mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.3 KiB
59 lines
1.3 KiB
/*
|
|
* Squidex Headless CMS
|
|
*
|
|
* @license
|
|
* Copyright (c) Sebastian Stehle. All rights reserved
|
|
*/
|
|
|
|
import { Component, OnInit, OnDestroy } from '@angular/core';
|
|
import { Subscription} from 'rxjs';
|
|
|
|
import {
|
|
AppComponentBase,
|
|
AppsStoreService,
|
|
AuthService,
|
|
fadeAnimation,
|
|
NotificationService
|
|
} from 'shared';
|
|
|
|
declare var _urq: any;
|
|
|
|
@Component({
|
|
selector: 'sqx-dashboard-page',
|
|
styleUrls: ['./dashboard-page.component.scss'],
|
|
templateUrl: './dashboard-page.component.html',
|
|
animations: [
|
|
fadeAnimation
|
|
]
|
|
})
|
|
export class DashboardPageComponent extends AppComponentBase implements OnInit, OnDestroy {
|
|
private authenticationSubscription: Subscription;
|
|
|
|
public profileDisplayName = '';
|
|
|
|
constructor(apps: AppsStoreService, notifications: NotificationService,
|
|
private readonly auth: AuthService
|
|
) {
|
|
super(notifications, apps);
|
|
}
|
|
|
|
public ngOnDestroy() {
|
|
this.authenticationSubscription.unsubscribe();
|
|
}
|
|
|
|
public ngOnInit() {
|
|
this.authenticationSubscription =
|
|
this.auth.isAuthenticated.subscribe(() => {
|
|
const user = this.auth.user;
|
|
|
|
if (user) {
|
|
this.profileDisplayName = user.displayName;
|
|
}
|
|
});
|
|
}
|
|
|
|
public showForum() {
|
|
_urq.push(['Feedback_Open']);
|
|
}
|
|
}
|
|
|
|
|