feat: tray enhance (#5058)
* feat: proxy group sorting for tray * feat(tray): add inline proxy groups toggle
This commit is contained in:
@@ -22,6 +22,7 @@ import { useWindowDecorations } from "@/hooks/use-window";
|
||||
import { copyIconFile, getAppDir } from "@/services/cmds";
|
||||
import { showNotice } from "@/services/noticeService";
|
||||
import getSystem from "@/utils/get-system";
|
||||
|
||||
import { GuardState } from "./guard-state";
|
||||
|
||||
const OS = getSystem();
|
||||
@@ -263,6 +264,19 @@ export const LayoutViewer = forwardRef<DialogRef>((props, ref) => {
|
||||
</GuardState>
|
||||
</Item>
|
||||
)}
|
||||
<Item>
|
||||
<ListItemText primary={t("Show Proxy Groups Inline")} />
|
||||
<GuardState
|
||||
value={verge?.tray_inline_proxy_groups ?? false}
|
||||
valueProps="checked"
|
||||
onCatch={onError}
|
||||
onFormat={onSwitchFormat}
|
||||
onChange={(e) => onChangeData({ tray_inline_proxy_groups: e })}
|
||||
onGuard={(e) => patchVerge({ tray_inline_proxy_groups: e })}
|
||||
>
|
||||
<Switch edge="end" />
|
||||
</GuardState>
|
||||
</Item>
|
||||
|
||||
<Item>
|
||||
<ListItemText primary={t("Common Tray Icon")} />
|
||||
|
||||
@@ -512,6 +512,7 @@
|
||||
"Direct Mode": "Direct Mode",
|
||||
"Enable Tray Speed": "Enable Tray Speed",
|
||||
"Enable Tray Icon": "Enable Tray Icon",
|
||||
"Show Proxy Groups Inline": "Show Proxy Groups Inline",
|
||||
"LightWeight Mode": "Lightweight Mode",
|
||||
"LightWeight Mode Info": "Close the GUI and keep only the kernel running",
|
||||
"LightWeight Mode Settings": "LightWeight Mode Settings",
|
||||
|
||||
@@ -512,6 +512,7 @@
|
||||
"Direct Mode": "直连模式",
|
||||
"Enable Tray Speed": "启用托盘速率",
|
||||
"Enable Tray Icon": "启用托盘图标",
|
||||
"Show Proxy Groups Inline": "将代理组显示在托盘一级菜单",
|
||||
"LightWeight Mode": "轻量模式",
|
||||
"LightWeight Mode Info": "关闭GUI界面,仅保留内核运行",
|
||||
"LightWeight Mode Settings": "轻量模式设置",
|
||||
|
||||
@@ -437,6 +437,7 @@
|
||||
"Direct Mode": "直連模式",
|
||||
"Enable Tray Speed": "啟用托盤速率",
|
||||
"Enable Tray Icon": "啟用托盤圖標",
|
||||
"Show Proxy Groups Inline": "將代理組顯示在托盤一級選單",
|
||||
"LightWeight Mode": "輕量模式",
|
||||
"LightWeight Mode Info": "關閉GUI界面,僅保留內核運行",
|
||||
"LightWeight Mode Settings": "輕量模式設置",
|
||||
|
||||
1
src/services/types.d.ts
vendored
1
src/services/types.d.ts
vendored
@@ -802,6 +802,7 @@ interface IVergeConfig {
|
||||
tun_tray_icon?: boolean;
|
||||
enable_tray_speed?: boolean;
|
||||
enable_tray_icon?: boolean;
|
||||
tray_inline_proxy_groups?: boolean;
|
||||
enable_tun_mode?: boolean;
|
||||
enable_auto_light_weight_mode?: boolean;
|
||||
auto_light_weight_minutes?: number;
|
||||
|
||||
Reference in New Issue
Block a user