Skip to content

Commit 2489a8f

Browse files
committed
perf: update connect acl dialog
1 parent 6997407 commit 2489a8f

6 files changed

Lines changed: 536 additions & 2 deletions

File tree

src/app/elements/elements.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import { ElementReplayAsciicastComponent } from '@app/elements/replay/asciicast/
2525
import { ElementConnectorNecComponent } from '@app/elements/content/content-window/nec/nec.component';
2626
import { ElementFaceMonitorComponent } from '@app/elements/connect/face-monitor/face-monitor.component';
2727
import { ElementACLDialogComponent } from '@app/services/connect-token/acl-dialog/acl-dialog.component';
28+
import { ElementBatchACLDialogComponent } from '@app/services/connect-token/batch-acl-dialog/batch-acl-dialog.component';
2829
import { ElementTreeFilterComponent } from '@app/elements/asset-tree/tree-filter/tree-filter.component';
2930
import { ElementOrganizationComponent } from '@app/elements/left-bar/organization/organization.component';
3031
import { ElementConnectorGuideComponent } from '@app/elements/content/content-window/guide/guide.component';
@@ -76,6 +77,7 @@ export const ElementComponents = [
7677
DynamicFormComponent,
7778
ElementsPartsComponent,
7879
ElementACLDialogComponent,
80+
ElementBatchACLDialogComponent,
7981
ElementDialogAlertComponent,
8082
ElementLoginExpiredDialogComponent,
8183
ElementTermComponent
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<div class="batch-acl-dialog">
2+
<div *nzModalTitle>{{ titleKey | translate }}</div>
3+
4+
<nz-alert
5+
[nzType]="isActionable ? 'info' : 'error'"
6+
[nzDescription]="messageKey | translate"
7+
></nz-alert>
8+
9+
<div class="review-list" *ngIf="isBatch">
10+
<div class="review-item" *ngFor="let item of items">
11+
<div class="review-header">
12+
<strong>{{ item.asset.name }}</strong>
13+
<nz-tag [nzColor]="statusType[item.status]">{{
14+
'Batch review status ' + item.status | translate
15+
}}</nz-tag>
16+
</div>
17+
<div class="review-detail" *ngIf="isReview && item.status === 'pending'">
18+
{{ 'Assignees' | translate }}: {{ item.assignees }}
19+
<button nz-button nzType="link" nzSize="small" (click)="onCopyLink(item)">
20+
{{ 'Copy link' | translate }}
21+
</button>
22+
</div>
23+
<div class="review-detail error" *ngIf="item.detail">{{ item.detail }}</div>
24+
</div>
25+
</div>
26+
27+
<div class="single-detail" *ngIf="!isBatch && isReview && singleItem?.status === 'pending'">
28+
{{ 'Assignees' | translate }}: {{ singleItem.assignees }}
29+
<button nz-button nzType="link" nzSize="small" (click)="onCopyLink(singleItem)">
30+
{{ 'Copy link' | translate }}
31+
</button>
32+
</div>
33+
34+
<iframe
35+
*ngIf="faceVerifyUrl"
36+
class="face-verify-frame"
37+
[src]="faceVerifyUrl"
38+
allow="camera"
39+
sandbox="allow-scripts allow-same-origin"
40+
></iframe>
41+
42+
<div *nzModalFooter>
43+
<button nz-button [disabled]="isSubmitting" (click)="onClose()">
44+
{{ closeTextKey | translate }}
45+
</button>
46+
<button nz-button nzType="primary" *ngIf="isActionable && !submitted" (click)="onConfirm()">
47+
{{ actionTextKey | translate }}
48+
</button>
49+
</div>
50+
</div>
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
.batch-acl-dialog {
2+
nz-alert {
3+
display: block;
4+
margin-bottom: 16px;
5+
}
6+
}
7+
8+
.review-list {
9+
max-height: 420px;
10+
overflow-y: auto;
11+
border: 1px solid #f0f0f0;
12+
border-radius: 4px;
13+
}
14+
15+
.face-verify-frame {
16+
width: 100%;
17+
height: 480px;
18+
margin-top: 16px;
19+
border: 0;
20+
}
21+
22+
.review-item {
23+
padding: 12px 16px;
24+
border-bottom: 1px solid #f0f0f0;
25+
26+
&:last-child {
27+
border-bottom: 0;
28+
}
29+
}
30+
31+
.review-header {
32+
display: flex;
33+
align-items: center;
34+
justify-content: space-between;
35+
gap: 12px;
36+
}
37+
38+
.review-detail {
39+
margin-top: 8px;
40+
color: #666;
41+
42+
&.error {
43+
color: #ff4d4f;
44+
}
45+
}
46+
47+
.single-detail {
48+
margin-top: 16px;
49+
}

0 commit comments

Comments
 (0)