Fix indexedDB deletion modal

This commit is contained in:
trevor-signal 2024-02-13 16:48:09 -05:00 committed by GitHub
parent 9ad6d5b66b
commit 5ba3ed1241
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 8 additions and 9 deletions

View File

@ -92,7 +92,7 @@
</head>
<body class="overflow-hidden">
<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-splash-screen__logo module-img--150"></div>

View File

@ -265,11 +265,6 @@ $loading-height: 16px;
padding-block: 0;
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
* theme class.
*/

View File

@ -10,7 +10,8 @@ body {
// 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.
--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));
}
}

View File

@ -645,6 +645,7 @@ export async function startApp(): Promise<void> {
await new Promise<void>((resolve, reject) => {
showConfirmationDialog({
dialogName: 'deleteOldIndexedDBData',
noMouseClose: true,
onTopOfEverything: true,
cancelText: window.i18n('icu:quit'),
confirmStyle: 'negative',

View File

@ -13,6 +13,7 @@ type ConfirmationDialogViewProps = {
title: string;
description?: string;
okText: string;
noMouseClose?: boolean;
reject?: (error: Error) => void;
resolve: () => void;
};
@ -25,7 +26,7 @@ function removeConfirmationDialog() {
return;
}
window.reduxActions.globalModals.toggleConfirmationModal(false);
window.reduxActions?.globalModals.toggleConfirmationModal(false);
unmountComponentAtNode(confirmationDialogViewNode);
document.body.removeChild(confirmationDialogViewNode);
@ -46,7 +47,7 @@ export function showConfirmationDialog(
removeConfirmationDialog();
}
window.reduxActions.globalModals.toggleConfirmationModal(true);
window.reduxActions?.globalModals.toggleConfirmationModal(true);
confirmationDialogViewNode = document.createElement('div');
document.body.appendChild(confirmationDialogViewNode);
@ -77,6 +78,7 @@ export function showConfirmationDialog(
removeConfirmationDialog();
}}
title={options.title}
noMouseClose={options.noMouseClose}
>
{options.description}
</ConfirmationDialog>,