mirror of
https://github.com/gurucomputing/headscale-ui.git
synced 2026-07-18 17:05:14 +00:00
refactor stores.js to be more explicit
This commit is contained in:
parent
fa28d334e0
commit
b29c79fe90
1 changed files with 10 additions and 10 deletions
|
|
@ -5,25 +5,18 @@ import { Device, User, ACL } from '$lib/common/classes';
|
|||
// localStorage Stores (global scope, saves to the browser)
|
||||
//
|
||||
|
||||
// used to store the value of an alert across all components
|
||||
export const alertStore = writable('');
|
||||
// used to determine if the API is functioning
|
||||
export const apiTestStore = writable('');
|
||||
// stores the theme
|
||||
export const themeStore = writable('');
|
||||
// stores URL and API Key
|
||||
export const URLStore = writable('');
|
||||
export const APIKeyStore = writable('');
|
||||
// stores preauth key preference
|
||||
export const preAuthHideStore = writable(false);
|
||||
// stores search state
|
||||
export const userSearchStore = writable('');
|
||||
export const deviceSearchStore = writable('');
|
||||
// stores sorting preferences
|
||||
export const deviceSortStore = writable('id');
|
||||
export const deviceSortDirectionStore = writable('ascending');
|
||||
export const userSortStore = writable('id');
|
||||
export const sortDirectionStore = writable('ascending');
|
||||
// stores preauth key preference
|
||||
export const preAuthHideStore = writable(false);
|
||||
|
||||
//
|
||||
// Normal Stores (global scope, saves until refresh)
|
||||
|
|
@ -35,4 +28,11 @@ export const userFilterStore = writable([new User()]);
|
|||
export const deviceStore = writable([new Device()]);
|
||||
export const deviceFilterStore = writable([new Device()]);
|
||||
// stores ACL object
|
||||
export const aclStore = writable(new ACL());
|
||||
export const aclStore = writable(new ACL());
|
||||
// used to store the value of an alert across all components
|
||||
export const alertStore = writable('');
|
||||
// used to determine if the API is functioning
|
||||
export const apiTestStore = writable('');
|
||||
// stores search state
|
||||
export const userSearchStore = writable('');
|
||||
export const deviceSearchStore = writable('');
|
||||
Loading…
Add table
Add a link
Reference in a new issue