mirror of
https://github.com/supabase/supabase.git
synced 2026-10-17 15:19:08 +03:00
* Inital setup * Add suggest feature to the RLS Assistant * Add AI button * Use existing policies in AI editor * Remove old feature preview * Cleanup * Tooltip * Update * Change panel width * Fix type * Fix types again * Flag cleanup * Add tooltip * Cleanup * Add a clear history button
23 lines
628 B
TypeScript
23 lines
628 B
TypeScript
import { LOCAL_STORAGE_KEYS } from 'lib/constants'
|
|
|
|
const LOCAL_STORAGE_KEYS_ALLOWLIST = [
|
|
'graphiql:theme',
|
|
'theme',
|
|
'supabaseDarkMode',
|
|
'supabase.dashboard.auth.debug',
|
|
'supabase.dashboard.auth.navigatorLock.disabled',
|
|
LOCAL_STORAGE_KEYS.TELEMETRY_CONSENT,
|
|
LOCAL_STORAGE_KEYS.UI_PREVIEW_API_SIDE_PANEL,
|
|
LOCAL_STORAGE_KEYS.UI_PREVIEW_NAVIGATION_LAYOUT,
|
|
LOCAL_STORAGE_KEYS.UI_PREVIEW_CLS,
|
|
LOCAL_STORAGE_KEYS.LAST_SIGN_IN_METHOD,
|
|
]
|
|
|
|
export function clearLocalStorage() {
|
|
for (const key in localStorage) {
|
|
if (!LOCAL_STORAGE_KEYS_ALLOWLIST.includes(key)) {
|
|
localStorage.removeItem(key)
|
|
}
|
|
}
|
|
}
|