优化样式

This commit is contained in:
jyuesong
2022-01-20 13:33:52 +08:00
parent 4f8285fcf1
commit 130459d646
13 changed files with 241 additions and 66 deletions

View File

@@ -334,13 +334,23 @@ class DependencyCell extends ConsumerWidget {
content: Text("确认删除依赖 ${bean.name ?? ""}"),
actions: [
CupertinoDialogAction(
child: const Text("取消"),
child: const Text(
"取消",
style: TextStyle(
color: Color(0xff999999),
),
),
onPressed: () {
Navigator.of(context).pop();
},
),
CupertinoDialogAction(
child: const Text("确定"),
child: Text(
"确定",
style: TextStyle(
color: primaryColor,
),
),
onPressed: () {
Navigator.of(context).pop();
ref.read(dependencyProvider).del(type.name.toLowerCase(), sId ?? "");

View File

@@ -297,16 +297,26 @@ class _OtherPageState extends ConsumerState<OtherPage> {
showCupertinoDialog(
context: context,
builder: (context) => CupertinoAlertDialog(
title: const Text("退出登录吗?"),
title: const Text("退出登录吗?"),
actions: [
CupertinoDialogAction(
child: const Text("取消"),
child: const Text(
"取消",
style: TextStyle(
color: Color(0xff999999),
),
),
onPressed: () {
Navigator.of(context).pop();
},
),
CupertinoDialogAction(
child: const Text("确定"),
child: Text(
"确定",
style: TextStyle(
color: primaryColor,
),
),
onPressed: () {
getIt<UserInfoViewModel>().updateToken("");
Navigator.of(context).pushReplacementNamed(Routes.routeLogin);

View File

@@ -84,13 +84,23 @@ class _ScriptDetailPageState extends ConsumerState<ScriptDetailPage> with LazyLo
content: const Text("确认删除该脚本吗"),
actions: [
CupertinoDialogAction(
child: const Text("取消"),
child: const Text(
"取消",
style: TextStyle(
color: Color(0xff999999),
),
),
onPressed: () {
Navigator.of(context).pop();
},
),
CupertinoDialogAction(
child: const Text("确定"),
child: Text(
"确定",
style: TextStyle(
color: primaryColor,
),
),
onPressed: () async {
Navigator.of(context).pop();
HttpResponse<NullResponse> result = await Api.delScript(widget.title, widget.path ?? "");