A small refactoring
ci/woodpecker/push/build Pipeline was successful Details

This commit is contained in:
Nikolai Rodionov 2024-04-19 13:41:50 +02:00
parent ea658ffe96
commit ad259dc553
Signed by: allanger
GPG Key ID: 0AA46A90E25592AD
2 changed files with 12 additions and 13 deletions

View File

@ -66,9 +66,7 @@ class _LoginFormState extends State<LoginForm> {
accountsGrpc.signIn(username, "", password).then((rs) {
window.localStorage["token"] = rs.token;
window.localStorage["uuid"] = rs.uuid;
setState(() {
});
Navigator.of(context, rootNavigator: true).pop();
}).catchError((e) {
print(e);
GrpcError error = e;

View File

@ -27,13 +27,7 @@ class MyApp extends StatelessWidget {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Softplayer',
home: Scaffold(
body: TestAlert(channel: channel),
appBar: AppBar(),
floatingActionButton: FloatingActionButton(
onPressed: () => print("1"),
),
),
home: TestAlert(channel: channel),
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
@ -53,7 +47,8 @@ class TestAlert extends StatelessWidget {
@override
Widget build(BuildContext context) {
if (!isSignedIn()) {
return Container(
return Scaffold(
body: Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/login_background.jpg"),
@ -61,9 +56,15 @@ class TestAlert extends StatelessWidget {
),
),
child: LoginForm(grpcChannel: channel),
);
));
} else {
return EnvirnomentList(channel: channel);
return Scaffold(
body: EnvirnomentList(channel: channel),
appBar: AppBar(),
floatingActionButton: FloatingActionButton(
onPressed: () => print("1"),
),
);
}
}
}