summaryrefslogtreecommitdiff
path: root/packages/frontend/src/local-storage.ts
blob: e6b828696c06353c59970eba3af928ee3d87c351 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
type Keys =
	'v' |
	'lastVersion' |
	'instance' |
	'emojis' | // TODO: indexed db
	'lastEmojisFetchedAt' |
	'account' |
	'accounts' |
	'latestDonationInfoShownAt' |
	'neverShowDonationInfo' |
	'lastUsed' |
	'lang' |
	'drafts' |
	'hashtags' |
	'wallpaper' |
	'theme' |
	'colorSchema' |
	'useSystemFont' | 
	'fontSize' |
	'ui' |
	'ui_temp' |
	'locale' |
	'localeVersion' |
	'theme' |
	'customCss' |
	'message_drafts' |
	'scratchpad' |
	`miux:${string}` |
	`ui:folder:${string}` |
	`themes:${string}` |
	`aiscript:${string}`;

export const miLocalStorage = {
	getItem: (key: Keys) => window.localStorage.getItem(key),
	setItem: (key: Keys, value: string) => window.localStorage.setItem(key, value),
	removeItem: (key: Keys) => window.localStorage.removeItem(key),
};