feat(console): apply private labeling settings (#2059)

* fetch org design an calc palette

* distinct theme deriv

* calculate self theme

* background palette, fix styles

* component fixes, warn color

* warn color

* stylelint config, set warn color

* lint

* fallback theme

* lint

* granted, owned proejct grid

* dynamic privacy policy, fix home layout, dismissables, info-section

* lint

* apply theme from settings

* enable cache

* fix: add primary tint
This commit is contained in:
Max Peintner
2021-07-28 14:59:52 +02:00
committed by GitHub
parent fb06aed238
commit 7d3c768d8b
47 changed files with 963 additions and 588 deletions
@@ -4,7 +4,7 @@
<p class="wlc_stnce">{{'HOME.WELCOMESENTENCE' | translate}}</p>
</div>
<div class="container">
<div class="gridcontainer">
<ng-template appHasRole [appHasRole]="['iam.write']">
<a matRipple *ngIf="!firstStepsDismissed" class="onboard" [routerLink]="['/firststeps']">
<p class="first-steps">{{'ONBOARDING.HEADER' | translate}}</p>
@@ -17,7 +17,7 @@
</a>
</ng-template>
<a matRipple *ngIf="!firstStepsDismissed" class="quickstart" target="_blank"
<a matRipple *ngIf="!quickstartsDismissed" class="quickstart" target="_blank"
href="https://docs.zitadel.ch/docs/quickstarts/introduction">
<p class="first-steps">{{'HOME.QUICKSTARTS.LABEL' | translate}}</p>
<h2>{{'HOME.QUICKSTARTS.TITLE' | translate}}</h2>
@@ -35,7 +35,7 @@
</a>
<ng-template appHasRole [appHasRole]="['iam.write']">
<app-card class="item">
<app-card class="griditem" [nomargin]="true">
<div class="top">
<h2>
<i class="icon las la-gem"></i>
@@ -66,7 +66,7 @@
</app-card>
</ng-template>
<app-card class="item">
<app-card class="griditem" [nomargin]="true">
<div class="top">
<h2> <i class="icon las la-user-circle"></i>
{{'HOME.SECURITYANDPRIVACY'| translate}}</h2>
@@ -83,7 +83,7 @@
</app-card>
<ng-template appHasRole [appHasRole]="['project.read']">
<app-card class="item">
<app-card class="griditem" [nomargin]="true">
<div class="top">
<h2>
<i class="icon las la-layer-group"></i>
@@ -104,7 +104,7 @@
</ng-template>
<ng-template appHasRole [appHasRole]="['org.read']">
<app-card class="item">
<app-card class="griditem" [nomargin]="true">
<div class="top">
<h2> <i class="icon las la-archway"></i>
{{'HOME.PROTECTION'| translate}}</h2>
@@ -132,7 +132,7 @@
</ng-template>
<ng-template appHasRole [appHasRole]="['user.read']">
<app-card class="item">
<app-card class="griditem" [nomargin]="true">
<div class="top">
<h2>
<i class="las la-users"></i>
+13 -9
View File
@@ -18,21 +18,23 @@
}
}
.container {
display: flex;
flex-wrap: wrap;
margin: -1rem;
.gridcontainer {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem;
justify-content: space-evenly;
@media only screen and (max-width: 899px) {
grid-template-columns: 1fr;
}
.onboard,
.quickstart {
text-decoration: none;
cursor: pointer;
box-sizing: border-box;
flex: 1 0 45%;
position: relative;
border-radius: .5rem;
margin: 1rem;
padding: 1.5rem;
box-shadow: 0 3px 8px 0 rgb(0 0 0 / 6%);
@@ -96,12 +98,14 @@
}
}
.item {
flex: 1 0 45%;
margin: 0 1rem;
.griditem {
display: flex;
flex-direction: column;
.card {
margin: 0 !important;
}
.top {
h2 {
margin-top: .5rem;
+22 -22
View File
@@ -2,32 +2,32 @@ import { Component } from '@angular/core';
import { GrpcAuthService } from 'src/app/services/grpc-auth.service';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss'],
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss'],
})
export class HomeComponent {
public dark: boolean = true;
public firstStepsDismissed: boolean = false;
public quickstartsDismissed: boolean = false;
public dark: boolean = true;
public firstStepsDismissed: boolean = false;
public quickstartsDismissed: boolean = false;
constructor(public authService: GrpcAuthService) {
const theme = localStorage.getItem('theme');
this.dark = theme === 'dark-theme' ? true : theme === 'light-theme' ? false : true;
constructor(public authService: GrpcAuthService) {
const theme = localStorage.getItem('theme');
this.dark = theme === 'dark-theme' ? true : theme === 'light-theme' ? false : true;
this.firstStepsDismissed = localStorage.getItem('firstStartDismissed') === 'true' ? true : false;
this.quickstartsDismissed = localStorage.getItem('quickstartsDismissed') === 'true' ? true : false;
}
this.firstStepsDismissed = localStorage.getItem('firstStartDismissed') === 'true' ? true : false;
this.quickstartsDismissed = localStorage.getItem('quickstartsDismissed') === 'true' ? true : false;
}
dismissFirstSteps(event: Event): void {
event.preventDefault();
localStorage.setItem('firstStartDismissed', 'true');
this.firstStepsDismissed = true;
}
dismissFirstSteps(event: Event): void {
event.preventDefault();
localStorage.setItem('firstStartDismissed', 'true');
this.firstStepsDismissed = true;
}
dismissQuickstarts(event: Event): void {
event.preventDefault();
localStorage.setItem('quickstartsDismissed', 'true');
this.firstStepsDismissed = true;
}
dismissQuickstarts(event: Event): void {
event.preventDefault();
localStorage.setItem('quickstartsDismissed', 'true');
this.quickstartsDismissed = true;
}
}