Skip to content

Commit

Permalink
feat: add show item on system tray (#533)
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyWie authored May 15, 2024
1 parent d1a5ed8 commit db6352a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,20 @@ class AppController extends GetxController with WindowListener, TrayListener {
await trayManager.setIcon('assets/tray_icon/icon.png');
}
final menu = Menu(items: [
MenuItem(
label: "show".tr,
onClick: (menuItem) async => {
await windowManager.show(),
},
),
MenuItem.separator(),
MenuItem(
label: "create".tr,
onClick: (menuItem) async => {
await windowManager.show(),
await Get.rootDelegate.offAndToNamed(Routes.CREATE),
},
),
MenuItem.separator(),
MenuItem(
label: "startAll".tr,
onClick: (menuItem) async => {continueAllTasks()},
Expand Down
1 change: 1 addition & 0 deletions ui/flutter/lib/i18n/langs/en_us.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const enUS = {
'set': 'SET',
'portInUse': 'Port [@port] is in use, please change the port',
'effectAfterRestart': 'Effect after restart',
'show': 'Show',
'startAll': 'Start All',
'pauseAll': 'Pause All',
'deleteTask': 'Delete Task',
Expand Down
1 change: 1 addition & 0 deletions ui/flutter/lib/i18n/langs/zh_cn.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const zhCN = {
'set': '已设置',
'portInUse': '端口[@port]已被占用,请更换端口',
'effectAfterRestart': '此配置项将在重启应用后生效',
'show': '显示',
'startAll': '全部开始',
'pauseAll': '全部暂停',
'deleteTask': '删除任务',
Expand Down
1 change: 1 addition & 0 deletions ui/flutter/lib/i18n/langs/zh_tw.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const zhTW = {
'set': '已設定',
'portInUse': '端口[@port]已被占用,請更換端口',
'effectAfterRestart': '重啟後生效',
'show': '顯示',
'startAll': '全部開始',
'pauseAll': '全部暫停',
'deleteTask': '刪除任務',
Expand Down

0 comments on commit db6352a

Please sign in to comment.