diff --git a/app/pages/me/profile/index.vue b/app/pages/me/profile/index.vue index f029de1..0803354 100644 --- a/app/pages/me/profile/index.vue +++ b/app/pages/me/profile/index.vue @@ -39,6 +39,7 @@ const state = reactive({ linksJson: '[]', publicHomeHeaderTitle: '', publicHomeHeaderIconUrl: '', + commentNotifyEnabled: true, }) const loading = ref(true) @@ -195,6 +196,8 @@ async function load() { state.publicHomeHeaderTitle = typeof cfg.publicHomeHeaderTitle === 'string' ? cfg.publicHomeHeaderTitle : '' state.publicHomeHeaderIconUrl = typeof cfg.publicHomeHeaderIconUrl === 'string' ? cfg.publicHomeHeaderIconUrl : '' + state.commentNotifyEnabled = + typeof cfg.commentNotifyEnabled === 'boolean' ? cfg.commentNotifyEnabled : true } finally { loading.value = false } @@ -239,6 +242,11 @@ async function save() { notify: false, body: { key: 'publicHomeHeaderIconUrl', value: state.publicHomeHeaderIconUrl }, }), + fetchData('/api/config/me', { + method: 'PUT', + notify: false, + body: { key: 'commentNotifyEnabled', value: state.commentNotifyEnabled }, + }), ]) toast.add({ title: '资料已保存', color: 'success' }) try { @@ -305,6 +313,16 @@ async function save() { label="在发现卡片上显示上述地址" /> +
+

+ 通知偏好 +

+ +