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:
Sunil Mohan Adapa authored and James Valleroy committed 2025-12-02 20:17:36 -05:00
1 parent 4bbe53e9ff
commit 85f04dde1a
2 files changed
+9 -2

No files matched your search

+4 -2
View File
@@ -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 {
+5
View File
@@ -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