diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2024-01-04 15:30:40 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2024-01-04 15:30:40 +0900 |
| commit | ea41cc6ec0f7b79fc753d37b4586abfef87bf23f (patch) | |
| tree | cbbb93dbc3a40f33a998f91051ae630fc5b2fbce /packages/frontend/src/pages/settings/notifications.vue | |
| parent | Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop (diff) | |
| download | misskey-ea41cc6ec0f7b79fc753d37b4586abfef87bf23f.tar.gz misskey-ea41cc6ec0f7b79fc753d37b4586abfef87bf23f.tar.bz2 misskey-ea41cc6ec0f7b79fc753d37b4586abfef87bf23f.zip | |
refactor(frontend): reduce type errors
Diffstat (limited to 'packages/frontend/src/pages/settings/notifications.vue')
| -rw-r--r-- | packages/frontend/src/pages/settings/notifications.vue | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/frontend/src/pages/settings/notifications.vue b/packages/frontend/src/pages/settings/notifications.vue index 98b82f7116..1e9515e588 100644 --- a/packages/frontend/src/pages/settings/notifications.vue +++ b/packages/frontend/src/pages/settings/notifications.vue @@ -62,12 +62,14 @@ import FormSection from '@/components/form/section.vue'; import MkFolder from '@/components/MkFolder.vue'; import MkSwitch from '@/components/MkSwitch.vue'; import * as os from '@/os.js'; -import { $i } from '@/account.js'; +import { signinRequired } from '@/account.js'; import { i18n } from '@/i18n.js'; import { definePageMetadata } from '@/scripts/page-metadata.js'; import MkPushNotificationAllowButton from '@/components/MkPushNotificationAllowButton.vue'; import { notificationTypes } from '@/const.js'; +const $i = signinRequired(); + const nonConfigurableNotificationTypes = ['note', 'roleAssigned', 'followRequestAccepted', 'achievementEarned']; const allowButton = shallowRef<InstanceType<typeof MkPushNotificationAllowButton>>(); @@ -86,11 +88,11 @@ async function readAllNotifications() { async function updateReceiveConfig(type, value) { await os.apiWithDialog('i/update', { notificationRecieveConfig: { - ...$i!.notificationRecieveConfig, + ...$i.notificationRecieveConfig, [type]: value, }, }).then(i => { - $i!.notificationRecieveConfig = i.notificationRecieveConfig; + $i.notificationRecieveConfig = i.notificationRecieveConfig; }); } |