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:
Stefan Benz
2023-10-26 07:54:09 +02:00
committed by GitHub
parent 7b0506c19c
commit cb7b50b513
43 changed files with 527 additions and 100 deletions

View File

@@ -6230,6 +6230,11 @@ message UpdateLabelPolicyRequest {
}
];
bool disable_watermark = 11;
zitadel.policy.v1.ThemeMode theme_mode = 12 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "setting if there should be a restriction on which themes are available";
}
];
}
message UpdateLabelPolicyResponse {

View File

@@ -10583,6 +10583,11 @@ message AddCustomLabelPolicyRequest {
}
];
bool disable_watermark = 11;
zitadel.policy.v1.ThemeMode theme_mode = 12 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "setting if there should be a restriction on which themes are available";
}
];
}
message AddCustomLabelPolicyResponse {
@@ -10653,6 +10658,11 @@ message UpdateCustomLabelPolicyRequest {
}
];
bool disable_watermark = 11;
zitadel.policy.v1.ThemeMode theme_mode = 12 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "setting if there should be a restriction on which themes are available";
}
];
}
message UpdateCustomLabelPolicyResponse {

View File

@@ -145,6 +145,14 @@ message LabelPolicy {
}
];
string font_url = 18;
ThemeMode theme_mode = 19;
}
enum ThemeMode {
THEME_MODE_UNSPECIFIED = 0;
THEME_MODE_AUTO = 1;
THEME_MODE_DARK = 2;
THEME_MODE_LIGHT = 3;
}
message LoginPolicy {

View File

@@ -33,6 +33,11 @@ message BrandingSettings {
description: "resource_owner_type returns if the setting is managed on the organization or on the instance";
}
];
ThemeMode theme_mode = 7 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "states whether both or only dark or light theme will be used";
}
];
}
message Theme {
@@ -79,3 +84,10 @@ message Theme {
}
];
}
enum ThemeMode {
THEME_MODE_UNSPECIFIED = 0;
THEME_MODE_AUTO = 1;
THEME_MODE_LIGHT = 2;
THEME_MODE_DARK = 3;
}