mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 20:37:30 +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:
@@ -26,6 +26,7 @@ func ModelLabelPolicyToPb(policy *query.LabelPolicy, assetPrefix string) *policy
|
||||
|
||||
DisableWatermark: policy.WatermarkDisabled,
|
||||
HideLoginNameSuffix: policy.HideLoginNameSuffix,
|
||||
ThemeMode: themeModeToPb(policy.ThemeMode),
|
||||
Details: object.ToViewDetailsPb(
|
||||
policy.Sequence,
|
||||
policy.CreationDate,
|
||||
@@ -34,3 +35,16 @@ func ModelLabelPolicyToPb(policy *query.LabelPolicy, assetPrefix string) *policy
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
func themeModeToPb(theme domain.LabelPolicyThemeMode) policy_pb.ThemeMode {
|
||||
switch theme {
|
||||
case domain.LabelPolicyThemeAuto:
|
||||
return policy_pb.ThemeMode_THEME_MODE_AUTO
|
||||
case domain.LabelPolicyThemeDark:
|
||||
return policy_pb.ThemeMode_THEME_MODE_DARK
|
||||
case domain.LabelPolicyThemeLight:
|
||||
return policy_pb.ThemeMode_THEME_MODE_LIGHT
|
||||
default:
|
||||
return policy_pb.ThemeMode_THEME_MODE_AUTO
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user