Phase 4.5: Completed responsive player layout and real username integration

This commit is contained in:
2026-03-18 15:36:08 +08:00
parent 9c7261cbda
commit f21498717b
4 changed files with 170 additions and 88 deletions

View File

@@ -32,7 +32,7 @@ class _LoginPageState extends State<LoginPage> {
final response = await api.login(_usernameController.text, _passwordController.text);
if (response.statusCode == 200) {
final data = jsonDecode(response.body);
await auth.login(data['token']);
await auth.login(data['token'], data['username']);
} else {
final error = jsonDecode(response.body)['error'] ?? "Login Failed";
ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text(error)));