chore: pnpm v11 (#7942)
* chore: remove rolldown dep * fix: issues-helper and maintain-one-comment are temporarily disabled due to security issues * chore: update deps * fix: change error type to TypeError for non-browser environment check in LocalStorageDriver * chore: update pnpm v11
This commit is contained in:
@@ -18,8 +18,7 @@ class LocalStorageDriver implements IStorageDriver {
|
||||
storageType = 'localStorage',
|
||||
}: LocalStorageDriverOptions = {}) {
|
||||
if (typeof window === 'undefined') {
|
||||
// eslint-disable-next-line unicorn/prefer-type-error -- not a type check, it's an environment check
|
||||
throw new Error(
|
||||
throw new TypeError(
|
||||
'LocalStorageDriver is not available in non-browser environments. Use MemoryStorageDriver instead.',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -14,11 +14,17 @@ function clearPreferencesAndLogout() {
|
||||
}
|
||||
|
||||
const preferencesRef = ref<InstanceType<typeof Preferences> | null>(null);
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Preferences ref="preferencesRef" @clear-preferences-and-logout="clearPreferencesAndLogout">
|
||||
<VbenIconButton class="hover:animate-[shrink_0.3s_ease-in-out]" @click="preferencesRef?.open();">
|
||||
<Preferences
|
||||
ref="preferencesRef"
|
||||
@clear-preferences-and-logout="clearPreferencesAndLogout"
|
||||
>
|
||||
<VbenIconButton
|
||||
class="hover:animate-[shrink_0.3s_ease-in-out]"
|
||||
@click="preferencesRef?.open()"
|
||||
>
|
||||
<Settings class="size-4 text-foreground" />
|
||||
</VbenIconButton>
|
||||
</Preferences>
|
||||
|
||||
Reference in New Issue
Block a user