Skip to content

Commit

Permalink
20240502 update
Browse files Browse the repository at this point in the history
  • Loading branch information
neko0xff committed May 2, 2024
1 parent 6cf6886 commit 2b21d96
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 59 deletions.
10 changes: 9 additions & 1 deletion src/demo/viewapp_master/lib/pages/user/changePassword.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ class changePasswordPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("忘記密碼",
style: TextStyle(
color: Colors.black, // 設置文字顏色為黑色
),
),
automaticallyImplyLeading: true,
),
backgroundColor: Colors.white,
body: InputGet(
key: null,
Expand Down Expand Up @@ -141,7 +149,7 @@ class InputTip extends StatelessWidget {
const SizedBox(height: 10),
const Column(
children: [
Text("Please Input New Password!",
Text("請輸新的密碼,且按下Update進行生效!",
style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold)),
SizedBox(height: 10)
],
Expand Down
41 changes: 10 additions & 31 deletions src/demo/viewapp_master/lib/pages/user/forget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,15 @@ class forgetPage extends StatelessWidget {

@override
Widget build(BuildContext context) {
return const Scaffold(
return Scaffold(
appBar: AppBar(
title: const Text("忘記密碼",
style: TextStyle(
color: Colors.black, // 設置文字顏色為黑色
),
),
automaticallyImplyLeading: true,
),
backgroundColor: Colors.white,
body: InputGet(),
);
Expand Down Expand Up @@ -133,42 +141,13 @@ class btnView extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
SizedBox(width: 20.0),
btnToLoginPage(),
SizedBox(width: 20.0),
]),
],
);
}
}

class btnToLoginPage extends StatelessWidget {
const btnToLoginPage({super.key});

//跳回登入主頁
void pushToLogin(BuildContext context) {
Navigator.pushNamed(context, '/login');
}

@override
Widget build(BuildContext context) {
return SizedBox(
width: 150.0,
height: 100.0,
child: ElevatedButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all<Color>(Colors.yellow),
),
child: const Text("Login",
style: TextStyle(color: Colors.black)
),
onPressed: () {
pushToLogin(context);
},
),
);
}
}

class btnClear extends StatelessWidget {
const btnClear({super.key});

Expand Down Expand Up @@ -209,7 +188,7 @@ class btnforgetSend extends StatelessWidget {
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all<Color>(Colors.yellow),
),
child: const Text("Forget",
child: const Text("Next",
style: TextStyle(color: Colors.black)
),
onPressed: () {
Expand Down
10 changes: 9 additions & 1 deletion src/demo/viewapp_user/lib/pages/user/changePassword.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ class changePasswordPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("忘記密碼",
style: TextStyle(
color: Colors.black, // 設置文字顏色為黑色
),
),
automaticallyImplyLeading: true,
),
body: InputGet(
key: null,
username: username,
Expand Down Expand Up @@ -137,7 +145,7 @@ class InputTip extends StatelessWidget {
const SizedBox(height: 10),
const Column(
children: [
Text("Please Input New Password!",
Text("請輸新的密碼,且按下Update進行生效!",
style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold)),
SizedBox(height: 10)
],
Expand Down
36 changes: 10 additions & 26 deletions src/demo/viewapp_user/lib/pages/user/forget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@ class forgetPage extends StatelessWidget {

@override
Widget build(BuildContext context) {
return const Scaffold(
return Scaffold(
appBar: AppBar(
title: const Text("忘記密碼",
style: TextStyle(
color: Colors.black, // 設置文字顏色為黑色
),
),
automaticallyImplyLeading: true,
),
body: InputGet(),
);
}
Expand Down Expand Up @@ -129,37 +137,13 @@ class btnView extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
SizedBox(width: 20.0),
btnToLoginPage(),
SizedBox(width: 20.0),
]),
],
);
}
}

class btnToLoginPage extends StatelessWidget {
const btnToLoginPage({super.key});

//跳回登入主頁
void pushToLogin(BuildContext context) {
Navigator.pushNamed(context, '/login');
}

@override
Widget build(BuildContext context) {
return SizedBox(
width: 150.0,
height: 100.0,
child: ElevatedButton(
child: const Text("Login"),
onPressed: () {
pushToLogin(context);
},
),
);
}
}

class btnClear extends StatelessWidget {
const btnClear({super.key});

Expand Down Expand Up @@ -192,7 +176,7 @@ class btnforgetSend extends StatelessWidget {
width: 150.0,
height: 100.0,
child: ElevatedButton(
child: const Text("Forget"),
child: const Text("Next"),
onPressed: () {
checkInputNull(context);
cnServer(context);
Expand Down

0 comments on commit 2b21d96

Please sign in to comment.