mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 20:47:32 +00:00
feat: add attribute to only enable specific themes (#6798)
* feat: enable only specific themes in label policy * feat: enable only specific themes in label policy * feat: enable only specific themes in label policy * feat: enable only specific themes in label policy * add management in console * pass enabledTheme * render login ui based on enabled theme * add in branding / settings service and name consistently * update console to latest proto state * fix console linting * fix linting * cleanup * add translations --------- Co-authored-by: Livio Spring <livio.a@gmail.com> Co-authored-by: Tim Möhlmann <tim+github@zitadel.com>
This commit is contained in:
@@ -34,6 +34,7 @@ type LabelPolicy struct {
|
||||
HideLoginNameSuffix bool
|
||||
ErrorMsgPopup bool
|
||||
DisableWatermark bool
|
||||
ThemeMode LabelPolicyThemeMode
|
||||
}
|
||||
|
||||
type LabelPolicyState int32
|
||||
@@ -47,6 +48,14 @@ const (
|
||||
labelPolicyStateCount
|
||||
)
|
||||
|
||||
type LabelPolicyThemeMode int32
|
||||
|
||||
const (
|
||||
LabelPolicyThemeAuto LabelPolicyThemeMode = iota
|
||||
LabelPolicyThemeLight
|
||||
LabelPolicyThemeDark
|
||||
)
|
||||
|
||||
func (f LabelPolicy) IsValid() error {
|
||||
if !colorRegex.MatchString(f.PrimaryColor) {
|
||||
return caos_errs.ThrowInvalidArgument(nil, "POLICY-391dG", "Errors.Policy.Label.Invalid.PrimaryColor")
|
||||
|
Reference in New Issue
Block a user