feat: remove unnecessary tauri files
This commit is contained in:
parent
25bf6b3b62
commit
1aae94b4dc
1 changed files with 0 additions and 41 deletions
|
|
@ -1,41 +0,0 @@
|
|||
import { Store } from 'tauri-plugin-store-api'
|
||||
import { createStorage } from 'unstorage'
|
||||
import redisDriver from 'unstorage/drivers/redis'
|
||||
|
||||
const store = new Store('.servers.dat')
|
||||
|
||||
/**
|
||||
* TODO: Use redis as storage
|
||||
* - docs: https://unstorage.unjs.io/drivers/redis
|
||||
* - then we can probably remove need for `/elk/data` (see docker-compose)
|
||||
*/
|
||||
const storage = createStorage({
|
||||
driver: redisDriver({
|
||||
base: 'unstorage:elk:',
|
||||
}),
|
||||
})
|
||||
|
||||
storage.mount('servers', {
|
||||
getKeys() {
|
||||
return store.keys()
|
||||
},
|
||||
async removeItem(key: string) {
|
||||
await store.delete(key)
|
||||
},
|
||||
clear() {
|
||||
return store.clear()
|
||||
},
|
||||
hasItem(key: string) {
|
||||
return store.has(key)
|
||||
},
|
||||
setItem(key: string, value: any) {
|
||||
return store.set(key, value)
|
||||
},
|
||||
getItem(key: string) {
|
||||
return store.get(key)
|
||||
},
|
||||
})
|
||||
|
||||
export function useStorage() {
|
||||
return storage
|
||||
}
|
||||
Loading…
Reference in a new issue