Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 20 additions & 14 deletions src/app/services/connect-token/acl-dialog/acl-dialog.component.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { writeText } from 'clipboard-polyfill';
import { I18nService } from '@app/services/i18n';
import { HttpService } from '@app/services/http';
import { FaceService } from '@app/services/face';
import { HttpErrorResponse } from '@angular/common/http';
import { Component, Inject, OnInit } from '@angular/core';
import { Asset, ConnectData, ConnectionToken } from '@app/model';
import { NzNotificationService } from 'ng-zorro-antd/notification';
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
import { NZ_MODAL_DATA, NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
import {writeText} from 'clipboard-polyfill';
import {I18nService} from '@app/services/i18n';
import {HttpService} from '@app/services/http';
import {FaceService} from '@app/services/face';
import {HttpErrorResponse} from '@angular/common/http';
import {Component, Inject, OnInit} from '@angular/core';
import {Asset, ConnectData, ConnectionToken} from '@app/model';
import {NzNotificationService} from 'ng-zorro-antd/notification';
import {DomSanitizer, SafeResourceUrl} from '@angular/platform-browser';
import {NZ_MODAL_DATA, NzModalRef, NzModalService} from 'ng-zorro-antd/modal';

interface DialogAction {
text: string;
Expand Down Expand Up @@ -92,7 +92,7 @@ export class ElementACLDialogComponent implements OnInit {

async onCopySuccess(evt) {
const msg = await this._i18n.t('Copied');
this._toastr.success(msg, '', { nzClass: 'custom-success-notification' });
this._toastr.success(msg, '', {nzClass: 'custom-success-notification'});
writeText(evt);
}

Expand Down Expand Up @@ -121,7 +121,7 @@ export class ElementACLDialogComponent implements OnInit {
this.content = this.getDialogContent(this.code);
} else {
const msg = await this._i18n.t('Face verify success');
this._toastr.success(msg, '', { nzClass: 'custom-success-notification' });
this._toastr.success(msg, '', {nzClass: 'custom-success-notification'});
this.dialogRef.close(connToken);
this.faceService.openFaceMonitor();
}
Expand Down Expand Up @@ -176,7 +176,7 @@ export class ElementACLDialogComponent implements OnInit {
this.content = this.getDialogContent(this.code);
} else {
const msg = await this._i18n.t('Face verify success');
this._toastr.success(msg, '', { nzClass: 'custom-success-notification' });
this._toastr.success(msg, '', {nzClass: 'custom-success-notification'});
this.dialogRef.close(connToken);
}
}
Expand All @@ -194,6 +194,7 @@ export class ElementACLDialogComponent implements OnInit {
this.content = this.getDialogContent(this.code);
};


if (this.tokenAction === 'exchange') {
this._http
.exchangeConnectToken(this.tokenID, false, true)
Expand Down Expand Up @@ -281,7 +282,7 @@ export class ElementACLDialogComponent implements OnInit {

if (state === 'approved') {
const msg = await this._i18n.t('Login review approved');
this._toastr.success(msg, '', { nzClass: 'custom-success-notification' });
this._toastr.success(msg, '', {nzClass: 'custom-success-notification'});
this.dialogRef.close(this.connectionToken);
} else if (state === 'rejected') {
this.code = 'ticket_review_rejected';
Expand Down Expand Up @@ -373,6 +374,11 @@ export class ElementACLDialogComponent implements OnInit {
}
]
},
face_verify_capture: {
title: 'Face Verify',
message: 'Please complete the face verification',
actions: [],
},
no_face_feature: {
title: 'Login reminder',
message: 'No facial features',
Expand Down