mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-26 11:21:16 +01:00
Better tauri listeners and stuff
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import { invoke } from '@tauri-apps/api';
|
||||
import type { KeyValue } from './models';
|
||||
|
||||
const DEFAULT_NAMESPACE = 'app';
|
||||
export const NAMESPACE_GLOBAL = 'global';
|
||||
export const NAMESPACE_NO_SYNC = 'no_sync';
|
||||
|
||||
export async function setKeyValue<T>({
|
||||
namespace = DEFAULT_NAMESPACE,
|
||||
namespace = NAMESPACE_GLOBAL,
|
||||
key,
|
||||
value,
|
||||
}: {
|
||||
@@ -20,7 +21,7 @@ export async function setKeyValue<T>({
|
||||
}
|
||||
|
||||
export async function getKeyValue<T>({
|
||||
namespace = DEFAULT_NAMESPACE,
|
||||
namespace = NAMESPACE_GLOBAL,
|
||||
key,
|
||||
fallback,
|
||||
}: {
|
||||
|
||||
Reference in New Issue
Block a user