|
|
|
@ -2,7 +2,6 @@ import { UserService } from '@ghostfolio/client/services/user/user.service'; |
|
|
|
import { CreatePlatformDto, UpdatePlatformDto } from '@ghostfolio/common/dtos'; |
|
|
|
import { ConfirmationDialogType } from '@ghostfolio/common/enums'; |
|
|
|
import { getLocale } from '@ghostfolio/common/helper'; |
|
|
|
import { User } from '@ghostfolio/common/interfaces'; |
|
|
|
import { GfEntityLogoComponent } from '@ghostfolio/ui/entity-logo'; |
|
|
|
import { NotificationService } from '@ghostfolio/ui/notifications'; |
|
|
|
import { AdminService, DataService } from '@ghostfolio/ui/services'; |
|
|
|
@ -63,7 +62,6 @@ export class GfAdminPlatformComponent implements OnDestroy, OnInit { |
|
|
|
public deviceType: string; |
|
|
|
public displayedColumns = ['name', 'url', 'accounts', 'actions']; |
|
|
|
public platforms: Platform[]; |
|
|
|
public user: User; |
|
|
|
|
|
|
|
private unsubscribeSubject = new Subject<void>(); |
|
|
|
|
|
|
|
@ -102,16 +100,6 @@ export class GfAdminPlatformComponent implements OnDestroy, OnInit { |
|
|
|
public ngOnInit() { |
|
|
|
this.deviceType = this.deviceService.getDeviceInfo().deviceType; |
|
|
|
|
|
|
|
this.userService.stateChanged |
|
|
|
.pipe(takeUntil(this.unsubscribeSubject)) |
|
|
|
.subscribe((state) => { |
|
|
|
if (state?.user) { |
|
|
|
this.user = state.user; |
|
|
|
|
|
|
|
this.changeDetectorRef.markForCheck(); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
this.fetchPlatforms(); |
|
|
|
} |
|
|
|
|
|
|
|
|