refactor(代码重复): 抽取共享工具函数与 UI 组件,消除多处重复实现
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import type { StorageCleanerOptions } from '@/types/storage';
|
||||
|
||||
export const CLEAN_OPTION_KEYS = [
|
||||
'localStorage',
|
||||
'sessionStorage',
|
||||
'indexedDB',
|
||||
'cookies',
|
||||
'cacheStorage',
|
||||
'serviceWorkers',
|
||||
] as const satisfies readonly (keyof StorageCleanerOptions)[];
|
||||
|
||||
export const OPTION_LABELS: Record<(typeof CLEAN_OPTION_KEYS)[number], string> = {
|
||||
localStorage: 'Local Storage',
|
||||
sessionStorage: 'Session Storage',
|
||||
indexedDB: '站点存储',
|
||||
cookies: 'Cookies',
|
||||
cacheStorage: 'Cache Storage',
|
||||
serviceWorkers: 'Service Workers',
|
||||
};
|
||||
Reference in New Issue
Block a user