mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-06 22:32:16 +00:00
fix(console): edit project role, address form cleanup, assets, i18n (#339)
* remove grant detail module, role detail dialog * change appearance, i18n, remove address form
This commit is contained in:
-2
@@ -88,7 +88,6 @@
|
||||
margin-top: 1rem;
|
||||
font-size: 1.2rem;
|
||||
margin-bottom: 0.5rem;
|
||||
font-family: 'Rubik', sans-serif;
|
||||
}
|
||||
|
||||
.description {
|
||||
@@ -186,7 +185,6 @@
|
||||
border-radius: 0.5rem;
|
||||
margin: 1rem;
|
||||
box-sizing: border-box;
|
||||
font-family: 'Rubik', sans-serif;
|
||||
|
||||
.icon {
|
||||
display: flex;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
h1 {
|
||||
font-family: ailerons;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,24 +1,4 @@
|
||||
|
||||
.circle {
|
||||
position: relative;
|
||||
border-radius: 100%;
|
||||
width: 8rem;
|
||||
height: 8rem;
|
||||
background: linear-gradient(40deg, #8983F7, #A3DAFB 70%);
|
||||
margin: auto;
|
||||
}
|
||||
.crescent {
|
||||
position: absolute;
|
||||
border-radius: 100%;
|
||||
right: 0;
|
||||
width: 6rem;
|
||||
height: 6rem;
|
||||
background: #212224;
|
||||
transform: scale(1);
|
||||
transform-origin: top right;
|
||||
transition: transform .6s cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
width: 80%;
|
||||
max-width: 1350px;
|
||||
@@ -43,7 +23,6 @@
|
||||
|
||||
h1 {
|
||||
font-size: 3rem;
|
||||
font-family: ailerons;
|
||||
}
|
||||
p {
|
||||
color: #8795a1;
|
||||
@@ -78,7 +57,6 @@
|
||||
padding: 1rem 2rem;
|
||||
h2 {
|
||||
margin-top: .5rem;
|
||||
font-family: 'Rubik';
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
h1 {
|
||||
font-family: ailerons;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
h1 {
|
||||
font-family: ailerons;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
h1 {
|
||||
font-family: ailerons;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
@@ -88,7 +87,6 @@ h1 {
|
||||
margin-top: 1rem;
|
||||
font-size: 1.2rem;
|
||||
margin-bottom: 0.5rem;
|
||||
font-family: 'Rubik', sans-serif;
|
||||
}
|
||||
|
||||
.description {
|
||||
@@ -200,7 +198,6 @@ h1 {
|
||||
border-radius: 0.5rem;
|
||||
margin: 1rem;
|
||||
box-sizing: border-box;
|
||||
font-family: 'Rubik', sans-serif;
|
||||
|
||||
.icon {
|
||||
display: flex;
|
||||
|
||||
-2
@@ -84,7 +84,6 @@
|
||||
margin-top: 1rem;
|
||||
font-size: 1.2rem;
|
||||
margin-bottom: 0.5rem;
|
||||
font-family: 'Rubik', sans-serif;
|
||||
}
|
||||
|
||||
.description {
|
||||
@@ -182,7 +181,6 @@
|
||||
border-radius: 0.5rem;
|
||||
margin: 1rem;
|
||||
box-sizing: border-box;
|
||||
font-family: 'Rubik', sans-serif;
|
||||
|
||||
.icon {
|
||||
display: flex;
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
h1 {
|
||||
font-family: ailerons;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,6 @@ const routes: Routes = [
|
||||
{
|
||||
path: ':projectid/roles/create',
|
||||
loadChildren: () => import('../project-role-create/project-role-create.module').then(m => m.ProjectRoleCreateModule),
|
||||
|
||||
},
|
||||
{
|
||||
path: ':projectid/grants/create',
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
h1 {
|
||||
font-family: ailerons;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
|
||||
-4
@@ -5,10 +5,6 @@
|
||||
.fill-space {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-family: 'Rubik';
|
||||
}
|
||||
}
|
||||
|
||||
.app-container {
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
h1 {
|
||||
font-family: ailerons;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 4rem 4rem 2rem 4rem;
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
|
||||
h1 {
|
||||
font-size: 3rem;
|
||||
font-family: ailerons;
|
||||
}
|
||||
p {
|
||||
color: #8795a1;
|
||||
|
||||
@@ -229,7 +229,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <p class="side-section">{{ 'CHANGES.USER.TITLE' | translate }}</p> -->
|
||||
<app-changes [changeType]="ChangeType.MYUSER" [id]="user.id"></app-changes>
|
||||
</metainfo>
|
||||
</app-meta-layout>
|
||||
@@ -1,5 +1,4 @@
|
||||
h1 {
|
||||
font-family: ailerons;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,6 @@ export class AuthUserDetailComponent implements OnDestroy {
|
||||
public languages: string[] = ['de', 'en'];
|
||||
|
||||
public passwordForm!: FormGroup;
|
||||
// public addressForm!: FormGroup;
|
||||
private subscription: Subscription = new Subscription();
|
||||
|
||||
public emailEditState: boolean = false;
|
||||
@@ -101,14 +100,6 @@ export class AuthUserDetailComponent implements OnDestroy {
|
||||
});
|
||||
});
|
||||
|
||||
// this.addressForm = this.fb.group({
|
||||
// streetAddress: [''],
|
||||
// postalCode: [''],
|
||||
// locality: [''],
|
||||
// region: [''],
|
||||
// country: [''],
|
||||
// });
|
||||
|
||||
this.loading = true;
|
||||
this.getData().then(() => {
|
||||
this.loading = false;
|
||||
@@ -229,33 +220,6 @@ export class AuthUserDetailComponent implements OnDestroy {
|
||||
});
|
||||
}
|
||||
|
||||
// public saveAddress(): void {
|
||||
// this.address = this.addressForm.value;
|
||||
// this.userService
|
||||
// .SaveMyUserAddress(this.address as UserAddress.AsObject).then((data: UserAddress) => {
|
||||
// this.toast.showInfo('Saved Address');
|
||||
// this.address = data.toObject();
|
||||
// }).catch(data => {
|
||||
// this.toast.showError(data.message);
|
||||
// });
|
||||
// }
|
||||
|
||||
// public get streetAddress(): AbstractControl | null {
|
||||
// return this.addressForm.get('streetAddress');
|
||||
// }
|
||||
// public get postalCode(): AbstractControl | null {
|
||||
// return this.addressForm.get('postalCode');
|
||||
// }
|
||||
// public get locality(): AbstractControl | null {
|
||||
// return this.addressForm.get('locality');
|
||||
// }
|
||||
// public get region(): AbstractControl | null {
|
||||
// return this.addressForm.get('region');
|
||||
// }
|
||||
// public get country(): AbstractControl | null {
|
||||
// return this.addressForm.get('country');
|
||||
// }
|
||||
|
||||
public get currentPassword(): AbstractControl | null {
|
||||
return this.passwordForm.get('currentPassword');
|
||||
}
|
||||
@@ -272,9 +236,6 @@ export class AuthUserDetailComponent implements OnDestroy {
|
||||
}).catch(err => {
|
||||
console.error(err);
|
||||
});
|
||||
|
||||
// this.address = (await this.userService.GetMyUserAddress()).toObject();
|
||||
// this.addressForm.patchValue(this.address);
|
||||
}
|
||||
|
||||
public copytoclipboard(value: string): void {
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
$dark-background: #2d2e30;
|
||||
|
||||
// * {
|
||||
// transition: background-color .5s ease-in-out;
|
||||
// }
|
||||
|
||||
:root {
|
||||
transition: none;
|
||||
}
|
||||
@@ -11,11 +7,13 @@ $dark-background: #2d2e30;
|
||||
.theme-app {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.theme-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.circle {
|
||||
position: relative;
|
||||
border-radius: 100%;
|
||||
@@ -24,6 +22,7 @@ $dark-background: #2d2e30;
|
||||
background: linear-gradient(40deg, #FF0080,#FF8C00 70%);
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.crescent {
|
||||
position: absolute;
|
||||
border-radius: 100%;
|
||||
@@ -35,9 +34,11 @@ $dark-background: #2d2e30;
|
||||
transform-origin: top right;
|
||||
transition: transform .6s cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
.heading {
|
||||
font-size: 100%;
|
||||
font-weight: bolder;
|
||||
@@ -62,11 +63,13 @@ label {
|
||||
margin: 1rem 0 1rem 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.toggle {
|
||||
position: absolute;
|
||||
background-color: #fafafa;
|
||||
box-shadow: 0 2px 15px rgba(0,0,0,.15);
|
||||
}
|
||||
|
||||
.names {
|
||||
font-size: 90%;
|
||||
font-weight: bolder;
|
||||
@@ -79,38 +82,37 @@ label {
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
/* -------- Switch Styles ------------*/
|
||||
[type="checkbox"] {
|
||||
display: none;
|
||||
}
|
||||
/* Toggle */
|
||||
|
||||
[type="checkbox"]:checked + .theme-app .toggle{
|
||||
transform: translateX(100%);
|
||||
background-color: $dark-background;
|
||||
}
|
||||
|
||||
[type="checkbox"]:checked + .theme-app .dark{
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
[type="checkbox"]:checked + .theme-app .light{
|
||||
opacity: .5;
|
||||
}
|
||||
/* App */
|
||||
|
||||
[type="checkbox"]:checked + .theme-app{
|
||||
background-color: $dark-background;
|
||||
color: #fafafa;
|
||||
}
|
||||
/* Circle */
|
||||
|
||||
[type="checkbox"]:checked + .theme-app .crescent{
|
||||
transform: scale(1);
|
||||
background: $dark-background;
|
||||
}
|
||||
|
||||
[type="checkbox"]:checked + .theme-app .circle{
|
||||
background: linear-gradient(40deg, #8983F7, #A3DAFB 70%);
|
||||
}
|
||||
|
||||
[type="checkbox"]:checked + .theme-app .main-circle{
|
||||
background: linear-gradient(40deg, #8983F7, #A3DAFB 70%);
|
||||
}
|
||||
/* Fab */
|
||||
[type="checkbox"]:checked + .theme-app .fab{
|
||||
background-color: $dark-background;
|
||||
}
|
||||
}
|
||||
@@ -18,10 +18,6 @@ const routes: Routes = [
|
||||
roles: ['user.read'],
|
||||
},
|
||||
},
|
||||
{
|
||||
path: ':id/grant/:grantid',
|
||||
loadChildren: () => import('src/app/modules/user-grant/user-grant.module').then(m => m.UserGrantModule),
|
||||
},
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<a (click)="navigateBack()" mat-icon-button>
|
||||
<mat-icon class="icon">arrow_back</mat-icon>
|
||||
</a>
|
||||
<h1>{{ 'USER.PROFILE.TITLE' | translate }} {{user?.firstName}}</h1>
|
||||
<h1>{{ 'USER.PROFILE.TITLE' | translate }} {{user?.displayName}}</h1>
|
||||
|
||||
<p class="desc">{{ 'USER.PROFILE.DESCRIPTION' | translate }}</p>
|
||||
</div>
|
||||
@@ -175,36 +175,6 @@
|
||||
|
||||
<app-user-mfa *ngIf="user" [user]="user"></app-user-mfa>
|
||||
|
||||
<!-- <app-card title="{{ 'USER.ADDRESS.TITLE' | translate }}">
|
||||
<form [formGroup]="addressForm" (ngSubmit)="saveAddress()">
|
||||
<div class="content">
|
||||
<mat-form-field class="formfield">
|
||||
<mat-label>{{ 'USER.ADDRESS.STREET' | translate }}</mat-label>
|
||||
<input matInput formControlName="streetAddress" />
|
||||
</mat-form-field>
|
||||
<mat-form-field class="formfield">
|
||||
<mat-label>{{ 'USER.ADDRESS.POSTAL_CODE' | translate }}</mat-label>
|
||||
<input matInput formControlName="postalCode" />
|
||||
</mat-form-field>
|
||||
<mat-form-field class="formfield">
|
||||
<mat-label>{{ 'USER.ADDRESS.LOCALITY' | translate }}</mat-label>
|
||||
<input matInput formControlName="locality" />
|
||||
</mat-form-field>
|
||||
<mat-form-field class="formfield">
|
||||
<mat-label>{{ 'USER.ADDRESS.REGION' | translate }}</mat-label>
|
||||
<input matInput formControlName="region" />
|
||||
</mat-form-field>
|
||||
<mat-form-field class="formfield">
|
||||
<mat-label>{{ 'USER.ADDRESS.COUNTRY' | translate }}</mat-label>
|
||||
<input matInput formControlName="country" />
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="btn-container">
|
||||
<button type="submit" color="primary" mat-raised-button>{{ 'ACTIONS.SAVE' | translate }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</app-card> -->
|
||||
|
||||
<app-card *ngIf="user?.id" title="{{ 'GRANTS.USER.TITLE' | translate }}"
|
||||
description="{{'GRANTS.USER.DESCRIPTION' | translate }}">
|
||||
<app-user-grants [filterValue]="user?.id" [allowCreate]="['user.grant.write'] | hasRole"
|
||||
@@ -221,7 +191,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="side-section">{{ 'CHANGES.USER.TITLE' | translate }}</p>
|
||||
<app-changes [changeType]="ChangeType.USER" [id]="user.id"></app-changes>
|
||||
</metainfo>
|
||||
</app-meta-layout>
|
||||
@@ -104,14 +104,6 @@ export class UserDetailComponent implements OnInit, OnDestroy {
|
||||
confirmPassword: ['', [passwordConfirmValidator]],
|
||||
});
|
||||
});
|
||||
|
||||
// this.addressForm = this.fb.group({
|
||||
// streetAddress: [''],
|
||||
// postalCode: [''],
|
||||
// locality: [''],
|
||||
// region: [''],
|
||||
// country: [''],
|
||||
// });
|
||||
}
|
||||
|
||||
public ngOnInit(): void {
|
||||
@@ -231,46 +223,10 @@ export class UserDetailComponent implements OnInit, OnDestroy {
|
||||
});
|
||||
}
|
||||
|
||||
// public saveAddress(): void {
|
||||
// if (!this.address.id) {
|
||||
// this.address.id = this.user.id;
|
||||
// }
|
||||
|
||||
// this.address.streetAddress = this.streetAddress?.value;
|
||||
// this.address.postalCode = this.postalCode?.value;
|
||||
// this.address.locality = this.locality?.value;
|
||||
// this.address.region = this.region?.value;
|
||||
// this.address.country = this.country?.value;
|
||||
|
||||
// this.mgmtUserService
|
||||
// .SaveUserAddress(this.address as UserAddress.AsObject).then((data: UserAddress) => {
|
||||
// this.toast.showInfo('Saved Address');
|
||||
// this.address = data.toObject();
|
||||
// }).catch(data => {
|
||||
// this.toast.showError(data.message);
|
||||
// });
|
||||
// }
|
||||
|
||||
public navigateBack(): void {
|
||||
this._location.back();
|
||||
}
|
||||
|
||||
// public get streetAddress(): AbstractControl | null {
|
||||
// return this.addressForm.get('streetAddress');
|
||||
// }
|
||||
// public get postalCode(): AbstractControl | null {
|
||||
// return this.addressForm.get('postalCode');
|
||||
// }
|
||||
// public get locality(): AbstractControl | null {
|
||||
// return this.addressForm.get('locality');
|
||||
// }
|
||||
// public get region(): AbstractControl | null {
|
||||
// return this.addressForm.get('region');
|
||||
// }
|
||||
// public get country(): AbstractControl | null {
|
||||
// return this.addressForm.get('country');
|
||||
// }
|
||||
|
||||
public get password(): AbstractControl | null {
|
||||
return this.passwordForm.get('password');
|
||||
}
|
||||
@@ -285,7 +241,5 @@ export class UserDetailComponent implements OnInit, OnDestroy {
|
||||
}).catch(err => {
|
||||
console.error(err);
|
||||
});
|
||||
// this.address = (await this.mgmtUserService.GetUserAddress(id)).toObject();
|
||||
// this.addressForm.patchValue(this.address);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
h1 {
|
||||
font-family: ailerons;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user