Skip to content

Commit

Permalink
20240324 update2
Browse files Browse the repository at this point in the history
  • Loading branch information
neko0xff committed Mar 24, 2024
1 parent 267b740 commit 621d181
Show file tree
Hide file tree
Showing 6 changed files with 152 additions and 36 deletions.
27 changes: 23 additions & 4 deletions src/demo/viewapp_master/lib/pages/out/about.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ class AboutPage extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("關於本App"),
title: const Text("關於本App",
style: TextStyle(
color: Colors.black, // 設置文字顏色為黑色
),
),
automaticallyImplyLeading: true,
),
backgroundColor: Colors.white,
Expand Down Expand Up @@ -111,8 +115,13 @@ class btnGithub extends StatelessWidget {
width: 200.0,
height: 50.0,
child: ElevatedButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all<Color>(Colors.yellow),
),
onPressed: launchURL,
child: const Text("Github"),
child: const Text("Github",
style: TextStyle(color: Colors.black)
),
),
);
}
Expand All @@ -133,8 +142,13 @@ class btnTwitter extends StatelessWidget {
width: 200.0,
height: 50.0,
child: ElevatedButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all<Color>(Colors.yellow),
),
onPressed: launchURL,
child: const Text("X(Twitter)"),
child: const Text("X(Twitter)",
style: TextStyle(color: Colors.black)
),
),
);
}
Expand All @@ -155,8 +169,13 @@ class btnMastdon extends StatelessWidget {
width: 200.0,
height: 50.0,
child: ElevatedButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all<Color>(Colors.yellow),
),
onPressed: launchURL,
child: const Text("Mastdon(mas.to)"),
child: const Text("Mastdon(mas.to)",
style: TextStyle(color: Colors.black)
),
),
);
}
Expand Down
18 changes: 16 additions & 2 deletions src/demo/viewapp_master/lib/pages/user/changePassword.dart
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,12 @@ class btnClear extends StatelessWidget {
width: 100.0,
height: 40.0,
child: ElevatedButton(
child: const Text("Clear"),
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all<Color>(Colors.yellow),
),
child: const Text("Clear",
style: TextStyle(color: Colors.black)
),
onPressed: () {
clearInput();
},
Expand All @@ -248,7 +253,12 @@ class btnUpdateSend extends StatelessWidget {
width: 100.0,
height: 40.0,
child: ElevatedButton(
child: const Text("Update"),
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all<Color>(Colors.yellow),
),
child: const Text("Update",
style: TextStyle(color: Colors.black)
),
onPressed: () {
sendUserData(context);
},
Expand Down Expand Up @@ -315,6 +325,7 @@ class btnUpdateSend extends StatelessWidget {
return AlertDialog(
title: const Text('Update User Finnish!'),
content: const Text('Please Go to Login Page,You now can Login!'),
backgroundColor: Colors.yellow,
actions: <Widget>[
ElevatedButton(
child: const Text('OK'),
Expand All @@ -336,6 +347,7 @@ class btnUpdateSend extends StatelessWidget {
return AlertDialog(
title: const Text('User Data Update Fail!'),
content: const Text('Please check you are Input Data!'),
backgroundColor: Colors.yellow,
actions: <Widget>[
ElevatedButton(
child: const Text('OK'),
Expand All @@ -357,6 +369,7 @@ class btnUpdateSend extends StatelessWidget {
return AlertDialog(
title: const Text('Network Connection Fail!'),
content: const Text('Please check you are Network & Server!'),
backgroundColor: Colors.yellow,
actions: <Widget>[
ElevatedButton(
child: const Text('OK'),
Expand All @@ -378,6 +391,7 @@ class btnUpdateSend extends StatelessWidget {
return AlertDialog(
title: const Text('Password Fail!'),
content: const Text('Please check you are Password!'),
backgroundColor: Colors.yellow,
actions: <Widget>[
ElevatedButton(
child: const Text('OK'),
Expand Down
23 changes: 20 additions & 3 deletions src/demo/viewapp_master/lib/pages/user/forget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,12 @@ class btnToLoginPage extends StatelessWidget {
width: 150.0,
height: 100.0,
child: ElevatedButton(
child: const Text("Login"),
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all<Color>(Colors.yellow),
),
child: const Text("Login",
style: TextStyle(color: Colors.black)
),
onPressed: () {
pushToLogin(context);
},
Expand All @@ -173,7 +178,12 @@ class btnClear extends StatelessWidget {
width: 150.0,
height: 100.0,
child: ElevatedButton(
child: const Text("Clear"),
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all<Color>(Colors.yellow),
),
child: const Text("Clear",
style: TextStyle(color: Colors.black)
),
onPressed: () {
clearInput();
},
Expand All @@ -196,7 +206,12 @@ class btnforgetSend extends StatelessWidget {
width: 150.0,
height: 100.0,
child: ElevatedButton(
child: const Text("Forget"),
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all<Color>(Colors.yellow),
),
child: const Text("Forget",
style: TextStyle(color: Colors.black)
),
onPressed: () {
checkInputNull(context);
cnServer(context);
Expand Down Expand Up @@ -256,6 +271,7 @@ class btnforgetSend extends StatelessWidget {
return AlertDialog(
title: const Text('Forget Fail!'),
content: const Text('Please check you are Input Data!'),
backgroundColor: Colors.yellow,
actions: <Widget>[
ElevatedButton(
child: const Text('OK'),
Expand All @@ -277,6 +293,7 @@ class btnforgetSend extends StatelessWidget {
return AlertDialog(
title: const Text('Network Connection Fail!'),
content: const Text('Please check you are Network & Server!'),
backgroundColor: Colors.yellow,
actions: <Widget>[
ElevatedButton(
child: const Text('OK'),
Expand Down
54 changes: 39 additions & 15 deletions src/demo/viewapp_master/lib/pages/user/login.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ const focusedcolor = Colors.green;
const enablecolor = Colors.black;

class LoginPage extends StatelessWidget {
const LoginPage({super.key});
const LoginPage({Key? key});

@override
Widget build(BuildContext context) {
return const Scaffold(
return Scaffold(
backgroundColor: Colors.white,
body: InputGet(),
);
Expand All @@ -39,12 +39,11 @@ class InputGet extends StatelessWidget {
child: Column(
children: <Widget>[
wallpaperLogin(),
const SizedBox(height: 10.0),
const LoginStr(),
const SizedBox(height: 10.0),
const btnView(),
const SizedBox(height: 10.0),
//const PWA_Install(),
SizedBox(height: 20.0),
LoginStr(),
SizedBox(height: 20.0),
btnView(),
SizedBox(height: 20.0),
],
),
);
Expand All @@ -55,10 +54,16 @@ class LoginStr extends StatelessWidget {
const LoginStr({Key? key});
@override
Widget build(BuildContext context) {
return const Column(
return Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[tbServerSource(), tbUsername(), tbPassword()],
children: const <Widget>[
tbServerSource(),
SizedBox(height: 10),
tbUsername(),
SizedBox(height: 10),
tbPassword(),
],
);
}
}
Expand Down Expand Up @@ -144,6 +149,7 @@ class btnView extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(width: 50.0),
btnLoginSend(),
SizedBox(width: 50.0)
],
Expand Down Expand Up @@ -172,7 +178,12 @@ class btnLoginSend extends StatelessWidget {
width: 150.0,
height: 100.0,
child: ElevatedButton(
child: const Text("Login"),
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all<Color>(Colors.yellow),
),
child: const Text("Login",
style: TextStyle(color: Colors.black)
),
onPressed: () {
checkInputNull(context);
sendUserData(context);
Expand Down Expand Up @@ -247,6 +258,7 @@ class btnLoginSend extends StatelessWidget {
return AlertDialog(
title: const Text('Login Fail!'),
content: const Text('Please check you are Input Data!'),
backgroundColor: Colors.yellow,
actions: <Widget>[
ElevatedButton(
child: const Text('OK'),
Expand All @@ -268,6 +280,7 @@ class btnLoginSend extends StatelessWidget {
return AlertDialog(
title: const Text('Password Fail!'),
content: const Text('Please check you are Password!'),
backgroundColor: Colors.yellow,
actions: <Widget>[
ElevatedButton(
child: const Text('OK'),
Expand All @@ -290,9 +303,11 @@ class btnLoginSend extends StatelessWidget {
return AlertDialog(
title: const Text('Network Connection Fail!'),
content: const Text('Please check you are Network & Server!'),
backgroundColor: Colors.yellow,
actions: <Widget>[
ElevatedButton(
child: const Text('OK'),
child: const Text('OK',
),
onPressed: () {
pushToLogin(context);
},
Expand All @@ -318,14 +333,18 @@ class btnClear extends StatelessWidget {
width: 150.0,
height: 100.0,
child: ElevatedButton(
child: const Text("Clear"),
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all<Color>(Colors.yellow),
),
child: const Text("Clear",
style: TextStyle(color: Colors.black)
),
onPressed: () {
clearInput();
},
),
);
}

void clearInput() {
serverSourceStr.text = "";
usernameStr.text = "";
Expand All @@ -347,7 +366,12 @@ class btnToforgetPage extends StatelessWidget {
width: 150.0,
height: 100.0,
child: ElevatedButton(
child: const Text("Forget"),
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all<Color>(Colors.yellow),
),
child: const Text("Forget",
style: TextStyle(color: Colors.black)
),
onPressed: () {
pushToforget(context);
},
Expand Down
Loading

0 comments on commit 621d181

Please sign in to comment.