1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-21 02:55:25 +02:00

refactor(frontend): os.select, MkSelectのitem指定をオブジェクトによる定義に統一し、型を狭める (#16475)

* refactor(frontend): MkSelectのitem指定をオブジェクトによる定義に統一

* fix

* spdx

* fix

* fix os.select

* fix lint

* add comment

* fix

* fix: os.select対応漏れを修正

* fix

* fix

* fix: MkSelectのmodelに対する型チェックを厳格化

* fix

* fix

* fix

* Update packages/frontend/src/components/MkEmbedCodeGenDialog.vue

Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>

* fix

* fix types

* fix

* fix

* Update packages/frontend/src/pages/admin/roles.editor.vue

Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>

* fix: MkSelectに直接配列を指定している場合に正常に型が解決されるように

---------

Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
かっこかり
2025-09-13 21:00:33 +09:00
committed by GitHub
parent b7da6cad87
commit d4654dd7bd
64 changed files with 1171 additions and 765 deletions

View File

@@ -447,16 +447,16 @@ export class PreferencesManager {
title: i18n.ts.preferenceSyncConflictTitle,
text: i18n.ts.preferenceSyncConflictText,
items: [...(mergedValue !== undefined ? [{
text: i18n.ts.preferenceSyncConflictChoiceMerge,
value: 'merge',
label: i18n.ts.preferenceSyncConflictChoiceMerge,
value: 'merge' as const,
}] : []), {
text: i18n.ts.preferenceSyncConflictChoiceServer,
value: 'remote',
label: i18n.ts.preferenceSyncConflictChoiceServer,
value: 'remote' as const,
}, {
text: i18n.ts.preferenceSyncConflictChoiceDevice,
value: 'local',
label: i18n.ts.preferenceSyncConflictChoiceDevice,
value: 'local' as const,
}, {
text: i18n.ts.preferenceSyncConflictChoiceCancel,
label: i18n.ts.preferenceSyncConflictChoiceCancel,
value: null,
}],
default: mergedValue !== undefined ? 'merge' : 'remote',

View File

@@ -187,7 +187,7 @@ export async function restoreFromCloudBackup() {
const select = await os.select({
title: i18n.ts._preferencesBackup.selectBackupToRestore,
items: backups.map(backup => ({
text: backup.name,
label: backup.name,
value: backup.name,
})),
});