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:
@@ -88,7 +88,7 @@ class _AddTaskPageState extends ConsumerState<AddTaskPage> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
height: 15,
|
||||
),
|
||||
const Text(
|
||||
"名称:",
|
||||
@@ -97,9 +97,6 @@ class _AddTaskPageState extends ConsumerState<AddTaskPage> {
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
TextField(
|
||||
focusNode: focusNode,
|
||||
controller: _nameController,
|
||||
@@ -121,7 +118,7 @@ class _AddTaskPageState extends ConsumerState<AddTaskPage> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
height: 15,
|
||||
),
|
||||
const Text(
|
||||
"命令:",
|
||||
@@ -130,9 +127,6 @@ class _AddTaskPageState extends ConsumerState<AddTaskPage> {
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
TextField(
|
||||
controller: _commandController,
|
||||
maxLines: 4,
|
||||
@@ -155,7 +149,7 @@ class _AddTaskPageState extends ConsumerState<AddTaskPage> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
height: 15,
|
||||
),
|
||||
const Text(
|
||||
"定时:",
|
||||
@@ -164,9 +158,6 @@ class _AddTaskPageState extends ConsumerState<AddTaskPage> {
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
TextField(
|
||||
controller: _cronController,
|
||||
decoration: const InputDecoration(
|
||||
@@ -213,10 +204,12 @@ class _AddTaskPageState extends ConsumerState<AddTaskPage> {
|
||||
taskBean.name = _nameController.text;
|
||||
taskBean.command = _commandController.text;
|
||||
taskBean.schedule = _cronController.text;
|
||||
HttpResponse<NullResponse> response = await Api.addTask(_nameController.text, _commandController.text, _cronController.text, id: taskBean.sId);
|
||||
HttpResponse<NullResponse> response = await Api.addTask(
|
||||
_nameController.text, _commandController.text, _cronController.text,
|
||||
id: taskBean.sId);
|
||||
|
||||
if (response.success) {
|
||||
"操作成功".toast();
|
||||
(widget.taskBean?.sId == null) ? "新增成功" : "修改成功".toast();
|
||||
ref.read(taskProvider).updateBean(taskBean);
|
||||
Navigator.of(context).pop();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user