Fix buttons on safeStorage fallback modal
This commit is contained in:
parent
2eb2a64e0a
commit
133f12cfd1
1 changed files with 6 additions and 3 deletions
|
@ -1654,8 +1654,11 @@ async function initializeSQL(
|
||||||
const { i18n } = getResolvedMessagesLocale();
|
const { i18n } = getResolvedMessagesLocale();
|
||||||
|
|
||||||
const buttonIndex = dialog.showMessageBoxSync({
|
const buttonIndex = dialog.showMessageBoxSync({
|
||||||
buttons: [i18n('icu:cancel'), i18n('icu:databaseError__recover__button')],
|
buttons: [
|
||||||
defaultId: 1,
|
i18n('icu:databaseError__recover__button'),
|
||||||
|
i18n('icu:copyErrorAndQuit'),
|
||||||
|
],
|
||||||
|
defaultId: 0,
|
||||||
cancelId: 1,
|
cancelId: 1,
|
||||||
message: i18n('icu:databaseError'),
|
message: i18n('icu:databaseError'),
|
||||||
detail: i18n('icu:databaseError__recover__detail', {
|
detail: i18n('icu:databaseError__recover__detail', {
|
||||||
|
@ -1665,7 +1668,7 @@ async function initializeSQL(
|
||||||
type: 'error',
|
type: 'error',
|
||||||
});
|
});
|
||||||
|
|
||||||
const copyErrorAndQuitButtonIndex = 0;
|
const copyErrorAndQuitButtonIndex = 1;
|
||||||
if (buttonIndex === copyErrorAndQuitButtonIndex) {
|
if (buttonIndex === copyErrorAndQuitButtonIndex) {
|
||||||
clipboard.writeText(
|
clipboard.writeText(
|
||||||
`Database startup error:\n\n${redactAll(Errors.toLogFormat(error))}`
|
`Database startup error:\n\n${redactAll(Errors.toLogFormat(error))}`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue