diff --git a/src/Squidex/app/features/administration/pages/users/users-page.component.html b/src/Squidex/app/features/administration/pages/users/users-page.component.html
index a65cdab0e..68c42465a 100644
--- a/src/Squidex/app/features/administration/pages/users/users-page.component.html
+++ b/src/Squidex/app/features/administration/pages/users/users-page.component.html
@@ -61,10 +61,10 @@
-
diff --git a/src/Squidex/app/features/rules/pages/events/rule-events-page.component.html b/src/Squidex/app/features/rules/pages/events/rule-events-page.component.html
index 9c9c6f5cb..c7a0f98de 100644
--- a/src/Squidex/app/features/rules/pages/events/rule-events-page.component.html
+++ b/src/Squidex/app/features/rules/pages/events/rule-events-page.component.html
@@ -70,7 +70,7 @@
Next: {{event.nextAttempt | sqxFromNow}}
-
+
Cancel
diff --git a/src/Squidex/app/shared/services/auth.service.ts b/src/Squidex/app/shared/services/auth.service.ts
index bb808dc3e..d5d70da60 100644
--- a/src/Squidex/app/shared/services/auth.service.ts
+++ b/src/Squidex/app/shared/services/auth.service.ts
@@ -29,6 +29,10 @@ export class Profile {
return this.user.profile['sub'];
}
+ public get email(): string {
+ return this.user.profile['email'];
+ }
+
public get displayName(): string {
return this.user.profile['urn:squidex:name'];
}
diff --git a/src/Squidex/app/shared/services/schemas.service.ts b/src/Squidex/app/shared/services/schemas.service.ts
index f8b08abda..8f663375a 100644
--- a/src/Squidex/app/shared/services/schemas.service.ts
+++ b/src/Squidex/app/shared/services/schemas.service.ts
@@ -78,7 +78,7 @@ export class SchemaDetailsDto extends SchemaDto {
}
if (fields.length === 0) {
- fields = [{ properties: {} }];
+ fields = NONE_FIELDS;
}
this.listFields = fields;
@@ -148,6 +148,9 @@ export class RootFieldDto extends FieldDto {
}
}
+const NONE_FIELD = new RootFieldDto(-1, '', createProperties('String'), 'invariant');
+const NONE_FIELDS = [NONE_FIELD];
+
export class NestedFieldDto extends FieldDto {
constructor(fieldId: number, name: string, properties: FieldPropertiesDto,
public readonly parentId: number,
diff --git a/src/Squidex/app/shell/pages/internal/profile-menu.component.html b/src/Squidex/app/shell/pages/internal/profile-menu.component.html
index 7d6c4c1f7..5e5e87bef 100644
--- a/src/Squidex/app/shell/pages/internal/profile-menu.component.html
+++ b/src/Squidex/app/shell/pages/internal/profile-menu.component.html
@@ -9,6 +9,14 @@
diff --git a/src/Squidex/app/shell/pages/internal/profile-menu.component.scss b/src/Squidex/app/shell/pages/internal/profile-menu.component.scss
index d9f38ad67..546145346 100644
--- a/src/Squidex/app/shell/pages/internal/profile-menu.component.scss
+++ b/src/Squidex/app/shell/pages/internal/profile-menu.component.scss
@@ -27,4 +27,10 @@
&-item {
cursor: pointer;
}
+
+ &-info {
+ line-height: 1.4rem;
+ font-size: .9rem;
+ font-weight: normal;
+ }
}
\ No newline at end of file
diff --git a/src/Squidex/app/shell/pages/internal/profile-menu.component.ts b/src/Squidex/app/shell/pages/internal/profile-menu.component.ts
index 8332fb646..214a8249e 100644
--- a/src/Squidex/app/shell/pages/internal/profile-menu.component.ts
+++ b/src/Squidex/app/shell/pages/internal/profile-menu.component.ts
@@ -6,7 +6,6 @@
*/
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core';
-import { filter } from 'rxjs/operators';
import {
ApiUrlConfig,
@@ -19,6 +18,7 @@ import {
interface State {
profileDisplayName: string;
profileId: string;
+ profileEmail: string;
profileUrl: string;
}
@@ -39,18 +39,22 @@ export class ProfileMenuComponent extends StatefulComponent implements On
) {
super(changeDetector, {
profileDisplayName: '',
+ profileEmail: '',
profileId: '',
profileUrl: apiUrl.buildUrl('/identity-server/account/profile')
});
}
public ngOnInit() {
this.own(
- this.authService.userChanges.pipe(filter(user => !!user))
+ this.authService.userChanges
.subscribe(user => {
- const profileId = user!.id;
- const profileDisplayName = user!.displayName;
+ if (user) {
+ const profileId = user.id;
+ const profileEmail = user.email;
+ const profileDisplayName = user.displayName;
- this.next(s => ({ ...s, profileId, profileDisplayName }));
+ this.next(s => ({ ...s, profileId, profileEmail, profileDisplayName }));
+ }
}));
}
|