feat: add theme mode support with AppThemeMode enum and AppThemeState service

- Introduced AppThemeMode enum to define theme options: System, Light, Dark.
- Updated AppSettingsDocument to include ThemeMode property.
- Created AppThemeState service to manage current theme mode and handle changes.
- Integrated theme mode handling in CouchbaseLiteAppSettingsService for persistence.
- Added JavaScript for theme management in the frontend, supporting system preference detection.
- Enhanced CSS with theme variables for consistent styling across light and dark modes.
- Updated Playwright tests to ensure sidebar functionality and responsiveness.
This commit is contained in:
MaddoScientisto 2026-04-20 22:58:25 +02:00
commit 158906fa28
19 changed files with 889 additions and 82 deletions

View file

@ -14,8 +14,8 @@ main {
}
.top-row {
background-color: #f7f7f7;
border-bottom: 1px solid #d6d5d5;
background-color: var(--wt-header-bg);
border-bottom: 1px solid var(--wt-header-border);
justify-content: flex-end;
height: 3.5rem;
display: flex;
@ -23,6 +23,7 @@ main {
}
.top-row ::deep a, .top-row ::deep .btn-link {
color: var(--wt-header-link);
white-space: nowrap;
margin-left: 1.5rem;
text-decoration: none;
@ -37,30 +38,9 @@ main {
text-overflow: ellipsis;
}
.sidebar-toggle {
display: none;
align-items: center;
justify-content: center;
flex-direction: column;
gap: 0.2rem;
width: 2.5rem;
height: 2.5rem;
margin-right: auto;
border: 1px solid #d6d5d5;
border-radius: 0.65rem;
background: #fff;
}
.sidebar-toggle-bar {
width: 1rem;
height: 2px;
background: #334155;
border-radius: 999px;
}
@media (max-width: 640.98px) {
.top-row {
justify-content: space-between;
justify-content: flex-end;
}
.top-row ::deep a, .top-row ::deep .btn-link {
@ -100,10 +80,6 @@ main {
padding-right: 1.5rem !important;
}
.sidebar-toggle {
display: inline-flex;
}
.sidebar.sidebar-collapsed {
width: 5rem;
}