From 5b69ccb02bc267a7786faa5771a9e0993a8987c1 Mon Sep 17 00:00:00 2001 From: scheianu Date: Wed, 14 Oct 2026 22:35:39 +0300 Subject: [PATCH] Fix dark-theme colours on player delete modal and maintenance page Both bugs had the same cause: light colours were set with inline style attributes, which outrank the theme rules in base.html and so survived the dark theme. Text that inherits --text-color then became light-on-light. * manage_player.html: the delete confirmation modal used an inline background-color of #fefefe with the body's dark-mode text colour, making the message unreadable in dark mode. Rebuilt it with .modal-* classes driven by the base.html CSS variables (and dark-mode variants for the title, warning and player name). * admin/maintenance.html: the "Automatic reset interval" panel, table headers and JS-rendered rows/tables hardcoded #f8f9fa/#e2e8f0/#dee2e6. Switched them to --bg-color / --card-bg / --border-color / --text-secondary and added a themed .maint-badge-pending. Verified with computed styles in both themes; light mode is unchanged. --- app/templates/admin/maintenance.html | 82 ++++++++++++------ app/templates/players/manage_player.html | 104 ++++++++++++++++++----- 2 files changed, 142 insertions(+), 44 deletions(-) diff --git a/app/templates/admin/maintenance.html b/app/templates/admin/maintenance.html index 8eabc6d..3771174 100644 --- a/app/templates/admin/maintenance.html +++ b/app/templates/admin/maintenance.html @@ -3,6 +3,41 @@ {% block title %}Maintenance - Admin - DigiServer v2{% endblock %} {% block content %} + +
@@ -64,16 +99,17 @@

+ class="maint-panel" + style="display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 25px; padding: 15px;">
+ style="padding: 10px; border: 1px solid var(--border-color); border-radius: 6px; width: 140px;">
-
+
Days before a token expires automatically. Use 0 to disable. {% if auth_config %}
Last changed by {{ auth_config.updated_by or 'unknown' }} @@ -95,49 +131,47 @@
- + - - - - - + + + + + {% for player in players %} {% set age = player.auth_token_age_days() %} - + {% else %} - @@ -200,7 +234,7 @@ function tableRow(cells) { return '' + cells.map(function (c) { - return ''; + return ''; }).join('') + ''; } @@ -235,7 +269,7 @@ html += banner(data.ok, data.ok ? 'Database integrity OK — no problems found.' : 'Issues detected — review the details below.'); - html += '
' + + html += '
' + '
Integrity check: ' + esc(data.integrity.join(', ')) + '
' + '
Quick check: ' + esc(data.quick_check.join(', ')) + '
' + '
Database size: ' + esc(data.db_size_mb) + ' MB' + @@ -247,7 +281,7 @@ html += '
PlayerStatusToken AgeRe-authActionsPlayerStatusToken AgeRe-authActions
{{ player.name }} -
{{ player.hostname }}
+
{{ player.hostname }}
{% if player.is_online %} ● Online {% else %} - ○ {{ player.status or 'offline' }} + ○ {{ player.status or 'offline' }} {% endif %} {% if age is not none %} {{ '%.1f'|format(age) }} day(s) {% if player.auth_token_issued_at %} -
+
issued {{ player.auth_token_issued_at | localtime('%Y-%m-%d %H:%M') }}
{% endif %} {% else %} - — + — {% endif %}
{% if player.auth_reset_required %} - - pending - + pending {% else %} - — + — {% endif %} @@ -160,7 +194,7 @@
+ No players registered yet.
' + c + '' + c + '
'; html += '' + ['Table', 'Row ID', 'Missing parent', 'Constraint'].map(function (h) { - return ''; + return ''; }).join('') + ''; data.foreign_key_violations.slice(0, 100).forEach(function (v) { html += tableRow([esc(v.table), esc(v.rowid), esc(v.parent), esc(v.constraint)]); @@ -299,7 +333,7 @@ html += '
' + h + '' + h + '
'; html += '' + ['Type', 'Table', 'Action', 'Count'].map(function (h) { - return ''; + return ''; }).join('') + ''; data.checks.forEach(function (c) { if (c.error) { @@ -337,7 +371,7 @@ html += '
' + h + '' + h + '
'; html += '' + ['Record type', 'Action', 'Rows removed'].map(function (h) { - return ''; + return ''; }).join('') + ''; data.cleaned.forEach(function (c) { html += tableRow([esc(c.label), esc(c.action), c.rows]); diff --git a/app/templates/players/manage_player.html b/app/templates/players/manage_player.html index 630bc6e..392a360 100644 --- a/app/templates/players/manage_player.html +++ b/app/templates/players/manage_player.html @@ -290,24 +290,24 @@ -
' + h + '' + h + '