From 9a6b877190797153b1c756278c48b4f6b904e49e Mon Sep 17 00:00:00 2001 From: Pedro Pinto Silva Date: Tue, 10 Oct 2023 14:56:26 +0200 Subject: [PATCH] Snackbar hasProgress: Set to double column grid Use new id for snackbar with progress and style it Signed-off-by: Pedro Pinto Silva Change-Id: I24a1647f0f629b7b079aa65601f4309c339a06e8 --- browser/css/jsdialogs.css | 13 ++++++++++++- browser/src/control/Control.UIManager.js | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/browser/css/jsdialogs.css b/browser/css/jsdialogs.css index b1d3b4b952c7..fdf687e8f4f1 100644 --- a/browser/css/jsdialogs.css +++ b/browser/css/jsdialogs.css @@ -1386,7 +1386,8 @@ input[type='number']:hover::-webkit-outer-spin-button { .snackbar.jsdialog-window { overflow: visible; } -.snackbar #snackbar-container { +.snackbar #snackbar-container, +.snackbar #snackbar-container-progress { align-items: center; max-width: calc(80vw); } @@ -1437,6 +1438,16 @@ input[type='number']:hover::-webkit-outer-spin-button { padding: 8px; } +#snackbar-container-progress .ui-progressbar { + display: grid; + grid-column: 1 / 3; +} + +#snackbar-container-progress { + grid-template-rows: repeat(2, auto); + grid-template-columns: repeat(2, auto); +} + #mobile-wizard.popup.snackbar #button, .snackbar.jsdialog-container #button { color: #469cff !important; diff --git a/browser/src/control/Control.UIManager.js b/browser/src/control/Control.UIManager.js index 851556caf425..778c24ebf4e3 100644 --- a/browser/src/control/Control.UIManager.js +++ b/browser/src/control/Control.UIManager.js @@ -938,7 +938,7 @@ L.Control.UIManager = L.Control.extend({ 'init_focus_id': action ? buttonId : undefined, children: [ { - id: 'snackbar-container', + id: hasProgress ? 'snackbar-container-progress' : 'snackbar-container', type: 'container', children: [ action ? {id: labelId, type: 'fixedtext', text: label, labelFor: buttonId} : {id: 'label-no-action', type: 'fixedtext', text: label},