feat: add scheduled tasks behind a 全部功能 button
- the sidebar footer gains 全部功能 left of 设置; its page lists the features the server offers, planned tasks for now - 计划任务 follows the web client: a project (or the chats scope) picked at the top, then its tasks with schedule, last result, next run, model and error; the switch pauses, the menu runs now, edits or deletes - the editor covers name, prompt, daily/weekly/once/cron schedules (Chinese date and time pickers), several times a day, weekdays, cron examples, enabled, and either the session defaults or a fixed model and agent - the same /api/projects/:id/scheduled-tasks endpoints the web uses; a server without them says so instead of failing silently - the app now pins zh_CN localizations, so the built-in pickers and menus are Chinese too - bump to 0.5.1
This commit is contained in:
1 parent
2f5ce61692
commit
da4bfb6826
13 files changed
+1612
-3
No files matched your search
@@ -7,6 +7,7 @@ import 'package:flutter_slidable/flutter_slidable.dart';
|
||||
import '../api/models.dart';
|
||||
import '../state.dart';
|
||||
import '../widgets/project_icon.dart';
|
||||
import 'features_screen.dart';
|
||||
import 'servers_screen.dart';
|
||||
import 'settings_screen.dart';
|
||||
|
||||
@@ -185,6 +186,11 @@ class _SessionListPaneState extends State<SessionListPane> {
|
||||
),
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.widgets_outlined),
|
||||
tooltip: '全部功能',
|
||||
onPressed: _openFeatures,
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.settings_outlined),
|
||||
tooltip: '设置',
|
||||
@@ -196,6 +202,13 @@ class _SessionListPaneState extends State<SessionListPane> {
|
||||
);
|
||||
}
|
||||
|
||||
void _openFeatures() {
|
||||
widget.onOpened?.call();
|
||||
Navigator.of(context).push(MaterialPageRoute(
|
||||
builder: (_) => FeaturesScreen(app: _app),
|
||||
));
|
||||
}
|
||||
|
||||
void _openSettings() {
|
||||
// A phone's list is a drawer: close it before the settings page covers
|
||||
// the shell.
|
||||
|
||||
Reference in new issue
Block a user