This commit is contained in:
2025-03-10 10:50:06 +08:00
commit 81c79275aa
65 changed files with 3648 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
export const checkIsElectron = () => {
return typeof window !== 'undefined' && typeof window.electron === 'object';
};
export const getElectron = () => {
return window.electron;
};
export const saveAppConfig = async (config) => {
const check = checkIsElectron();
if (!check) {
console.log('not electron');
return [];
}
const electron = getElectron();
const saveResult = await electron.ipcRenderer.invoke('save-app-config', config);
return saveResult;
};
export const relunch = async () => {
const check = checkIsElectron();
if (!check) {
console.log('not electron');
return [];
}
};