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