mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-15 04:51:06 +02:00
Add initial files
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import Store from 'electron-store';
|
||||
import { app, ipcRenderer } from 'electron';
|
||||
|
||||
const store = new Store();
|
||||
|
||||
const set = (property: string, value: string | Record<string, unknown> | boolean) => {
|
||||
store.set(`${property}`, value);
|
||||
};
|
||||
|
||||
const get = (property: string) => {
|
||||
return store.get(`${property}`);
|
||||
};
|
||||
|
||||
const restart = () => {
|
||||
app.relaunch();
|
||||
app.exit(0);
|
||||
};
|
||||
|
||||
const enableMediaKeys = () => {
|
||||
ipcRenderer.send('global-media-keys-enable');
|
||||
};
|
||||
|
||||
const disableMediaKeys = () => {
|
||||
ipcRenderer.send('global-media-keys-disable');
|
||||
};
|
||||
|
||||
export const localSettings = {
|
||||
set,
|
||||
get,
|
||||
enableMediaKeys,
|
||||
disableMediaKeys,
|
||||
restart,
|
||||
};
|
||||
Reference in New Issue
Block a user