summaryrefslogtreecommitdiff
path: root/packages/frontend/src/pages/settings/notifications.vue
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2024-01-04 15:30:40 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2024-01-04 15:30:40 +0900
commitea41cc6ec0f7b79fc753d37b4586abfef87bf23f (patch)
treecbbb93dbc3a40f33a998f91051ae630fc5b2fbce /packages/frontend/src/pages/settings/notifications.vue
parentMerge branch 'develop' of https://github.com/misskey-dev/misskey into develop (diff)
downloadmisskey-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.vue8
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;
});
}