Fix theme handling and auto theme

This commit fixes the client side theme selection being overwritten by the backend and adds a selectable auto theming option.
This commit is contained in:
Robert Smits
2023-10-01 15:25:11 +02:00
parent 0231ebfeef
commit c64dda8ca7
8 changed files with 101 additions and 36 deletions

26
ui/src/app/theme.ts Normal file
View File

@@ -0,0 +1,26 @@
import { IconDefinition } from "@fortawesome/fontawesome-svg-core";
import { faCircleHalfStroke, faMoon, faSun } from "@fortawesome/free-solid-svg-icons";
export interface Theme {
id: string;
displayName: string;
icon: IconDefinition;
}
export const Themes: Theme[] = [
{
id: 'light',
displayName: 'Light',
icon: faSun,
},
{
id: 'dark',
displayName: 'Dark',
icon: faMoon,
},
{
id: 'auto',
displayName: 'Auto',
icon: faCircleHalfStroke,
},
];