mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-22 21:08: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
+104
-17
@@ -7,27 +7,11 @@
|
||||
</div>
|
||||
|
||||
<div class="privatelabeling-top-row">
|
||||
<mat-button-toggle-group class="buttongroup" [(ngModel)]="theme" name="theme" aria-label="Theme">
|
||||
<mat-button-toggle [value]="Theme.LIGHT">
|
||||
<div class="toggle-row">
|
||||
<i class="icon las la-sun"></i>
|
||||
<span>{{ 'POLICY.PRIVATELABELING.LIGHT' | translate }}</span>
|
||||
<div *ngIf="theme === Theme.LIGHT" class="current-dot"></div>
|
||||
</div>
|
||||
</mat-button-toggle>
|
||||
<mat-button-toggle [value]="Theme.DARK">
|
||||
<div class="toggle-row">
|
||||
<i class="icon las la-moon"></i>
|
||||
<span> {{ 'POLICY.PRIVATELABELING.DARK' | translate }}</span>
|
||||
<div *ngIf="theme === Theme.DARK" class="current-dot"></div>
|
||||
</div>
|
||||
</mat-button-toggle>
|
||||
</mat-button-toggle-group>
|
||||
|
||||
<mat-button-toggle-group
|
||||
class="theme-toggle"
|
||||
class="buttongroup"
|
||||
[(ngModel)]="view"
|
||||
(change)="toggleView(view)"
|
||||
name="displayview"
|
||||
aria-label="Display View"
|
||||
>
|
||||
@@ -48,6 +32,109 @@
|
||||
</div>
|
||||
</mat-button-toggle>
|
||||
</mat-button-toggle-group>
|
||||
</div>
|
||||
|
||||
<div class="privatelabeling-top-row">
|
||||
<mat-button-toggle-group
|
||||
*ngIf="previewData && data"
|
||||
class="buttongroup"
|
||||
[(ngModel)]="view === View.CURRENT ? data.themeMode : previewData.themeMode"
|
||||
(change)="toggleThemeMode()"
|
||||
[disabled]="
|
||||
view === View.CURRENT ||
|
||||
([
|
||||
serviceType === PolicyComponentServiceType.ADMIN
|
||||
? 'iam.policy.write'
|
||||
: serviceType === PolicyComponentServiceType.MGMT
|
||||
? 'policy.write'
|
||||
: ''
|
||||
]
|
||||
| hasRole
|
||||
| async) === false
|
||||
"
|
||||
name="thememode"
|
||||
aria-label="Theme Mode"
|
||||
>
|
||||
<mat-button-toggle [value]="ThemeMode.THEME_MODE_AUTO">
|
||||
<div class="toggle-row">
|
||||
<i class="icon las la-adjust"></i>
|
||||
<span>{{ 'POLICY.PRIVATELABELING.THEMEMODE.THEME_MODE_AUTO' | translate }}</span>
|
||||
<div
|
||||
*ngIf="
|
||||
view === View.PREVIEW
|
||||
? previewData.themeMode === ThemeMode.THEME_MODE_AUTO
|
||||
: data.themeMode === ThemeMode.THEME_MODE_AUTO
|
||||
"
|
||||
class="current-dot"
|
||||
></div>
|
||||
</div>
|
||||
</mat-button-toggle>
|
||||
<mat-button-toggle [value]="ThemeMode.THEME_MODE_LIGHT">
|
||||
<div class="toggle-row">
|
||||
<i class="icon las la-sun"></i>
|
||||
<span> {{ 'POLICY.PRIVATELABELING.THEMEMODE.THEME_MODE_LIGHT' | translate }}</span>
|
||||
<div
|
||||
*ngIf="
|
||||
view === View.PREVIEW
|
||||
? previewData.themeMode === ThemeMode.THEME_MODE_LIGHT
|
||||
: data.themeMode === ThemeMode.THEME_MODE_LIGHT
|
||||
"
|
||||
class="current-dot"
|
||||
></div>
|
||||
</div>
|
||||
</mat-button-toggle>
|
||||
<mat-button-toggle [value]="ThemeMode.THEME_MODE_DARK">
|
||||
<div class="toggle-row">
|
||||
<i class="icon las la-moon"></i>
|
||||
<span> {{ 'POLICY.PRIVATELABELING.THEMEMODE.THEME_MODE_DARK' | translate }}</span>
|
||||
<div
|
||||
*ngIf="
|
||||
view === View.PREVIEW
|
||||
? previewData.themeMode === ThemeMode.THEME_MODE_DARK
|
||||
: data.themeMode === ThemeMode.THEME_MODE_DARK
|
||||
"
|
||||
class="current-dot"
|
||||
></div>
|
||||
</div>
|
||||
</mat-button-toggle>
|
||||
</mat-button-toggle-group>
|
||||
|
||||
<mat-button-toggle-group
|
||||
class="buttongroup"
|
||||
[(ngModel)]="theme"
|
||||
name="theme"
|
||||
aria-label="Theme"
|
||||
*ngIf="previewData && data"
|
||||
>
|
||||
<mat-button-toggle
|
||||
[value]="Theme.LIGHT"
|
||||
[disabled]="
|
||||
view === View.PREVIEW
|
||||
? previewData.themeMode === ThemeMode.THEME_MODE_DARK
|
||||
: data.themeMode === ThemeMode.THEME_MODE_DARK
|
||||
"
|
||||
>
|
||||
<div class="toggle-row">
|
||||
<i class="icon las la-sun"></i>
|
||||
<span>{{ 'POLICY.PRIVATELABELING.LIGHT' | translate }}</span>
|
||||
<div *ngIf="theme === Theme.LIGHT" class="current-dot"></div>
|
||||
</div>
|
||||
</mat-button-toggle>
|
||||
<mat-button-toggle
|
||||
[value]="Theme.DARK"
|
||||
[disabled]="
|
||||
view === View.PREVIEW
|
||||
? previewData.themeMode === ThemeMode.THEME_MODE_LIGHT
|
||||
: data.themeMode === ThemeMode.THEME_MODE_LIGHT
|
||||
"
|
||||
>
|
||||
<div class="toggle-row">
|
||||
<i class="icon las la-moon"></i>
|
||||
<span> {{ 'POLICY.PRIVATELABELING.DARK' | translate }}</span>
|
||||
<div *ngIf="theme === Theme.DARK" class="current-dot"></div>
|
||||
</div>
|
||||
</mat-button-toggle>
|
||||
</mat-button-toggle-group>
|
||||
|
||||
<span class="fill-space"></span>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user