diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-08-26 13:34:41 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-08-26 13:34:41 +0900 |
| commit | d6a1046361d3d38726f2a86588960c3614f72a9f (patch) | |
| tree | d0a501710c36b8e9488e6756adc906c08447910b /packages/frontend/src/pages/settings | |
| parent | refactor and fix (diff) | |
| download | misskey-d6a1046361d3d38726f2a86588960c3614f72a9f.tar.gz misskey-d6a1046361d3d38726f2a86588960c3614f72a9f.tar.bz2 misskey-d6a1046361d3d38726f2a86588960c3614f72a9f.zip | |
refactor
Diffstat (limited to 'packages/frontend/src/pages/settings')
5 files changed, 12 insertions, 12 deletions
diff --git a/packages/frontend/src/pages/settings/avatar-decoration.vue b/packages/frontend/src/pages/settings/avatar-decoration.vue index 4b8ac9a26c..d3d642f156 100644 --- a/packages/frontend/src/pages/settings/avatar-decoration.vue +++ b/packages/frontend/src/pages/settings/avatar-decoration.vue @@ -108,7 +108,7 @@ async function openDecoration(avatarDecoration: { offsetY: payload.offsetY, }; const update = [...$i.avatarDecorations]; - update[index] = decoration; + update[index!] = decoration; await os.apiWithDialog('i/update', { avatarDecorations: update, }); @@ -116,7 +116,7 @@ async function openDecoration(avatarDecoration: { }, 'detach': async () => { const update = [...$i.avatarDecorations]; - update.splice(index, 1); + update.splice(index!, 1); await os.apiWithDialog('i/update', { avatarDecorations: update, }); diff --git a/packages/frontend/src/pages/settings/notifications.vue b/packages/frontend/src/pages/settings/notifications.vue index 3ddfb81c33..2f2b57bdaf 100644 --- a/packages/frontend/src/pages/settings/notifications.vue +++ b/packages/frontend/src/pages/settings/notifications.vue @@ -43,9 +43,9 @@ SPDX-License-Identifier: AGPL-3.0-only </FormSection> <FormSection> <div class="_gaps_s"> - <FormLink @click="readAllNotifications">{{ i18n.ts.markAsReadAllNotifications }}</FormLink> - <FormLink @click="testNotification">{{ i18n.ts._notification.sendTestNotification }}</FormLink> - <FormLink @click="flushNotification">{{ i18n.ts._notification.flushNotification }}</FormLink> + <MkButton @click="readAllNotifications">{{ i18n.ts.markAsReadAllNotifications }}</MkButton> + <MkButton @click="testNotification">{{ i18n.ts._notification.sendTestNotification }}</MkButton> + <MkButton @click="flushNotification">{{ i18n.ts._notification.flushNotification }}</MkButton> </div> </FormSection> <FormSection> @@ -76,6 +76,7 @@ import FormLink from '@/components/form/link.vue'; import FormSection from '@/components/form/section.vue'; import MkFolder from '@/components/MkFolder.vue'; import MkSwitch from '@/components/MkSwitch.vue'; +import MkButton from '@/components/MkButton.vue'; import * as os from '@/os.js'; import { ensureSignin } from '@/i.js'; import { misskeyApi } from '@/utility/misskey-api.js'; @@ -96,7 +97,7 @@ const sendReadMessage = computed(() => pushRegistrationInServer.value?.sendReadM const userLists = await misskeyApi('users/lists/list'); async function readAllNotifications() { - await os.apiWithDialog('notifications/mark-all-as-read'); + await os.apiWithDialog('notifications/mark-all-as-read', {}); } async function updateReceiveConfig(type: typeof notificationTypes[number], value: NotificationConfig) { @@ -134,7 +135,7 @@ async function flushNotification() { if (canceled) return; - os.apiWithDialog('notifications/flush'); + os.apiWithDialog('notifications/flush', {}); } const headerActions = computed(() => []); diff --git a/packages/frontend/src/pages/settings/security.vue b/packages/frontend/src/pages/settings/security.vue index c954b9dd5a..bc77c1f0af 100644 --- a/packages/frontend/src/pages/settings/security.vue +++ b/packages/frontend/src/pages/settings/security.vue @@ -80,14 +80,14 @@ async function change() { type: 'password', autocomplete: 'new-password', }); - if (canceled2) return; + if (canceled2 || newPassword == null) return; const { canceled: canceled3, result: newPassword2 } = await os.inputText({ title: i18n.ts.newPasswordRetype, type: 'password', autocomplete: 'new-password', }); - if (canceled3) return; + if (canceled3 || newPassword2 == null) return; if (newPassword !== newPassword2) { os.alert({ diff --git a/packages/frontend/src/pages/settings/theme.vue b/packages/frontend/src/pages/settings/theme.vue index d8ae356f6b..beae1224e4 100644 --- a/packages/frontend/src/pages/settings/theme.vue +++ b/packages/frontend/src/pages/settings/theme.vue @@ -205,8 +205,8 @@ import { computed, ref, watch } from 'vue'; import JSON5 from 'json5'; import defaultLightTheme from '@@/themes/l-light.json5'; import defaultDarkTheme from '@@/themes/d-green-lime.json5'; -import type { Theme } from '@/theme.js'; import { isSafeMode } from '@@/js/config.js'; +import type { Theme } from '@/theme.js'; import * as os from '@/os.js'; import MkSwitch from '@/components/MkSwitch.vue'; import FormSection from '@/components/form/section.vue'; @@ -275,6 +275,7 @@ async function toggleDarkMode() { const value = !store.r.darkMode.value; if (syncDeviceDarkMode.value) { const { canceled } = await os.confirm({ + type: 'question', text: i18n.tsx.switchDarkModeManuallyWhenSyncEnabledConfirm({ x: i18n.ts.syncDeviceDarkMode }), }); if (canceled) return; diff --git a/packages/frontend/src/pages/settings/webhook.edit.vue b/packages/frontend/src/pages/settings/webhook.edit.vue index ee387fb20c..a92d3dc457 100644 --- a/packages/frontend/src/pages/settings/webhook.edit.vue +++ b/packages/frontend/src/pages/settings/webhook.edit.vue @@ -149,10 +149,8 @@ async function test(type: Misskey.entities.UserWebhook['on'][number]): Promise<v }); } -// eslint-disable-next-line @typescript-eslint/no-unused-vars const headerActions = computed(() => []); -// eslint-disable-next-line @typescript-eslint/no-unused-vars const headerTabs = computed(() => []); definePage(() => ({ |