mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-20 03:48:47 +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 <[email protected]> Co-authored-by: Tim Möhlmann <[email protected]>
This commit is contained in:
co-authored by
Livio Spring
Tim Möhlmann
parent
7b0506c19c
commit
cb7b50b513
@@ -28,6 +28,7 @@ type LabelPolicyWriteModel struct {
|
||||
HideLoginNameSuffix bool
|
||||
ErrorMsgPopup bool
|
||||
DisableWatermark bool
|
||||
ThemeMode domain.LabelPolicyThemeMode
|
||||
|
||||
State domain.PolicyState
|
||||
}
|
||||
@@ -47,6 +48,7 @@ func (wm *LabelPolicyWriteModel) Reduce() error {
|
||||
wm.HideLoginNameSuffix = e.HideLoginNameSuffix
|
||||
wm.ErrorMsgPopup = e.ErrorMsgPopup
|
||||
wm.DisableWatermark = e.DisableWatermark
|
||||
wm.ThemeMode = e.ThemeMode
|
||||
wm.State = domain.PolicyStateActive
|
||||
case *policy.LabelPolicyChangedEvent:
|
||||
if e.PrimaryColor != nil {
|
||||
@@ -82,6 +84,9 @@ func (wm *LabelPolicyWriteModel) Reduce() error {
|
||||
if e.DisableWatermark != nil {
|
||||
wm.DisableWatermark = *e.DisableWatermark
|
||||
}
|
||||
if e.ThemeMode != nil {
|
||||
wm.ThemeMode = *e.ThemeMode
|
||||
}
|
||||
case *policy.LabelPolicyLogoAddedEvent:
|
||||
wm.LogoKey = e.StoreKey
|
||||
case *policy.LabelPolicyLogoRemovedEvent:
|
||||
|
||||
Reference in New Issue
Block a user