From 91324a4a48d8ea7c2d51fa3671a7e437887d9d79 Mon Sep 17 00:00:00 2001 From: tophf Date: Fri, 6 Aug 2021 19:50:36 +0300 Subject: [PATCH] use `center-dialog` class for import&history regressed in a2c8953e which centered the contents too --- js/dlg/message-box.css | 6 ++++-- manage/import-export.js | 2 +- manage/updater-ui.js | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/js/dlg/message-box.css b/js/dlg/message-box.css index 7f80d853..48874cb0 100644 --- a/js/dlg/message-box.css +++ b/js/dlg/message-box.css @@ -36,7 +36,8 @@ animation: fadeout .25s ease-in-out; } -#message-box.center { +#message-box.center, +#message-box.center-dialog { align-items: center; justify-content: center; } @@ -49,7 +50,8 @@ text-align: left; } -#message-box.center > div { +#message-box.center > div, +#message-box.center-dialog > div { top: unset; right: unset; } diff --git a/manage/import-export.js b/manage/import-export.js index 4f742f77..b26bf4c7 100644 --- a/manage/import-export.js +++ b/manage/import-export.js @@ -206,10 +206,10 @@ async function importFromString(jsonString) { const report = entries.map(renderStats).filter(Boolean); messageBoxProxy.show({ title: t('importReportTitle'), + className: 'center-dialog', contents: $create('#import', report.length ? report : t('importReportUnchanged')), buttons: [t('confirmClose'), numChanged && t('undo')], onshow: bindClick, - className: 'center', }) .then(({button}) => { if (button === 1) { diff --git a/manage/updater-ui.js b/manage/updater-ui.js index 77893cac..42bb66fe 100644 --- a/manage/updater-ui.js +++ b/manage/updater-ui.js @@ -223,8 +223,8 @@ async function showUpdateHistory(event) { const logText = lines.join('\n'); messageBoxProxy.show({ title: t('updateCheckHistory'), + className: 'center-dialog', contents: log, - className: 'center', blockScroll: true, buttons: [ t('confirmOK'),