From 3b2a3f2c57b7d7645b03b3e38917d8c981951c29 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Thu, 7 May 2026 11:11:30 +0900 Subject: [PATCH] clean pref migration --- CHANGELOG.md | 3 +- locales/ja-JP.yml | 3 - packages/frontend/src/boot/main-boot.ts | 9 - .../frontend/src/pages/settings/other.vue | 10 - packages/frontend/src/pref-migrate.ts | 141 ------- packages/frontend/src/store.ts | 346 ------------------ packages/i18n/src/autogen/locale.ts | 12 - 7 files changed, 2 insertions(+), 522 deletions(-) delete mode 100644 packages/frontend/src/pref-migrate.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index b713d617f3..5dbde8ec5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,8 @@ - ### Client -- +- 2025.4.0 以前の設定情報の移行処理が削除されました + - 2025.4.0 から直接 2026.6.0 以上にアップデートする場合は設定が移行されませんので注意してください。移行したい場合は一度 2026.5.1 を経由してください。 ### Server - diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 5512deb972..19636396ad 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1358,14 +1358,11 @@ information: "情報" chat: "チャット" directMessage: "ダイレクトメッセージ" directMessage_short: "メッセージ" -migrateOldSettings: "旧設定情報を移行" -migrateOldSettings_description: "通常これは自動で行われていますが、何らかの理由により上手く移行されなかった場合は手動で移行処理をトリガーできます。現在の設定情報は上書きされます。" compress: "圧縮" right: "右" bottom: "下" top: "上" embed: "埋め込み" -settingsMigrating: "設定を移行しています。しばらくお待ちください... (後ほど、設定→その他→旧設定情報を移行 で手動で移行することもできます)" readonly: "読み取り専用" goToDeck: "デッキへ戻る" federationJobs: "連合ジョブ" diff --git a/packages/frontend/src/boot/main-boot.ts b/packages/frontend/src/boot/main-boot.ts index 3d4ecbf75b..5a5c91cf90 100644 --- a/packages/frontend/src/boot/main-boot.ts +++ b/packages/frontend/src/boot/main-boot.ts @@ -27,7 +27,6 @@ import { makeHotkey } from '@/utility/hotkey.js'; import { addCustomEmoji, removeCustomEmojis, updateCustomEmojis } from '@/custom-emojis.js'; import { prefer } from '@/preferences.js'; import { updateCurrentAccountPartial } from '@/accounts.js'; -import { migrateOldSettings } from '@/pref-migrate.js'; import { unisonReload } from '@/utility/unison-reload.js'; import { isBirthday } from '@/utility/is-birthday.js'; @@ -69,14 +68,6 @@ export async function mainBoot() { const { dispose } = popup(defineAsyncComponent(() => import('@/components/MkUpdated.vue')), {}, { closed: () => dispose(), }); - - // prefereces migration - // TODO: そのうち消す - if (lastVersion && (compareVersions('2025.3.2-alpha.0', lastVersion) === 1)) { - console.log('Preferences migration'); - - migrateOldSettings(); - } } try { diff --git a/packages/frontend/src/pages/settings/other.vue b/packages/frontend/src/pages/settings/other.vue index 4facc696a4..6ab645ed1c 100644 --- a/packages/frontend/src/pages/settings/other.vue +++ b/packages/frontend/src/pages/settings/other.vue @@ -145,11 +145,6 @@ SPDX-License-Identifier: AGPL-3.0-only {{ i18n.ts._settings.settingsPersistence_title }} {{ i18n.ts._preferencesBackup.forceBackup }} - - - {{ i18n.ts.migrateOldSettings }} - - @@ -173,7 +168,6 @@ import FormSection from '@/components/form/section.vue'; import { prefer } from '@/preferences.js'; import MkRolePreview from '@/components/MkRolePreview.vue'; import { signout } from '@/signout.js'; -import { migrateOldSettings } from '@/pref-migrate.js'; import { hideAllTips as _hideAllTips, resetAllTips as _resetAllTips } from '@/tips.js'; import { suggestReload } from '@/utility/reload-suggest.js'; import { cloudBackup } from '@/preferences/utility.js'; @@ -219,10 +213,6 @@ async function deleteAccount() { await signout(); } -function migrate() { - migrateOldSettings(); -} - function resetAllTips() { _resetAllTips(); os.success(); diff --git a/packages/frontend/src/pref-migrate.ts b/packages/frontend/src/pref-migrate.ts deleted file mode 100644 index bf86f6954e..0000000000 --- a/packages/frontend/src/pref-migrate.ts +++ /dev/null @@ -1,141 +0,0 @@ -/* - * SPDX-FileCopyrightText: syuilo and misskey-project - * SPDX-License-Identifier: AGPL-3.0-only - */ - -import type { DeckProfile } from '@/deck.js'; -import { genId } from '@/utility/id.js'; -import { store } from '@/store.js'; -import { prefer } from '@/preferences.js'; -import { misskeyApi } from '@/utility/misskey-api.js'; -import { deckStore } from '@/ui/deck/deck-store.js'; -import { unisonReload } from '@/utility/unison-reload.js'; -import * as os from '@/os.js'; -import { i18n } from '@/i18n.js'; -import type { SoundStore } from '@/preferences/def.js'; - -// TODO: そのうち消す -export function migrateOldSettings() { - os.waiting({ text: i18n.ts.settingsMigrating }); - - store.loaded.then(async () => { - misskeyApi('i/registry/get', { scope: ['client'], key: 'themes' }).catch(() => []).then((themes: any) => { - if (themes.length > 0) { - prefer.commit('themes', themes); - } - }); - - prefer.commit('deck.profile', deckStore.s.profile); - misskeyApi('i/registry/keys', { - scope: ['client', 'deck', 'profiles'], - }).then(async keys => { - const profiles: DeckProfile[] = []; - for (const key of keys) { - const deck = await misskeyApi('i/registry/get', { - scope: ['client', 'deck', 'profiles'], - key: key, - }); - profiles.push({ - id: genId(), - name: key, - columns: deck.columns, - layout: deck.layout, - }); - } - prefer.commit('deck.profiles', profiles); - }); - - prefer.commit('emojiPalettes', [{ - id: 'reactions', - name: '', - emojis: store.s.reactions, - }, { - id: 'pinnedEmojis', - name: '', - emojis: store.s.pinnedEmojis, - }]); - prefer.commit('emojiPaletteForMain', 'pinnedEmojis'); - prefer.commit('emojiPaletteForReaction', 'reactions'); - prefer.commit('overridedDeviceKind', store.s.overridedDeviceKind); - prefer.commit('widgets', store.s.widgets); - prefer.commit('keepCw', store.s.keepCw); - prefer.commit('collapseRenotes', store.s.collapseRenotes); - prefer.commit('rememberNoteVisibility', store.s.rememberNoteVisibility); - prefer.commit('uploadFolder', store.s.uploadFolder); - prefer.commit('menu', [...store.s.menu, 'chat']); - prefer.commit('statusbars', store.s.statusbars); - prefer.commit('pinnedUserLists', store.s.pinnedUserLists); - prefer.commit('serverDisconnectedBehavior', store.s.serverDisconnectedBehavior); - prefer.commit('nsfw', store.s.nsfw); - prefer.commit('highlightSensitiveMedia', store.s.highlightSensitiveMedia); - prefer.commit('animation', store.s.animation); - prefer.commit('animatedMfm', store.s.animatedMfm); - prefer.commit('advancedMfm', store.s.advancedMfm); - prefer.commit('showReactionsCount', store.s.showReactionsCount); - prefer.commit('enableQuickAddMfmFunction', store.s.enableQuickAddMfmFunction); - prefer.commit('loadRawImages', store.s.loadRawImages); - prefer.commit('imageNewTab', store.s.imageNewTab); - prefer.commit('disableShowingAnimatedImages', store.s.disableShowingAnimatedImages); - prefer.commit('emojiStyle', store.s.emojiStyle); - prefer.commit('menuStyle', store.s.menuStyle); - prefer.commit('useBlurEffectForModal', store.s.useBlurEffectForModal); - prefer.commit('useBlurEffect', store.s.useBlurEffect); - prefer.commit('showFixedPostForm', store.s.showFixedPostForm); - prefer.commit('showFixedPostFormInChannel', store.s.showFixedPostFormInChannel); - prefer.commit('enableInfiniteScroll', store.s.enableInfiniteScroll); - prefer.commit('useReactionPickerForContextMenu', store.s.useReactionPickerForContextMenu); - prefer.commit('instanceTicker', store.s.instanceTicker); - prefer.commit('emojiPickerScale', store.s.emojiPickerScale); - prefer.commit('emojiPickerWidth', store.s.emojiPickerWidth); - prefer.commit('emojiPickerHeight', store.s.emojiPickerHeight); - prefer.commit('emojiPickerStyle', store.s.emojiPickerStyle); - prefer.commit('reportError', store.s.reportError); - prefer.commit('squareAvatars', store.s.squareAvatars); - prefer.commit('showAvatarDecorations', store.s.showAvatarDecorations); - prefer.commit('numberOfPageCache', store.s.numberOfPageCache); - prefer.commit('showNoteActionsOnlyHover', store.s.showNoteActionsOnlyHover); - prefer.commit('showClipButtonInNoteFooter', store.s.showClipButtonInNoteFooter); - prefer.commit('reactionsDisplaySize', store.s.reactionsDisplaySize); - prefer.commit('limitWidthOfReaction', store.s.limitWidthOfReaction); - prefer.commit('forceShowAds', store.s.forceShowAds); - prefer.commit('aiChanMode', store.s.aiChanMode); - prefer.commit('devMode', store.s.devMode); - prefer.commit('mediaListWithOneImageAppearance', store.s.mediaListWithOneImageAppearance); - prefer.commit('notificationPosition', store.s.notificationPosition); - prefer.commit('notificationStackAxis', store.s.notificationStackAxis); - prefer.commit('enableCondensedLine', store.s.enableCondensedLine); - prefer.commit('keepScreenOn', store.s.keepScreenOn); - prefer.commit('useGroupedNotifications', store.s.useGroupedNotifications); - prefer.commit('dataSaver', { - ...prefer.s.dataSaver, - media: store.s.dataSaver.media, - avatar: store.s.dataSaver.avatar, - urlPreviewThumbnail: store.s.dataSaver.urlPreview, - code: store.s.dataSaver.code, - }); - prefer.commit('enableSeasonalScreenEffect', store.s.enableSeasonalScreenEffect); - prefer.commit('enableHorizontalSwipe', store.s.enableHorizontalSwipe); - prefer.commit('useNativeUiForVideoAudioPlayer', store.s.useNativeUIForVideoAudioPlayer); - prefer.commit('keepOriginalFilename', store.s.keepOriginalFilename); - prefer.commit('alwaysConfirmFollow', store.s.alwaysConfirmFollow); - prefer.commit('confirmWhenRevealingSensitiveMedia', store.s.confirmWhenRevealingSensitiveMedia); - prefer.commit('contextMenu', store.s.contextMenu); - prefer.commit('skipNoteRender', store.s.skipNoteRender); - prefer.commit('showSoftWordMutedWord', store.s.showSoftWordMutedWord); - prefer.commit('confirmOnReact', store.s.confirmOnReact); - prefer.commit('defaultFollowWithReplies', store.s.defaultWithReplies); - prefer.commit('sound.masterVolume', store.s.sound_masterVolume); - prefer.commit('sound.notUseSound', store.s.sound_notUseSound); - prefer.commit('sound.useSoundOnlyWhenActive', store.s.sound_useSoundOnlyWhenActive); - prefer.commit('sound.on.note', store.s.sound_note as SoundStore); - prefer.commit('sound.on.noteMy', store.s.sound_noteMy as SoundStore); - prefer.commit('sound.on.notification', store.s.sound_notification as SoundStore); - prefer.commit('sound.on.reaction', store.s.sound_reaction as SoundStore); - prefer.commit('defaultNoteVisibility', store.s.defaultNoteVisibility); - prefer.commit('defaultNoteLocalOnly', store.s.defaultNoteLocalOnly); - - window.setTimeout(() => { - unisonReload(); - }, 10000); - }); -} diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index e7cdc98415..7017725e30 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -118,352 +118,6 @@ export const store = markRaw(new Pizzax('base', { where: 'device', default: true, }, - - //#region TODO: そのうち消す (preferに移行済み) - defaultWithReplies: { - where: 'account', - default: false, - }, - reactions: { - where: 'account', - default: ['👍', '❤️', '😆', '🤔', '😮', '🎉', '💢', '😥', '😇', '🍮'], - }, - pinnedEmojis: { - where: 'account', - default: [], - }, - widgets: { - where: 'account', - default: [] as { - name: string; - id: string; - place: string | null; - data: Record; - }[], - }, - overridedDeviceKind: { - where: 'device', - default: null as DeviceKind | null, - }, - defaultSideView: { - where: 'device', - default: false, - }, - defaultNoteVisibility: { - where: 'account', - default: 'public' as (typeof Misskey.noteVisibilities)[number], - }, - defaultNoteLocalOnly: { - where: 'account', - default: false, - }, - keepCw: { - where: 'account', - default: true, - }, - collapseRenotes: { - where: 'account', - default: true, - }, - rememberNoteVisibility: { - where: 'account', - default: false, - }, - uploadFolder: { - where: 'account', - default: null as string | null, - }, - keepOriginalUploading: { - where: 'account', - default: false, - }, - menu: { - where: 'deviceAccount', - default: [ - 'notifications', - 'clips', - 'drive', - 'followRequests', - '-', - 'explore', - 'announcements', - 'search', - '-', - 'ui', - ], - }, - statusbars: { - where: 'deviceAccount', - default: [] as { - name: string; - id: string; - type: string; - size: 'verySmall' | 'small' | 'medium' | 'large' | 'veryLarge'; - black: boolean; - props: Record; - }[], - }, - pinnedUserLists: { - where: 'deviceAccount', - default: [] as Misskey.entities.UserList[], - }, - serverDisconnectedBehavior: { - where: 'device', - default: 'quiet' as 'quiet' | 'reload' | 'dialog', - }, - nsfw: { - where: 'device', - default: 'respect' as 'respect' | 'force' | 'ignore', - }, - highlightSensitiveMedia: { - where: 'device', - default: false, - }, - animation: { - where: 'device', - default: !prefersReducedMotion, - }, - animatedMfm: { - where: 'device', - default: !prefersReducedMotion, - }, - advancedMfm: { - where: 'device', - default: true, - }, - showReactionsCount: { - where: 'device', - default: false, - }, - enableQuickAddMfmFunction: { - where: 'device', - default: false, - }, - loadRawImages: { - where: 'device', - default: false, - }, - imageNewTab: { - where: 'device', - default: false, - }, - disableShowingAnimatedImages: { - where: 'device', - default: prefersReducedMotion, - }, - emojiStyle: { - where: 'device', - default: 'twemoji' as 'twemoji' | 'fluentEmoji' | 'native', - }, - menuStyle: { - where: 'device', - default: 'auto' as 'auto' | 'popup' | 'drawer', - }, - useBlurEffectForModal: { - where: 'device', - default: DEFAULT_DEVICE_KIND === 'desktop', - }, - useBlurEffect: { - where: 'device', - default: DEFAULT_DEVICE_KIND === 'desktop', - }, - showFixedPostForm: { - where: 'device', - default: false, - }, - showFixedPostFormInChannel: { - where: 'device', - default: false, - }, - enableInfiniteScroll: { - where: 'device', - default: true, - }, - useReactionPickerForContextMenu: { - where: 'device', - default: false, - }, - showGapBetweenNotesInTimeline: { - where: 'device', - default: false, - }, - instanceTicker: { - where: 'device', - default: 'remote' as 'none' | 'remote' | 'always', - }, - emojiPickerScale: { - where: 'device', - default: 1, - }, - emojiPickerWidth: { - where: 'device', - default: 1, - }, - emojiPickerHeight: { - where: 'device', - default: 2, - }, - emojiPickerStyle: { - where: 'device', - default: 'auto' as 'auto' | 'popup' | 'drawer', - }, - reportError: { - where: 'device', - default: false, - }, - squareAvatars: { - where: 'device', - default: false, - }, - showAvatarDecorations: { - where: 'device', - default: true, - }, - numberOfPageCache: { - where: 'device', - default: 3, - }, - showNoteActionsOnlyHover: { - where: 'device', - default: false, - }, - showClipButtonInNoteFooter: { - where: 'device', - default: false, - }, - reactionsDisplaySize: { - where: 'device', - default: 'medium' as 'small' | 'medium' | 'large', - }, - limitWidthOfReaction: { - where: 'device', - default: true, - }, - forceShowAds: { - where: 'device', - default: false, - }, - aiChanMode: { - where: 'device', - default: false, - }, - devMode: { - where: 'device', - default: false, - }, - mediaListWithOneImageAppearance: { - where: 'device', - default: 'expand' as 'expand' | '16_9' | '1_1' | '2_3', - }, - notificationPosition: { - where: 'device', - default: 'rightBottom' as 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom', - }, - notificationStackAxis: { - where: 'device', - default: 'horizontal' as 'vertical' | 'horizontal', - }, - enableCondensedLine: { - where: 'device', - default: true, - }, - keepScreenOn: { - where: 'device', - default: false, - }, - useGroupedNotifications: { - where: 'device', - default: true, - }, - dataSaver: { - where: 'device', - default: { - media: false, - avatar: false, - urlPreview: false, - code: false, - }, - }, - enableSeasonalScreenEffect: { - where: 'device', - default: false, - }, - enableHorizontalSwipe: { - where: 'device', - default: true, - }, - useNativeUIForVideoAudioPlayer: { - where: 'device', - default: false, - }, - keepOriginalFilename: { - where: 'device', - default: true, - }, - alwaysConfirmFollow: { - where: 'device', - default: true, - }, - confirmWhenRevealingSensitiveMedia: { - where: 'device', - default: false, - }, - contextMenu: { - where: 'device', - default: 'app' as 'app' | 'appWithShift' | 'native', - }, - skipNoteRender: { - where: 'device', - default: true, - }, - showSoftWordMutedWord: { - where: 'device', - default: false, - }, - confirmOnReact: { - where: 'device', - default: false, - }, - hemisphere: { - where: 'device', - default: hemisphere as 'N' | 'S', - }, - sound_masterVolume: { - where: 'device', - default: 0.3, - }, - sound_notUseSound: { - where: 'device', - default: false, - }, - sound_useSoundOnlyWhenActive: { - where: 'device', - default: false, - }, - sound_note: { - where: 'device', - default: { type: 'syuilo/n-aec', volume: 1 }, - }, - sound_noteMy: { - where: 'device', - default: { type: 'syuilo/n-cea-4va', volume: 1 }, - }, - sound_notification: { - where: 'device', - default: { type: 'syuilo/n-ea', volume: 1 }, - }, - sound_reaction: { - where: 'device', - default: { type: 'syuilo/bubble2', volume: 1 }, - }, - dropAndFusion: { - where: 'device', - default: { - bgmVolume: 0.25, - sfxVolume: 1, - }, - }, - //#endregion })); // TODO: 他のタブと永続化されたstateを同期 diff --git a/packages/i18n/src/autogen/locale.ts b/packages/i18n/src/autogen/locale.ts index 07e9a3afc1..7a4d46abf5 100644 --- a/packages/i18n/src/autogen/locale.ts +++ b/packages/i18n/src/autogen/locale.ts @@ -5444,14 +5444,6 @@ export interface Locale extends ILocale { * メッセージ */ "directMessage_short": string; - /** - * 旧設定情報を移行 - */ - "migrateOldSettings": string; - /** - * 通常これは自動で行われていますが、何らかの理由により上手く移行されなかった場合は手動で移行処理をトリガーできます。現在の設定情報は上書きされます。 - */ - "migrateOldSettings_description": string; /** * 圧縮 */ @@ -5472,10 +5464,6 @@ export interface Locale extends ILocale { * 埋め込み */ "embed": string; - /** - * 設定を移行しています。しばらくお待ちください... (後ほど、設定→その他→旧設定情報を移行 で手動で移行することもできます) - */ - "settingsMigrating": string; /** * 読み取り専用 */