mirror of
https://github.com/hotomoe/hotomoe
synced 2024-12-12 05:38:12 +09:00
バックアップ名が null のバックアップが作成でき削除などの操作ができなくなる問題を修正 (MisskeyIO#474)
This commit is contained in:
parent
c795ec2111
commit
dbcf85e620
@ -289,7 +289,7 @@ export function inputText(props: {
|
|||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
done: result => {
|
done: result => {
|
||||||
resolve(result ? result : { canceled: true });
|
resolve(typeof result.result === 'string' ? result : { canceled: true, result: undefined });
|
||||||
},
|
},
|
||||||
}, 'closed');
|
}, 'closed');
|
||||||
});
|
});
|
||||||
|
@ -278,7 +278,7 @@ async function applyProfile(id: string): Promise<void> {
|
|||||||
const { canceled: cancel1 } = await os.confirm({
|
const { canceled: cancel1 } = await os.confirm({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
title: ts._preferencesBackups.apply,
|
title: ts._preferencesBackups.apply,
|
||||||
text: t('_preferencesBackups.applyConfirm', { name: profile.name }),
|
text: t('_preferencesBackups.applyConfirm', { name: profile.name || '' }),
|
||||||
});
|
});
|
||||||
if (cancel1) return;
|
if (cancel1) return;
|
||||||
|
|
||||||
@ -336,7 +336,7 @@ async function deleteProfile(id: string): Promise<void> {
|
|||||||
const { canceled } = await os.confirm({
|
const { canceled } = await os.confirm({
|
||||||
type: 'info',
|
type: 'info',
|
||||||
title: ts.delete,
|
title: ts.delete,
|
||||||
text: t('deleteAreYouSure', { x: profiles.value[id].name }),
|
text: t('deleteAreYouSure', { x: profiles.value[id].name || '' }),
|
||||||
});
|
});
|
||||||
if (canceled) return;
|
if (canceled) return;
|
||||||
|
|
||||||
@ -352,7 +352,7 @@ async function save(id: string): Promise<void> {
|
|||||||
const { canceled } = await os.confirm({
|
const { canceled } = await os.confirm({
|
||||||
type: 'info',
|
type: 'info',
|
||||||
title: ts._preferencesBackups.save,
|
title: ts._preferencesBackups.save,
|
||||||
text: t('_preferencesBackups.saveConfirm', { name }),
|
text: t('_preferencesBackups.saveConfirm', { name: name || '' }),
|
||||||
});
|
});
|
||||||
if (canceled) return;
|
if (canceled) return;
|
||||||
|
|
||||||
@ -387,7 +387,7 @@ async function rename(id: string): Promise<void> {
|
|||||||
const { canceled: cancel2 } = await os.confirm({
|
const { canceled: cancel2 } = await os.confirm({
|
||||||
type: 'info',
|
type: 'info',
|
||||||
title: ts.rename,
|
title: ts.rename,
|
||||||
text: t('_preferencesBackups.renameConfirm', { old: registry.name, new: name }),
|
text: t('_preferencesBackups.renameConfirm', { old: registry.name || '', new: name }),
|
||||||
});
|
});
|
||||||
if (cancel2) return;
|
if (cancel2) return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user