 463446795d
			
		
	
	463446795d
	
	
	
		
			
			* refactor/miLocalStorageのメソッドに戻り値追加 * refactor/miLocalStorageのキーとしてdebugがconfig.tsに存在するので追加 * fix/JSON.parseにnullは入らないのでnullの時は分岐させてnullにする * refactor/修正したファイルの型調整+記法の統一 * fix/型のためにlangがnullの時はhtmlの言語の設定をしない * refactor/catchで何もしないと警告が出るので修正 * refactor/細かい点の修正 * refactor/変数の二重定義になっていた二重定義になっていたので修正 * refactor/importの整理(通常のimportは最初に処理されるので影響はない想定) * fix/vueファイルに型を与えてインポート時の型エラーを防ぐ * refactor/開発環境のみで利用するので,eslintの設定を変更する * fix/vueの定義を最小限にする * fallback language to 'en-US' * remove accounts migration * fix:vueの型定義ファイルを消す --------- Co-authored-by: tamaina <tamaina@hotmail.co.jp>
		
			
				
	
	
		
			40 lines
		
	
	
		
			900 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			900 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| type Keys =
 | |
| 	'v' |
 | |
| 	'lastVersion' |
 | |
| 	'instance' |
 | |
| 	'account' |
 | |
| 	'accounts' |
 | |
| 	'latestDonationInfoShownAt' |
 | |
| 	'neverShowDonationInfo' |
 | |
| 	'neverShowLocalOnlyInfo' |
 | |
| 	'lastUsed' |
 | |
| 	'lang' |
 | |
| 	'drafts' |
 | |
| 	'hashtags' |
 | |
| 	'wallpaper' |
 | |
| 	'theme' |
 | |
| 	'colorSchema' |
 | |
| 	'useSystemFont' | 
 | |
| 	'fontSize' |
 | |
| 	'ui' |
 | |
| 	'ui_temp' |
 | |
| 	'locale' |
 | |
| 	'localeVersion' |
 | |
| 	'theme' |
 | |
| 	'customCss' |
 | |
| 	'message_drafts' |
 | |
| 	'scratchpad' |
 | |
| 	'debug' |
 | |
| 	`miux:${string}` |
 | |
| 	`ui:folder:${string}` |
 | |
| 	`themes:${string}` |
 | |
| 	`aiscript:${string}` |
 | |
| 	'lastEmojisFetchedAt' | // DEPRECATED, stored in indexeddb (13.9.0~)
 | |
| 	'emojis' // DEPRECATED, stored in indexeddb (13.9.0~);
 | |
| 
 | |
| export const miLocalStorage = {
 | |
| 	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),
 | |
| };
 |