mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-15 13:00:25 +02:00
Add local settings
This commit is contained in:
@@ -1 +1,16 @@
|
||||
import isElectron from 'is-electron';
|
||||
|
||||
export * from './hooks/useDefaultSettings';
|
||||
|
||||
const ipc = isElectron() ? window.electron.ipcRenderer : null;
|
||||
|
||||
const get = (property: string) => ipc?.SETTINGS_GET({ property });
|
||||
|
||||
const set = (property: string, value: any) => {
|
||||
ipc?.SETTINGS_SET({ property, value });
|
||||
};
|
||||
|
||||
export const settings = {
|
||||
get,
|
||||
set,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user