增加client_id登录方式

This commit is contained in:
NewTab
2022-01-19 20:35:14 +08:00
parent e8694643d8
commit 364c0da236
5 changed files with 33 additions and 16 deletions

View File

@@ -5,7 +5,7 @@ import 'package:qinglong_app/base/routes.dart';
import 'package:qinglong_app/base/theme.dart';
import 'package:qinglong_app/base/userinfo_viewmodel.dart';
import 'package:qinglong_app/main.dart';
import 'package:qinglong_app/utils/extension.dart';
class OtherPage extends ConsumerStatefulWidget {
const OtherPage({Key? key}) : super(key: key);
@@ -57,7 +57,10 @@ class _OtherPageState extends ConsumerState<OtherPage> {
Text(
"脚本管理",
style: TextStyle(
color: ref.watch(themeProvider).themeColor.titleColor(),
color: ref
.watch(themeProvider)
.themeColor
.titleColor(),
fontSize: 16,
),
),
@@ -90,7 +93,10 @@ class _OtherPageState extends ConsumerState<OtherPage> {
Text(
"依赖管理",
style: TextStyle(
color: ref.watch(themeProvider).themeColor.titleColor(),
color: ref
.watch(themeProvider)
.themeColor
.titleColor(),
fontSize: 16,
),
),
@@ -123,7 +129,10 @@ class _OtherPageState extends ConsumerState<OtherPage> {
Text(
"任务日志",
style: TextStyle(
color: ref.watch(themeProvider).themeColor.titleColor(),
color: ref
.watch(themeProvider)
.themeColor
.titleColor(),
fontSize: 16,
),
),
@@ -142,9 +151,13 @@ class _OtherPageState extends ConsumerState<OtherPage> {
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
Navigator.of(context).pushNamed(
Routes.routeLoginLog,
);
if (getIt<UserInfoViewModel>().useSecretLogined) {
"使用client_id方式登录无法获取登录日志".toast();
} else {
Navigator.of(context).pushNamed(
Routes.routeLoginLog,
);
}
},
child: Padding(
padding: const EdgeInsets.symmetric(
@@ -157,7 +170,10 @@ class _OtherPageState extends ConsumerState<OtherPage> {
Text(
"登录日志",
style: TextStyle(
color: ref.watch(themeProvider).themeColor.titleColor(),
color: ref
.watch(themeProvider)
.themeColor
.titleColor(),
fontSize: 16,
),
),
@@ -201,7 +217,8 @@ class _OtherPageState extends ConsumerState<OtherPage> {
Text(
"夜间模式",
style: TextStyle(
color: ref.watch(themeProvider).themeColor.titleColor(),
color:
ref.watch(themeProvider).themeColor.titleColor(),
fontSize: 16,
),
),
@@ -250,7 +267,8 @@ class _OtherPageState extends ConsumerState<OtherPage> {
child: const Text("确定"),
onPressed: () {
getIt<UserInfoViewModel>().updateToken("");
Navigator.of(context).pushReplacementNamed(Routes.routeLogin);
Navigator.of(context)
.pushReplacementNamed(Routes.routeLogin);
},
),
],

View File

@@ -170,7 +170,7 @@ class _AddTaskPageState extends ConsumerState<AddTaskPage> {
height: 5,
),
const Text(
"定时的cron不校验,自己确保写的是正确的cron",
"定时的cron不校验是否正确",
style: TextStyle(
fontSize: 12,
),