mirror of
https://github.com/qinglong-app/qinglong_app.git
synced 2025-10-09 16:48:19 +08:00
add enable
This commit is contained in:
@@ -59,4 +59,12 @@ class Api {
|
||||
static Future<HttpResponse<NullResponse>> unpinTask(String cron) async {
|
||||
return await Http.put<NullResponse>(Url.UNPIN_TASK, [cron]);
|
||||
}
|
||||
|
||||
static Future<HttpResponse<NullResponse>> enableTask(String cron) async {
|
||||
return await Http.put<NullResponse>(Url.ENABLE_TASK, [cron]);
|
||||
}
|
||||
|
||||
static Future<HttpResponse<NullResponse>> disableTask(String cron) async {
|
||||
return await Http.put<NullResponse>(Url.DISABLE_TASK, [cron]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ class Url {
|
||||
static const ADD_TASK = "/api/crons";
|
||||
static const PIN_TASK = "/api/crons/pin";
|
||||
static const UNPIN_TASK = "/api/crons/unpin";
|
||||
static const ENABLE_TASK = "/api/crons/enable";
|
||||
static const DISABLE_TASK = "/api/crons/disable";
|
||||
|
||||
static INTIME_LOG(String cronId) {
|
||||
return "/api/crons/$cronId/log";
|
||||
|
||||
@@ -31,7 +31,10 @@ ThemeData lightTheme = ThemeData.light().copyWith(
|
||||
|
||||
abstract class ThemeColors {
|
||||
Color taskTitleColor();
|
||||
|
||||
Color searchBarBg();
|
||||
|
||||
Color pinColor();
|
||||
}
|
||||
|
||||
class LightartThemeColors extends ThemeColors {
|
||||
@@ -40,11 +43,15 @@ class LightartThemeColors extends ThemeColors {
|
||||
return Color(0xff333333);
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
Color searchBarBg() {
|
||||
return const Color(0xffF7F7F7);
|
||||
}
|
||||
|
||||
@override
|
||||
Color pinColor() {
|
||||
return const Color(0xffF7F7F7);
|
||||
}
|
||||
}
|
||||
|
||||
class DartThemeColors extends ThemeColors {
|
||||
@@ -53,10 +60,13 @@ class DartThemeColors extends ThemeColors {
|
||||
return Colors.white;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@override
|
||||
Color searchBarBg() {
|
||||
return const Color(0xff2E312E);
|
||||
}
|
||||
|
||||
@override
|
||||
Color pinColor() {
|
||||
return Colors.black12;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user