refactor: Optimize implementation of Custom tray icon
This commit is contained in:
@@ -139,6 +139,10 @@ export async function grantPermission(core: string) {
|
||||
return invoke<void>("grant_permission", { core });
|
||||
}
|
||||
|
||||
export async function getAppDir() {
|
||||
return invoke<string>("get_app_dir");
|
||||
}
|
||||
|
||||
export async function openAppDir() {
|
||||
return invoke<void>("open_app_dir").catch((err) =>
|
||||
Notice.error(err?.message || err.toString(), 1500)
|
||||
@@ -212,3 +216,10 @@ export async function getPortableFlag() {
|
||||
export async function exitApp() {
|
||||
return invoke("exit_app");
|
||||
}
|
||||
|
||||
export async function copyIconFile(
|
||||
path: string,
|
||||
name: "common.png" | "sysproxy.png" | "tun.png"
|
||||
) {
|
||||
return invoke<void>("copy_icon_file", { path, name });
|
||||
}
|
||||
|
||||
6
src/services/types.d.ts
vendored
6
src/services/types.d.ts
vendored
@@ -200,9 +200,9 @@ interface IVergeConfig {
|
||||
theme_mode?: "light" | "dark" | "system";
|
||||
traffic_graph?: boolean;
|
||||
enable_memory_usage?: boolean;
|
||||
common_tray_icon?: string;
|
||||
sysproxy_tray_icon?: string;
|
||||
tun_tray_icon?: string;
|
||||
common_tray_icon?: boolean;
|
||||
sysproxy_tray_icon?: boolean;
|
||||
tun_tray_icon?: boolean;
|
||||
enable_tun_mode?: boolean;
|
||||
enable_auto_launch?: boolean;
|
||||
enable_service_mode?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user