We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 58c7426 commit d11d457Copy full SHA for d11d457
src/components/views/settings/SettingsBadge.vue
@@ -1,4 +1,5 @@
1
<script lang="ts" setup>
2
+import { chromeRuntimeId } from '@dvcol/web-extension-utils/chrome/runtime';
3
import { NSwitch } from 'naive-ui';
4
5
import SettingsFormItem from '~/components/views/settings/SettingsFormItem.vue';
@@ -14,7 +15,11 @@ const { enableBadge } = useBadgeStoreRefs();
14
15
<div class="badge-container">
16
<!-- Enable -->
17
<SettingsFormItem :label="i18n('label_enable_badge')">
- <NSwitch v-model:value="enableBadge" class="form-switch">
18
+ <NSwitch
19
+ v-model:value="enableBadge"
20
+ class="form-switch"
21
+ :disabled="!chromeRuntimeId"
22
+ >
23
<template #checked>{{ i18n('on', 'common', 'button') }}</template>
24
<template #unchecked>{{ i18n('off', 'common', 'button') }}</template>
25
</NSwitch>
0 commit comments