Files
mixtape/zero.Backoffice.UI/app/modules/search/store.ts
T
2022-02-04 20:13:32 +01:00

20 lines
428 B
TypeScript

import { defineStore } from 'pinia';
const SEARCH_BY_SHORTCUT_KEY = 'zero.search.shortcut';
export const useSearchStore = defineStore('zero.search', {
state: () => ({}),
actions: {
shortcutEnabled()
{
return localStorage.getItem(SEARCH_BY_SHORTCUT_KEY) !== 'false';
},
setShortcutEnabled(enabled: boolean)
{
localStorage.setItem(SEARCH_BY_SHORTCUT_KEY, enabled.toString());
}
}
});