Merge 77bb0caeb0
into 218070eb13
This commit is contained in:
commit
a731783009
|
@ -15,6 +15,7 @@
|
||||||
- Enhance: 絵文字ピッカーのサイズをより大きくできるように
|
- Enhance: 絵文字ピッカーのサイズをより大きくできるように
|
||||||
- Enhance: 時刻計算のための基準値を一か所で管理するようにし、パフォーマンスを向上
|
- Enhance: 時刻計算のための基準値を一か所で管理するようにし、パフォーマンスを向上
|
||||||
- Fix: iOSで、デバイスがダークモードだと初回読み込み時にエラーになる問題を修正
|
- Fix: iOSで、デバイスがダークモードだと初回読み込み時にエラーになる問題を修正
|
||||||
|
- Fix: 設定データの移行が完了しているクライアントでは、設定データ移行用のプログラムの読み込みをスキップするように
|
||||||
|
|
||||||
### Server
|
### Server
|
||||||
- Enhance: ユーザーIPを確実に取得できるために設定ファイルにFastifyOptions.trustProxyを追加しました
|
- Enhance: ユーザーIPを確実に取得できるために設定ファイルにFastifyOptions.trustProxyを追加しました
|
||||||
|
|
|
@ -27,7 +27,6 @@ import { makeHotkey } from '@/utility/hotkey.js';
|
||||||
import { addCustomEmoji, removeCustomEmojis, updateCustomEmojis } from '@/custom-emojis.js';
|
import { addCustomEmoji, removeCustomEmojis, updateCustomEmojis } from '@/custom-emojis.js';
|
||||||
import { prefer } from '@/preferences.js';
|
import { prefer } from '@/preferences.js';
|
||||||
import { updateCurrentAccountPartial } from '@/accounts.js';
|
import { updateCurrentAccountPartial } from '@/accounts.js';
|
||||||
import { migrateOldSettings } from '@/pref-migrate.js';
|
|
||||||
import { unisonReload } from '@/utility/unison-reload.js';
|
import { unisonReload } from '@/utility/unison-reload.js';
|
||||||
|
|
||||||
export async function mainBoot() {
|
export async function mainBoot() {
|
||||||
|
@ -74,6 +73,8 @@ export async function mainBoot() {
|
||||||
if (lastVersion && (compareVersions('2025.3.2-alpha.0', lastVersion) === 1)) {
|
if (lastVersion && (compareVersions('2025.3.2-alpha.0', lastVersion) === 1)) {
|
||||||
console.log('Preferences migration');
|
console.log('Preferences migration');
|
||||||
|
|
||||||
|
const { migrateOldSettings } = await import('@/pref-migrate.js');
|
||||||
|
|
||||||
migrateOldSettings();
|
migrateOldSettings();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,15 +14,23 @@ import * as os from '@/os.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
|
|
||||||
// TODO: そのうち消す
|
// TODO: そのうち消す
|
||||||
export function migrateOldSettings() {
|
export async function migrateOldSettings() {
|
||||||
os.waiting({ text: i18n.ts.settingsMigrating });
|
os.waiting({ text: i18n.ts.settingsMigrating });
|
||||||
|
|
||||||
store.loaded.then(async () => {
|
const minWait = new Promise<void>(resolve => {
|
||||||
misskeyApi('i/registry/get', { scope: ['client'], key: 'themes' }).catch(() => []).then((themes: any) => {
|
window.setTimeout(() => {
|
||||||
|
resolve();
|
||||||
|
}, 5000);
|
||||||
|
});
|
||||||
|
|
||||||
|
const migratePromise = store.loaded.then(async () => {
|
||||||
|
const migrationPromises: Promise<any>[] = [];
|
||||||
|
|
||||||
|
migrationPromises.push(misskeyApi('i/registry/get', { scope: ['client'], key: 'themes' }).catch(() => []).then((themes: any) => {
|
||||||
if (themes.length > 0) {
|
if (themes.length > 0) {
|
||||||
prefer.commit('themes', themes);
|
prefer.commit('themes', themes);
|
||||||
}
|
}
|
||||||
});
|
}));
|
||||||
|
|
||||||
const plugins = ColdDeviceStorage.get('plugins');
|
const plugins = ColdDeviceStorage.get('plugins');
|
||||||
prefer.commit('plugins', plugins.map(p => {
|
prefer.commit('plugins', plugins.map(p => {
|
||||||
|
@ -35,7 +43,7 @@ export function migrateOldSettings() {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
prefer.commit('deck.profile', deckStore.s.profile);
|
prefer.commit('deck.profile', deckStore.s.profile);
|
||||||
misskeyApi('i/registry/keys', {
|
migrationPromises.push(misskeyApi('i/registry/keys', {
|
||||||
scope: ['client', 'deck', 'profiles'],
|
scope: ['client', 'deck', 'profiles'],
|
||||||
}).then(async keys => {
|
}).then(async keys => {
|
||||||
const profiles: DeckProfile[] = [];
|
const profiles: DeckProfile[] = [];
|
||||||
|
@ -52,7 +60,7 @@ export function migrateOldSettings() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
prefer.commit('deck.profiles', profiles);
|
prefer.commit('deck.profiles', profiles);
|
||||||
});
|
}));
|
||||||
|
|
||||||
prefer.commit('lightTheme', ColdDeviceStorage.get('lightTheme'));
|
prefer.commit('lightTheme', ColdDeviceStorage.get('lightTheme'));
|
||||||
prefer.commit('darkTheme', ColdDeviceStorage.get('darkTheme'));
|
prefer.commit('darkTheme', ColdDeviceStorage.get('darkTheme'));
|
||||||
|
@ -146,8 +154,11 @@ export function migrateOldSettings() {
|
||||||
prefer.commit('defaultNoteVisibility', store.s.defaultNoteVisibility);
|
prefer.commit('defaultNoteVisibility', store.s.defaultNoteVisibility);
|
||||||
prefer.commit('defaultNoteLocalOnly', store.s.defaultNoteLocalOnly);
|
prefer.commit('defaultNoteLocalOnly', store.s.defaultNoteLocalOnly);
|
||||||
|
|
||||||
window.setTimeout(() => {
|
await Promise.all(migrationPromises);
|
||||||
unisonReload();
|
|
||||||
}, 10000);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 最低5秒 or 設定移行が完了するまで待つ
|
||||||
|
await Promise.all([migratePromise, minWait]);
|
||||||
|
|
||||||
|
unisonReload();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue