Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion fluxtuner/web/static/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ html[data-theme="light"] .player-debug-export {
/* User management: light theme */

html[data-theme="light"] .admin-user-form button {
color: #04111f;
color: #ffffff;
border-color: var(--action-fill);
background: var(--action-fill);
}
Expand All @@ -564,6 +564,35 @@ html[data-theme="light"] .admin-user-actions [data-admin-user-action="deactivate
background: rgba(254, 243, 199, 0.82);
}

html[data-theme="light"] .admin-user-form,
html[data-theme="light"] .admin-users-row {
border-color: rgba(100, 116, 139, 0.18);
background: rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] .admin-users-head {
background: transparent;
}

html[data-theme="light"] .admin-user-actions [data-admin-user-action="reject"],
html[data-theme="light"] .admin-user-actions [data-admin-password-change-action="reject"] {
color: #991b1b;
border-color: rgba(220, 38, 38, 0.28);
background: rgba(254, 226, 226, 0.82);
}

html[data-theme="light"] .admin-user-actions [data-admin-user-action="delete"] {
color: #ffffff;
border-color: #b91c1c;
background: #b91c1c;
}

html[data-theme="light"] .admin-user-actions [data-admin-user-action="delete"]:not(:disabled):hover {
color: #ffffff;
border-color: #991b1b;
background: #991b1b;
}

/* Completed admin diagnostic ownership */

.player-debug-details {
Expand Down
2 changes: 1 addition & 1 deletion fluxtuner/web/static/auth.css
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@

html[data-theme="light"] .auth-form button,
html[data-theme="light"] .setup-form button {
color: #04111f;
color: #ffffff;
border-color: var(--action-fill);
background: var(--action-fill);
}
Expand Down
22 changes: 22 additions & 0 deletions fluxtuner/web/static/search.css
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,25 @@
width: fit-content;
}
}

html[data-theme="light"] .search-form button {
color: #ffffff;
border-color: var(--action-fill);
background: var(--action-fill);
}

html[data-theme="light"] .search-form button:not(:disabled):hover {
color: #ffffff;
border-color: var(--action-fill-hover);
background: var(--action-fill-hover);
}

html[data-theme="light"] .search-debug-panel {
border-color: rgba(14, 116, 144, 0.2);
background: rgba(255, 255, 255, 0.76);
}

html[data-theme="light"] .search-debug-panel div {
border-color: rgba(100, 116, 139, 0.16);
background: rgba(241, 245, 249, 0.82);
}
19 changes: 19 additions & 0 deletions fluxtuner/web/static/station-actions.css
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,22 @@ html[data-theme="light"] .station-actions a.station-external-link:hover {
color: #334155;
background: rgba(241, 245, 249, 0.92);
}

html[data-theme="light"] .station-actions button[data-play-station] {
color: #ffffff;
border-color: var(--action-fill);
background: var(--action-fill);
}

html[data-theme="light"] .station-actions button[data-play-station]:not(:disabled):hover {
color: #ffffff;
border-color: var(--action-fill-hover);
background: var(--action-fill-hover);
}

html[data-theme="light"] .station-actions [data-delete-playlist],
html[data-theme="light"] .station-actions [data-remove-from-playlist] {
color: #991b1b;
border-color: rgba(220, 38, 38, 0.28);
background: rgba(254, 226, 226, 0.82);
}
2 changes: 1 addition & 1 deletion fluxtuner/web/static/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ h1 {
--muted: #52677d;
--accent: #0f766e;
--accent-strong: #0284c7;
--action-fill: #6ee7d8;
--action-fill: #0891b2;
--action-fill-hover: #0e7490;
--border: rgba(14, 116, 144, 0.24);
--border-soft: rgba(14, 116, 144, 0.14);
Expand Down
57 changes: 57 additions & 0 deletions tests/test_web_light_theme_css.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
from fastapi.testclient import TestClient

from fluxtuner.web.app import create_app


def test_light_theme_defines_complete_color_tokens() -> None:
client = TestClient(create_app())

styles_response = client.get("/static/styles.css")
forms_response = client.get("/static/forms.css")

assert styles_response.status_code == 200
assert forms_response.status_code == 200

assert "--action-fill: #0891b2;" in styles_response.text
assert "--action-fill-hover: #0e7490;" in styles_response.text

assert "--help-text: #b8ccde;" in forms_response.text
assert "--help-text: #47637f;" in forms_response.text
assert "--help-text:" not in styles_response.text


def test_light_theme_primary_actions_use_light_palette() -> None:
client = TestClient(create_app())

search_css = client.get("/static/search.css").text
auth_css = client.get("/static/auth.css").text
station_css = client.get("/static/station-actions.css").text
admin_css = client.get("/static/admin.css").text

assert 'html[data-theme="light"] .search-form button' in search_css
assert 'html[data-theme="light"] .auth-form button' in auth_css
assert 'html[data-theme="light"] .station-actions button[data-play-station]' in station_css
assert 'html[data-theme="light"] .admin-user-form button' in admin_css

for css in (search_css, auth_css, station_css, admin_css):
assert "color: #ffffff;" in css


def test_light_theme_overrides_dark_diagnostic_and_destructive_surfaces() -> None:
client = TestClient(create_app())

search_css = client.get("/static/search.css").text
station_css = client.get("/static/station-actions.css").text
admin_css = client.get("/static/admin.css").text

assert 'html[data-theme="light"] .search-debug-panel' in search_css
assert 'html[data-theme="light"] .search-debug-panel div' in search_css
assert 'html[data-theme="light"] .station-actions [data-delete-playlist]' in station_css
assert (
'html[data-theme="light"] .admin-user-actions [data-admin-user-action="reject"]'
in admin_css
)
assert (
'html[data-theme="light"] .admin-user-actions [data-admin-user-action="delete"]'
in admin_css
)