wallpaper-state.service.ts 332 B

123456789101112131415
  1. import Store from 'electron-store'
  2. interface StoreSchema {
  3. activeWallpaperId?: string
  4. }
  5. const store = new Store<StoreSchema>()
  6. export function getActiveWallpaperId(): string | undefined {
  7. return store.get('activeWallpaperId')
  8. }
  9. export function setActiveWallpaperId(id: string): void {
  10. store.set('activeWallpaperId', id)
  11. }