Initial clean project import

This commit is contained in:
cat-shark
2026-06-19 18:41:41 +08:00
commit a13b804c7a
1306 changed files with 220568 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
import { ipcRenderer } from "electron";
const all = async (group: string) => {
return ipcRenderer.invoke("storage:all", group);
};
const get = async (group: string, key: string, defaultValue: any) => {
return ipcRenderer.invoke("storage:get", group, key, JSON.parse(JSON.stringify(defaultValue)));
};
const set = async (group: string, key: string, value: any) => {
return ipcRenderer.invoke("storage:set", group, key, JSON.parse(JSON.stringify(value)));
};
const read = async (group: string, defaultValue: any = null) => {
return ipcRenderer.invoke("storage:read", group, JSON.parse(JSON.stringify(defaultValue)));
};
const write = async (group: string, value: any) => {
return ipcRenderer.invoke("storage:write", group, JSON.parse(JSON.stringify(value)));
};
export default {
all,
get,
set,
read,
write,
};