web: toggle dark/light theme manually (#4876)

This commit is contained in:
Jens L
2023-03-09 23:17:53 +01:00
committed by GitHub
parent e28f897cb1
commit b6b820f6f1
119 changed files with 658 additions and 688 deletions

View File

@ -1,7 +1,7 @@
import { currentInterface } from "@goauthentik/common/sentry";
import { me } from "@goauthentik/common/users";
import { UserSelf } from "@goauthentik/api";
import { UiThemeEnum, UserSelf } from "@goauthentik/api";
export enum UserDisplay {
username = "username",
@ -32,6 +32,7 @@ export interface UIConfig {
userDisplay: UserDisplay;
};
theme: {
base: UiThemeEnum;
background: string;
cardBackground: string;
};
@ -59,6 +60,7 @@ export class DefaultUIConfig implements UIConfig {
userDisplay: UserDisplay.username,
};
theme = {
base: UiThemeEnum.Automatic,
background: "",
cardBackground: "",
};