mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-08 17:40:28 +00:00
feat: add show item on system tray (#533)
This commit is contained in:
4 files changed
+10
-1
No files matched your search
@@ -198,6 +198,13 @@ class AppController extends GetxController with WindowListener, TrayListener {
|
|||||||
await trayManager.setIcon('assets/tray_icon/icon.png');
|
await trayManager.setIcon('assets/tray_icon/icon.png');
|
||||||
}
|
}
|
||||||
final menu = Menu(items: [
|
final menu = Menu(items: [
|
||||||
|
MenuItem(
|
||||||
|
label: "show".tr,
|
||||||
|
onClick: (menuItem) async => {
|
||||||
|
await windowManager.show(),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
MenuItem.separator(),
|
||||||
MenuItem(
|
MenuItem(
|
||||||
label: "create".tr,
|
label: "create".tr,
|
||||||
onClick: (menuItem) async => {
|
onClick: (menuItem) async => {
|
||||||
@@ -205,7 +212,6 @@ class AppController extends GetxController with WindowListener, TrayListener {
|
|||||||
await Get.rootDelegate.offAndToNamed(Routes.CREATE),
|
await Get.rootDelegate.offAndToNamed(Routes.CREATE),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
MenuItem.separator(),
|
|
||||||
MenuItem(
|
MenuItem(
|
||||||
label: "startAll".tr,
|
label: "startAll".tr,
|
||||||
onClick: (menuItem) async => {continueAllTasks()},
|
onClick: (menuItem) async => {continueAllTasks()},
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ const enUS = {
|
|||||||
'set': 'SET',
|
'set': 'SET',
|
||||||
'portInUse': 'Port [@port] is in use, please change the port',
|
'portInUse': 'Port [@port] is in use, please change the port',
|
||||||
'effectAfterRestart': 'Effect after restart',
|
'effectAfterRestart': 'Effect after restart',
|
||||||
|
'show': 'Show',
|
||||||
'startAll': 'Start All',
|
'startAll': 'Start All',
|
||||||
'pauseAll': 'Pause All',
|
'pauseAll': 'Pause All',
|
||||||
'deleteTask': 'Delete Task',
|
'deleteTask': 'Delete Task',
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ const zhCN = {
|
|||||||
'set': '已设置',
|
'set': '已设置',
|
||||||
'portInUse': '端口[@port]已被占用,请更换端口',
|
'portInUse': '端口[@port]已被占用,请更换端口',
|
||||||
'effectAfterRestart': '此配置项将在重启应用后生效',
|
'effectAfterRestart': '此配置项将在重启应用后生效',
|
||||||
|
'show': '显示',
|
||||||
'startAll': '全部开始',
|
'startAll': '全部开始',
|
||||||
'pauseAll': '全部暂停',
|
'pauseAll': '全部暂停',
|
||||||
'deleteTask': '删除任务',
|
'deleteTask': '删除任务',
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ const zhTW = {
|
|||||||
'set': '已設定',
|
'set': '已設定',
|
||||||
'portInUse': '端口[@port]已被占用,請更換端口',
|
'portInUse': '端口[@port]已被占用,請更換端口',
|
||||||
'effectAfterRestart': '重啟後生效',
|
'effectAfterRestart': '重啟後生效',
|
||||||
|
'show': '顯示',
|
||||||
'startAll': '全部開始',
|
'startAll': '全部開始',
|
||||||
'pauseAll': '全部暫停',
|
'pauseAll': '全部暫停',
|
||||||
'deleteTask': '刪除任務',
|
'deleteTask': '刪除任務',
|
||||||
|
|||||||
Reference in new issue
Block a user