|
|
@ -16,6 +16,8 @@ import { TokenStorageService } from '@ghostfolio/client/services/token-storage.s
|
|
|
|
templateUrl: 'login-with-access-token-dialog.html'
|
|
|
|
templateUrl: 'login-with-access-token-dialog.html'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
export class LoginWithAccessTokenDialog {
|
|
|
|
export class LoginWithAccessTokenDialog {
|
|
|
|
|
|
|
|
public isAccessTokenHidden = true;
|
|
|
|
|
|
|
|
|
|
|
|
public constructor(
|
|
|
|
public constructor(
|
|
|
|
@Inject(MAT_DIALOG_DATA) public data: any,
|
|
|
|
@Inject(MAT_DIALOG_DATA) public data: any,
|
|
|
|
public dialogRef: MatDialogRef<LoginWithAccessTokenDialog>,
|
|
|
|
public dialogRef: MatDialogRef<LoginWithAccessTokenDialog>,
|
|
|
@ -38,6 +40,12 @@ export class LoginWithAccessTokenDialog {
|
|
|
|
this.dialogRef.close();
|
|
|
|
this.dialogRef.close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public onLoginWithAccessToken() {
|
|
|
|
|
|
|
|
if (this.data.accessToken) {
|
|
|
|
|
|
|
|
this.dialogRef.close(this.data);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public async onLoginWithInternetIdentity() {
|
|
|
|
public async onLoginWithInternetIdentity() {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
const { authToken } = await this.internetIdentityService.login();
|
|
|
|
const { authToken } = await this.internetIdentityService.login();
|
|
|
|