2023-08-15 02:52:38 +09:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2023-01-07 10:13:02 +09:00
|
|
|
type Keys =
|
|
|
|
'v' |
|
|
|
|
'lastVersion' |
|
|
|
|
'instance' |
|
|
|
|
'account' |
|
|
|
|
'accounts' |
|
2023-01-07 11:49:00 +09:00
|
|
|
'latestDonationInfoShownAt' |
|
|
|
|
'neverShowDonationInfo' |
|
2023-04-05 14:30:03 +09:00
|
|
|
'neverShowLocalOnlyInfo' |
|
2023-01-07 10:13:02 +09:00
|
|
|
'lastUsed' |
|
|
|
|
'lang' |
|
|
|
|
'drafts' |
|
|
|
|
'hashtags' |
|
|
|
|
'wallpaper' |
|
|
|
|
'theme' |
|
2023-06-05 10:55:18 +09:00
|
|
|
'colorScheme' |
|
2023-07-08 07:08:16 +09:00
|
|
|
'useSystemFont' |
|
2023-01-07 10:13:02 +09:00
|
|
|
'fontSize' |
|
|
|
|
'ui' |
|
2023-01-27 13:52:51 +09:00
|
|
|
'ui_temp' |
|
2023-01-07 10:13:02 +09:00
|
|
|
'locale' |
|
2023-01-21 20:24:15 +09:00
|
|
|
'localeVersion' |
|
2023-01-07 10:13:02 +09:00
|
|
|
'theme' |
|
|
|
|
'customCss' |
|
|
|
|
'message_drafts' |
|
|
|
|
'scratchpad' |
|
2023-04-13 18:47:49 +09:00
|
|
|
'debug' |
|
2023-01-07 10:13:02 +09:00
|
|
|
`miux:${string}` |
|
|
|
|
`ui:folder:${string}` |
|
|
|
|
`themes:${string}` |
|
2023-02-28 20:10:52 +09:00
|
|
|
`aiscript:${string}` |
|
|
|
|
'lastEmojisFetchedAt' | // DEPRECATED, stored in indexeddb (13.9.0~)
|
|
|
|
'emojis' // DEPRECATED, stored in indexeddb (13.9.0~);
|
2023-01-07 10:13:02 +09:00
|
|
|
|
|
|
|
export const miLocalStorage = {
|
2023-04-13 18:47:49 +09:00
|
|
|
getItem: (key: Keys): string | null => window.localStorage.getItem(key),
|
|
|
|
setItem: (key: Keys, value: string): void => window.localStorage.setItem(key, value),
|
|
|
|
removeItem: (key: Keys): void => window.localStorage.removeItem(key),
|
2023-01-07 10:13:02 +09:00
|
|
|
};
|