feat: Add application-level settings for CSS color management
Some checks failed
Run Tests / test (push) Failing after 1m51s

- Introduced a new table `application_setting` to store configurable application options.
- Implemented functions to manage CSS color settings, including loading, updating, and reading environment overrides.
- Added a new settings view to render and manage theme colors.
- Updated UI to include a settings page with theme color management and environment overrides display.
- Enhanced CSS styles for the settings page and sidebar navigation.
- Created unit and end-to-end tests for the new settings functionality and CSS management.
This commit is contained in:
2025-10-25 19:20:52 +02:00
parent e74ec79cc9
commit 5b1322ddbc
24 changed files with 1336 additions and 35 deletions

View File

@@ -1,17 +1,3 @@
{% set nav_links = [
("/", "Dashboard"),
("/ui/scenarios", "Scenarios"),
("/ui/parameters", "Parameters"),
("/ui/currencies", "Currencies"),
("/ui/costs", "Costs"),
("/ui/consumption", "Consumption"),
("/ui/production", "Production"),
("/ui/equipment", "Equipment"),
("/ui/maintenance", "Maintenance"),
("/ui/simulations", "Simulations"),
("/ui/reporting", "Reporting"),
] %}
<div class="sidebar-inner">
<div class="sidebar-brand">
<span class="brand-logo" aria-hidden="true">CM</span>
@@ -20,20 +6,5 @@
<span class="brand-subtitle">Mining Planner</span>
</div>
</div>
<nav class="sidebar-nav" aria-label="Primary navigation">
{% set current_path = request.url.path if request else "" %}
{% for href, label in nav_links %}
{% if href == "/" %}
{% set is_active = current_path == "/" %}
{% else %}
{% set is_active = current_path.startswith(href) %}
{% endif %}
<a
href="{{ href }}"
class="sidebar-link{% if is_active %} is-active{% endif %}"
>
{{ label }}
</a>
{% endfor %}
</nav>
{% include "partials/sidebar_nav.html" %}
</div>