Skip to content

Commit d11d457

Browse files
committed
fix(settings): disable badge for the web version
1 parent 58c7426 commit d11d457

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/components/views/settings/SettingsBadge.vue

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<script lang="ts" setup>
2+
import { chromeRuntimeId } from '@dvcol/web-extension-utils/chrome/runtime';
23
import { NSwitch } from 'naive-ui';
34
45
import SettingsFormItem from '~/components/views/settings/SettingsFormItem.vue';
@@ -14,7 +15,11 @@ const { enableBadge } = useBadgeStoreRefs();
1415
<div class="badge-container">
1516
<!-- Enable -->
1617
<SettingsFormItem :label="i18n('label_enable_badge')">
17-
<NSwitch v-model:value="enableBadge" class="form-switch">
18+
<NSwitch
19+
v-model:value="enableBadge"
20+
class="form-switch"
21+
:disabled="!chromeRuntimeId"
22+
>
1823
<template #checked>{{ i18n('on', 'common', 'button') }}</template>
1924
<template #unchecked>{{ i18n('off', 'common', 'button') }}</template>
2025
</NSwitch>

0 commit comments

Comments
 (0)