1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-12 05:38:12 +09:00

バックアップ名が null のバックアップが作成でき削除などの操作ができなくなる問題を修正 (MisskeyIO#474)

This commit is contained in:
riku6460 2024-02-25 03:38:19 +09:00 committed by GitHub
parent c795ec2111
commit dbcf85e620
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -289,7 +289,7 @@ export function inputText(props: {
},
}, {
done: result => {
resolve(result ? result : { canceled: true });
resolve(typeof result.result === 'string' ? result : { canceled: true, result: undefined });
},
}, 'closed');
});

View File

@ -278,7 +278,7 @@ async function applyProfile(id: string): Promise<void> {
const { canceled: cancel1 } = await os.confirm({
type: 'warning',
title: ts._preferencesBackups.apply,
text: t('_preferencesBackups.applyConfirm', { name: profile.name }),
text: t('_preferencesBackups.applyConfirm', { name: profile.name || '' }),
});
if (cancel1) return;
@ -336,7 +336,7 @@ async function deleteProfile(id: string): Promise<void> {
const { canceled } = await os.confirm({
type: 'info',
title: ts.delete,
text: t('deleteAreYouSure', { x: profiles.value[id].name }),
text: t('deleteAreYouSure', { x: profiles.value[id].name || '' }),
});
if (canceled) return;
@ -352,7 +352,7 @@ async function save(id: string): Promise<void> {
const { canceled } = await os.confirm({
type: 'info',
title: ts._preferencesBackups.save,
text: t('_preferencesBackups.saveConfirm', { name }),
text: t('_preferencesBackups.saveConfirm', { name: name || '' }),
});
if (canceled) return;
@ -387,7 +387,7 @@ async function rename(id: string): Promise<void> {
const { canceled: cancel2 } = await os.confirm({
type: 'info',
title: ts.rename,
text: t('_preferencesBackups.renameConfirm', { old: registry.name, new: name }),
text: t('_preferencesBackups.renameConfirm', { old: registry.name || '', new: name }),
});
if (cancel2) return;