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:
parent
b45eac8055
commit
158906fa28
19 changed files with 889 additions and 82 deletions
|
|
@ -24,7 +24,7 @@
|
|||
else
|
||||
{
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm table-bordered align-middle">
|
||||
<table class="table table-sm table-bordered align-middle grid-view-table">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
|
|
@ -150,31 +150,31 @@ else
|
|||
|
||||
private string GetRowClass(CalendarDayRow row)
|
||||
{
|
||||
if (row.IsWeekend || row.IsFestivity) return "table-danger";
|
||||
if (row.Entry is null) return "";
|
||||
if (row.IsWeekend || row.IsFestivity) return "grid-row-weekend";
|
||||
if (row.Entry is null) return string.Empty;
|
||||
if (row.Entry.CalendarEvents.Any(entry => entry.EventType == CalendarEventType.Holiday))
|
||||
{
|
||||
return "table-success";
|
||||
return "grid-row-holiday";
|
||||
}
|
||||
|
||||
if (row.Entry.CalendarEvents.Any(entry => entry.EventType == CalendarEventType.Closure))
|
||||
{
|
||||
return "table-warning";
|
||||
return "grid-row-closure";
|
||||
}
|
||||
|
||||
if (row.Entry.CalendarEvents.Any(entry => entry.EventType == CalendarEventType.Illness))
|
||||
{
|
||||
return "table-info";
|
||||
return "grid-row-illness";
|
||||
}
|
||||
|
||||
if (row.Entry.CalendarEvents.Any(entry => entry.EventType == CalendarEventType.DayOff))
|
||||
{
|
||||
return "table-secondary";
|
||||
return "grid-row-dayoff";
|
||||
}
|
||||
|
||||
if (row.Entry.WorkUnits.Any(entry => entry.Location == WorkUnitLocation.Home))
|
||||
{
|
||||
return "table-light";
|
||||
return "grid-row-home";
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue