mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
ui: Fix dark theme colors for running status indicator
Tests: - Insert event.preventDefault() in form submission code for submission buttons. - For various button styles, submit the form. Running status indicator appears on the form button. The styles for the indicator is appropriate in dark and light themes. - Calibre delete library confirmation page has btn-danger. - Software Update, configuration update button has btn-primary. - Software Update, 'update now' button has btn-default. - Change a button from btn-primary to btn-link. Running status is not shown for this type of button. Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
4bbe53e9ff
commit
85f04dde1a
@ -739,8 +739,8 @@ footer {
|
||||
*/
|
||||
.running-status-button-before {
|
||||
display: inline-block;
|
||||
border: 0.25rem solid var(--neutral-light-color);
|
||||
border-top: 0.25rem solid var(--progress-color);
|
||||
border: 0.25rem solid var(--bs-btn-color);
|
||||
border-top-color: transparent;
|
||||
border-radius: 50%;
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
@ -748,6 +748,8 @@ footer {
|
||||
margin-left: 0.625rem;
|
||||
margin-bottom: -0.25rem;
|
||||
margin-right: -1.625rem;
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.running-status-button:disabled {
|
||||
|
||||
@ -85,6 +85,11 @@ function onSubmitAddProgress(event) {
|
||||
// For push buttons
|
||||
const beforeElement = document.createElement('div');
|
||||
beforeElement.classList.add('running-status-button-before');
|
||||
button.classList.forEach(className => {
|
||||
if (className.startsWith('btn-')) {
|
||||
beforeElement.classList.add(className);
|
||||
}
|
||||
});
|
||||
button.parentNode.insertBefore(beforeElement, button);
|
||||
} else if (button.tagName == "BUTTON") {
|
||||
// For toggle buttons
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user