This commit is contained in:
0XE
2025-03-04 20:46:17 +08:00
committed by GitHub
parent 1ee8786ab7
commit 7ea7ca1415
3 changed files with 71 additions and 21 deletions

View File

@@ -199,7 +199,19 @@ export async function copyIconFile(
path: string,
name: "common" | "sysproxy" | "tun",
) {
return invoke<void>("copy_icon_file", { path, name });
const key = `icon_${name}_update_time`;
const previousTime = localStorage.getItem(key) || "";
const currentTime = String(Date.now());
localStorage.setItem(key, currentTime);
const iconInfo = {
name,
previous_t: previousTime,
current_t: currentTime,
};
return invoke<void>("copy_icon_file", { path, iconInfo });
}
export async function downloadIconCache(url: string, name: string) {