mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-08 07:05:12 +00:00
feat(console): message and login texts, privacy policy (#2016)
* message texts wrapper components * message-text sub, i18n, grid * fix routing * pack * pack * update material * audit * fix mgmt service for labelplcy * map conv * edit text from map * request map * fetch data, mgmt admin service * warn box, i18n * resetbtn * login texts * login text requests * reset, default, i18n * disabled, features, message text setter, service * locale switcher * policy grid * password reset, domain claimed i18n * lint files * fix admin service, i18n, lang setter * fix scss duplicate * privacy policy, cleanup grid, fix message, login texts (#2031) * policy grid everywhere 🦒 * cleanup home * log login text request * patch all data * refresh toggle * fix: add dialog for unsaved changes (#2057) * logintexts dialog * check for dialog on pairwise operation * fix: patch value to local state after save * fix: i18n and custom login texts (#2060) * fix: i18n and custom login texts * fix: tos and privacy texts * fix frontend * fix: tos and privacy texts and tests * fix: i18n, tos and privacy texts and tests * fix frontend maps * i18n * add ResetCustomLoginTextToDefault in admin api and fix template remove in handlers * resetlogintexttodefault Co-authored-by: Livio Amstutz <[email protected]>
This commit is contained in:
co-authored by
Livio Amstutz
parent
26e4e607bc
commit
2e684684de
@@ -1,24 +1,7 @@
|
||||
<div class="wrapper max-width-container">
|
||||
<div class="header" *ngIf="(authService.user | async) || {} as user">
|
||||
<app-avatar [routerLink]="['/users/me']"
|
||||
*ngIf="user && (user.human?.profile?.displayName || (user.human?.profile?.firstName && user.human?.profile?.lastName))"
|
||||
class="avatar"
|
||||
[avatarUrl]="user.human?.profile?.avatarUrl || ''"
|
||||
[forColor]="user?.preferredLoginName"
|
||||
[name]="user.human?.profile?.displayName ? user.human?.profile?.displayName : (user.human?.profile?.firstName + ' '+ user.human?.profile?.lastName)"
|
||||
[size]="100">
|
||||
</app-avatar>
|
||||
<h3
|
||||
*ngIf="user && (user.human?.profile?.displayName || user.human?.profile?.firstName || user.human?.profile?.lastName); else loader">
|
||||
{{'HOME.WELCOME' | translate}},
|
||||
{{user?.human?.profile?.displayName ? user.human?.profile?.displayName : (user.human?.profile?.firstName + '
|
||||
'+ user.human?.profile?.lastName)}}</h3>
|
||||
<p>{{user?.human?.profile?.userName}}</p>
|
||||
|
||||
<div class="header">
|
||||
<h1 class="title">{{'HOME.WELCOME' | translate}}</h1>
|
||||
<p class="wlc_stnce">{{'HOME.WELCOMESENTENCE' | translate}}</p>
|
||||
<ng-template #loader>
|
||||
<mat-spinner diameter="50"></mat-spinner>
|
||||
</ng-template>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
.wrapper {
|
||||
padding-bottom: 100px;
|
||||
position: relative;
|
||||
@@ -6,24 +5,17 @@
|
||||
.header {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom: 4rem;
|
||||
align-items: center;
|
||||
margin-bottom: 2rem;
|
||||
|
||||
h3 {
|
||||
.title {
|
||||
font-size: 24px;
|
||||
margin-bottom: 1rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wlc_stnce {
|
||||
color: var(--grey);
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.container {
|
||||
@@ -74,7 +66,7 @@
|
||||
}
|
||||
|
||||
.onboard {
|
||||
background: linear-gradient(40deg, rgb(80, 66, 121), rgb(177, 59, 122), rgb(225, 53, 81), rgb(230, 107, 86));
|
||||
background: linear-gradient(40deg, rgb(177, 59, 122), rgb(225, 53, 81), rgb(230, 107, 86));
|
||||
|
||||
p {
|
||||
color: #fad6e3;
|
||||
@@ -82,7 +74,7 @@
|
||||
}
|
||||
|
||||
.quickstart {
|
||||
background: linear-gradient(30deg, #2283a6, #6c8f59);
|
||||
background: linear-gradient(40deg, #047857, #059669);
|
||||
|
||||
p {
|
||||
color: #d6f3fa;
|
||||
|
||||
@@ -116,6 +116,30 @@ const routes: Routes = [
|
||||
loadChildren: () => import('src/app/modules/policies/login-policy/login-policy.module')
|
||||
.then(m => m.LoginPolicyModule),
|
||||
},
|
||||
{
|
||||
path: PolicyComponentType.MESSAGETEXTS,
|
||||
data: {
|
||||
serviceType: PolicyComponentServiceType.ADMIN,
|
||||
},
|
||||
loadChildren: () => import('src/app/modules/policies/message-texts/message-texts.module')
|
||||
.then(m => m.MessageTextsPolicyModule),
|
||||
},
|
||||
{
|
||||
path: PolicyComponentType.LOGINTEXTS,
|
||||
data: {
|
||||
serviceType: PolicyComponentServiceType.ADMIN,
|
||||
},
|
||||
loadChildren: () => import('src/app/modules/policies/login-texts/login-texts.module')
|
||||
.then(m => m.LoginTextsPolicyModule),
|
||||
},
|
||||
{
|
||||
path: PolicyComponentType.PRIVACYPOLICY,
|
||||
data: {
|
||||
serviceType: PolicyComponentServiceType.ADMIN,
|
||||
},
|
||||
loadChildren: () => import('src/app/modules/policies/privacy-policy/privacy-policy.module')
|
||||
.then(m => m.PrivacyPolicyModule),
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<p class="top-desc">{{'FEATURES.DESCRIPTION' | translate}}</p>
|
||||
<cnsl-zitadel-tier [features]="features" [iam]="true"></cnsl-zitadel-tier>
|
||||
|
||||
<app-policy-grid [type]="PolicyGridType.IAM"></app-policy-grid>
|
||||
<app-policy-grid [type]="PolicyComponentServiceType.ADMIN"></app-policy-grid>
|
||||
</div>
|
||||
|
||||
<div metainfo>
|
||||
|
||||
@@ -5,7 +5,6 @@ import { BehaviorSubject, from, Observable, of } from 'rxjs';
|
||||
import { catchError, finalize, map } from 'rxjs/operators';
|
||||
import { CreationType, MemberCreateDialogComponent } from 'src/app/modules/add-member-dialog/member-create-dialog.component';
|
||||
import { PolicyComponentServiceType } from 'src/app/modules/policies/policy-component-types.enum';
|
||||
import { PolicyGridType } from 'src/app/modules/policy-grid/policy-grid.component';
|
||||
import { Features } from 'src/app/proto/generated/zitadel/features_pb';
|
||||
import { Member } from 'src/app/proto/generated/zitadel/member_pb';
|
||||
import { User } from 'src/app/proto/generated/zitadel/user_pb';
|
||||
@@ -25,7 +24,6 @@ export class IamComponent {
|
||||
public membersSubject: BehaviorSubject<Member.AsObject[]>
|
||||
= new BehaviorSubject<Member.AsObject[]>([]);
|
||||
|
||||
public PolicyGridType: any = PolicyGridType;
|
||||
public features!: Features.AsObject;
|
||||
|
||||
constructor(public adminService: AdminService, private dialog: MatDialog, private toast: ToastService,
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
</ng-container>
|
||||
|
||||
<ng-template appHasRole [appHasRole]="['policy.read']">
|
||||
<app-policy-grid [type]="PolicyGridType.ORG"></app-policy-grid>
|
||||
<app-policy-grid [type]="PolicyComponentServiceType.MGMT"></app-policy-grid>
|
||||
</ng-template>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import { catchError, finalize, map } from 'rxjs/operators';
|
||||
import { CreationType, MemberCreateDialogComponent } from 'src/app/modules/add-member-dialog/member-create-dialog.component';
|
||||
import { ChangeType } from 'src/app/modules/changes/changes.component';
|
||||
import { PolicyComponentServiceType } from 'src/app/modules/policies/policy-component-types.enum';
|
||||
import { PolicyGridType } from 'src/app/modules/policy-grid/policy-grid.component';
|
||||
import { WarnDialogComponent } from 'src/app/modules/warn-dialog/warn-dialog.component';
|
||||
import { Features } from 'src/app/proto/generated/zitadel/features_pb';
|
||||
import { Member } from 'src/app/proto/generated/zitadel/member_pb';
|
||||
@@ -42,8 +41,6 @@ export class OrgDetailComponent implements OnInit {
|
||||
public totalMemberResult: number = 0;
|
||||
public membersSubject: BehaviorSubject<Member.AsObject[]>
|
||||
= new BehaviorSubject<Member.AsObject[]>([]);
|
||||
public PolicyGridType: any = PolicyGridType;
|
||||
|
||||
public features!: Features.AsObject;
|
||||
|
||||
constructor(
|
||||
|
||||
@@ -100,6 +100,30 @@ const routes: Routes = [
|
||||
loadChildren: () => import('src/app/modules/policies/login-policy/login-policy.module')
|
||||
.then(m => m.LoginPolicyModule),
|
||||
},
|
||||
{
|
||||
path: PolicyComponentType.MESSAGETEXTS,
|
||||
data: {
|
||||
serviceType: PolicyComponentServiceType.MGMT,
|
||||
},
|
||||
loadChildren: () => import('src/app/modules/policies/message-texts/message-texts.module')
|
||||
.then(m => m.MessageTextsPolicyModule),
|
||||
},
|
||||
{
|
||||
path: PolicyComponentType.LOGINTEXTS,
|
||||
data: {
|
||||
serviceType: PolicyComponentServiceType.MGMT,
|
||||
},
|
||||
loadChildren: () => import('src/app/modules/policies/login-texts/login-texts.module')
|
||||
.then(m => m.LoginTextsPolicyModule),
|
||||
},
|
||||
{
|
||||
path: PolicyComponentType.PRIVACYPOLICY,
|
||||
data: {
|
||||
serviceType: PolicyComponentServiceType.MGMT,
|
||||
},
|
||||
loadChildren: () => import('src/app/modules/policies/privacy-policy/privacy-policy.module')
|
||||
.then(m => m.PrivacyPolicyModule),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
@@ -6,7 +6,6 @@ import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { ImageCropperModule } from 'ngx-image-cropper';
|
||||
import { DropzoneModule } from 'src/app/directives/dropzone/dropzone.module';
|
||||
import { AvatarModule } from 'src/app/modules/avatar/avatar.module';
|
||||
import { InputModule } from 'src/app/modules/input/input.module';
|
||||
@@ -25,7 +24,6 @@ import { ProfilePictureComponent } from './profile-picture/profile-picture.compo
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
ImageCropperModule,
|
||||
TranslateModule,
|
||||
MatSelectModule,
|
||||
MatButtonModule,
|
||||
|
||||
Reference in New Issue
Block a user