Fix indexedDB deletion modal
This commit is contained in:
parent
9ad6d5b66b
commit
5ba3ed1241
5 changed files with 8 additions and 9 deletions
|
@ -92,7 +92,7 @@
|
||||||
</head>
|
</head>
|
||||||
<body class="overflow-hidden">
|
<body class="overflow-hidden">
|
||||||
<div id="app-container">
|
<div id="app-container">
|
||||||
<div class="app-loading-screen app-loading-screen--without-titlebar">
|
<div class="app-loading-screen app-loading-screen--before-app-load">
|
||||||
<div class="module-title-bar-drag-area"></div>
|
<div class="module-title-bar-drag-area"></div>
|
||||||
|
|
||||||
<div class="module-splash-screen__logo module-img--150"></div>
|
<div class="module-splash-screen__logo module-img--150"></div>
|
||||||
|
|
|
@ -265,11 +265,6 @@ $loading-height: 16px;
|
||||||
padding-block: 0;
|
padding-block: 0;
|
||||||
padding-inline: 16px;
|
padding-inline: 16px;
|
||||||
|
|
||||||
&--without-titlebar {
|
|
||||||
/* There is no titlebar during loading screen on Windows */
|
|
||||||
-webkit-app-region: drag;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Note: background-color is intentionally transparent until body has the
|
/* Note: background-color is intentionally transparent until body has the
|
||||||
* theme class.
|
* theme class.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -10,7 +10,8 @@ body {
|
||||||
// It'd be great if we could use the `:fullscreen` selector here, but that does not seem
|
// It'd be great if we could use the `:fullscreen` selector here, but that does not seem
|
||||||
// to work with Electron, at least on macOS.
|
// to work with Electron, at least on macOS.
|
||||||
--title-bar-drag-area-height: 0px; // Needs to have a unit to work with `calc()`.
|
--title-bar-drag-area-height: 0px; // Needs to have a unit to work with `calc()`.
|
||||||
&.os-macos:not(.full-screen) {
|
&.os-macos:not(.full-screen),
|
||||||
|
.app-loading-screen--before-app-load {
|
||||||
--title-bar-drag-area-height: calc(28px / var(--zoom-factor));
|
--title-bar-drag-area-height: calc(28px / var(--zoom-factor));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -645,6 +645,7 @@ export async function startApp(): Promise<void> {
|
||||||
await new Promise<void>((resolve, reject) => {
|
await new Promise<void>((resolve, reject) => {
|
||||||
showConfirmationDialog({
|
showConfirmationDialog({
|
||||||
dialogName: 'deleteOldIndexedDBData',
|
dialogName: 'deleteOldIndexedDBData',
|
||||||
|
noMouseClose: true,
|
||||||
onTopOfEverything: true,
|
onTopOfEverything: true,
|
||||||
cancelText: window.i18n('icu:quit'),
|
cancelText: window.i18n('icu:quit'),
|
||||||
confirmStyle: 'negative',
|
confirmStyle: 'negative',
|
||||||
|
|
|
@ -13,6 +13,7 @@ type ConfirmationDialogViewProps = {
|
||||||
title: string;
|
title: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
okText: string;
|
okText: string;
|
||||||
|
noMouseClose?: boolean;
|
||||||
reject?: (error: Error) => void;
|
reject?: (error: Error) => void;
|
||||||
resolve: () => void;
|
resolve: () => void;
|
||||||
};
|
};
|
||||||
|
@ -25,7 +26,7 @@ function removeConfirmationDialog() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.reduxActions.globalModals.toggleConfirmationModal(false);
|
window.reduxActions?.globalModals.toggleConfirmationModal(false);
|
||||||
|
|
||||||
unmountComponentAtNode(confirmationDialogViewNode);
|
unmountComponentAtNode(confirmationDialogViewNode);
|
||||||
document.body.removeChild(confirmationDialogViewNode);
|
document.body.removeChild(confirmationDialogViewNode);
|
||||||
|
@ -46,7 +47,7 @@ export function showConfirmationDialog(
|
||||||
removeConfirmationDialog();
|
removeConfirmationDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
window.reduxActions.globalModals.toggleConfirmationModal(true);
|
window.reduxActions?.globalModals.toggleConfirmationModal(true);
|
||||||
|
|
||||||
confirmationDialogViewNode = document.createElement('div');
|
confirmationDialogViewNode = document.createElement('div');
|
||||||
document.body.appendChild(confirmationDialogViewNode);
|
document.body.appendChild(confirmationDialogViewNode);
|
||||||
|
@ -77,6 +78,7 @@ export function showConfirmationDialog(
|
||||||
removeConfirmationDialog();
|
removeConfirmationDialog();
|
||||||
}}
|
}}
|
||||||
title={options.title}
|
title={options.title}
|
||||||
|
noMouseClose={options.noMouseClose}
|
||||||
>
|
>
|
||||||
{options.description}
|
{options.description}
|
||||||
</ConfirmationDialog>,
|
</ConfirmationDialog>,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue