fix(console): user create loading state and i18n, improved app create stepper, invalid token dialog, cleanup, new home (#509)

* fix iam member model

* fix org member model

* fix auth user loading

* copytoclipboard directive

* directive logs, load bar on init, create user

* typo

* welcome section, contributor spinner

* fix home link

* fix stepper flow

* show dialog on invalid token

* fix app table refresh, pin icons light theme

* cleanup contributor

* Update console/src/assets/i18n/en.json

Co-authored-by: Florian Forster <[email protected]>

* Update console/src/assets/i18n/de.json

Co-authored-by: Florian Forster <[email protected]>

* Update console/src/assets/i18n/de.json

Co-authored-by: Florian Forster <[email protected]>

* Update console/src/assets/i18n/de.json

Co-authored-by: Florian Forster <[email protected]>

Co-authored-by: Florian Forster <[email protected]>
This commit is contained in:
Max Peintner
2020-07-24 09:48:58 +02:00
committed by GitHub
co-authored by Florian Forster
parent c105bf483b
commit af60b88997
73 changed files with 581 additions and 487 deletions
+20 -7
View File
@@ -1,9 +1,17 @@
<div class="wrapper">
<div class="header">
<img alt="zitadel logo" *ngIf="dark; else lighttheme"
src="../assets/images/zitadel-logo-oneline-darkdesign.svg" />
<ng-template #lighttheme>
<img alt="zitadel logo" src="../assets/images/zitadel-logo-oneline-lightdesign.svg" />
<div class="wrapper max-width-container">
<div class="header" *ngIf="(authService.user | async) || {} as user">
<app-avatar [routerLink]="['/users/me']" *ngIf="user && (user.displayName || (user.firstName && user.lastName))"
class="avatar" [name]="user.displayName ? user.displayName : (user.firstName + ' '+ user.lastName)"
[size]="100">
</app-avatar>
<h3 *ngIf="(user.displayName || user.firstName || user.lastName); else loader">
{{'HOME.WELCOME' | translate}},
{{user?.displayName ? user.displayName : (user.firstName + ' '+ user.lastName)}}</h3>
<p>{{user?.userName}}</p>
<p class="wlc_stnce">{{'HOME.WELCOMESENTENCE' | translate}}</p>
<ng-template #loader>
<mat-spinner diameter="50"></mat-spinner>
</ng-template>
</div>
@@ -77,9 +85,14 @@
</div>
<span class="fill-space"></span>
<div class="footer">
<a color="primary" mat-button [routerLink]="['/users/me']">{{'HOME.USERS_BUTTON' | translate}}</a>
<a color="primary" mat-button [routerLink]="['/users/all']">{{'HOME.USERS_BUTTON' | translate}}</a>
</div>
</app-card>
</ng-template>
</div>
<p class="disclaimer">{{'HOME.DISCLAIMER' | translate}}
<!-- TODO: Add doc link to security here -->
<!-- <a href="https://caos.github.io/site#security"></a> -->
</p>
</div>
+20 -28
View File
@@ -1,39 +1,25 @@
.wrapper {
width: 80%;
max-width: 1350px;
@media only screen and (max-width: 700px) {
width: 90%;
}
margin: auto;
padding-bottom: 100px;
.header {
display: flex;
flex-direction: column;
margin: 4rem 0;
align-items: center;
align-items: center;
.avatar {
width: 100px;
height: 100px;
font-size: 100px;
line-height: 100px;
margin-top: 1rem;
}
h1 {
font-size: 3rem;
}
p {
color: #8795a1;
text-align: center;
font-size: 1rem;
margin: 0;
h3 {
font-size: 24px;
margin-bottom: 1rem;
}
img {
height: 60px;
align-self: flex-end;
.wlc_stnce {
color: #8795a1;
font-size: 16px;
}
.avatar {
outline: none;
cursor: pointer;
}
}
@@ -84,5 +70,11 @@
}
}
}
}
}
.disclaimer {
color: #8795a1;
font-size: 14px;
margin-top: 3rem;
}
}
+3 -2
View File
@@ -1,4 +1,5 @@
import { Component } from '@angular/core';
import { AuthService } from 'src/app/services/auth.service';
@Component({
selector: 'app-home',
@@ -7,9 +8,9 @@ import { Component } from '@angular/core';
})
export class HomeComponent {
public dark: boolean = true;
constructor() {
constructor(public authService: AuthService) {
const theme = localStorage.getItem('theme');
this.dark = theme === 'dark-theme' ? true : theme === 'light-theme' ? false : true;
}
}
@@ -2,8 +2,10 @@ import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { TranslateModule } from '@ngx-translate/core';
import { HasRoleModule } from 'src/app/directives/has-role/has-role.module';
import { AvatarModule } from 'src/app/modules/avatar/avatar.module';
import { CardModule } from 'src/app/modules/card/card.module';
import { SharedModule } from 'src/app/modules/shared/shared.module';
@@ -21,7 +23,9 @@ import { HomeComponent } from './home.component';
HomeRoutingModule,
MatButtonModule,
TranslateModule,
AvatarModule,
SharedModule,
MatProgressSpinnerModule,
CardModule,
],
})