|
@ -1,5 +1,5 @@ |
|
|
import { NotificationService } from '@ghostfolio/client/core/notification/notification.service'; |
|
|
|
|
|
import { ConfirmationDialogType } from '@ghostfolio/client/core/notification/confirmation-dialog/confirmation-dialog.type'; |
|
|
import { ConfirmationDialogType } from '@ghostfolio/client/core/notification/confirmation-dialog/confirmation-dialog.type'; |
|
|
|
|
|
import { NotificationService } from '@ghostfolio/client/core/notification/notification.service'; |
|
|
import { DataService } from '@ghostfolio/client/services/data.service'; |
|
|
import { DataService } from '@ghostfolio/client/services/data.service'; |
|
|
import { |
|
|
import { |
|
|
KEY_STAY_SIGNED_IN, |
|
|
KEY_STAY_SIGNED_IN, |
|
@ -76,8 +76,7 @@ export class UserAccountSettingsComponent implements OnDestroy, OnInit { |
|
|
private snackBar: MatSnackBar, |
|
|
private snackBar: MatSnackBar, |
|
|
private tokenStorageService: TokenStorageService, |
|
|
private tokenStorageService: TokenStorageService, |
|
|
private userService: UserService, |
|
|
private userService: UserService, |
|
|
public webAuthnService: WebAuthnService, |
|
|
public webAuthnService: WebAuthnService |
|
|
private notificationService: NotificationService |
|
|
|
|
|
) { |
|
|
) { |
|
|
const { baseCurrency, currencies } = this.dataService.fetchInfo(); |
|
|
const { baseCurrency, currencies } = this.dataService.fetchInfo(); |
|
|
|
|
|
|
|
@ -150,18 +149,6 @@ export class UserAccountSettingsComponent implements OnDestroy, OnInit { |
|
|
public onCloseAccount() { |
|
|
public onCloseAccount() { |
|
|
this.notificationService.confirm({ |
|
|
this.notificationService.confirm({ |
|
|
confirmFn: () => { |
|
|
confirmFn: () => { |
|
|
this.dataService |
|
|
|
|
|
.deleteOwnUser({ |
|
|
|
|
|
accessToken: this.deleteOwnUserForm.get('accessToken').value |
|
|
|
|
|
}) |
|
|
|
|
|
.pipe( |
|
|
|
|
|
catchError(() => { |
|
|
|
|
|
this.notificationService.alert({ |
|
|
|
|
|
title: '', |
|
|
|
|
|
message: $localize`Oops! Incorrect Security Token.` |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if (confirmation) { |
|
|
|
|
|
this.dataService |
|
|
this.dataService |
|
|
.deleteOwnUser({ |
|
|
.deleteOwnUser({ |
|
|
accessToken: this.deleteOwnUserForm.get('accessToken').value |
|
|
accessToken: this.deleteOwnUserForm.get('accessToken').value |
|
|