refactor(theme): drop dark-green and collapse theme registry to light/dark
Remove the extensible theme catalog (config/themes.php + ThemeConfigGateway) in favor of a two-entry const on SettingsAppGateway. appThemes() now returns the list directly — no container lookup, no file include. Drop the dark-green theme assets, narrow [data-theme^="dark"] selectors to [data-theme="dark"], and tighten isDarkTheme() to an exact match. Ship an idempotent migration that corrects any leftover 'dark-green' rows on users and tenants to safe defaults (light / NULL). Tenant scoping (default_theme, allow_user_theme) and per-user override stay intact; only the catalog extensibility and the third theme are removed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -602,7 +602,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
[data-theme^="dark"] {
|
||||
[data-theme="dark"] {
|
||||
color-scheme: dark;
|
||||
--app-background-color: rgb(19, 22.5, 30.5);
|
||||
--app-sidebar-background-color: var(--app-background-color);
|
||||
@@ -830,7 +830,7 @@
|
||||
--app-icon-invalid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(149.5, 74, 80)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
[data-theme^="dark"]
|
||||
[data-theme="dark"]
|
||||
input:is(
|
||||
[type="submit"],
|
||||
[type="button"],
|
||||
|
||||
@@ -37,8 +37,8 @@ html[data-contrast="high"][data-theme="light"],
|
||||
--app-action-danger-outline-background: rgba(143, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
html[data-contrast="high"][data-theme^="dark"],
|
||||
[data-contrast="high"][data-theme^="dark"] {
|
||||
html[data-contrast="high"][data-theme="dark"],
|
||||
[data-contrast="high"][data-theme="dark"] {
|
||||
--app-background-color: #000;
|
||||
--app-sidebar-background-color: var(--app-background-color);
|
||||
--app-color: #f8fafc;
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
@charset "UTF-8";
|
||||
|
||||
@layer tokens {
|
||||
[data-theme="dark-green"] {
|
||||
--app-background-color: #0f1713;
|
||||
--app-sidebar-background-color: var(--app-background-color);
|
||||
--app-color: #cfe0d6;
|
||||
--app-text-selection-color: rgba(64, 170, 118, 0.25);
|
||||
--app-muted-color: #8a9b91;
|
||||
--app-muted-border-color: #223028;
|
||||
--app-form-element-background-color: #141f19;
|
||||
--app-form-element-border-color: #26362d;
|
||||
--app-form-element-color: #d5e6dc;
|
||||
--app-form-element-placeholder-color: #7f9187;
|
||||
--app-card-background-color: #141f19;
|
||||
--app-card-border-color: #223028;
|
||||
--app-card-sectioning-background-color: #1a261f;
|
||||
--app-details-card-open-summary-bg: #203026;
|
||||
--app-dropdown-background-color: #141f19;
|
||||
--app-dropdown-border-color: #223028;
|
||||
--app-dropdown-hover-background-color: #1f2a24;
|
||||
--app-modal-overlay-background-color: rgba(7, 10, 8, 0.75);
|
||||
--app-progress-background-color: #223028;
|
||||
--app-primary-h-base: 145;
|
||||
--app-primary-s-base: 38%;
|
||||
--app-primary-l-base: 38%;
|
||||
--badge-success-bg: #123225;
|
||||
--badge-success-color: #8de2b4;
|
||||
--badge-success-border: #1f4a36;
|
||||
--badge-danger-bg: #361a1d;
|
||||
--badge-danger-color: #f4a3ad;
|
||||
--badge-danger-border: #5a2b32;
|
||||
--badge-info-bg: #142735;
|
||||
--badge-info-color: #9ad2e0;
|
||||
--badge-info-border: #214156;
|
||||
--badge-warn-bg: #3a2a12;
|
||||
--badge-warn-color: #ffdf9e;
|
||||
--badge-warn-border: #5a401b;
|
||||
--badge-neutral-bg: #1b2620;
|
||||
--badge-neutral-color: #cfe0d6;
|
||||
--badge-neutral-border: #2a3a31;
|
||||
--app-tile-bg: rgb(20 28 24);
|
||||
--app-blockquote-background-color: rgb(20 28 24);
|
||||
}
|
||||
}
|
||||
@@ -691,11 +691,6 @@
|
||||
filter: invert(1);
|
||||
}
|
||||
|
||||
html[data-theme="dark-green"] button.gridjs-sort,
|
||||
html[data-theme="dark-green"] button.gridjs-sort-neutral {
|
||||
filter: invert(1);
|
||||
}
|
||||
|
||||
button.gridjs-sort {
|
||||
background-color: transparent;
|
||||
background-position-x: center;
|
||||
|
||||
@@ -8,7 +8,7 @@ const setTheme = (theme) => {
|
||||
document.documentElement.dataset.theme = theme;
|
||||
};
|
||||
|
||||
const isDarkTheme = (theme) => theme && theme.startsWith('dark');
|
||||
const isDarkTheme = (theme) => theme === 'dark';
|
||||
|
||||
const setIcon = (iconEl, theme) => {
|
||||
if (!iconEl) {
|
||||
|
||||
Reference in New Issue
Block a user