mirror of
https://github.com/viarotel-org/escrcpy.git
synced 2024-11-30 18:24:27 +01:00
26 lines
480 B
JavaScript
26 lines
480 B
JavaScript
|
import Store from 'electron-store'
|
||
|
import { createProxy } from './index.js'
|
||
|
|
||
|
const appStore = new Store()
|
||
|
|
||
|
appStore.onDidAnyChange(() => {
|
||
|
console.log('appStore.onDidAnyChange', appStore.store)
|
||
|
})
|
||
|
|
||
|
export default {
|
||
|
...createProxy(appStore, [
|
||
|
'set',
|
||
|
'get',
|
||
|
'delete',
|
||
|
'clear',
|
||
|
'reset',
|
||
|
'has',
|
||
|
'onDidChange',
|
||
|
'onDidAnyChange',
|
||
|
'openInEditor',
|
||
|
]),
|
||
|
...appStore,
|
||
|
getAll: () => appStore.store,
|
||
|
setAll: value => (appStore.store = value),
|
||
|
}
|