-
Notifications
You must be signed in to change notification settings - Fork 432
Expand file tree
/
Copy pathconfig-notification.vue
More file actions
40 lines (36 loc) · 909 Bytes
/
config-notification.vue
File metadata and controls
40 lines (36 loc) · 909 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<script lang="ts" setup>
import type { Notification } from '#/config';
import type { SettingItem } from '#/components';
const { t } = useMyI18n();
const { getSettingGroup } = useConfigStore();
const notification = getSettingGroup('notification');
const items: SettingItem<Notification>[] = [
{
configKey: 'enable',
label: () => t('config.notification_set.enable'),
type: 'switch',
bottomLine: true,
},
{
configKey: 'entry',
label: () => t('config.notification_set.entry'),
type: 'input',
prop: {
type: 'text',
placeholder: 'entry',
},
},
];
</script>
<template>
<ab-fold-panel :title="$t('config.notification_set.title')">
<div space-y-12>
<ab-setting
v-for="i in items"
:key="i.configKey"
v-bind="i"
v-model:data="notification[i.configKey]"
></ab-setting>
</div>
</ab-fold-panel>
</template>