mirror of
https://github.com/qinglong-app/qinglong_app.git
synced 2025-10-09 16:48:19 +08:00
增加client_id登录方式
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
Android端去[release](https://github.com/qinglong-app/qinglong_app/releases)下载
|
Android端去[release](https://github.com/qinglong-app/qinglong_app/releases)下载
|
||||||
|
|
||||||
本人没有iOS开发者账号,iOS端用户自行下载main分支源码编译安装
|
iOS端暂无上架打算,用户自行下载main分支源码编译安装
|
||||||
|
|
||||||
目前只支持用户名密码登录,不用担心,你的用户名密码不会泄露
|
目前只支持用户名密码登录,不用担心,你的用户名密码不会泄露
|
||||||
|
|
||||||
@@ -44,4 +44,3 @@ Android端去[release](https://github.com/qinglong-app/qinglong_app/releases)下
|
|||||||
>* 应用设置
|
>* 应用设置
|
||||||
>* 通知设置
|
>* 通知设置
|
||||||
>* 脚本管理中的增删改和调试
|
>* 脚本管理中的增删改和调试
|
||||||
>* 暂不支持通过Client ID/Client Secret登录
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class UserInfoViewModel {
|
|||||||
_passWord = SpUtil.getString(spPassWord);
|
_passWord = SpUtil.getString(spPassWord);
|
||||||
|
|
||||||
_useSecertLogined = SpUtil.getBool(spSecretLogined, defValue: false);
|
_useSecertLogined = SpUtil.getBool(spSecretLogined, defValue: false);
|
||||||
_host = SpUtil.getString(spHost, defValue: 'http://1.1.1.1:5700');
|
_host = SpUtil.getString(spHost, defValue: '');
|
||||||
|
|
||||||
if (userInfoJson.isNotEmpty) {
|
if (userInfoJson.isNotEmpty) {
|
||||||
_token = userInfoJson;
|
_token = userInfoJson;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import 'package:qinglong_app/base/routes.dart';
|
|||||||
import 'package:qinglong_app/base/theme.dart';
|
import 'package:qinglong_app/base/theme.dart';
|
||||||
import 'package:qinglong_app/base/userinfo_viewmodel.dart';
|
import 'package:qinglong_app/base/userinfo_viewmodel.dart';
|
||||||
import 'package:qinglong_app/main.dart';
|
import 'package:qinglong_app/main.dart';
|
||||||
|
import 'package:qinglong_app/utils/extension.dart';
|
||||||
class OtherPage extends ConsumerStatefulWidget {
|
class OtherPage extends ConsumerStatefulWidget {
|
||||||
const OtherPage({Key? key}) : super(key: key);
|
const OtherPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
@@ -57,7 +57,10 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
|||||||
Text(
|
Text(
|
||||||
"脚本管理",
|
"脚本管理",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: ref.watch(themeProvider).themeColor.titleColor(),
|
color: ref
|
||||||
|
.watch(themeProvider)
|
||||||
|
.themeColor
|
||||||
|
.titleColor(),
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -90,7 +93,10 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
|||||||
Text(
|
Text(
|
||||||
"依赖管理",
|
"依赖管理",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: ref.watch(themeProvider).themeColor.titleColor(),
|
color: ref
|
||||||
|
.watch(themeProvider)
|
||||||
|
.themeColor
|
||||||
|
.titleColor(),
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -123,7 +129,10 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
|||||||
Text(
|
Text(
|
||||||
"任务日志",
|
"任务日志",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: ref.watch(themeProvider).themeColor.titleColor(),
|
color: ref
|
||||||
|
.watch(themeProvider)
|
||||||
|
.themeColor
|
||||||
|
.titleColor(),
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -142,9 +151,13 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
|||||||
GestureDetector(
|
GestureDetector(
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context).pushNamed(
|
if (getIt<UserInfoViewModel>().useSecretLogined) {
|
||||||
Routes.routeLoginLog,
|
"使用client_id方式登录无法获取登录日志".toast();
|
||||||
);
|
} else {
|
||||||
|
Navigator.of(context).pushNamed(
|
||||||
|
Routes.routeLoginLog,
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
@@ -157,7 +170,10 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
|||||||
Text(
|
Text(
|
||||||
"登录日志",
|
"登录日志",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: ref.watch(themeProvider).themeColor.titleColor(),
|
color: ref
|
||||||
|
.watch(themeProvider)
|
||||||
|
.themeColor
|
||||||
|
.titleColor(),
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -201,7 +217,8 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
|||||||
Text(
|
Text(
|
||||||
"夜间模式",
|
"夜间模式",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: ref.watch(themeProvider).themeColor.titleColor(),
|
color:
|
||||||
|
ref.watch(themeProvider).themeColor.titleColor(),
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -250,7 +267,8 @@ class _OtherPageState extends ConsumerState<OtherPage> {
|
|||||||
child: const Text("确定"),
|
child: const Text("确定"),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
getIt<UserInfoViewModel>().updateToken("");
|
getIt<UserInfoViewModel>().updateToken("");
|
||||||
Navigator.of(context).pushReplacementNamed(Routes.routeLogin);
|
Navigator.of(context)
|
||||||
|
.pushReplacementNamed(Routes.routeLogin);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ class _AddTaskPageState extends ConsumerState<AddTaskPage> {
|
|||||||
height: 5,
|
height: 5,
|
||||||
),
|
),
|
||||||
const Text(
|
const Text(
|
||||||
"定时的cron不校验,自己确保写的是正确的cron",
|
"定时的cron不校验是否正确",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
name: qinglong_app
|
name: qinglong_app
|
||||||
description: A new Flutter project.
|
description: A new Flutter project.
|
||||||
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||||
version: 1.0.0+1
|
version: 1.0.1+2
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.15.1 <3.0.0"
|
sdk: ">=2.15.1 <3.0.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user