|
|
|
@ -1,4 +1,3 @@ |
|
|
|
import { ImpersonationStorageService } from '@ghostfolio/client/services/impersonation-storage.service'; |
|
|
|
import { |
|
|
|
KEY_STAY_SIGNED_IN, |
|
|
|
KEY_TOKEN, |
|
|
|
@ -77,7 +76,6 @@ export class GfUserAccountSettingsComponent implements OnInit { |
|
|
|
public deleteOwnUserForm = this.formBuilder.group({ |
|
|
|
accessToken: ['', Validators.required] |
|
|
|
}); |
|
|
|
public hasImpersonationId: boolean; |
|
|
|
public hasPermissionForSubscription: boolean; |
|
|
|
public hasPermissionToDeleteOwnUser: boolean; |
|
|
|
public hasPermissionToUpdateViewMode: boolean; |
|
|
|
@ -111,7 +109,6 @@ export class GfUserAccountSettingsComponent implements OnInit { |
|
|
|
private dataService: DataService, |
|
|
|
private destroyRef: DestroyRef, |
|
|
|
private formBuilder: FormBuilder, |
|
|
|
private impersonationStorageService: ImpersonationStorageService, |
|
|
|
private notificationService: NotificationService, |
|
|
|
private settingsStorageService: SettingsStorageService, |
|
|
|
private snackBar: MatSnackBar, |
|
|
|
@ -129,15 +126,6 @@ export class GfUserAccountSettingsComponent implements OnInit { |
|
|
|
permissions.enableSubscription |
|
|
|
); |
|
|
|
|
|
|
|
this.impersonationStorageService |
|
|
|
.onChangeHasImpersonation() |
|
|
|
.pipe(takeUntilDestroyed(this.destroyRef)) |
|
|
|
.subscribe((impersonationId) => { |
|
|
|
this.hasImpersonationId = !!impersonationId; |
|
|
|
|
|
|
|
this.changeDetectorRef.markForCheck(); |
|
|
|
}); |
|
|
|
|
|
|
|
this.userService.stateChanged |
|
|
|
.pipe(takeUntilDestroyed(this.destroyRef)) |
|
|
|
.subscribe((state) => { |
|
|
|
|