@brggroup/share-lib 0.2.24 → 0.2.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -4
- package/fesm2022/brggroup-share-lib.mjs +323 -37
- package/fesm2022/brggroup-share-lib.mjs.map +1 -1
- package/lib/auth/auth.service.d.ts +1 -1
- package/lib/auth/auth.service.d.ts.map +1 -1
- package/lib/auth/session-manager.service.d.ts +1 -1
- package/lib/auth/session-manager.service.d.ts.map +1 -1
- package/lib/drive/components/drive-explorer/controllers/drive-explorer-dragdrop.base.d.ts.map +1 -1
- package/lib/drive/components/drive-explorer/controllers/drive-explorer-drawers.base.d.ts +1 -1
- package/lib/drive/components/drive-explorer/controllers/drive-explorer-drawers.base.d.ts.map +1 -1
- package/lib/drive/components/drive-explorer/controllers/drive-explorer-navigation.base.d.ts +4 -1
- package/lib/drive/components/drive-explorer/controllers/drive-explorer-navigation.base.d.ts.map +1 -1
- package/lib/drive/components/drive-explorer/controllers/drive-explorer-state.base.d.ts +2 -1
- package/lib/drive/components/drive-explorer/controllers/drive-explorer-state.base.d.ts.map +1 -1
- package/lib/drive/components/drive-explorer/drive-explorer.d.ts.map +1 -1
- package/lib/drive/components/drive-folder-embed/drive-folder-embed.d.ts +2 -0
- package/lib/drive/components/drive-folder-embed/drive-folder-embed.d.ts.map +1 -1
- package/lib/drive/components/drive-share-modal/drive-share-modal.d.ts +16 -1
- package/lib/drive/components/drive-share-modal/drive-share-modal.d.ts.map +1 -1
- package/lib/drive/models/custom-space.model.d.ts +2 -0
- package/lib/drive/models/custom-space.model.d.ts.map +1 -1
- package/lib/drive/models/enums.model.d.ts +1 -1
- package/lib/drive/models/enums.model.d.ts.map +1 -1
- package/lib/drive/models/explorer.model.d.ts +2 -0
- package/lib/drive/models/explorer.model.d.ts.map +1 -1
- package/lib/drive/services/drive-explorer.base.d.ts +2 -0
- package/lib/drive/services/drive-explorer.base.d.ts.map +1 -1
- package/lib/drive/services/drive-state.base.d.ts +4 -0
- package/lib/drive/services/drive-state.base.d.ts.map +1 -1
- package/lib/drive/utils/drive-mapper.util.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -6629,15 +6629,18 @@ function mapDriveNode(n) {
|
|
|
6629
6629
|
};
|
|
6630
6630
|
}
|
|
6631
6631
|
function mapCustomSpace(s) {
|
|
6632
|
+
const canManage = s.CanManage ?? s.canManage ?? s.CanManageSpace ?? s.canManageSpace ?? false;
|
|
6632
6633
|
return {
|
|
6633
6634
|
Id: s.Id ?? s.id,
|
|
6634
6635
|
Name: s.Name ?? s.name ?? '',
|
|
6635
6636
|
Icon: s.Icon ?? s.icon ?? 'project',
|
|
6636
6637
|
IsVisibleToAllUsers: s.IsVisibleToAllUsers ?? s.isVisibleToAllUsers ?? false,
|
|
6637
|
-
DefaultAccessLevel: s.DefaultAccessLevel ?? s.defaultAccessLevel ?? DriveAccessLevel.
|
|
6638
|
+
DefaultAccessLevel: s.DefaultAccessLevel ?? s.defaultAccessLevel ?? DriveAccessLevel.Downloader,
|
|
6638
6639
|
OwnerId: s.OwnerId ?? s.ownerId ?? '',
|
|
6639
6640
|
OwnerName: s.OwnerName ?? s.ownerName ?? '',
|
|
6640
|
-
|
|
6641
|
+
EffectiveAccess: s.EffectiveAccess ?? s.effectiveAccess ?? DriveAccessLevel.Downloader,
|
|
6642
|
+
CanManage: canManage,
|
|
6643
|
+
CanManageSpace: canManage,
|
|
6641
6644
|
};
|
|
6642
6645
|
}
|
|
6643
6646
|
function mapTemplatePermissions(rawPerms) {
|
|
@@ -7296,11 +7299,13 @@ class DriveStateBaseService extends HTTPService {
|
|
|
7296
7299
|
quotaLimitBytes = signal(10 * 1024 * 1024 * 1024);
|
|
7297
7300
|
defaultUserQuotaBytes = signal(10 * 1024 * 1024 * 1024);
|
|
7298
7301
|
isCurrentUserAdmin = signal(false);
|
|
7302
|
+
orgDriveSpace = signal(null);
|
|
7299
7303
|
customSpaces = signal([]);
|
|
7300
7304
|
currentCustomSpaceId = signal(null);
|
|
7301
7305
|
isTreeTableView = signal(false);
|
|
7302
7306
|
usePhysicalFolders = signal(false);
|
|
7303
7307
|
useSharedPhysicalRoot = signal(true);
|
|
7308
|
+
allowDeleteFromTrash = signal(true);
|
|
7304
7309
|
storageRootPath = signal(null);
|
|
7305
7310
|
currentPhysicalPath = signal(null);
|
|
7306
7311
|
activeUserKey = signal(TokenStorage.getUsername() || '');
|
|
@@ -7338,6 +7343,8 @@ class DriveStateBaseService extends HTTPService {
|
|
|
7338
7343
|
(mode === 'SHARED_WITH_ME' && !!this.currentFolderId());
|
|
7339
7344
|
return allowInMode && this.currentFolderAccess() >= DriveAccessLevel.Editor;
|
|
7340
7345
|
});
|
|
7346
|
+
/** YÊU CẦU #3: Quyền "Xem & Tải lên" (Uploader = 35) không được tạo thư mục mới bên trong (yêu cầu >= Editor = 40) */
|
|
7347
|
+
canCreateFolderCurrentFolder = computed(() => this.canEditCurrentFolder());
|
|
7341
7348
|
get frontendShareBaseUrl() {
|
|
7342
7349
|
if (typeof window === 'undefined')
|
|
7343
7350
|
return '';
|
|
@@ -7404,8 +7411,11 @@ class DriveExplorerBaseService extends DriveStateBaseService {
|
|
|
7404
7411
|
.set('PageIndex', this.pageIndex())
|
|
7405
7412
|
.set('PageSize', this.pageSize());
|
|
7406
7413
|
let folderId = this.currentFolderId();
|
|
7407
|
-
if (this.currentViewMode() === 'CUSTOM_SPACE' &&
|
|
7408
|
-
|
|
7414
|
+
if (this.currentViewMode() === 'CUSTOM_SPACE' && this.currentCustomSpaceId()) {
|
|
7415
|
+
params = params.set('CustomSpaceId', this.currentCustomSpaceId());
|
|
7416
|
+
if (!folderId) {
|
|
7417
|
+
folderId = this.currentCustomSpaceId();
|
|
7418
|
+
}
|
|
7409
7419
|
}
|
|
7410
7420
|
if (folderId && ['MY_DRIVE', 'ORG_DRIVE', 'CUSTOM_SPACE', 'SHARED_WITH_ME'].includes(this.currentViewMode())) {
|
|
7411
7421
|
params = params.set('ParentId', folderId);
|
|
@@ -7437,12 +7447,18 @@ class DriveExplorerBaseService extends DriveStateBaseService {
|
|
|
7437
7447
|
}
|
|
7438
7448
|
this.usePhysicalFolders.set(d.UsePhysicalFolders ?? d.usePhysicalFolders ?? false);
|
|
7439
7449
|
this.useSharedPhysicalRoot.set(d.UseSharedPhysicalRoot ?? d.useSharedPhysicalRoot ?? true);
|
|
7450
|
+
const allowDelTrash = d.AllowDeleteFromTrash ?? d.allowDeleteFromTrash;
|
|
7451
|
+
this.allowDeleteFromTrash.set(allowDelTrash !== undefined ? !!allowDelTrash : true);
|
|
7440
7452
|
this.storageRootPath.set(d.StorageRootPath ?? d.storageRootPath ?? null);
|
|
7441
7453
|
this.currentPhysicalPath.set(d.CurrentPhysicalPath ?? d.currentPhysicalPath ?? null);
|
|
7442
7454
|
const isAdminFromApi = d.IsCurrentUserAdmin ?? d.isCurrentUserAdmin;
|
|
7443
7455
|
const uname = (resolvedUser || '').toLowerCase();
|
|
7444
7456
|
this.isCurrentUserAdmin.set(isAdminFromApi !== undefined ? !!isAdminFromApi : uname === 'admin');
|
|
7445
7457
|
this.defaultUserQuotaBytes.set(d.DefaultUserQuotaBytes ?? d.defaultUserQuotaBytes ?? 10 * 1024 * 1024 * 1024);
|
|
7458
|
+
const rawOrgSpace = d.OrgDriveSpace ?? d.orgDriveSpace ?? null;
|
|
7459
|
+
if (rawOrgSpace) {
|
|
7460
|
+
this.orgDriveSpace.set(mapCustomSpace(rawOrgSpace));
|
|
7461
|
+
}
|
|
7446
7462
|
const rawSpaces = d.CustomSpaces ?? d.customSpaces ?? [];
|
|
7447
7463
|
this.customSpaces.set(rawSpaces.map((s) => mapCustomSpace(s)));
|
|
7448
7464
|
}
|
|
@@ -7474,6 +7490,27 @@ class DriveExplorerBaseService extends DriveStateBaseService {
|
|
|
7474
7490
|
await this.loadNodes();
|
|
7475
7491
|
return res;
|
|
7476
7492
|
}
|
|
7493
|
+
async getOrgDriveSpace() {
|
|
7494
|
+
const raw = await this.get(`${this.apiUrl}/org-drive/space`, true);
|
|
7495
|
+
const res = this.unwrapResponse(raw);
|
|
7496
|
+
if (res.IsSuccess && res.Data) {
|
|
7497
|
+
const mapped = mapCustomSpace(res.Data);
|
|
7498
|
+
this.orgDriveSpace.set(mapped);
|
|
7499
|
+
return mapped;
|
|
7500
|
+
}
|
|
7501
|
+
return this.orgDriveSpace();
|
|
7502
|
+
}
|
|
7503
|
+
async updateOrgDriveSpace(payload) {
|
|
7504
|
+
const raw = await firstValueFrom(this.http.put(`${this.apiUrl}/org-drive/space`, payload));
|
|
7505
|
+
const res = this.unwrapResponse(raw);
|
|
7506
|
+
if (res.IsSuccess) {
|
|
7507
|
+
if (res.Data) {
|
|
7508
|
+
this.orgDriveSpace.set(mapCustomSpace(res.Data));
|
|
7509
|
+
}
|
|
7510
|
+
await this.loadNodes();
|
|
7511
|
+
}
|
|
7512
|
+
return res;
|
|
7513
|
+
}
|
|
7477
7514
|
async createCustomSpace(payload) {
|
|
7478
7515
|
const raw = await this.postData(`${this.apiUrl}/custom-spaces`, payload);
|
|
7479
7516
|
const res = this.unwrapResponse(raw);
|
|
@@ -7525,6 +7562,9 @@ class DriveExplorerBaseService extends DriveStateBaseService {
|
|
|
7525
7562
|
.set('SortDesc', false)
|
|
7526
7563
|
.set('PageIndex', 1)
|
|
7527
7564
|
.set('PageSize', 500);
|
|
7565
|
+
if (isCustom && customSpaceId) {
|
|
7566
|
+
params = params.set('CustomSpaceId', customSpaceId);
|
|
7567
|
+
}
|
|
7528
7568
|
if (effectiveParentId) {
|
|
7529
7569
|
params = params.set('ParentId', effectiveParentId);
|
|
7530
7570
|
}
|
|
@@ -7535,7 +7575,10 @@ class DriveExplorerBaseService extends DriveStateBaseService {
|
|
|
7535
7575
|
const rawItems = res.Data.Items ?? res.Data.items ?? [];
|
|
7536
7576
|
const foldersOnly = rawItems
|
|
7537
7577
|
.map((x) => this.mapNode(x))
|
|
7538
|
-
.filter((n) => isDriveFolderLike(n) &&
|
|
7578
|
+
.filter((n) => isDriveFolderLike(n) &&
|
|
7579
|
+
!n.IsDeleted &&
|
|
7580
|
+
!n.IsBrokenShortcut &&
|
|
7581
|
+
(spaceKey !== 'MY_DRIVE' || !n.IsOrgNode));
|
|
7539
7582
|
return sortDriveNodesList(foldersOnly, 'Name', false);
|
|
7540
7583
|
}
|
|
7541
7584
|
async createShortcut(payload) {
|
|
@@ -9395,11 +9438,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
9395
9438
|
}] } });
|
|
9396
9439
|
|
|
9397
9440
|
class DriveShareModalComponent extends BaseComponent {
|
|
9398
|
-
modalData = inject(NZ_MODAL_DATA, {
|
|
9399
|
-
|
|
9441
|
+
modalData = inject(NZ_MODAL_DATA, {
|
|
9442
|
+
optional: true,
|
|
9443
|
+
});
|
|
9444
|
+
drawerData = inject(NZ_DRAWER_DATA, {
|
|
9445
|
+
optional: true,
|
|
9446
|
+
});
|
|
9400
9447
|
driveService = inject(DriveService);
|
|
9401
9448
|
search$ = new Subject();
|
|
9402
9449
|
nodeId = '';
|
|
9450
|
+
/** Ẩn thanh bật/tắt Kế thừa quyền từ thư mục cha khi phân quyền cho Không gian gốc (Tài liệu Đơn vị / Tài liệu dự án) */
|
|
9451
|
+
hideInheritanceToggle = false;
|
|
9403
9452
|
DriveGranteeType = DriveGranteeType;
|
|
9404
9453
|
DriveAccessLevel = DriveAccessLevel;
|
|
9405
9454
|
DriveShareScope = DriveShareScope;
|
|
@@ -9416,6 +9465,13 @@ class DriveShareModalComponent extends BaseComponent {
|
|
|
9416
9465
|
CanShare: false,
|
|
9417
9466
|
CanDownload: true,
|
|
9418
9467
|
};
|
|
9468
|
+
// Trạng thái Chỉnh sửa trực tiếp (Inline Edit) trên bảng phân quyền
|
|
9469
|
+
editingPermId = signal(null);
|
|
9470
|
+
savingEdit = signal(false);
|
|
9471
|
+
editAccessLevel = DriveAccessLevel.Downloader;
|
|
9472
|
+
editIsDeny = false;
|
|
9473
|
+
editCanDownload = true;
|
|
9474
|
+
editCanShare = false;
|
|
9419
9475
|
newLink = {
|
|
9420
9476
|
Scope: DriveShareScope.InternalAuthenticated,
|
|
9421
9477
|
AccessLevel: DriveAccessLevel.Downloader,
|
|
@@ -9425,6 +9481,9 @@ class DriveShareModalComponent extends BaseComponent {
|
|
|
9425
9481
|
if (!this.nodeId) {
|
|
9426
9482
|
this.nodeId = this.drawerData?.nodeId || this.modalData?.nodeId || '';
|
|
9427
9483
|
}
|
|
9484
|
+
if (!this.hideInheritanceToggle) {
|
|
9485
|
+
this.hideInheritanceToggle = !!(this.drawerData?.hideInheritanceToggle || this.modalData?.hideInheritanceToggle);
|
|
9486
|
+
}
|
|
9428
9487
|
this.reload();
|
|
9429
9488
|
this.search$
|
|
9430
9489
|
.pipe(debounceTime(250), distinctUntilChanged$1(), switchMap$1((kw) => this.driveService.searchGrantees(kw, this.newPerm.GranteeType)))
|
|
@@ -9434,6 +9493,7 @@ class DriveShareModalComponent extends BaseComponent {
|
|
|
9434
9493
|
}
|
|
9435
9494
|
ngOnChanges(changes) {
|
|
9436
9495
|
if (changes['nodeId'] && !changes['nodeId'].firstChange && this.nodeId) {
|
|
9496
|
+
this.cancelEditPerm();
|
|
9437
9497
|
this.reload();
|
|
9438
9498
|
}
|
|
9439
9499
|
}
|
|
@@ -9450,25 +9510,50 @@ class DriveShareModalComponent extends BaseComponent {
|
|
|
9450
9510
|
}
|
|
9451
9511
|
onGranteeTypeChange() {
|
|
9452
9512
|
this.selectedGrantee = null;
|
|
9453
|
-
this.driveService
|
|
9513
|
+
this.driveService
|
|
9514
|
+
.searchGrantees('', this.newPerm.GranteeType)
|
|
9515
|
+
.then((list) => this.granteeOptions.set(list));
|
|
9454
9516
|
}
|
|
9455
9517
|
onSearchGrantee(keyword) {
|
|
9456
9518
|
this.search$.next(keyword || '');
|
|
9457
9519
|
}
|
|
9520
|
+
onNewPermAccessChange(level) {
|
|
9521
|
+
this.newPerm.AccessLevel = level;
|
|
9522
|
+
this.newPerm.CanDownload = !this.newPerm.IsDeny && level >= DriveAccessLevel.Downloader;
|
|
9523
|
+
this.newPerm.CanShare = !this.newPerm.IsDeny && level >= DriveAccessLevel.Manager;
|
|
9524
|
+
}
|
|
9525
|
+
onNewPermDenyChange(isDeny) {
|
|
9526
|
+
this.newPerm.IsDeny = isDeny;
|
|
9527
|
+
if (isDeny) {
|
|
9528
|
+
this.newPerm.CanDownload = false;
|
|
9529
|
+
this.newPerm.CanShare = false;
|
|
9530
|
+
}
|
|
9531
|
+
else {
|
|
9532
|
+
this.newPerm.CanDownload = this.newPerm.AccessLevel >= DriveAccessLevel.Downloader;
|
|
9533
|
+
this.newPerm.CanShare = this.newPerm.AccessLevel >= DriveAccessLevel.Manager;
|
|
9534
|
+
}
|
|
9535
|
+
}
|
|
9458
9536
|
async addOrUpdatePermission() {
|
|
9459
9537
|
if (!this.selectedGrantee)
|
|
9460
9538
|
return;
|
|
9461
9539
|
try {
|
|
9540
|
+
const effectiveLevel = this.newPerm.IsDeny ? DriveAccessLevel.None : this.newPerm.AccessLevel;
|
|
9541
|
+
const canDownload = !this.newPerm.IsDeny && effectiveLevel >= DriveAccessLevel.Downloader;
|
|
9542
|
+
const canShare = !this.newPerm.IsDeny && effectiveLevel >= DriveAccessLevel.Manager;
|
|
9462
9543
|
const payload = {
|
|
9463
9544
|
...this.newPerm,
|
|
9464
9545
|
GranteeType: this.selectedGrantee.GranteeType,
|
|
9465
9546
|
GranteeId: this.selectedGrantee.GranteeId,
|
|
9466
9547
|
GranteeName: this.selectedGrantee.DisplayName,
|
|
9548
|
+
AccessLevel: effectiveLevel,
|
|
9549
|
+
CanDownload: canDownload,
|
|
9550
|
+
CanShare: canShare,
|
|
9467
9551
|
};
|
|
9468
9552
|
const res = await this.driveService.upsertPermission(this.nodeId, payload);
|
|
9469
9553
|
if (res.IsSuccess) {
|
|
9470
9554
|
this.success('Đã cập nhật phân quyền.');
|
|
9471
9555
|
this.selectedGrantee = null;
|
|
9556
|
+
this.newPerm.IsDeny = false;
|
|
9472
9557
|
await this.reload();
|
|
9473
9558
|
await this.driveService.loadNodes();
|
|
9474
9559
|
}
|
|
@@ -9480,12 +9565,88 @@ class DriveShareModalComponent extends BaseComponent {
|
|
|
9480
9565
|
this.handleError(err);
|
|
9481
9566
|
}
|
|
9482
9567
|
}
|
|
9568
|
+
// ==================== CHỈNH SỬA PHÂN QUYỀN TRỰC TIẾP TRÊN DÒNG (INLINE EDIT) ====================
|
|
9569
|
+
startEditPerm(p) {
|
|
9570
|
+
this.editingPermId.set(p.Id);
|
|
9571
|
+
this.editIsDeny = !!p.IsDeny;
|
|
9572
|
+
this.editAccessLevel =
|
|
9573
|
+
p.AccessLevel && p.AccessLevel > 0 ? p.AccessLevel : DriveAccessLevel.Downloader;
|
|
9574
|
+
this.editCanDownload =
|
|
9575
|
+
!p.IsDeny && (p.CanDownload ?? p.AccessLevel >= DriveAccessLevel.Downloader);
|
|
9576
|
+
this.editCanShare = !p.IsDeny && (p.CanShare ?? p.AccessLevel >= DriveAccessLevel.Manager);
|
|
9577
|
+
}
|
|
9578
|
+
cancelEditPerm() {
|
|
9579
|
+
this.editingPermId.set(null);
|
|
9580
|
+
this.savingEdit.set(false);
|
|
9581
|
+
}
|
|
9582
|
+
onEditAccessLevelChange(level) {
|
|
9583
|
+
this.editAccessLevel = level;
|
|
9584
|
+
if (level < DriveAccessLevel.Downloader) {
|
|
9585
|
+
this.editCanDownload = false;
|
|
9586
|
+
}
|
|
9587
|
+
else {
|
|
9588
|
+
this.editCanDownload = true;
|
|
9589
|
+
}
|
|
9590
|
+
this.editCanShare = level >= DriveAccessLevel.Manager;
|
|
9591
|
+
}
|
|
9592
|
+
onEditDenyChange(isDeny) {
|
|
9593
|
+
this.editIsDeny = isDeny;
|
|
9594
|
+
if (isDeny) {
|
|
9595
|
+
this.editCanDownload = false;
|
|
9596
|
+
this.editCanShare = false;
|
|
9597
|
+
}
|
|
9598
|
+
else if (this.editAccessLevel >= DriveAccessLevel.Downloader) {
|
|
9599
|
+
this.editCanDownload = true;
|
|
9600
|
+
}
|
|
9601
|
+
}
|
|
9602
|
+
async saveEditPerm(p) {
|
|
9603
|
+
if (!this.nodeId)
|
|
9604
|
+
return;
|
|
9605
|
+
this.savingEdit.set(true);
|
|
9606
|
+
try {
|
|
9607
|
+
const effectiveLevel = this.editIsDeny ? DriveAccessLevel.None : this.editAccessLevel;
|
|
9608
|
+
const effectiveCanDl = !this.editIsDeny &&
|
|
9609
|
+
effectiveLevel >= DriveAccessLevel.Downloader &&
|
|
9610
|
+
this.editCanDownload;
|
|
9611
|
+
const effectiveCanSh = !this.editIsDeny &&
|
|
9612
|
+
(this.editCanShare || effectiveLevel >= DriveAccessLevel.Manager);
|
|
9613
|
+
const payload = {
|
|
9614
|
+
GranteeType: p.GranteeType,
|
|
9615
|
+
GranteeId: p.GranteeId,
|
|
9616
|
+
GranteeName: p.GranteeName || p.GranteeId,
|
|
9617
|
+
AccessLevel: effectiveLevel,
|
|
9618
|
+
IsDeny: this.editIsDeny,
|
|
9619
|
+
CanDownload: effectiveCanDl,
|
|
9620
|
+
CanShare: effectiveCanSh,
|
|
9621
|
+
ExpiresAt: p.ExpiresAt,
|
|
9622
|
+
};
|
|
9623
|
+
const res = await this.driveService.upsertPermission(this.nodeId, payload);
|
|
9624
|
+
if (res.IsSuccess) {
|
|
9625
|
+
this.success(`Đã cập nhật quyền của "${p.GranteeName || p.GranteeId}".`);
|
|
9626
|
+
this.editingPermId.set(null);
|
|
9627
|
+
await this.reload();
|
|
9628
|
+
await this.driveService.loadNodes();
|
|
9629
|
+
}
|
|
9630
|
+
else {
|
|
9631
|
+
this.error(res.ErrorMessage || 'Không thể cập nhật phân quyền.');
|
|
9632
|
+
}
|
|
9633
|
+
}
|
|
9634
|
+
catch (err) {
|
|
9635
|
+
this.handleError(err);
|
|
9636
|
+
}
|
|
9637
|
+
finally {
|
|
9638
|
+
this.savingEdit.set(false);
|
|
9639
|
+
}
|
|
9640
|
+
}
|
|
9483
9641
|
async removePerm(permId) {
|
|
9484
9642
|
if (!(await this.confirm('Xác nhận gỡ quyền truy cập này?')))
|
|
9485
9643
|
return;
|
|
9486
9644
|
try {
|
|
9487
9645
|
const res = await this.driveService.removePermission(this.nodeId, permId);
|
|
9488
9646
|
if (res.IsSuccess) {
|
|
9647
|
+
if (this.editingPermId() === permId) {
|
|
9648
|
+
this.cancelEditPerm();
|
|
9649
|
+
}
|
|
9489
9650
|
this.success('Đã gỡ bỏ quyền.');
|
|
9490
9651
|
await this.reload();
|
|
9491
9652
|
await this.driveService.loadNodes();
|
|
@@ -9523,7 +9684,9 @@ class DriveShareModalComponent extends BaseComponent {
|
|
|
9523
9684
|
async onTransferOwnership() {
|
|
9524
9685
|
if (!this.selectedNewOwner)
|
|
9525
9686
|
return;
|
|
9526
|
-
const targetName = this.selectedNewOwner.DisplayName ||
|
|
9687
|
+
const targetName = this.selectedNewOwner.DisplayName ||
|
|
9688
|
+
this.selectedNewOwner.Code ||
|
|
9689
|
+
this.selectedNewOwner.GranteeId;
|
|
9527
9690
|
if (!(await this.confirm(`Xác nhận chuyển quyền sở hữu mục này cho "${targetName}"?`)))
|
|
9528
9691
|
return;
|
|
9529
9692
|
try {
|
|
@@ -9622,7 +9785,7 @@ class DriveShareModalComponent extends BaseComponent {
|
|
|
9622
9785
|
}
|
|
9623
9786
|
}
|
|
9624
9787
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: DriveShareModalComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
9625
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: DriveShareModalComponent, isStandalone: true, selector: "lib-drive-share-modal", inputs: { nodeId: "nodeId" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@if (details(); as d) {\n <div class=\"drive-share-modal\">\n <nz-tabset>\n <!-- TAB 1: PH\u00C2N QUY\u1EC0N NG\u01AF\u1EDCI D\u00D9NG / \u0110\u01A0N V\u1ECA (APP_ORG) / VAI TR\u00D2 (APP_ROLE) -->\n <nz-tab nzTitle=\"Ph\u00E2n quy\u1EC1n Truy c\u1EADp (ACL & RBAC)\">\n <div class=\"inheritance-bar\">\n <div>\n <strong>Ch\u1EE7 s\u1EDF h\u1EEFu hi\u1EC7n t\u1EA1i: </strong>\n <nz-tag nzColor=\"gold\" style=\"margin-left: 4px\">\n <nz-icon nzType=\"crown\"></nz-icon> {{ d.OwnerName || d.OwnerId }}\n </nz-tag>\n <p class=\"text-muted\">\n Chuy\u1EC3n quy\u1EC1n s\u1EDF h\u1EEFu m\u1EE5c n\u00E0y (v\u00E0 to\u00E0n b\u1ED9 nh\u00E1nh con n\u1EBFu l\u00E0 th\u01B0 m\u1EE5c) cho m\u1ED9t c\u00E1 nh\u00E2n kh\u00E1c trong h\u1EC7 th\u1ED1ng.\n </p>\n </div>\n <div nz-flex nzAlign=\"center\" style=\"flex-wrap: wrap\">\n <nz-select\n nzShowSearch\n nzServerSearch\n nzPlaceHolder=\"T\u00ECm ng\u01B0\u1EDDi d\u00F9ng nh\u1EADn quy\u1EC1n s\u1EDF h\u1EEFu...\"\n [(ngModel)]=\"selectedNewOwner\"\n (nzOnSearch)=\"onSearchOwnerCandidate($event)\"\n style=\"width: 240px\"\n >\n @for (u of ownerCandidateOptions(); track u.GranteeId) {\n <nz-option [nzValue]=\"u\" [nzLabel]=\"u.DisplayName + ' (' + u.Code + ')'\"></nz-option>\n }\n </nz-select>\n <button nz-button nzType=\"default\" [disabled]=\"!selectedNewOwner\" (click)=\"onTransferOwnership()\">\n <nz-icon nzType=\"swap\"></nz-icon> Chuy\u1EC3n quy\u1EC1n s\u1EDF h\u1EEFu\n </button>\n </div>\n </div>\n <div class=\"inheritance-bar\">\n <div>\n <strong>K\u1EBF th\u1EEBa quy\u1EC1n t\u1EEB th\u01B0 m\u1EE5c cha</strong>\n <p class=\"text-muted\">\n Khi t\u1EAFt k\u1EBF th\u1EEBa, h\u1EC7 th\u1ED1ng gi\u1EEF nguy\u00EAn b\u1EA3n sao quy\u1EC1n hi\u1EC7n t\u1EA1i \u0111\u1EC3 b\u1EA1n t\u00F9y ch\u1EC9nh \u0111\u1ED9c l\u1EADp.\n </p>\n </div>\n <nz-switch\n [ngModel]=\"d.InheritPermissions\"\n (ngModelChange)=\"onToggleInheritance($event)\"\n nzCheckedChildren=\"\u0110ang k\u1EBF th\u1EEBa\"\n nzUnCheckedChildren=\"\u0110\u00E3 ng\u1EAFt k\u1EBF th\u1EEBa\"\n >\n </nz-switch>\n </div>\n <!-- Thanh ch\u1ECDn Ng\u01B0\u1EDDi d\u00F9ng / \u0110\u01A1n v\u1ECB / Vai tr\u00F2 t\u1EEB App.Auth -->\n <div class=\"grant-form\">\n <nz-select [(ngModel)]=\"newPerm.GranteeType\" (ngModelChange)=\"onGranteeTypeChange()\" style=\"width: 150px\">\n <nz-option [nzValue]=\"DriveGranteeType.User\" nzLabel=\"C\u00E1 nh\u00E2n (User)\"></nz-option>\n <nz-option [nzValue]=\"DriveGranteeType.Org\" nzLabel=\"\u0110\u01A1n v\u1ECB (App_Org)\"></nz-option>\n <nz-option [nzValue]=\"DriveGranteeType.Role\" nzLabel=\"Vai tr\u00F2 (App_Role)\"></nz-option>\n </nz-select>\n <nz-select\n nzShowSearch\n nzServerSearch\n nzPlaceHolder=\"G\u00F5 t\u00EAn ho\u1EB7c m\u00E3 User / \u0110\u01A1n v\u1ECB / Vai tr\u00F2...\"\n [(ngModel)]=\"selectedGrantee\"\n (nzOnSearch)=\"onSearchGrantee($event)\"\n style=\"flex: 1; min-width: 220px\"\n >\n @for (g of granteeOptions(); track g.GranteeId) {\n <nz-option [nzValue]=\"g\" [nzLabel]=\"g.DisplayName + ' (' + g.Code + ')'\"></nz-option>\n }\n </nz-select>\n <nz-select [(ngModel)]=\"newPerm.AccessLevel\" style=\"width: 175px\">\n <nz-option [nzValue]=\"DriveAccessLevel.Viewer\" nzLabel=\"Ch\u1EC9 xem (Viewer)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Downloader\" nzLabel=\"Xem & T\u1EA3i xu\u1ED1ng\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Uploader\" nzLabel=\"Xem & T\u1EA3i l\u00EAn\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Editor\" nzLabel=\"Ch\u1EC9nh s\u1EEDa (Editor)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Manager\" nzLabel=\"Qu\u1EA3n tr\u1ECB (Manager)\"></nz-option>\n </nz-select>\n <label nz-checkbox [(ngModel)]=\"newPerm.IsDeny\"> C\u1EA5m (Deny) </label>\n <button nz-button nzType=\"primary\" (click)=\"addOrUpdatePermission()\" [disabled]=\"!selectedGrantee\">\n <nz-icon nzType=\"user-add\"></nz-icon> C\u1EA5p quy\u1EC1n\n </button>\n </div>\n <nz-table #permTable [nzData]=\"d.Permissions\" nzSize=\"small\" [nzBordered]=\"true\" [nzFrontPagination]=\"false\">\n <thead>\n <tr>\n <th>\u0110\u1ED1i t\u01B0\u1EE3ng nh\u1EADn quy\u1EC1n</th>\n <th nzWidth=\"170px\">Ngu\u1ED3n quy\u1EC1n</th>\n <th nzWidth=\"160px\">M\u1EE9c quy\u1EC1n</th>\n <th nzWidth=\"100px\" class=\"text-center\">T\u1EA3i xu\u1ED1ng</th>\n <th nzWidth=\"120px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (p of permTable.data; track p.Id) {\n <tr>\n <td>\n <nz-tag\n [nzColor]=\"\n p.GranteeType === DriveGranteeType.User\n ? 'blue'\n : p.GranteeType === DriveGranteeType.Org\n ? 'cyan'\n : 'purple'\n \"\n >\n {{\n p.GranteeType === DriveGranteeType.User\n ? \"User\"\n : p.GranteeType === DriveGranteeType.Org\n ? \"\u0110\u01A1n v\u1ECB\"\n : \"Role\"\n }}\n </nz-tag>\n <strong>{{ p.GranteeName || p.GranteeId }}</strong>\n </td>\n <td>\n @if (p.IsInherited) {\n <nz-tag nzColor=\"default\">K\u1EBF th\u1EEBa: {{ p.SourceNodeName }}</nz-tag>\n } @else {\n <nz-tag nzColor=\"green\">Tr\u1EF1c ti\u1EBFp</nz-tag>\n }\n </td>\n <td>\n @if (p.IsDeny) {\n <nz-tag nzColor=\"error\">T\u1EEB ch\u1ED1i (Deny)</nz-tag>\n } @else {\n <span>{{ getAccessLabel(p.AccessLevel) }}</span>\n }\n </td>\n <td class=\"text-center\">{{ p.CanDownload ? \"Cho ph\u00E9p\" : \"Ch\u1EB7n\" }}</td>\n <td class=\"text-center\">\n @if (p.GranteeType === DriveGranteeType.User && !p.IsDeny && p.GranteeId !== d.OwnerId) {\n <button\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Chuy\u1EC3n quy\u1EC1n s\u1EDF h\u1EEFu cho ng\u01B0\u1EDDi d\u00F9ng n\u00E0y\"\n (click)=\"quickTransferOwnershipFromRow(p)\"\n >\n <nz-icon nzType=\"crown\" style=\"color: #d97706\"></nz-icon>\n </button>\n }\n <button\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n [disabled]=\"p.IsInherited\"\n nz-tooltip\n [nzTooltipTitle]=\"p.IsInherited ? 'Quy\u1EC1n k\u1EBF th\u1EEBa t\u1EEB th\u01B0 m\u1EE5c cha' : 'X\u00F3a quy\u1EC1n n\u00E0y'\"\n (click)=\"removePerm(p.Id)\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n </nz-tab>\n <!-- TAB 2: CHIA S\u1EBA QUA LINK -->\n <nz-tab nzTitle=\"Li\u00EAn k\u1EBFt chia s\u1EBB (Share Links)\">\n <div class=\"link-builder\">\n <nz-select [(ngModel)]=\"newLink.Scope\" style=\"width: 255px\">\n <nz-option [nzValue]=\"DriveShareScope.InternalAuthenticated\" nzLabel=\"N\u1ED9i b\u1ED9 (Ph\u1EA3i \u0111\u0103ng nh\u1EADp)\"></nz-option>\n <nz-option\n [nzValue]=\"DriveShareScope.DirectPermissionOnly\"\n nzLabel=\"Link chia s\u1EBB tr\u1EF1c ti\u1EBFp (Theo quy\u1EC1n)\"\n ></nz-option>\n <nz-option [nzValue]=\"DriveShareScope.AnyoneWithLink\" nzLabel=\"C\u00F4ng khai (B\u1EA5t k\u1EF3 ai c\u00F3 link)\"></nz-option>\n </nz-select>\n <input\n nz-input\n type=\"password\"\n placeholder=\"M\u1EADt kh\u1EA9u b\u1EA3o v\u1EC7 (t\u00F9y ch\u1ECDn)\"\n [(ngModel)]=\"newLink.Password\"\n style=\"width: 185px\"\n />\n <nz-date-picker\n [(ngModel)]=\"newLink.ExpiresAt\"\n nzFormat=\"dd/MM/yyyy\"\n nzPlaceHolder=\"Ng\u00E0y h\u1EBFt h\u1EA1n\"\n style=\"width: 145px\"\n >\n </nz-date-picker>\n <label nz-checkbox [(ngModel)]=\"newLink.AllowDownload\">Cho ph\u00E9p t\u1EA3i</label>\n <button nz-button nzType=\"primary\" (click)=\"createLink()\"><nz-icon nzType=\"link\"></nz-icon> T\u1EA1o link</button>\n </div>\n <nz-table #linkTable [nzData]=\"d.ShareLinks\" nzSize=\"small\" [nzBordered]=\"true\" [nzFrontPagination]=\"false\">\n <thead>\n <tr>\n <th>\u0110\u01B0\u1EDDng d\u1EABn chia s\u1EBB</th>\n <th nzWidth=\"135px\">Ph\u1EA1m vi</th>\n <th nzWidth=\"160px\">B\u1EA3o m\u1EADt</th>\n <th nzWidth=\"85px\" class=\"text-center\">L\u01B0\u1EE3t t\u1EA3i</th>\n <th nzWidth=\"150px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (l of linkTable.data; track l.Id) {\n <tr>\n <td>\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <a [href]=\"l.FullUrl\" target=\"_blank\" class=\"link-detail break-word\">{{ l.FullUrl }}</a>\n <icon-copy [textToCopy]=\"l.FullUrl\" tooltip=\"Sao ch\u00E9p li\u00EAn k\u1EBFt\"></icon-copy>\n </div>\n </td>\n <td>\n <nz-tag\n [nzColor]=\"\n l.Scope === DriveShareScope.AnyoneWithLink\n ? 'orange'\n : l.Scope === DriveShareScope.DirectPermissionOnly\n ? 'geekblue'\n : 'cyan'\n \"\n nz-tooltip\n [nzTooltipTitle]=\"\n l.Scope === DriveShareScope.DirectPermissionOnly\n ? 'Link chia s\u1EBB tr\u1EF1c ti\u1EBFp: B\u1EAFt bu\u1ED9c \u0111\u0103ng nh\u1EADp V\u00C0 ki\u1EC3m tra quy\u1EC1n ACL/RBAC tr\u00EAn File/Folder'\n : l.Scope === DriveShareScope.AnyoneWithLink\n ? 'C\u00F4ng khai: B\u1EA5t k\u1EF3 ai c\u00F3 \u0111\u01B0\u1EDDng d\u1EABn \u0111\u1EC1u m\u1EDF \u0111\u01B0\u1EE3c'\n : 'N\u1ED9i b\u1ED9: Ai c\u00F3 t\u00E0i kho\u1EA3n \u0111\u0103ng nh\u1EADp h\u1EC7 th\u1ED1ng \u0111\u1EC1u m\u1EDF \u0111\u01B0\u1EE3c'\n \"\n >\n {{\n l.Scope === DriveShareScope.AnyoneWithLink\n ? \"C\u00F4ng khai\"\n : l.Scope === DriveShareScope.DirectPermissionOnly\n ? \"Link tr\u1EF1c ti\u1EBFp\"\n : \"N\u1ED9i b\u1ED9\"\n }}\n </nz-tag>\n </td>\n <td>\n @if (l.HasPassword) {\n <nz-tag nzColor=\"gold\">C\u00F3 m\u1EADt kh\u1EA9u</nz-tag>\n }\n @if (l.ExpiresAt) {\n <span>H\u1EBFt h\u1EA1n: {{ l.ExpiresAt | date: \"dd/MM/yyyy\" }}</span>\n }\n </td>\n <td class=\"text-center\">{{ l.DownloadCount }}{{ l.MaxDownloads ? \" / \" + l.MaxDownloads : \"\" }}</td>\n <td class=\"text-center\">\n <a nz-button nzType=\"link\" nzSize=\"small\" [href]=\"l.FullUrl\" target=\"_blank\">\n <nz-icon nzType=\"export\"></nz-icon> M\u1EDF\n </a>\n <button nz-button nzType=\"text\" nzDanger nzSize=\"small\" (click)=\"revokeLink(l.Id)\">\n <nz-icon nzType=\"stop\"></nz-icon> Thu h\u1ED3i\n </button>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n </nz-tab>\n </nz-tabset>\n </div>\n}\n", styles: [".inheritance-bar{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:var(--app-sidebar-bg, #f8fafc);border:1px solid var(--app-border, #e2e8f0);border-radius:6px;margin-bottom:16px}.text-muted{margin:2px 0 0;font-size:12px;color:var(--app-text-muted, #64748b)}.grant-form,.link-builder{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:16px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzTabsModule }, { kind: "component", type: i5$1.NzTabSetComponent, selector: "nz-tabset", inputs: ["nzSelectedIndex", "nzTabPosition", "nzTabBarExtraContent", "nzCanDeactivate", "nzAddIcon", "nzTabBarStyle", "nzType", "nzSize", "nzAnimated", "nzTabBarGutter", "nzHideAdd", "nzCentered", "nzHideAll", "nzLinkRouter", "nzLinkExact", "nzDestroyInactiveTabPane"], outputs: ["nzSelectChange", "nzSelectedIndexChange", "nzTabListScroll", "nzClose", "nzAdd"], exportAs: ["nzTabset"] }, { kind: "component", type: i5$1.NzTabComponent, selector: "nz-tab", inputs: ["nzTitle", "nzClosable", "nzCloseIcon", "nzDisabled", "nzForceRender"], outputs: ["nzSelect", "nzDeselect", "nzClick", "nzContextmenu"], exportAs: ["nzTab"] }, { kind: "ngmodule", type: NzSelectModule }, { kind: "component", type: i13$1.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i13$1.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i12.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i2$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i3$3.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i4$1.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i6.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "directive", type: i6.NzTableCellDirective, selector: "th:not(.nz-disable-th):not([mat-cell]), td:not(.nz-disable-td):not([mat-cell])" }, { kind: "directive", type: i6.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i6.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i6.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i6.NzTrDirective, selector: "tr:not([mat-row]):not([mat-header-row]):not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "ngmodule", type: NzSwitchModule }, { kind: "component", type: i13$2.NzSwitchComponent, selector: "nz-switch", inputs: ["nzLoading", "nzDisabled", "nzControl", "nzCheckedChildren", "nzUnCheckedChildren", "nzSize", "nzId"], exportAs: ["nzSwitch"] }, { kind: "ngmodule", type: NzDatePickerModule }, { kind: "component", type: i5.NzDatePickerComponent, selector: "nz-date-picker,nz-week-picker,nz-month-picker,nz-quarter-picker,nz-year-picker,nz-range-picker", inputs: ["nzAllowClear", "nzAutoFocus", "nzDisabled", "nzBorderless", "nzInputReadOnly", "nzInline", "nzOpen", "nzDisabledDate", "nzLocale", "nzPlaceHolder", "nzPopupStyle", "nzDropdownClassName", "nzSize", "nzStatus", "nzFormat", "nzDateRender", "nzDisabledTime", "nzRenderExtraFooter", "nzShowToday", "nzMode", "nzShowNow", "nzRanges", "nzDefaultPickerValue", "nzSeparator", "nzSuffixIcon", "nzBackdrop", "nzId", "nzPlacement", "nzShowWeekNumber", "nzShowTime"], outputs: ["nzOnPanelChange", "nzOnCalendarChange", "nzOnOk", "nzOnOpenChange"], exportAs: ["nzDatePicker"] }, { kind: "ngmodule", type: NzTagModule }, { kind: "component", type: i11.NzTagComponent, selector: "nz-tag", inputs: ["nzMode", "nzColor", "nzChecked", "nzBordered"], outputs: ["nzOnClose", "nzCheckedChange"], exportAs: ["nzTag"] }, { kind: "ngmodule", type: NzCheckboxModule }, { kind: "component", type: i3$2.NzCheckboxComponent, selector: "[nz-checkbox]", inputs: ["nzValue", "nzAutoFocus", "nzDisabled", "nzIndeterminate", "nzChecked", "nzId", "nzName"], outputs: ["nzCheckedChange"], exportAs: ["nzCheckbox"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i1$2.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "directive", type: i8.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "component", type: IconCopy, selector: "icon-copy", inputs: ["textToCopy", "tooltip", "size"] }] });
|
|
9788
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: DriveShareModalComponent, isStandalone: true, selector: "lib-drive-share-modal", inputs: { nodeId: "nodeId", hideInheritanceToggle: "hideInheritanceToggle" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@if (details(); as d) {\n <div class=\"drive-share-modal\">\n <nz-tabset>\n <!-- TAB 1: PH\u00C2N QUY\u1EC0N NG\u01AF\u1EDCI D\u00D9NG / \u0110\u01A0N V\u1ECA (APP_ORG) / VAI TR\u00D2 (APP_ROLE) -->\n <nz-tab nzTitle=\"Ph\u00E2n quy\u1EC1n Truy c\u1EADp (ACL & RBAC)\">\n @if (!hideInheritanceToggle) {\n <div class=\"inheritance-bar\">\n <div>\n <strong>Ch\u1EE7 s\u1EDF h\u1EEFu hi\u1EC7n t\u1EA1i: </strong>\n <nz-tag nzColor=\"gold\" style=\"margin-left: 4px\">\n <nz-icon nzType=\"crown\"></nz-icon> {{ d.OwnerName || d.OwnerId }}\n </nz-tag>\n <p class=\"text-muted\">\n Chuy\u1EC3n quy\u1EC1n s\u1EDF h\u1EEFu m\u1EE5c n\u00E0y (v\u00E0 to\u00E0n b\u1ED9 nh\u00E1nh con n\u1EBFu l\u00E0 th\u01B0 m\u1EE5c) cho m\u1ED9t c\u00E1 nh\u00E2n kh\u00E1c trong h\u1EC7 th\u1ED1ng.\n </p>\n </div>\n <div nz-flex nzAlign=\"center\" style=\"flex-wrap: wrap; gap: 6px\">\n <nz-select\n nzShowSearch\n nzServerSearch\n nzPlaceHolder=\"T\u00ECm ng\u01B0\u1EDDi d\u00F9ng nh\u1EADn quy\u1EC1n s\u1EDF h\u1EEFu...\"\n [(ngModel)]=\"selectedNewOwner\"\n (nzOnSearch)=\"onSearchOwnerCandidate($event)\"\n style=\"width: 240px\"\n >\n @for (u of ownerCandidateOptions(); track u.GranteeId) {\n <nz-option [nzValue]=\"u\" [nzLabel]=\"u.DisplayName + ' (' + u.Code + ')'\"></nz-option>\n }\n </nz-select>\n <button nz-button nzType=\"default\" [disabled]=\"!selectedNewOwner\" (click)=\"onTransferOwnership()\">\n <nz-icon nzType=\"swap\"></nz-icon> Chuy\u1EC3n quy\u1EC1n s\u1EDF h\u1EEFu\n </button>\n </div>\n </div>\n <div class=\"inheritance-bar\">\n <div>\n <strong>K\u1EBF th\u1EEBa quy\u1EC1n t\u1EEB th\u01B0 m\u1EE5c cha</strong>\n <p class=\"text-muted\">\n Khi t\u1EAFt k\u1EBF th\u1EEBa, h\u1EC7 th\u1ED1ng gi\u1EEF nguy\u00EAn b\u1EA3n sao quy\u1EC1n hi\u1EC7n t\u1EA1i \u0111\u1EC3 b\u1EA1n t\u00F9y ch\u1EC9nh \u0111\u1ED9c l\u1EADp.\n </p>\n </div>\n <nz-switch\n [ngModel]=\"d.InheritPermissions\"\n (ngModelChange)=\"onToggleInheritance($event)\"\n nzCheckedChildren=\"\u0110ang k\u1EBF th\u1EEBa\"\n nzUnCheckedChildren=\"\u0110\u00E3 ng\u1EAFt k\u1EBF th\u1EEBa\"\n >\n </nz-switch>\n </div>\n }\n <!-- Thanh ch\u1ECDn Ng\u01B0\u1EDDi d\u00F9ng / \u0110\u01A1n v\u1ECB / Vai tr\u00F2 t\u1EEB App.Auth -->\n <div class=\"grant-form\">\n <nz-select [(ngModel)]=\"newPerm.GranteeType\" (ngModelChange)=\"onGranteeTypeChange()\" style=\"width: 150px\">\n <nz-option [nzValue]=\"DriveGranteeType.User\" nzLabel=\"C\u00E1 nh\u00E2n (User)\"></nz-option>\n <nz-option [nzValue]=\"DriveGranteeType.Org\" nzLabel=\"\u0110\u01A1n v\u1ECB (App_Org)\"></nz-option>\n <nz-option [nzValue]=\"DriveGranteeType.Role\" nzLabel=\"Vai tr\u00F2 (App_Role)\"></nz-option>\n </nz-select>\n <nz-select\n nzShowSearch\n nzServerSearch\n nzPlaceHolder=\"G\u00F5 t\u00EAn ho\u1EB7c m\u00E3 User / \u0110\u01A1n v\u1ECB / Vai tr\u00F2...\"\n [(ngModel)]=\"selectedGrantee\"\n (nzOnSearch)=\"onSearchGrantee($event)\"\n style=\"flex: 1; min-width: 220px\"\n >\n @for (g of granteeOptions(); track g.GranteeId) {\n <nz-option [nzValue]=\"g\" [nzLabel]=\"g.DisplayName + ' (' + g.Code + ')'\"></nz-option>\n }\n </nz-select>\n <nz-select\n [(ngModel)]=\"newPerm.AccessLevel\"\n (ngModelChange)=\"onNewPermAccessChange($event)\"\n [nzDisabled]=\"!!newPerm.IsDeny\"\n style=\"width: 175px\"\n >\n <nz-option [nzValue]=\"DriveAccessLevel.Viewer\" nzLabel=\"Ch\u1EC9 xem (Viewer)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Downloader\" nzLabel=\"Xem & T\u1EA3i xu\u1ED1ng\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Uploader\" nzLabel=\"Xem & T\u1EA3i l\u00EAn\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Editor\" nzLabel=\"Ch\u1EC9nh s\u1EEDa (Editor)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Manager\" nzLabel=\"Qu\u1EA3n tr\u1ECB (Manager)\"></nz-option>\n </nz-select>\n <label nz-checkbox [(ngModel)]=\"newPerm.IsDeny\" (ngModelChange)=\"onNewPermDenyChange($event)\">\n C\u1EA5m (Deny)\n </label>\n <button nz-button nzType=\"primary\" (click)=\"addOrUpdatePermission()\" [disabled]=\"!selectedGrantee\">\n <nz-icon nzType=\"user-add\"></nz-icon> C\u1EA5p quy\u1EC1n\n </button>\n </div>\n <nz-table #permTable [nzData]=\"d.Permissions\" nzSize=\"small\" [nzBordered]=\"true\" [nzFrontPagination]=\"false\">\n <thead>\n <tr>\n <th>\u0110\u1ED1i t\u01B0\u1EE3ng nh\u1EADn quy\u1EC1n</th>\n <th nzWidth=\"165px\">Ngu\u1ED3n quy\u1EC1n</th>\n <th nzWidth=\"255px\">M\u1EE9c quy\u1EC1n</th>\n <th nzWidth=\"115px\" class=\"text-center\">T\u1EA3i xu\u1ED1ng</th>\n <th nzWidth=\"135px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (p of permTable.data; track p.Id) {\n <tr [class.editing-perm-row]=\"editingPermId() === p.Id\">\n <td>\n <nz-tag\n [nzColor]=\"\n p.GranteeType === DriveGranteeType.User\n ? 'blue'\n : p.GranteeType === DriveGranteeType.Org\n ? 'cyan'\n : 'purple'\n \"\n >\n {{\n p.GranteeType === DriveGranteeType.User\n ? \"User\"\n : p.GranteeType === DriveGranteeType.Org\n ? \"\u0110\u01A1n v\u1ECB\"\n : \"Role\"\n }}\n </nz-tag>\n <strong>{{ p.GranteeName || p.GranteeId }}</strong>\n </td>\n <td>\n @if (p.IsInherited) {\n <nz-tag nzColor=\"default\">K\u1EBF th\u1EEBa: {{ p.SourceNodeName }}</nz-tag>\n } @else {\n <nz-tag nzColor=\"green\">Tr\u1EF1c ti\u1EBFp</nz-tag>\n }\n </td>\n <!-- C\u1ED9t M\u1EE9c quy\u1EC1n: H\u1ED7 tr\u1EE3 ch\u1EC9nh s\u1EEDa tr\u1EF1c ti\u1EBFp (Inline Edit) -->\n <td>\n @if (editingPermId() === p.Id) {\n <div class=\"inline-edit-perm-wrap\">\n <nz-select\n nzSize=\"small\"\n [(ngModel)]=\"editAccessLevel\"\n (ngModelChange)=\"onEditAccessLevelChange($event)\"\n [nzDisabled]=\"editIsDeny\"\n style=\"width: 155px\"\n >\n <nz-option [nzValue]=\"DriveAccessLevel.Viewer\" nzLabel=\"Ch\u1EC9 xem (Viewer)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Downloader\" nzLabel=\"Xem & T\u1EA3i xu\u1ED1ng\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Uploader\" nzLabel=\"Xem & T\u1EA3i l\u00EAn\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Editor\" nzLabel=\"Ch\u1EC9nh s\u1EEDa (Editor)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Manager\" nzLabel=\"Qu\u1EA3n tr\u1ECB (Manager)\"></nz-option>\n </nz-select>\n <label\n nz-checkbox\n [(ngModel)]=\"editIsDeny\"\n (ngModelChange)=\"onEditDenyChange($event)\"\n style=\"font-size: 12px\"\n >\n C\u1EA5m\n </label>\n </div>\n } @else {\n @if (p.IsDeny) {\n <nz-tag nzColor=\"error\">T\u1EEB ch\u1ED1i (Deny)</nz-tag>\n } @else {\n <span>{{ getAccessLabel(p.AccessLevel) }}</span>\n }\n }\n </td>\n <!-- C\u1ED9t T\u1EA3i xu\u1ED1ng -->\n <td class=\"text-center\">\n @if (editingPermId() === p.Id) {\n <label\n nz-checkbox\n [(ngModel)]=\"editCanDownload\"\n [nzDisabled]=\"editIsDeny || editAccessLevel < DriveAccessLevel.Downloader\"\n >\n Cho ph\u00E9p\n </label>\n } @else {\n {{ !p.IsDeny && p.CanDownload && p.AccessLevel >= DriveAccessLevel.Downloader ? \"Cho ph\u00E9p\" : \"Ch\u1EB7n\" }}\n }\n </td>\n <!-- C\u1ED9t Thao t\u00E1c: S\u1EEDa (Edit) / L\u01B0u / H\u1EE7y / Chuy\u1EC3n s\u1EDF h\u1EEFu / X\u00F3a -->\n <td class=\"text-center\">\n @if (editingPermId() === p.Id) {\n <button\n type=\"button\"\n nz-button\n nzType=\"primary\"\n nzSize=\"small\"\n [nzLoading]=\"savingEdit()\"\n nz-tooltip\n nzTooltipTitle=\"L\u01B0u thay \u0111\u1ED5i ph\u00E2n quy\u1EC1n\"\n (click)=\"saveEditPerm(p)\"\n style=\"margin-right: 4px\"\n >\n <nz-icon nzType=\"check\"></nz-icon>\n </button>\n <button\n type=\"button\"\n nz-button\n nzType=\"default\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"H\u1EE7y ch\u1EC9nh s\u1EEDa\"\n (click)=\"cancelEditPerm()\"\n >\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n } @else {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n [nzTooltipTitle]=\"p.IsInherited ? 'Ghi \u0111\u00E8 quy\u1EC1n ri\u00EAng t\u1EA1i m\u1EE5c n\u00E0y' : 'Ch\u1EC9nh s\u1EEDa ph\u00E2n quy\u1EC1n'\"\n (click)=\"startEditPerm(p)\"\n >\n <nz-icon nzType=\"edit\" style=\"color: var(--primary-color, #1890ff)\"></nz-icon>\n </button>\n @if (\n !hideInheritanceToggle &&\n p.GranteeType === DriveGranteeType.User &&\n !p.IsDeny &&\n p.GranteeId !== d.OwnerId\n ) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Chuy\u1EC3n quy\u1EC1n s\u1EDF h\u1EEFu cho ng\u01B0\u1EDDi d\u00F9ng n\u00E0y\"\n (click)=\"quickTransferOwnershipFromRow(p)\"\n >\n <nz-icon nzType=\"crown\" style=\"color: #d97706\"></nz-icon>\n </button>\n }\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n [disabled]=\"p.IsInherited\"\n nz-tooltip\n [nzTooltipTitle]=\"p.IsInherited ? 'Quy\u1EC1n k\u1EBF th\u1EEBa t\u1EEB th\u01B0 m\u1EE5c cha' : 'X\u00F3a quy\u1EC1n n\u00E0y'\"\n (click)=\"removePerm(p.Id)\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n </nz-tab>\n <!-- TAB 2: CHIA S\u1EBA QUA LINK -->\n <nz-tab nzTitle=\"Li\u00EAn k\u1EBFt chia s\u1EBB (Share Links)\">\n <div class=\"link-builder\">\n <nz-select [(ngModel)]=\"newLink.Scope\" style=\"width: 255px\">\n <nz-option [nzValue]=\"DriveShareScope.InternalAuthenticated\" nzLabel=\"N\u1ED9i b\u1ED9 (Ph\u1EA3i \u0111\u0103ng nh\u1EADp)\"></nz-option>\n <nz-option\n [nzValue]=\"DriveShareScope.DirectPermissionOnly\"\n nzLabel=\"Link chia s\u1EBB tr\u1EF1c ti\u1EBFp (Theo quy\u1EC1n)\"\n ></nz-option>\n <nz-option [nzValue]=\"DriveShareScope.AnyoneWithLink\" nzLabel=\"C\u00F4ng khai (B\u1EA5t k\u1EF3 ai c\u00F3 link)\"></nz-option>\n </nz-select>\n <input\n nz-input\n type=\"password\"\n placeholder=\"M\u1EADt kh\u1EA9u b\u1EA3o v\u1EC7 (t\u00F9y ch\u1ECDn)\"\n [(ngModel)]=\"newLink.Password\"\n style=\"width: 185px\"\n />\n <nz-date-picker\n [(ngModel)]=\"newLink.ExpiresAt\"\n nzFormat=\"dd/MM/yyyy\"\n nzPlaceHolder=\"Ng\u00E0y h\u1EBFt h\u1EA1n\"\n style=\"width: 145px\"\n >\n </nz-date-picker>\n <label nz-checkbox [(ngModel)]=\"newLink.AllowDownload\">Cho ph\u00E9p t\u1EA3i</label>\n <button nz-button nzType=\"primary\" (click)=\"createLink()\"><nz-icon nzType=\"link\"></nz-icon> T\u1EA1o link</button>\n </div>\n <nz-table #linkTable [nzData]=\"d.ShareLinks\" nzSize=\"small\" [nzBordered]=\"true\" [nzFrontPagination]=\"false\">\n <thead>\n <tr>\n <th>\u0110\u01B0\u1EDDng d\u1EABn chia s\u1EBB</th>\n <th nzWidth=\"135px\">Ph\u1EA1m vi</th>\n <th nzWidth=\"160px\">B\u1EA3o m\u1EADt</th>\n <th nzWidth=\"85px\" class=\"text-center\">L\u01B0\u1EE3t t\u1EA3i</th>\n <th nzWidth=\"150px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (l of linkTable.data; track l.Id) {\n <tr>\n <td>\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <a [href]=\"l.FullUrl\" target=\"_blank\" class=\"link-detail break-word\">{{ l.FullUrl }}</a>\n <icon-copy [textToCopy]=\"l.FullUrl\" tooltip=\"Sao ch\u00E9p li\u00EAn k\u1EBFt\"></icon-copy>\n </div>\n </td>\n <td>\n <nz-tag\n [nzColor]=\"\n l.Scope === DriveShareScope.AnyoneWithLink\n ? 'orange'\n : l.Scope === DriveShareScope.DirectPermissionOnly\n ? 'geekblue'\n : 'cyan'\n \"\n nz-tooltip\n [nzTooltipTitle]=\"\n l.Scope === DriveShareScope.DirectPermissionOnly\n ? 'Link chia s\u1EBB tr\u1EF1c ti\u1EBFp: B\u1EAFt bu\u1ED9c \u0111\u0103ng nh\u1EADp V\u00C0 ki\u1EC3m tra quy\u1EC1n ACL/RBAC tr\u00EAn File/Folder'\n : l.Scope === DriveShareScope.AnyoneWithLink\n ? 'C\u00F4ng khai: B\u1EA5t k\u1EF3 ai c\u00F3 \u0111\u01B0\u1EDDng d\u1EABn \u0111\u1EC1u m\u1EDF \u0111\u01B0\u1EE3c'\n : 'N\u1ED9i b\u1ED9: Ai c\u00F3 t\u00E0i kho\u1EA3n \u0111\u0103ng nh\u1EADp h\u1EC7 th\u1ED1ng \u0111\u1EC1u m\u1EDF \u0111\u01B0\u1EE3c'\n \"\n >\n {{\n l.Scope === DriveShareScope.AnyoneWithLink\n ? \"C\u00F4ng khai\"\n : l.Scope === DriveShareScope.DirectPermissionOnly\n ? \"Link tr\u1EF1c ti\u1EBFp\"\n : \"N\u1ED9i b\u1ED9\"\n }}\n </nz-tag>\n </td>\n <td>\n @if (l.HasPassword) {\n <nz-tag nzColor=\"gold\">C\u00F3 m\u1EADt kh\u1EA9u</nz-tag>\n }\n @if (l.ExpiresAt) {\n <span>H\u1EBFt h\u1EA1n: {{ l.ExpiresAt | date: \"dd/MM/yyyy\" }}</span>\n }\n </td>\n <td class=\"text-center\">{{ l.DownloadCount }}{{ l.MaxDownloads ? \" / \" + l.MaxDownloads : \"\" }}</td>\n <td class=\"text-center\">\n <a nz-button nzType=\"link\" nzSize=\"small\" [href]=\"l.FullUrl\" target=\"_blank\">\n <nz-icon nzType=\"export\"></nz-icon> M\u1EDF\n </a>\n <button nz-button nzType=\"text\" nzDanger nzSize=\"small\" (click)=\"revokeLink(l.Id)\">\n <nz-icon nzType=\"stop\"></nz-icon> Thu h\u1ED3i\n </button>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n </nz-tab>\n </nz-tabset>\n </div>\n}\n", styles: [".inheritance-bar{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:var(--app-sidebar-bg, #f8fafc);border:1px solid var(--app-border, #e2e8f0);border-radius:6px;margin-bottom:16px}.text-muted{margin:2px 0 0;font-size:12px;color:var(--app-text-muted, #64748b)}.grant-form,.link-builder{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:16px}.inline-edit-perm-wrap{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.editing-perm-row>td{background-color:#f0f9ff!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzTabsModule }, { kind: "component", type: i5$1.NzTabSetComponent, selector: "nz-tabset", inputs: ["nzSelectedIndex", "nzTabPosition", "nzTabBarExtraContent", "nzCanDeactivate", "nzAddIcon", "nzTabBarStyle", "nzType", "nzSize", "nzAnimated", "nzTabBarGutter", "nzHideAdd", "nzCentered", "nzHideAll", "nzLinkRouter", "nzLinkExact", "nzDestroyInactiveTabPane"], outputs: ["nzSelectChange", "nzSelectedIndexChange", "nzTabListScroll", "nzClose", "nzAdd"], exportAs: ["nzTabset"] }, { kind: "component", type: i5$1.NzTabComponent, selector: "nz-tab", inputs: ["nzTitle", "nzClosable", "nzCloseIcon", "nzDisabled", "nzForceRender"], outputs: ["nzSelect", "nzDeselect", "nzClick", "nzContextmenu"], exportAs: ["nzTab"] }, { kind: "ngmodule", type: NzSelectModule }, { kind: "component", type: i13$1.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i13$1.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i12.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i2$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i3$3.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i4$1.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i6.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "directive", type: i6.NzTableCellDirective, selector: "th:not(.nz-disable-th):not([mat-cell]), td:not(.nz-disable-td):not([mat-cell])" }, { kind: "directive", type: i6.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i6.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i6.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i6.NzTrDirective, selector: "tr:not([mat-row]):not([mat-header-row]):not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "ngmodule", type: NzSwitchModule }, { kind: "component", type: i13$2.NzSwitchComponent, selector: "nz-switch", inputs: ["nzLoading", "nzDisabled", "nzControl", "nzCheckedChildren", "nzUnCheckedChildren", "nzSize", "nzId"], exportAs: ["nzSwitch"] }, { kind: "ngmodule", type: NzDatePickerModule }, { kind: "component", type: i5.NzDatePickerComponent, selector: "nz-date-picker,nz-week-picker,nz-month-picker,nz-quarter-picker,nz-year-picker,nz-range-picker", inputs: ["nzAllowClear", "nzAutoFocus", "nzDisabled", "nzBorderless", "nzInputReadOnly", "nzInline", "nzOpen", "nzDisabledDate", "nzLocale", "nzPlaceHolder", "nzPopupStyle", "nzDropdownClassName", "nzSize", "nzStatus", "nzFormat", "nzDateRender", "nzDisabledTime", "nzRenderExtraFooter", "nzShowToday", "nzMode", "nzShowNow", "nzRanges", "nzDefaultPickerValue", "nzSeparator", "nzSuffixIcon", "nzBackdrop", "nzId", "nzPlacement", "nzShowWeekNumber", "nzShowTime"], outputs: ["nzOnPanelChange", "nzOnCalendarChange", "nzOnOk", "nzOnOpenChange"], exportAs: ["nzDatePicker"] }, { kind: "ngmodule", type: NzTagModule }, { kind: "component", type: i11.NzTagComponent, selector: "nz-tag", inputs: ["nzMode", "nzColor", "nzChecked", "nzBordered"], outputs: ["nzOnClose", "nzCheckedChange"], exportAs: ["nzTag"] }, { kind: "ngmodule", type: NzCheckboxModule }, { kind: "component", type: i3$2.NzCheckboxComponent, selector: "[nz-checkbox]", inputs: ["nzValue", "nzAutoFocus", "nzDisabled", "nzIndeterminate", "nzChecked", "nzId", "nzName"], outputs: ["nzCheckedChange"], exportAs: ["nzCheckbox"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i1$2.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "directive", type: i8.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "component", type: IconCopy, selector: "icon-copy", inputs: ["textToCopy", "tooltip", "size"] }] });
|
|
9626
9789
|
}
|
|
9627
9790
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: DriveShareModalComponent, decorators: [{
|
|
9628
9791
|
type: Component,
|
|
@@ -9641,9 +9804,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
9641
9804
|
NzIconModule,
|
|
9642
9805
|
NzToolTipModule,
|
|
9643
9806
|
IconCopy,
|
|
9644
|
-
], template: "@if (details(); as d) {\n <div class=\"drive-share-modal\">\n <nz-tabset>\n <!-- TAB 1: PH\u00C2N QUY\u1EC0N NG\u01AF\u1EDCI D\u00D9NG / \u0110\u01A0N V\u1ECA (APP_ORG) / VAI TR\u00D2 (APP_ROLE) -->\n <nz-tab nzTitle=\"Ph\u00E2n quy\u1EC1n Truy c\u1EADp (ACL & RBAC)\">\n <div class=\"inheritance-bar\">\n <div>\n <strong>Ch\u1EE7 s\u1EDF h\u1EEFu hi\u1EC7n t\u1EA1i: </strong>\n <nz-tag nzColor=\"gold\" style=\"margin-left: 4px\">\n <nz-icon nzType=\"crown\"></nz-icon> {{ d.OwnerName || d.OwnerId }}\n </nz-tag>\n <p class=\"text-muted\">\n Chuy\u1EC3n quy\u1EC1n s\u1EDF h\u1EEFu m\u1EE5c n\u00E0y (v\u00E0 to\u00E0n b\u1ED9 nh\u00E1nh con n\u1EBFu l\u00E0 th\u01B0 m\u1EE5c) cho m\u1ED9t c\u00E1 nh\u00E2n kh\u00E1c trong h\u1EC7 th\u1ED1ng.\n </p>\n </div>\n <div nz-flex nzAlign=\"center\" style=\"flex-wrap: wrap\">\n <nz-select\n nzShowSearch\n nzServerSearch\n nzPlaceHolder=\"T\u00ECm ng\u01B0\u1EDDi d\u00F9ng nh\u1EADn quy\u1EC1n s\u1EDF h\u1EEFu...\"\n [(ngModel)]=\"selectedNewOwner\"\n (nzOnSearch)=\"onSearchOwnerCandidate($event)\"\n style=\"width: 240px\"\n >\n @for (u of ownerCandidateOptions(); track u.GranteeId) {\n <nz-option [nzValue]=\"u\" [nzLabel]=\"u.DisplayName + ' (' + u.Code + ')'\"></nz-option>\n }\n </nz-select>\n <button nz-button nzType=\"default\" [disabled]=\"!selectedNewOwner\" (click)=\"onTransferOwnership()\">\n <nz-icon nzType=\"swap\"></nz-icon> Chuy\u1EC3n quy\u1EC1n s\u1EDF h\u1EEFu\n </button>\n </div>\n </div>\n <div class=\"inheritance-bar\">\n <div>\n <strong>K\u1EBF th\u1EEBa quy\u1EC1n t\u1EEB th\u01B0 m\u1EE5c cha</strong>\n <p class=\"text-muted\">\n Khi t\u1EAFt k\u1EBF th\u1EEBa, h\u1EC7 th\u1ED1ng gi\u1EEF nguy\u00EAn b\u1EA3n sao quy\u1EC1n hi\u1EC7n t\u1EA1i \u0111\u1EC3 b\u1EA1n t\u00F9y ch\u1EC9nh \u0111\u1ED9c l\u1EADp.\n </p>\n </div>\n <nz-switch\n [ngModel]=\"d.InheritPermissions\"\n (ngModelChange)=\"onToggleInheritance($event)\"\n nzCheckedChildren=\"\u0110ang k\u1EBF th\u1EEBa\"\n nzUnCheckedChildren=\"\u0110\u00E3 ng\u1EAFt k\u1EBF th\u1EEBa\"\n >\n </nz-switch>\n </div>\n <!-- Thanh ch\u1ECDn Ng\u01B0\u1EDDi d\u00F9ng / \u0110\u01A1n v\u1ECB / Vai tr\u00F2 t\u1EEB App.Auth -->\n <div class=\"grant-form\">\n <nz-select [(ngModel)]=\"newPerm.GranteeType\" (ngModelChange)=\"onGranteeTypeChange()\" style=\"width: 150px\">\n <nz-option [nzValue]=\"DriveGranteeType.User\" nzLabel=\"C\u00E1 nh\u00E2n (User)\"></nz-option>\n <nz-option [nzValue]=\"DriveGranteeType.Org\" nzLabel=\"\u0110\u01A1n v\u1ECB (App_Org)\"></nz-option>\n <nz-option [nzValue]=\"DriveGranteeType.Role\" nzLabel=\"Vai tr\u00F2 (App_Role)\"></nz-option>\n </nz-select>\n <nz-select\n nzShowSearch\n nzServerSearch\n nzPlaceHolder=\"G\u00F5 t\u00EAn ho\u1EB7c m\u00E3 User / \u0110\u01A1n v\u1ECB / Vai tr\u00F2...\"\n [(ngModel)]=\"selectedGrantee\"\n (nzOnSearch)=\"onSearchGrantee($event)\"\n style=\"flex: 1; min-width: 220px\"\n >\n @for (g of granteeOptions(); track g.GranteeId) {\n <nz-option [nzValue]=\"g\" [nzLabel]=\"g.DisplayName + ' (' + g.Code + ')'\"></nz-option>\n }\n </nz-select>\n <nz-select [(ngModel)]=\"newPerm.AccessLevel\" style=\"width: 175px\">\n <nz-option [nzValue]=\"DriveAccessLevel.Viewer\" nzLabel=\"Ch\u1EC9 xem (Viewer)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Downloader\" nzLabel=\"Xem & T\u1EA3i xu\u1ED1ng\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Uploader\" nzLabel=\"Xem & T\u1EA3i l\u00EAn\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Editor\" nzLabel=\"Ch\u1EC9nh s\u1EEDa (Editor)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Manager\" nzLabel=\"Qu\u1EA3n tr\u1ECB (Manager)\"></nz-option>\n </nz-select>\n <label nz-checkbox [(ngModel)]=\"newPerm.IsDeny\"> C\u1EA5m (Deny) </label>\n <button nz-button nzType=\"primary\" (click)=\"addOrUpdatePermission()\" [disabled]=\"!selectedGrantee\">\n <nz-icon nzType=\"user-add\"></nz-icon> C\u1EA5p quy\u1EC1n\n </button>\n </div>\n <nz-table #permTable [nzData]=\"d.Permissions\" nzSize=\"small\" [nzBordered]=\"true\" [nzFrontPagination]=\"false\">\n <thead>\n <tr>\n <th>\u0110\u1ED1i t\u01B0\u1EE3ng nh\u1EADn quy\u1EC1n</th>\n <th nzWidth=\"170px\">Ngu\u1ED3n quy\u1EC1n</th>\n <th nzWidth=\"160px\">M\u1EE9c quy\u1EC1n</th>\n <th nzWidth=\"100px\" class=\"text-center\">T\u1EA3i xu\u1ED1ng</th>\n <th nzWidth=\"120px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (p of permTable.data; track p.Id) {\n <tr>\n <td>\n <nz-tag\n [nzColor]=\"\n p.GranteeType === DriveGranteeType.User\n ? 'blue'\n : p.GranteeType === DriveGranteeType.Org\n ? 'cyan'\n : 'purple'\n \"\n >\n {{\n p.GranteeType === DriveGranteeType.User\n ? \"User\"\n : p.GranteeType === DriveGranteeType.Org\n ? \"\u0110\u01A1n v\u1ECB\"\n : \"Role\"\n }}\n </nz-tag>\n <strong>{{ p.GranteeName || p.GranteeId }}</strong>\n </td>\n <td>\n @if (p.IsInherited) {\n <nz-tag nzColor=\"default\">K\u1EBF th\u1EEBa: {{ p.SourceNodeName }}</nz-tag>\n } @else {\n <nz-tag nzColor=\"green\">Tr\u1EF1c ti\u1EBFp</nz-tag>\n }\n </td>\n <td>\n @if (p.IsDeny) {\n <nz-tag nzColor=\"error\">T\u1EEB ch\u1ED1i (Deny)</nz-tag>\n } @else {\n <span>{{ getAccessLabel(p.AccessLevel) }}</span>\n }\n </td>\n <td class=\"text-center\">{{ p.CanDownload ? \"Cho ph\u00E9p\" : \"Ch\u1EB7n\" }}</td>\n <td class=\"text-center\">\n @if (p.GranteeType === DriveGranteeType.User && !p.IsDeny && p.GranteeId !== d.OwnerId) {\n <button\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Chuy\u1EC3n quy\u1EC1n s\u1EDF h\u1EEFu cho ng\u01B0\u1EDDi d\u00F9ng n\u00E0y\"\n (click)=\"quickTransferOwnershipFromRow(p)\"\n >\n <nz-icon nzType=\"crown\" style=\"color: #d97706\"></nz-icon>\n </button>\n }\n <button\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n [disabled]=\"p.IsInherited\"\n nz-tooltip\n [nzTooltipTitle]=\"p.IsInherited ? 'Quy\u1EC1n k\u1EBF th\u1EEBa t\u1EEB th\u01B0 m\u1EE5c cha' : 'X\u00F3a quy\u1EC1n n\u00E0y'\"\n (click)=\"removePerm(p.Id)\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n </nz-tab>\n <!-- TAB 2: CHIA S\u1EBA QUA LINK -->\n <nz-tab nzTitle=\"Li\u00EAn k\u1EBFt chia s\u1EBB (Share Links)\">\n <div class=\"link-builder\">\n <nz-select [(ngModel)]=\"newLink.Scope\" style=\"width: 255px\">\n <nz-option [nzValue]=\"DriveShareScope.InternalAuthenticated\" nzLabel=\"N\u1ED9i b\u1ED9 (Ph\u1EA3i \u0111\u0103ng nh\u1EADp)\"></nz-option>\n <nz-option\n [nzValue]=\"DriveShareScope.DirectPermissionOnly\"\n nzLabel=\"Link chia s\u1EBB tr\u1EF1c ti\u1EBFp (Theo quy\u1EC1n)\"\n ></nz-option>\n <nz-option [nzValue]=\"DriveShareScope.AnyoneWithLink\" nzLabel=\"C\u00F4ng khai (B\u1EA5t k\u1EF3 ai c\u00F3 link)\"></nz-option>\n </nz-select>\n <input\n nz-input\n type=\"password\"\n placeholder=\"M\u1EADt kh\u1EA9u b\u1EA3o v\u1EC7 (t\u00F9y ch\u1ECDn)\"\n [(ngModel)]=\"newLink.Password\"\n style=\"width: 185px\"\n />\n <nz-date-picker\n [(ngModel)]=\"newLink.ExpiresAt\"\n nzFormat=\"dd/MM/yyyy\"\n nzPlaceHolder=\"Ng\u00E0y h\u1EBFt h\u1EA1n\"\n style=\"width: 145px\"\n >\n </nz-date-picker>\n <label nz-checkbox [(ngModel)]=\"newLink.AllowDownload\">Cho ph\u00E9p t\u1EA3i</label>\n <button nz-button nzType=\"primary\" (click)=\"createLink()\"><nz-icon nzType=\"link\"></nz-icon> T\u1EA1o link</button>\n </div>\n <nz-table #linkTable [nzData]=\"d.ShareLinks\" nzSize=\"small\" [nzBordered]=\"true\" [nzFrontPagination]=\"false\">\n <thead>\n <tr>\n <th>\u0110\u01B0\u1EDDng d\u1EABn chia s\u1EBB</th>\n <th nzWidth=\"135px\">Ph\u1EA1m vi</th>\n <th nzWidth=\"160px\">B\u1EA3o m\u1EADt</th>\n <th nzWidth=\"85px\" class=\"text-center\">L\u01B0\u1EE3t t\u1EA3i</th>\n <th nzWidth=\"150px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (l of linkTable.data; track l.Id) {\n <tr>\n <td>\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <a [href]=\"l.FullUrl\" target=\"_blank\" class=\"link-detail break-word\">{{ l.FullUrl }}</a>\n <icon-copy [textToCopy]=\"l.FullUrl\" tooltip=\"Sao ch\u00E9p li\u00EAn k\u1EBFt\"></icon-copy>\n </div>\n </td>\n <td>\n <nz-tag\n [nzColor]=\"\n l.Scope === DriveShareScope.AnyoneWithLink\n ? 'orange'\n : l.Scope === DriveShareScope.DirectPermissionOnly\n ? 'geekblue'\n : 'cyan'\n \"\n nz-tooltip\n [nzTooltipTitle]=\"\n l.Scope === DriveShareScope.DirectPermissionOnly\n ? 'Link chia s\u1EBB tr\u1EF1c ti\u1EBFp: B\u1EAFt bu\u1ED9c \u0111\u0103ng nh\u1EADp V\u00C0 ki\u1EC3m tra quy\u1EC1n ACL/RBAC tr\u00EAn File/Folder'\n : l.Scope === DriveShareScope.AnyoneWithLink\n ? 'C\u00F4ng khai: B\u1EA5t k\u1EF3 ai c\u00F3 \u0111\u01B0\u1EDDng d\u1EABn \u0111\u1EC1u m\u1EDF \u0111\u01B0\u1EE3c'\n : 'N\u1ED9i b\u1ED9: Ai c\u00F3 t\u00E0i kho\u1EA3n \u0111\u0103ng nh\u1EADp h\u1EC7 th\u1ED1ng \u0111\u1EC1u m\u1EDF \u0111\u01B0\u1EE3c'\n \"\n >\n {{\n l.Scope === DriveShareScope.AnyoneWithLink\n ? \"C\u00F4ng khai\"\n : l.Scope === DriveShareScope.DirectPermissionOnly\n ? \"Link tr\u1EF1c ti\u1EBFp\"\n : \"N\u1ED9i b\u1ED9\"\n }}\n </nz-tag>\n </td>\n <td>\n @if (l.HasPassword) {\n <nz-tag nzColor=\"gold\">C\u00F3 m\u1EADt kh\u1EA9u</nz-tag>\n }\n @if (l.ExpiresAt) {\n <span>H\u1EBFt h\u1EA1n: {{ l.ExpiresAt | date: \"dd/MM/yyyy\" }}</span>\n }\n </td>\n <td class=\"text-center\">{{ l.DownloadCount }}{{ l.MaxDownloads ? \" / \" + l.MaxDownloads : \"\" }}</td>\n <td class=\"text-center\">\n <a nz-button nzType=\"link\" nzSize=\"small\" [href]=\"l.FullUrl\" target=\"_blank\">\n <nz-icon nzType=\"export\"></nz-icon> M\u1EDF\n </a>\n <button nz-button nzType=\"text\" nzDanger nzSize=\"small\" (click)=\"revokeLink(l.Id)\">\n <nz-icon nzType=\"stop\"></nz-icon> Thu h\u1ED3i\n </button>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n </nz-tab>\n </nz-tabset>\n </div>\n}\n", styles: [".inheritance-bar{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:var(--app-sidebar-bg, #f8fafc);border:1px solid var(--app-border, #e2e8f0);border-radius:6px;margin-bottom:16px}.text-muted{margin:2px 0 0;font-size:12px;color:var(--app-text-muted, #64748b)}.grant-form,.link-builder{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:16px}\n"] }]
|
|
9807
|
+
], template: "@if (details(); as d) {\n <div class=\"drive-share-modal\">\n <nz-tabset>\n <!-- TAB 1: PH\u00C2N QUY\u1EC0N NG\u01AF\u1EDCI D\u00D9NG / \u0110\u01A0N V\u1ECA (APP_ORG) / VAI TR\u00D2 (APP_ROLE) -->\n <nz-tab nzTitle=\"Ph\u00E2n quy\u1EC1n Truy c\u1EADp (ACL & RBAC)\">\n @if (!hideInheritanceToggle) {\n <div class=\"inheritance-bar\">\n <div>\n <strong>Ch\u1EE7 s\u1EDF h\u1EEFu hi\u1EC7n t\u1EA1i: </strong>\n <nz-tag nzColor=\"gold\" style=\"margin-left: 4px\">\n <nz-icon nzType=\"crown\"></nz-icon> {{ d.OwnerName || d.OwnerId }}\n </nz-tag>\n <p class=\"text-muted\">\n Chuy\u1EC3n quy\u1EC1n s\u1EDF h\u1EEFu m\u1EE5c n\u00E0y (v\u00E0 to\u00E0n b\u1ED9 nh\u00E1nh con n\u1EBFu l\u00E0 th\u01B0 m\u1EE5c) cho m\u1ED9t c\u00E1 nh\u00E2n kh\u00E1c trong h\u1EC7 th\u1ED1ng.\n </p>\n </div>\n <div nz-flex nzAlign=\"center\" style=\"flex-wrap: wrap; gap: 6px\">\n <nz-select\n nzShowSearch\n nzServerSearch\n nzPlaceHolder=\"T\u00ECm ng\u01B0\u1EDDi d\u00F9ng nh\u1EADn quy\u1EC1n s\u1EDF h\u1EEFu...\"\n [(ngModel)]=\"selectedNewOwner\"\n (nzOnSearch)=\"onSearchOwnerCandidate($event)\"\n style=\"width: 240px\"\n >\n @for (u of ownerCandidateOptions(); track u.GranteeId) {\n <nz-option [nzValue]=\"u\" [nzLabel]=\"u.DisplayName + ' (' + u.Code + ')'\"></nz-option>\n }\n </nz-select>\n <button nz-button nzType=\"default\" [disabled]=\"!selectedNewOwner\" (click)=\"onTransferOwnership()\">\n <nz-icon nzType=\"swap\"></nz-icon> Chuy\u1EC3n quy\u1EC1n s\u1EDF h\u1EEFu\n </button>\n </div>\n </div>\n <div class=\"inheritance-bar\">\n <div>\n <strong>K\u1EBF th\u1EEBa quy\u1EC1n t\u1EEB th\u01B0 m\u1EE5c cha</strong>\n <p class=\"text-muted\">\n Khi t\u1EAFt k\u1EBF th\u1EEBa, h\u1EC7 th\u1ED1ng gi\u1EEF nguy\u00EAn b\u1EA3n sao quy\u1EC1n hi\u1EC7n t\u1EA1i \u0111\u1EC3 b\u1EA1n t\u00F9y ch\u1EC9nh \u0111\u1ED9c l\u1EADp.\n </p>\n </div>\n <nz-switch\n [ngModel]=\"d.InheritPermissions\"\n (ngModelChange)=\"onToggleInheritance($event)\"\n nzCheckedChildren=\"\u0110ang k\u1EBF th\u1EEBa\"\n nzUnCheckedChildren=\"\u0110\u00E3 ng\u1EAFt k\u1EBF th\u1EEBa\"\n >\n </nz-switch>\n </div>\n }\n <!-- Thanh ch\u1ECDn Ng\u01B0\u1EDDi d\u00F9ng / \u0110\u01A1n v\u1ECB / Vai tr\u00F2 t\u1EEB App.Auth -->\n <div class=\"grant-form\">\n <nz-select [(ngModel)]=\"newPerm.GranteeType\" (ngModelChange)=\"onGranteeTypeChange()\" style=\"width: 150px\">\n <nz-option [nzValue]=\"DriveGranteeType.User\" nzLabel=\"C\u00E1 nh\u00E2n (User)\"></nz-option>\n <nz-option [nzValue]=\"DriveGranteeType.Org\" nzLabel=\"\u0110\u01A1n v\u1ECB (App_Org)\"></nz-option>\n <nz-option [nzValue]=\"DriveGranteeType.Role\" nzLabel=\"Vai tr\u00F2 (App_Role)\"></nz-option>\n </nz-select>\n <nz-select\n nzShowSearch\n nzServerSearch\n nzPlaceHolder=\"G\u00F5 t\u00EAn ho\u1EB7c m\u00E3 User / \u0110\u01A1n v\u1ECB / Vai tr\u00F2...\"\n [(ngModel)]=\"selectedGrantee\"\n (nzOnSearch)=\"onSearchGrantee($event)\"\n style=\"flex: 1; min-width: 220px\"\n >\n @for (g of granteeOptions(); track g.GranteeId) {\n <nz-option [nzValue]=\"g\" [nzLabel]=\"g.DisplayName + ' (' + g.Code + ')'\"></nz-option>\n }\n </nz-select>\n <nz-select\n [(ngModel)]=\"newPerm.AccessLevel\"\n (ngModelChange)=\"onNewPermAccessChange($event)\"\n [nzDisabled]=\"!!newPerm.IsDeny\"\n style=\"width: 175px\"\n >\n <nz-option [nzValue]=\"DriveAccessLevel.Viewer\" nzLabel=\"Ch\u1EC9 xem (Viewer)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Downloader\" nzLabel=\"Xem & T\u1EA3i xu\u1ED1ng\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Uploader\" nzLabel=\"Xem & T\u1EA3i l\u00EAn\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Editor\" nzLabel=\"Ch\u1EC9nh s\u1EEDa (Editor)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Manager\" nzLabel=\"Qu\u1EA3n tr\u1ECB (Manager)\"></nz-option>\n </nz-select>\n <label nz-checkbox [(ngModel)]=\"newPerm.IsDeny\" (ngModelChange)=\"onNewPermDenyChange($event)\">\n C\u1EA5m (Deny)\n </label>\n <button nz-button nzType=\"primary\" (click)=\"addOrUpdatePermission()\" [disabled]=\"!selectedGrantee\">\n <nz-icon nzType=\"user-add\"></nz-icon> C\u1EA5p quy\u1EC1n\n </button>\n </div>\n <nz-table #permTable [nzData]=\"d.Permissions\" nzSize=\"small\" [nzBordered]=\"true\" [nzFrontPagination]=\"false\">\n <thead>\n <tr>\n <th>\u0110\u1ED1i t\u01B0\u1EE3ng nh\u1EADn quy\u1EC1n</th>\n <th nzWidth=\"165px\">Ngu\u1ED3n quy\u1EC1n</th>\n <th nzWidth=\"255px\">M\u1EE9c quy\u1EC1n</th>\n <th nzWidth=\"115px\" class=\"text-center\">T\u1EA3i xu\u1ED1ng</th>\n <th nzWidth=\"135px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (p of permTable.data; track p.Id) {\n <tr [class.editing-perm-row]=\"editingPermId() === p.Id\">\n <td>\n <nz-tag\n [nzColor]=\"\n p.GranteeType === DriveGranteeType.User\n ? 'blue'\n : p.GranteeType === DriveGranteeType.Org\n ? 'cyan'\n : 'purple'\n \"\n >\n {{\n p.GranteeType === DriveGranteeType.User\n ? \"User\"\n : p.GranteeType === DriveGranteeType.Org\n ? \"\u0110\u01A1n v\u1ECB\"\n : \"Role\"\n }}\n </nz-tag>\n <strong>{{ p.GranteeName || p.GranteeId }}</strong>\n </td>\n <td>\n @if (p.IsInherited) {\n <nz-tag nzColor=\"default\">K\u1EBF th\u1EEBa: {{ p.SourceNodeName }}</nz-tag>\n } @else {\n <nz-tag nzColor=\"green\">Tr\u1EF1c ti\u1EBFp</nz-tag>\n }\n </td>\n <!-- C\u1ED9t M\u1EE9c quy\u1EC1n: H\u1ED7 tr\u1EE3 ch\u1EC9nh s\u1EEDa tr\u1EF1c ti\u1EBFp (Inline Edit) -->\n <td>\n @if (editingPermId() === p.Id) {\n <div class=\"inline-edit-perm-wrap\">\n <nz-select\n nzSize=\"small\"\n [(ngModel)]=\"editAccessLevel\"\n (ngModelChange)=\"onEditAccessLevelChange($event)\"\n [nzDisabled]=\"editIsDeny\"\n style=\"width: 155px\"\n >\n <nz-option [nzValue]=\"DriveAccessLevel.Viewer\" nzLabel=\"Ch\u1EC9 xem (Viewer)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Downloader\" nzLabel=\"Xem & T\u1EA3i xu\u1ED1ng\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Uploader\" nzLabel=\"Xem & T\u1EA3i l\u00EAn\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Editor\" nzLabel=\"Ch\u1EC9nh s\u1EEDa (Editor)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Manager\" nzLabel=\"Qu\u1EA3n tr\u1ECB (Manager)\"></nz-option>\n </nz-select>\n <label\n nz-checkbox\n [(ngModel)]=\"editIsDeny\"\n (ngModelChange)=\"onEditDenyChange($event)\"\n style=\"font-size: 12px\"\n >\n C\u1EA5m\n </label>\n </div>\n } @else {\n @if (p.IsDeny) {\n <nz-tag nzColor=\"error\">T\u1EEB ch\u1ED1i (Deny)</nz-tag>\n } @else {\n <span>{{ getAccessLabel(p.AccessLevel) }}</span>\n }\n }\n </td>\n <!-- C\u1ED9t T\u1EA3i xu\u1ED1ng -->\n <td class=\"text-center\">\n @if (editingPermId() === p.Id) {\n <label\n nz-checkbox\n [(ngModel)]=\"editCanDownload\"\n [nzDisabled]=\"editIsDeny || editAccessLevel < DriveAccessLevel.Downloader\"\n >\n Cho ph\u00E9p\n </label>\n } @else {\n {{ !p.IsDeny && p.CanDownload && p.AccessLevel >= DriveAccessLevel.Downloader ? \"Cho ph\u00E9p\" : \"Ch\u1EB7n\" }}\n }\n </td>\n <!-- C\u1ED9t Thao t\u00E1c: S\u1EEDa (Edit) / L\u01B0u / H\u1EE7y / Chuy\u1EC3n s\u1EDF h\u1EEFu / X\u00F3a -->\n <td class=\"text-center\">\n @if (editingPermId() === p.Id) {\n <button\n type=\"button\"\n nz-button\n nzType=\"primary\"\n nzSize=\"small\"\n [nzLoading]=\"savingEdit()\"\n nz-tooltip\n nzTooltipTitle=\"L\u01B0u thay \u0111\u1ED5i ph\u00E2n quy\u1EC1n\"\n (click)=\"saveEditPerm(p)\"\n style=\"margin-right: 4px\"\n >\n <nz-icon nzType=\"check\"></nz-icon>\n </button>\n <button\n type=\"button\"\n nz-button\n nzType=\"default\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"H\u1EE7y ch\u1EC9nh s\u1EEDa\"\n (click)=\"cancelEditPerm()\"\n >\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n } @else {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n [nzTooltipTitle]=\"p.IsInherited ? 'Ghi \u0111\u00E8 quy\u1EC1n ri\u00EAng t\u1EA1i m\u1EE5c n\u00E0y' : 'Ch\u1EC9nh s\u1EEDa ph\u00E2n quy\u1EC1n'\"\n (click)=\"startEditPerm(p)\"\n >\n <nz-icon nzType=\"edit\" style=\"color: var(--primary-color, #1890ff)\"></nz-icon>\n </button>\n @if (\n !hideInheritanceToggle &&\n p.GranteeType === DriveGranteeType.User &&\n !p.IsDeny &&\n p.GranteeId !== d.OwnerId\n ) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Chuy\u1EC3n quy\u1EC1n s\u1EDF h\u1EEFu cho ng\u01B0\u1EDDi d\u00F9ng n\u00E0y\"\n (click)=\"quickTransferOwnershipFromRow(p)\"\n >\n <nz-icon nzType=\"crown\" style=\"color: #d97706\"></nz-icon>\n </button>\n }\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n [disabled]=\"p.IsInherited\"\n nz-tooltip\n [nzTooltipTitle]=\"p.IsInherited ? 'Quy\u1EC1n k\u1EBF th\u1EEBa t\u1EEB th\u01B0 m\u1EE5c cha' : 'X\u00F3a quy\u1EC1n n\u00E0y'\"\n (click)=\"removePerm(p.Id)\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n </nz-tab>\n <!-- TAB 2: CHIA S\u1EBA QUA LINK -->\n <nz-tab nzTitle=\"Li\u00EAn k\u1EBFt chia s\u1EBB (Share Links)\">\n <div class=\"link-builder\">\n <nz-select [(ngModel)]=\"newLink.Scope\" style=\"width: 255px\">\n <nz-option [nzValue]=\"DriveShareScope.InternalAuthenticated\" nzLabel=\"N\u1ED9i b\u1ED9 (Ph\u1EA3i \u0111\u0103ng nh\u1EADp)\"></nz-option>\n <nz-option\n [nzValue]=\"DriveShareScope.DirectPermissionOnly\"\n nzLabel=\"Link chia s\u1EBB tr\u1EF1c ti\u1EBFp (Theo quy\u1EC1n)\"\n ></nz-option>\n <nz-option [nzValue]=\"DriveShareScope.AnyoneWithLink\" nzLabel=\"C\u00F4ng khai (B\u1EA5t k\u1EF3 ai c\u00F3 link)\"></nz-option>\n </nz-select>\n <input\n nz-input\n type=\"password\"\n placeholder=\"M\u1EADt kh\u1EA9u b\u1EA3o v\u1EC7 (t\u00F9y ch\u1ECDn)\"\n [(ngModel)]=\"newLink.Password\"\n style=\"width: 185px\"\n />\n <nz-date-picker\n [(ngModel)]=\"newLink.ExpiresAt\"\n nzFormat=\"dd/MM/yyyy\"\n nzPlaceHolder=\"Ng\u00E0y h\u1EBFt h\u1EA1n\"\n style=\"width: 145px\"\n >\n </nz-date-picker>\n <label nz-checkbox [(ngModel)]=\"newLink.AllowDownload\">Cho ph\u00E9p t\u1EA3i</label>\n <button nz-button nzType=\"primary\" (click)=\"createLink()\"><nz-icon nzType=\"link\"></nz-icon> T\u1EA1o link</button>\n </div>\n <nz-table #linkTable [nzData]=\"d.ShareLinks\" nzSize=\"small\" [nzBordered]=\"true\" [nzFrontPagination]=\"false\">\n <thead>\n <tr>\n <th>\u0110\u01B0\u1EDDng d\u1EABn chia s\u1EBB</th>\n <th nzWidth=\"135px\">Ph\u1EA1m vi</th>\n <th nzWidth=\"160px\">B\u1EA3o m\u1EADt</th>\n <th nzWidth=\"85px\" class=\"text-center\">L\u01B0\u1EE3t t\u1EA3i</th>\n <th nzWidth=\"150px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (l of linkTable.data; track l.Id) {\n <tr>\n <td>\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <a [href]=\"l.FullUrl\" target=\"_blank\" class=\"link-detail break-word\">{{ l.FullUrl }}</a>\n <icon-copy [textToCopy]=\"l.FullUrl\" tooltip=\"Sao ch\u00E9p li\u00EAn k\u1EBFt\"></icon-copy>\n </div>\n </td>\n <td>\n <nz-tag\n [nzColor]=\"\n l.Scope === DriveShareScope.AnyoneWithLink\n ? 'orange'\n : l.Scope === DriveShareScope.DirectPermissionOnly\n ? 'geekblue'\n : 'cyan'\n \"\n nz-tooltip\n [nzTooltipTitle]=\"\n l.Scope === DriveShareScope.DirectPermissionOnly\n ? 'Link chia s\u1EBB tr\u1EF1c ti\u1EBFp: B\u1EAFt bu\u1ED9c \u0111\u0103ng nh\u1EADp V\u00C0 ki\u1EC3m tra quy\u1EC1n ACL/RBAC tr\u00EAn File/Folder'\n : l.Scope === DriveShareScope.AnyoneWithLink\n ? 'C\u00F4ng khai: B\u1EA5t k\u1EF3 ai c\u00F3 \u0111\u01B0\u1EDDng d\u1EABn \u0111\u1EC1u m\u1EDF \u0111\u01B0\u1EE3c'\n : 'N\u1ED9i b\u1ED9: Ai c\u00F3 t\u00E0i kho\u1EA3n \u0111\u0103ng nh\u1EADp h\u1EC7 th\u1ED1ng \u0111\u1EC1u m\u1EDF \u0111\u01B0\u1EE3c'\n \"\n >\n {{\n l.Scope === DriveShareScope.AnyoneWithLink\n ? \"C\u00F4ng khai\"\n : l.Scope === DriveShareScope.DirectPermissionOnly\n ? \"Link tr\u1EF1c ti\u1EBFp\"\n : \"N\u1ED9i b\u1ED9\"\n }}\n </nz-tag>\n </td>\n <td>\n @if (l.HasPassword) {\n <nz-tag nzColor=\"gold\">C\u00F3 m\u1EADt kh\u1EA9u</nz-tag>\n }\n @if (l.ExpiresAt) {\n <span>H\u1EBFt h\u1EA1n: {{ l.ExpiresAt | date: \"dd/MM/yyyy\" }}</span>\n }\n </td>\n <td class=\"text-center\">{{ l.DownloadCount }}{{ l.MaxDownloads ? \" / \" + l.MaxDownloads : \"\" }}</td>\n <td class=\"text-center\">\n <a nz-button nzType=\"link\" nzSize=\"small\" [href]=\"l.FullUrl\" target=\"_blank\">\n <nz-icon nzType=\"export\"></nz-icon> M\u1EDF\n </a>\n <button nz-button nzType=\"text\" nzDanger nzSize=\"small\" (click)=\"revokeLink(l.Id)\">\n <nz-icon nzType=\"stop\"></nz-icon> Thu h\u1ED3i\n </button>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n </nz-tab>\n </nz-tabset>\n </div>\n}\n", styles: [".inheritance-bar{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:var(--app-sidebar-bg, #f8fafc);border:1px solid var(--app-border, #e2e8f0);border-radius:6px;margin-bottom:16px}.text-muted{margin:2px 0 0;font-size:12px;color:var(--app-text-muted, #64748b)}.grant-form,.link-builder{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:16px}.inline-edit-perm-wrap{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.editing-perm-row>td{background-color:#f0f9ff!important}\n"] }]
|
|
9645
9808
|
}], propDecorators: { nodeId: [{
|
|
9646
9809
|
type: Input
|
|
9810
|
+
}], hideInheritanceToggle: [{
|
|
9811
|
+
type: Input
|
|
9647
9812
|
}] } });
|
|
9648
9813
|
|
|
9649
9814
|
class DriveVersionModalComponent extends BaseComponent {
|
|
@@ -10359,7 +10524,7 @@ class DriveAttachmentBoxComponent extends BaseComponent {
|
|
|
10359
10524
|
useExisting: forwardRef(() => DriveAttachmentBoxComponent),
|
|
10360
10525
|
multi: true,
|
|
10361
10526
|
},
|
|
10362
|
-
], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"drive-attachment-box\"\n [class.drive-attachment-compact]=\"compact\"\n [class.drive-attachment-single]=\"isSingleFileMode\"\n [class.drag-active]=\"isDraggingOver()\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDropFiles($event)\"\n>\n <input\n #attFileInput\n type=\"file\"\n [multiple]=\"!isSingleFileMode\"\n [attr.accept]=\"acceptAttr || null\"\n hidden\n (change)=\"onUploadFilesSelected($event)\"\n />\n\n <!-- ========================================================================== -->\n <!-- CH\u1EBE \u0110\u1ED8 1: PHI\u00CAN B\u1EA2N R\u00DAT G\u1ECCN 1 FILE (COMPACT SINGLE-FILE INLINE BAR) -->\n <!-- T\u1ED1i \u01B0u cho v\u1ECB tr\u00ED kh\u00F4ng gian h\u1EA1n ch\u1EBF (\u00F4 b\u1EA3ng, c\u1ED9t h\u1EB9p) & ch\u1EC9 g\u1EAFn 1 t\u1EADp tin -->\n <!-- ========================================================================== -->\n @if (compact && isSingleFileMode) {\n @if (attachments().length === 0) {\n <div class=\"att-compact-single-empty\">\n <div\n class=\"att-compact-empty-trigger\"\n [class.clickable]=\"!readonly\"\n (click)=\"!readonly && attFileInput.click()\"\n >\n <nz-icon nzType=\"paper-clip\" class=\"att-compact-clip-icon\"></nz-icon>\n <span class=\"att-compact-placeholder\">\n {{ placeholder || (readonly ? \"Ch\u01B0a c\u00F3 t\u1EC7p \u0111\u00EDnh k\u00E8m\" : \"Ch\u01B0a c\u00F3 t\u1EC7p \u2014 K\u00E9o th\u1EA3 ho\u1EB7c ch\u1ECDn 1 t\u1EC7p\") }}\n </span>\n </div>\n\n @if (!readonly) {\n <div class=\"att-compact-actions\" nz-flex nzAlign=\"center\" [nzGap]=\"4\">\n <button\n type=\"button\"\n nz-button\n nzType=\"primary\"\n nzSize=\"small\"\n [nzLoading]=\"loading()\"\n nz-tooltip\n nzTooltipTitle=\"T\u1EA3i t\u1EADp tin t\u1EEB m\u00E1y t\u00EDnh\"\n (click)=\"attFileInput.click()\"\n >\n <nz-icon nzType=\"cloud-upload\"></nz-icon> T\u1EA3i l\u00EAn\n </button>\n @if (allowPickFromDrive) {\n <button\n type=\"button\"\n nz-button\n nzType=\"default\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Ch\u1ECDn t\u1EADp tin c\u00F3 s\u1EB5n t\u1EEB Kho Drive\"\n (click)=\"pickerDrawerVisible = true\"\n >\n <nz-icon nzType=\"folder-open\"></nz-icon> Drive\n </button>\n }\n </div>\n }\n </div>\n } @else {\n @for (item of attachments().slice(0, 1); track item.Id) {\n <div class=\"att-compact-single-card\">\n <div class=\"att-compact-file-info\">\n <nz-icon [nzType]=\"getFileIcon(item)\" class=\"att-compact-file-icon\"></nz-icon>\n <a\n class=\"att-compact-filename link-detail\"\n nz-tooltip\n [nzTooltipTitle]=\"item.Name + ' (' + (item.SizeBytes | formatBytes) + ')'\"\n (click)=\"previewItem(item)\"\n >\n {{ item.Name }}\n </a>\n <span class=\"att-compact-meta\">({{ item.SizeBytes | formatBytes }})</span>\n @if (item.NodeType === DriveNodeType.Shortcut) {\n <nz-tag nzColor=\"purple\" class=\"att-mini-tag\">L\u1ED1i t\u1EAFt</nz-tag>\n }\n </div>\n\n <div class=\"att-compact-actions\" nz-flex nzAlign=\"center\" [nzGap]=\"2\">\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Xem tr\u1EF1c tuy\u1EBFn\"\n (click)=\"previewItem(item)\"\n >\n <nz-icon nzType=\"eye\"></nz-icon>\n </button>\n @if (item.CanDownload) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"T\u1EA3i xu\u1ED1ng\"\n (click)=\"downloadItem(item)\"\n >\n <nz-icon nzType=\"download\"></nz-icon>\n </button>\n }\n @if (!readonly && item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n (v1, v2...)\"\n (click)=\"openVersionForNode(item)\"\n >\n <nz-icon nzType=\"history\"></nz-icon>\n </button>\n }\n @if (!readonly && (item.CanShare || item.EffectiveAccess >= DriveAccessLevel.Manager)) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Chia s\u1EBB & Ph\u00E2n quy\u1EC1n\"\n (click)=\"openShareForNode(item)\"\n >\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n @if (!readonly) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n [nzLoading]=\"loading()\"\n nz-tooltip\n nzTooltipTitle=\"\u0110\u1ED5i t\u1EC7p kh\u00E1c t\u1EEB m\u00E1y t\u00EDnh (T\u1EC7p c\u0169 s\u1EBD chuy\u1EC3n v\u00E0o th\u00F9ng r\u00E1c)\"\n (click)=\"attFileInput.click()\"\n >\n <nz-icon nzType=\"CloudUpload\" style=\"display: none\"></nz-icon>\n <nz-icon nzType=\"swap\"></nz-icon>\n </button>\n @if (allowPickFromDrive) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Ch\u1ECDn t\u1EC7p kh\u00E1c t\u1EEB Kho Drive\"\n (click)=\"pickerDrawerVisible = true\"\n >\n <nz-icon nzType=\"folder-open\"></nz-icon>\n </button>\n }\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n [nzLoading]=\"loading()\"\n nz-tooltip\n nzTooltipTitle=\"G\u1EE1 t\u00E0i li\u1EC7u \u0111\u00EDnh k\u00E8m (Chuy\u1EC3n v\u00E0o th\u00F9ng r\u00E1c)\"\n (click)=\"removeAttachment(item, $event)\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n </div>\n </div>\n }\n }\n }\n\n <!-- ========================================================================== -->\n <!-- CH\u1EBE \u0110\u1ED8 2: PHI\u00CAN B\u1EA2N R\u00DAT G\u1ECCN NHI\u1EC0U FILE (COMPACT MULTI-FILE LIST) -->\n <!-- T\u1ED1i \u01B0u cho khung h\u1EB9p / c\u1ED9t ph\u1EE5 tr\u00EAn Form nh\u01B0ng c\u1EA7n \u0111\u00EDnh k\u00E8m nhi\u1EC1u t\u1EADp tin -->\n <!-- ========================================================================== -->\n @else if (compact && !isSingleFileMode) {\n <div class=\"att-compact-header\" nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"6\">\n <div nz-flex nzAlign=\"center\" [nzGap]=\"6\">\n <nz-icon nzType=\"paper-clip\" style=\"font-size: 14px; color: var(--primary-color, #1890ff)\"></nz-icon>\n <strong style=\"font-size: 13px\">{{ title }}</strong>\n <nz-tag nzColor=\"blue\" class=\"att-mini-tag\">{{ attachments().length }}</nz-tag>\n </div>\n\n @if (!readonly) {\n <div nz-flex nzAlign=\"center\" [nzGap]=\"4\">\n <button\n type=\"button\"\n nz-button\n nzType=\"primary\"\n nzSize=\"small\"\n [nzLoading]=\"loading()\"\n (click)=\"attFileInput.click()\"\n >\n <nz-icon nzType=\"cloud-upload\"></nz-icon> T\u1EA3i l\u00EAn\n </button>\n @if (allowPickFromDrive) {\n <button type=\"button\" nz-button nzType=\"default\" nzSize=\"small\" (click)=\"pickerDrawerVisible = true\">\n <nz-icon nzType=\"folder-open\"></nz-icon> Drive\n </button>\n }\n @if (recordFolder() && allowShareFolder) {\n <button\n type=\"button\"\n nz-button\n nzType=\"dashed\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Ph\u00E2n quy\u1EC1n th\u01B0 m\u1EE5c h\u1ED3 s\u01A1\"\n (click)=\"openShareForNode(recordFolder()!)\"\n >\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n </div>\n }\n </div>\n\n @if (attachments().length === 0) {\n <div class=\"att-compact-empty-multi\" [class.clickable]=\"!readonly\" (click)=\"!readonly && attFileInput.click()\">\n <nz-icon nzType=\"inbox\"></nz-icon>\n <span>{{\n placeholder || (readonly ? \"Ch\u01B0a c\u00F3 t\u00E0i li\u1EC7u \u0111\u00EDnh k\u00E8m.\" : \"K\u00E9o th\u1EA3 t\u1EC7p v\u00E0o \u0111\u00E2y ho\u1EB7c b\u1EA5m 'T\u1EA3i l\u00EAn'\")\n }}</span>\n </div>\n } @else {\n <div class=\"att-compact-list\" [style.max-height]=\"maxCompactListHeight\">\n @for (item of attachments(); track item.Id; let idx = $index) {\n <div class=\"att-compact-row\">\n <div class=\"att-compact-file-info\">\n <span class=\"att-compact-index\">{{ idx + 1 }}.</span>\n <nz-icon [nzType]=\"getFileIcon(item)\" class=\"att-compact-file-icon\"></nz-icon>\n <a\n class=\"att-compact-filename link-detail\"\n nz-tooltip\n [nzTooltipTitle]=\"item.Name + ' \u2022 ' + (item.SizeBytes | formatBytes)\"\n (click)=\"previewItem(item)\"\n >\n {{ item.Name }}\n </a>\n <span class=\"att-compact-meta\">{{ item.SizeBytes | formatBytes }}</span>\n @if (item.NodeType === DriveNodeType.Shortcut) {\n <nz-tag nzColor=\"purple\" class=\"att-mini-tag\">L\u1ED1i t\u1EAFt</nz-tag>\n }\n </div>\n\n <div class=\"att-compact-actions\" nz-flex nzAlign=\"center\" [nzGap]=\"2\">\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Xem tr\u1EF1c tuy\u1EBFn\"\n (click)=\"previewItem(item)\"\n >\n <nz-icon nzType=\"eye\"></nz-icon>\n </button>\n @if (item.CanDownload) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"T\u1EA3i xu\u1ED1ng\"\n (click)=\"downloadItem(item)\"\n >\n <nz-icon nzType=\"download\"></nz-icon>\n </button>\n }\n @if (!readonly && item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n\"\n (click)=\"openVersionForNode(item)\"\n >\n <nz-icon nzType=\"history\"></nz-icon>\n </button>\n }\n @if (!readonly && (item.CanShare || item.EffectiveAccess >= DriveAccessLevel.Manager)) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Chia s\u1EBB & Ph\u00E2n quy\u1EC1n\"\n (click)=\"openShareForNode(item)\"\n >\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n @if (!readonly) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"G\u1EE1 t\u00E0i li\u1EC7u \u0111\u00EDnh k\u00E8m (Chuy\u1EC3n v\u00E0o th\u00F9ng r\u00E1c)\"\n (click)=\"removeAttachment(item, $event)\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n </div>\n </div>\n }\n </div>\n }\n }\n\n <!-- ========================================================================== -->\n <!-- CH\u1EBE \u0110\u1ED8 3: PHI\u00CAN B\u1EA2N \u0110\u1EA6Y \u0110\u1EE6 M\u1EB6C \u0110\u1ECANH (FULL TABLE MODE) -->\n <!-- ========================================================================== -->\n @else {\n <div class=\"att-header\" nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-icon nzType=\"paper-clip\" style=\"font-size: 16px; color: var(--primary-color, #1890ff)\"></nz-icon>\n <strong>{{ title }}</strong>\n <nz-tag nzColor=\"blue\">\n {{ attachments().length }} t\u1EC7p{{ isSingleFileMode ? \" (T\u1ED1i \u0111a 1)\" : \"\" }}\n </nz-tag>\n @if (recordFolder(); as rf) {\n <nz-tag nzColor=\"cyan\" nz-tooltip [nzTooltipTitle]=\"'Th\u01B0 m\u1EE5c l\u01B0u tr\u1EEF tr\u00EAn Drive: ' + rf.Name\">\n <nz-icon nzType=\"folder\"></nz-icon> {{ rf.Name }}\n </nz-tag>\n }\n </div>\n\n @if (!readonly) {\n <div nz-flex nzAlign=\"center\" [nzGap]=\"6\">\n <button\n type=\"button\"\n nz-button\n nzType=\"primary\"\n nzSize=\"small\"\n [nzLoading]=\"loading()\"\n (click)=\"attFileInput.click()\"\n >\n <nz-icon nzType=\"cloud-upload\"></nz-icon>\n {{ isSingleFileMode && attachments().length > 0 ? \"\u0110\u1ED5i t\u1EADp tin kh\u00E1c\" : \"T\u1EA3i t\u1EADp tin l\u00EAn\" }}\n </button>\n @if (allowPickFromDrive) {\n <button type=\"button\" nz-button nzType=\"default\" nzSize=\"small\" (click)=\"pickerDrawerVisible = true\">\n <nz-icon nzType=\"folder-open\"></nz-icon> Ch\u1ECDn t\u1EEB Drive\n </button>\n }\n @if (recordFolder() && allowShareFolder) {\n <button\n type=\"button\"\n nz-button\n nzType=\"dashed\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Ph\u00E2n quy\u1EC1n truy c\u1EADp th\u01B0 m\u1EE5c h\u1ED3 s\u01A1 n\u00E0y\"\n (click)=\"openShareForNode(recordFolder()!)\"\n >\n <nz-icon nzType=\"share-alt\"></nz-icon> Ph\u00E2n quy\u1EC1n h\u1ED3 s\u01A1\n </button>\n }\n </div>\n }\n </div>\n\n <!-- DANH S\u00C1CH T\u1EACP TIN \u0110\u00CDNH K\u00C8M (FULL TABLE) -->\n @if (attachments().length === 0) {\n <div class=\"att-empty-zone\" (click)=\"!readonly && attFileInput.click()\">\n <nz-icon nzType=\"inbox\" style=\"font-size: 28px; color: var(--primary-color, #1890ff)\"></nz-icon>\n <div style=\"font-size: 13px; margin-top: 4px\">\n {{\n readonly\n ? \"Ch\u01B0a c\u00F3 t\u00E0i li\u1EC7u \u0111\u00EDnh k\u00E8m.\"\n : \"K\u00E9o th\u1EA3 t\u1EADp tin v\u00E0o \u0111\u00E2y, b\u1EA5m \u0111\u1EC3 t\u1EA3i l\u00EAn ho\u1EB7c ch\u1ECDn t\u1EEB kho Drive\"\n }}\n </div>\n </div>\n } @else {\n <nz-table\n #attTable\n [nzData]=\"attachments()\"\n [nzLoading]=\"loading()\"\n nzSize=\"small\"\n [nzBordered]=\"true\"\n [nzFrontPagination]=\"false\"\n [nzShowPagination]=\"false\"\n >\n <thead>\n <tr>\n <th nzWidth=\"42px\" class=\"text-center\">#</th>\n <th>T\u00EAn t\u00E0i li\u1EC7u</th>\n <th nzWidth=\"105px\" class=\"text-right\">K\u00EDch th\u01B0\u1EDBc</th>\n <th nzWidth=\"135px\">Ng\u01B0\u1EDDi t\u1EA3i</th>\n <th nzWidth=\"135px\" class=\"text-center\">Ng\u00E0y c\u1EADp nh\u1EADt</th>\n <th nzWidth=\"150px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (item of attTable.data; track item.Id; let idx = $index) {\n <tr>\n <td class=\"text-center\">{{ idx + 1 }}</td>\n <td>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-icon\n [nzType]=\"getFileIcon(item)\"\n style=\"font-size: 17px; color: var(--primary-color, #1890ff)\"\n ></nz-icon>\n <a class=\"link-detail\" style=\"font-weight: 500\" (click)=\"previewItem(item)\">{{ item.Name }}</a>\n @if (item.NodeType === DriveNodeType.Shortcut) {\n <nz-tag nzColor=\"purple\">L\u1ED1i t\u1EAFt Drive</nz-tag>\n }\n </div>\n </td>\n <td class=\"text-right\">{{ item.SizeBytes | formatBytes }}</td>\n <td>{{ item.OwnerName || item.UpdatedUser || item.OwnerId }}</td>\n <td class=\"text-center\">{{ item.UpdatedDate | date: \"dd/MM/yyyy HH:mm\" }}</td>\n <td class=\"text-center\">\n <div nz-flex nzJustify=\"center\" [nzGap]=\"4\">\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Xem tr\u1EF1c tuy\u1EBFn\"\n (click)=\"previewItem(item)\"\n >\n <nz-icon nzType=\"eye\"></nz-icon>\n </button>\n @if (item.CanDownload) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"T\u1EA3i xu\u1ED1ng\"\n (click)=\"downloadItem(item)\"\n >\n <nz-icon nzType=\"download\"></nz-icon>\n </button>\n }\n @if (!readonly && item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n (v1, v2...)\"\n (click)=\"openVersionForNode(item)\"\n >\n <nz-icon nzType=\"history\"></nz-icon>\n </button>\n }\n @if (!readonly && (item.CanShare || item.EffectiveAccess >= DriveAccessLevel.Manager)) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Chia s\u1EBB & Ph\u00E2n quy\u1EC1n\"\n (click)=\"openShareForNode(item)\"\n >\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n @if (!readonly) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"G\u1EE1 t\u00E0i li\u1EC7u \u0111\u00EDnh k\u00E8m (Chuy\u1EC3n v\u00E0o th\u00F9ng r\u00E1c)\"\n (click)=\"removeAttachment(item, $event)\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n </div>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n }\n }\n</div>\n\n<!-- DRAWER CH\u1ECCN T\u1EEA KHO DRIVE -->\n<nz-drawer\n [nzVisible]=\"pickerDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"820\"\n nzTitle=\"Ch\u1ECDn t\u00E0i li\u1EC7u t\u1EEB Kho Drive\"\n (nzOnClose)=\"pickerDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n <lib-drive-picker\n [selectMode]=\"'file'\"\n [multiple]=\"!isSingleFileMode\"\n [acceptExtensions]=\"acceptExtensions\"\n (confirmed)=\"onPickedFromDrive($event)\"\n (cancelled)=\"pickerDrawerVisible = false\"\n ></lib-drive-picker>\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER XEM TR\u1EF0C TUY\u1EBEN -->\n<nz-drawer\n [nzVisible]=\"previewDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"'75vw'\"\n [nzBodyStyle]=\"{ padding: '0', height: '100%', display: 'flex', flexDirection: 'column', overflow: 'hidden' }\"\n [nzTitle]=\"previewTitle\"\n (nzOnClose)=\"previewDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n <div class=\"drive-preview-body-fill no-drawer-footer\">\n <extend-view-file-content [previewType]=\"previewType\" [previewContent]=\"previewContent\"></extend-view-file-content>\n </div>\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER L\u1ECACH S\u1EEC PHI\u00CAN B\u1EA2N -->\n<nz-drawer\n [nzVisible]=\"versionDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"740\"\n [nzTitle]=\"'L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n: ' + (activeNode()?.Name || '')\"\n (nzOnClose)=\"versionDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n @if (activeNode(); as node) {\n <lib-drive-version-modal\n [nodeId]=\"node.ShortcutTargetId || node.Id\"\n [nodeName]=\"node.Name\"\n [canEdit]=\"!readonly\"\n [canDownload]=\"node.CanDownload\"\n (closed)=\"versionDrawerVisible = false; reloadAttachments()\"\n ></lib-drive-version-modal>\n }\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER CHIA S\u1EBA & PH\u00C2N QUY\u1EC0N -->\n<nz-drawer\n [nzVisible]=\"shareDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"920\"\n [nzTitle]=\"'Chia s\u1EBB & Ph\u00E2n quy\u1EC1n: ' + (activeNode()?.Name || '')\"\n (nzOnClose)=\"shareDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n @if (activeNode(); as node) {\n <lib-drive-share-modal [nodeId]=\"node.ShortcutTargetId || node.Id\"></lib-drive-share-modal>\n }\n </ng-container>\n</nz-drawer>\n", styles: ["@charset \"UTF-8\";.drive-attachment-box{border:1px solid var(--app-border, #e2e8f0);border-radius:8px;padding:12px;background:var(--app-container-bg, #ffffff);display:flex;flex-direction:column;gap:10px;transition:border-color .15s,background .15s}.drive-attachment-box.drag-active{border:2px dashed var(--primary-color, #1890ff);background:color-mix(in srgb,var(--primary-color, #1890ff) 6%,transparent)}.att-empty-zone{border:1px dashed var(--app-border, #cbd5e1);border-radius:6px;padding:20px;text-align:center;cursor:pointer;color:var(--app-text-muted, #64748b)}.att-empty-zone:hover{border-color:var(--primary-color, #1890ff)}.drive-attachment-box.drive-attachment-compact{padding:6px 10px;border-radius:6px;gap:6px}.drive-attachment-box.drive-attachment-compact.drive-attachment-single{padding:4px 8px;min-height:36px;justify-content:center}.att-compact-single-empty,.att-compact-single-card{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-width:0}.att-compact-empty-trigger{display:flex;align-items:center;gap:6px;min-width:0;flex:1;color:var(--app-text-muted, #64748b);font-size:12.5px;overflow:hidden}.att-compact-empty-trigger.clickable{cursor:pointer}.att-compact-empty-trigger.clickable:hover .att-compact-placeholder{color:var(--primary-color, #1890ff)}.att-compact-clip-icon{font-size:14px;color:var(--primary-color, #1890ff);flex-shrink:0}.att-compact-placeholder{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.att-compact-file-info{display:flex;align-items:center;gap:6px;min-width:0;flex:1;overflow:hidden}.att-compact-index{font-size:12px;color:var(--app-text-muted, #64748b);flex-shrink:0}.att-compact-file-icon{font-size:16px;color:var(--primary-color, #1890ff);flex-shrink:0}.att-compact-filename{font-size:13px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.att-compact-meta{font-size:11.5px;color:var(--app-text-muted, #64748b);white-space:nowrap;flex-shrink:0}.att-compact-actions{flex-shrink:0}.att-mini-tag{margin:0;font-size:11px;line-height:16px;padding:0 5px;flex-shrink:0}.att-compact-header{padding-bottom:4px;border-bottom:1px dashed var(--app-border, #e2e8f0)}.att-compact-empty-multi{display:flex;align-items:center;justify-content:center;gap:6px;padding:8px;border:1px dashed var(--app-border, #cbd5e1);border-radius:5px;font-size:12.5px;color:var(--app-text-muted, #64748b)}.att-compact-empty-multi.clickable{cursor:pointer}.att-compact-empty-multi.clickable:hover{border-color:var(--primary-color, #1890ff);color:var(--primary-color, #1890ff)}.att-compact-list{display:flex;flex-direction:column;gap:4px;overflow-y:auto}.att-compact-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:3px 6px;border-radius:4px;background:var(--app-surface-subtle, #f8fafc);border:1px solid transparent;transition:background .12s,border-color .12s}.att-compact-row:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 5%,#f8fafc);border-color:color-mix(in srgb,var(--primary-color, #1890ff) 25%,transparent)}.drive-preview-body-fill{--drive-preview-fill-height: calc(100vh - 103px) ;display:flex;flex-direction:column;flex:1 1 auto;width:100%;height:100%;min-height:var(--drive-preview-fill-height);overflow:hidden}.drive-preview-body-fill.no-drawer-footer{--drive-preview-fill-height: calc(100vh - 55px) }.drive-preview-body-fill ::ng-deep extend-view-file-content{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;width:100%!important;height:100%!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important}.drive-preview-body-fill ::ng-deep extend-view-file-content>*:not(style):not(script),.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer>div,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .html,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .ink-switch-box,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .zoom,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer #outerContainer,.drive-preview-body-fill ::ng-deep extend-view-file-content pdf-viewer,.drive-preview-body-fill ::ng-deep extend-view-file-content iframe,.drive-preview-body-fill ::ng-deep extend-view-file-content embed,.drive-preview-body-fill ::ng-deep extend-view-file-content object{display:block!important;flex:1 1 auto!important;width:100%!important;height:var(--drive-preview-fill-height)!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important}.drive-preview-body-fill ::ng-deep extend-view-file-content pre{flex:1 1 auto!important;width:100%!important;height:var(--drive-preview-fill-height)!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important;margin:0!important;padding:16px!important;overflow:auto!important;box-sizing:border-box!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: NzFlexModule }, { kind: "directive", type: i3$4.NzFlexDirective, selector: "[nz-flex],nz-flex", inputs: ["nzVertical", "nzJustify", "nzAlign", "nzGap", "nzWrap", "nzFlex"], exportAs: ["nzFlex"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i6.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "directive", type: i6.NzTableCellDirective, selector: "th:not(.nz-disable-th):not([mat-cell]), td:not(.nz-disable-td):not([mat-cell])" }, { kind: "directive", type: i6.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i6.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i6.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i6.NzTrDirective, selector: "tr:not([mat-row]):not([mat-header-row]):not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i2$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i3$3.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i4$1.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i1$2.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzTagModule }, { kind: "component", type: i11.NzTagComponent, selector: "nz-tag", inputs: ["nzMode", "nzColor", "nzChecked", "nzBordered"], outputs: ["nzOnClose", "nzCheckedChange"], exportAs: ["nzTag"] }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "directive", type: i8.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "ngmodule", type: NzDrawerModule }, { kind: "component", type: i14.NzDrawerComponent, selector: "nz-drawer", inputs: ["nzContent", "nzCloseIcon", "nzClosable", "nzMaskClosable", "nzMask", "nzCloseOnNavigation", "nzNoAnimation", "nzKeyboard", "nzTitle", "nzExtra", "nzFooter", "nzPlacement", "nzSize", "nzMaskStyle", "nzBodyStyle", "nzWrapClassName", "nzWidth", "nzHeight", "nzZIndex", "nzOffsetX", "nzOffsetY", "nzVisible"], outputs: ["nzOnViewInit", "nzOnClose", "nzVisibleChange"], exportAs: ["nzDrawer"] }, { kind: "directive", type: i14.NzDrawerContentDirective, selector: "[nzDrawerContent]", exportAs: ["nzDrawerContent"] }, { kind: "ngmodule", type: NzEmptyModule }, { kind: "pipe", type: FormatBytesPipe, name: "formatBytes" }, { kind: "component", type: ExtendViewFileContentComponent, selector: "extend-view-file-content", inputs: ["previewType", "previewContent"] }, { kind: "component", type: DriveShareModalComponent, selector: "lib-drive-share-modal", inputs: ["nodeId"] }, { kind: "component", type: DriveVersionModalComponent, selector: "lib-drive-version-modal", inputs: ["nodeId", "nodeName", "canEdit", "canDownload"], outputs: ["closed"] }, { kind: "component", type: DrivePickerComponent, selector: "lib-drive-picker", inputs: ["selectMode", "multiple", "acceptExtensions", "allowUploadNew", "initialScope"], outputs: ["confirmed", "cancelled"] }] });
|
|
10527
|
+
], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"drive-attachment-box\"\n [class.drive-attachment-compact]=\"compact\"\n [class.drive-attachment-single]=\"isSingleFileMode\"\n [class.drag-active]=\"isDraggingOver()\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDropFiles($event)\"\n>\n <input\n #attFileInput\n type=\"file\"\n [multiple]=\"!isSingleFileMode\"\n [attr.accept]=\"acceptAttr || null\"\n hidden\n (change)=\"onUploadFilesSelected($event)\"\n />\n\n <!-- ========================================================================== -->\n <!-- CH\u1EBE \u0110\u1ED8 1: PHI\u00CAN B\u1EA2N R\u00DAT G\u1ECCN 1 FILE (COMPACT SINGLE-FILE INLINE BAR) -->\n <!-- T\u1ED1i \u01B0u cho v\u1ECB tr\u00ED kh\u00F4ng gian h\u1EA1n ch\u1EBF (\u00F4 b\u1EA3ng, c\u1ED9t h\u1EB9p) & ch\u1EC9 g\u1EAFn 1 t\u1EADp tin -->\n <!-- ========================================================================== -->\n @if (compact && isSingleFileMode) {\n @if (attachments().length === 0) {\n <div class=\"att-compact-single-empty\">\n <div\n class=\"att-compact-empty-trigger\"\n [class.clickable]=\"!readonly\"\n (click)=\"!readonly && attFileInput.click()\"\n >\n <nz-icon nzType=\"paper-clip\" class=\"att-compact-clip-icon\"></nz-icon>\n <span class=\"att-compact-placeholder\">\n {{ placeholder || (readonly ? \"Ch\u01B0a c\u00F3 t\u1EC7p \u0111\u00EDnh k\u00E8m\" : \"Ch\u01B0a c\u00F3 t\u1EC7p \u2014 K\u00E9o th\u1EA3 ho\u1EB7c ch\u1ECDn 1 t\u1EC7p\") }}\n </span>\n </div>\n\n @if (!readonly) {\n <div class=\"att-compact-actions\" nz-flex nzAlign=\"center\" [nzGap]=\"4\">\n <button\n type=\"button\"\n nz-button\n nzType=\"primary\"\n nzSize=\"small\"\n [nzLoading]=\"loading()\"\n nz-tooltip\n nzTooltipTitle=\"T\u1EA3i t\u1EADp tin t\u1EEB m\u00E1y t\u00EDnh\"\n (click)=\"attFileInput.click()\"\n >\n <nz-icon nzType=\"cloud-upload\"></nz-icon> T\u1EA3i l\u00EAn\n </button>\n @if (allowPickFromDrive) {\n <button\n type=\"button\"\n nz-button\n nzType=\"default\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Ch\u1ECDn t\u1EADp tin c\u00F3 s\u1EB5n t\u1EEB Kho Drive\"\n (click)=\"pickerDrawerVisible = true\"\n >\n <nz-icon nzType=\"folder-open\"></nz-icon> Drive\n </button>\n }\n </div>\n }\n </div>\n } @else {\n @for (item of attachments().slice(0, 1); track item.Id) {\n <div class=\"att-compact-single-card\">\n <div class=\"att-compact-file-info\">\n <nz-icon [nzType]=\"getFileIcon(item)\" class=\"att-compact-file-icon\"></nz-icon>\n <a\n class=\"att-compact-filename link-detail\"\n nz-tooltip\n [nzTooltipTitle]=\"item.Name + ' (' + (item.SizeBytes | formatBytes) + ')'\"\n (click)=\"previewItem(item)\"\n >\n {{ item.Name }}\n </a>\n <span class=\"att-compact-meta\">({{ item.SizeBytes | formatBytes }})</span>\n @if (item.NodeType === DriveNodeType.Shortcut) {\n <nz-tag nzColor=\"purple\" class=\"att-mini-tag\">L\u1ED1i t\u1EAFt</nz-tag>\n }\n </div>\n\n <div class=\"att-compact-actions\" nz-flex nzAlign=\"center\" [nzGap]=\"2\">\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Xem tr\u1EF1c tuy\u1EBFn\"\n (click)=\"previewItem(item)\"\n >\n <nz-icon nzType=\"eye\"></nz-icon>\n </button>\n @if (item.CanDownload) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"T\u1EA3i xu\u1ED1ng\"\n (click)=\"downloadItem(item)\"\n >\n <nz-icon nzType=\"download\"></nz-icon>\n </button>\n }\n @if (!readonly && item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n (v1, v2...)\"\n (click)=\"openVersionForNode(item)\"\n >\n <nz-icon nzType=\"history\"></nz-icon>\n </button>\n }\n @if (!readonly && (item.CanShare || item.EffectiveAccess >= DriveAccessLevel.Manager)) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Chia s\u1EBB & Ph\u00E2n quy\u1EC1n\"\n (click)=\"openShareForNode(item)\"\n >\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n @if (!readonly) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n [nzLoading]=\"loading()\"\n nz-tooltip\n nzTooltipTitle=\"\u0110\u1ED5i t\u1EC7p kh\u00E1c t\u1EEB m\u00E1y t\u00EDnh (T\u1EC7p c\u0169 s\u1EBD chuy\u1EC3n v\u00E0o th\u00F9ng r\u00E1c)\"\n (click)=\"attFileInput.click()\"\n >\n <nz-icon nzType=\"CloudUpload\" style=\"display: none\"></nz-icon>\n <nz-icon nzType=\"swap\"></nz-icon>\n </button>\n @if (allowPickFromDrive) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Ch\u1ECDn t\u1EC7p kh\u00E1c t\u1EEB Kho Drive\"\n (click)=\"pickerDrawerVisible = true\"\n >\n <nz-icon nzType=\"folder-open\"></nz-icon>\n </button>\n }\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n [nzLoading]=\"loading()\"\n nz-tooltip\n nzTooltipTitle=\"G\u1EE1 t\u00E0i li\u1EC7u \u0111\u00EDnh k\u00E8m (Chuy\u1EC3n v\u00E0o th\u00F9ng r\u00E1c)\"\n (click)=\"removeAttachment(item, $event)\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n </div>\n </div>\n }\n }\n }\n\n <!-- ========================================================================== -->\n <!-- CH\u1EBE \u0110\u1ED8 2: PHI\u00CAN B\u1EA2N R\u00DAT G\u1ECCN NHI\u1EC0U FILE (COMPACT MULTI-FILE LIST) -->\n <!-- T\u1ED1i \u01B0u cho khung h\u1EB9p / c\u1ED9t ph\u1EE5 tr\u00EAn Form nh\u01B0ng c\u1EA7n \u0111\u00EDnh k\u00E8m nhi\u1EC1u t\u1EADp tin -->\n <!-- ========================================================================== -->\n @else if (compact && !isSingleFileMode) {\n <div class=\"att-compact-header\" nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"6\">\n <div nz-flex nzAlign=\"center\" [nzGap]=\"6\">\n <nz-icon nzType=\"paper-clip\" style=\"font-size: 14px; color: var(--primary-color, #1890ff)\"></nz-icon>\n <strong style=\"font-size: 13px\">{{ title }}</strong>\n <nz-tag nzColor=\"blue\" class=\"att-mini-tag\">{{ attachments().length }}</nz-tag>\n </div>\n\n @if (!readonly) {\n <div nz-flex nzAlign=\"center\" [nzGap]=\"4\">\n <button\n type=\"button\"\n nz-button\n nzType=\"primary\"\n nzSize=\"small\"\n [nzLoading]=\"loading()\"\n (click)=\"attFileInput.click()\"\n >\n <nz-icon nzType=\"cloud-upload\"></nz-icon> T\u1EA3i l\u00EAn\n </button>\n @if (allowPickFromDrive) {\n <button type=\"button\" nz-button nzType=\"default\" nzSize=\"small\" (click)=\"pickerDrawerVisible = true\">\n <nz-icon nzType=\"folder-open\"></nz-icon> Drive\n </button>\n }\n @if (recordFolder() && allowShareFolder) {\n <button\n type=\"button\"\n nz-button\n nzType=\"dashed\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Ph\u00E2n quy\u1EC1n th\u01B0 m\u1EE5c h\u1ED3 s\u01A1\"\n (click)=\"openShareForNode(recordFolder()!)\"\n >\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n </div>\n }\n </div>\n\n @if (attachments().length === 0) {\n <div class=\"att-compact-empty-multi\" [class.clickable]=\"!readonly\" (click)=\"!readonly && attFileInput.click()\">\n <nz-icon nzType=\"inbox\"></nz-icon>\n <span>{{\n placeholder || (readonly ? \"Ch\u01B0a c\u00F3 t\u00E0i li\u1EC7u \u0111\u00EDnh k\u00E8m.\" : \"K\u00E9o th\u1EA3 t\u1EC7p v\u00E0o \u0111\u00E2y ho\u1EB7c b\u1EA5m 'T\u1EA3i l\u00EAn'\")\n }}</span>\n </div>\n } @else {\n <div class=\"att-compact-list\" [style.max-height]=\"maxCompactListHeight\">\n @for (item of attachments(); track item.Id; let idx = $index) {\n <div class=\"att-compact-row\">\n <div class=\"att-compact-file-info\">\n <span class=\"att-compact-index\">{{ idx + 1 }}.</span>\n <nz-icon [nzType]=\"getFileIcon(item)\" class=\"att-compact-file-icon\"></nz-icon>\n <a\n class=\"att-compact-filename link-detail\"\n nz-tooltip\n [nzTooltipTitle]=\"item.Name + ' \u2022 ' + (item.SizeBytes | formatBytes)\"\n (click)=\"previewItem(item)\"\n >\n {{ item.Name }}\n </a>\n <span class=\"att-compact-meta\">{{ item.SizeBytes | formatBytes }}</span>\n @if (item.NodeType === DriveNodeType.Shortcut) {\n <nz-tag nzColor=\"purple\" class=\"att-mini-tag\">L\u1ED1i t\u1EAFt</nz-tag>\n }\n </div>\n\n <div class=\"att-compact-actions\" nz-flex nzAlign=\"center\" [nzGap]=\"2\">\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Xem tr\u1EF1c tuy\u1EBFn\"\n (click)=\"previewItem(item)\"\n >\n <nz-icon nzType=\"eye\"></nz-icon>\n </button>\n @if (item.CanDownload) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"T\u1EA3i xu\u1ED1ng\"\n (click)=\"downloadItem(item)\"\n >\n <nz-icon nzType=\"download\"></nz-icon>\n </button>\n }\n @if (!readonly && item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n\"\n (click)=\"openVersionForNode(item)\"\n >\n <nz-icon nzType=\"history\"></nz-icon>\n </button>\n }\n @if (!readonly && (item.CanShare || item.EffectiveAccess >= DriveAccessLevel.Manager)) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Chia s\u1EBB & Ph\u00E2n quy\u1EC1n\"\n (click)=\"openShareForNode(item)\"\n >\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n @if (!readonly) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"G\u1EE1 t\u00E0i li\u1EC7u \u0111\u00EDnh k\u00E8m (Chuy\u1EC3n v\u00E0o th\u00F9ng r\u00E1c)\"\n (click)=\"removeAttachment(item, $event)\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n </div>\n </div>\n }\n </div>\n }\n }\n\n <!-- ========================================================================== -->\n <!-- CH\u1EBE \u0110\u1ED8 3: PHI\u00CAN B\u1EA2N \u0110\u1EA6Y \u0110\u1EE6 M\u1EB6C \u0110\u1ECANH (FULL TABLE MODE) -->\n <!-- ========================================================================== -->\n @else {\n <div class=\"att-header\" nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-icon nzType=\"paper-clip\" style=\"font-size: 16px; color: var(--primary-color, #1890ff)\"></nz-icon>\n <strong>{{ title }}</strong>\n <nz-tag nzColor=\"blue\">\n {{ attachments().length }} t\u1EC7p{{ isSingleFileMode ? \" (T\u1ED1i \u0111a 1)\" : \"\" }}\n </nz-tag>\n @if (recordFolder(); as rf) {\n <nz-tag nzColor=\"cyan\" nz-tooltip [nzTooltipTitle]=\"'Th\u01B0 m\u1EE5c l\u01B0u tr\u1EEF tr\u00EAn Drive: ' + rf.Name\">\n <nz-icon nzType=\"folder\"></nz-icon> {{ rf.Name }}\n </nz-tag>\n }\n </div>\n\n @if (!readonly) {\n <div nz-flex nzAlign=\"center\" [nzGap]=\"6\">\n <button\n type=\"button\"\n nz-button\n nzType=\"primary\"\n nzSize=\"small\"\n [nzLoading]=\"loading()\"\n (click)=\"attFileInput.click()\"\n >\n <nz-icon nzType=\"cloud-upload\"></nz-icon>\n {{ isSingleFileMode && attachments().length > 0 ? \"\u0110\u1ED5i t\u1EADp tin kh\u00E1c\" : \"T\u1EA3i t\u1EADp tin l\u00EAn\" }}\n </button>\n @if (allowPickFromDrive) {\n <button type=\"button\" nz-button nzType=\"default\" nzSize=\"small\" (click)=\"pickerDrawerVisible = true\">\n <nz-icon nzType=\"folder-open\"></nz-icon> Ch\u1ECDn t\u1EEB Drive\n </button>\n }\n @if (recordFolder() && allowShareFolder) {\n <button\n type=\"button\"\n nz-button\n nzType=\"dashed\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Ph\u00E2n quy\u1EC1n truy c\u1EADp th\u01B0 m\u1EE5c h\u1ED3 s\u01A1 n\u00E0y\"\n (click)=\"openShareForNode(recordFolder()!)\"\n >\n <nz-icon nzType=\"share-alt\"></nz-icon> Ph\u00E2n quy\u1EC1n h\u1ED3 s\u01A1\n </button>\n }\n </div>\n }\n </div>\n\n <!-- DANH S\u00C1CH T\u1EACP TIN \u0110\u00CDNH K\u00C8M (FULL TABLE) -->\n @if (attachments().length === 0) {\n <div class=\"att-empty-zone\" (click)=\"!readonly && attFileInput.click()\">\n <nz-icon nzType=\"inbox\" style=\"font-size: 28px; color: var(--primary-color, #1890ff)\"></nz-icon>\n <div style=\"font-size: 13px; margin-top: 4px\">\n {{\n readonly\n ? \"Ch\u01B0a c\u00F3 t\u00E0i li\u1EC7u \u0111\u00EDnh k\u00E8m.\"\n : \"K\u00E9o th\u1EA3 t\u1EADp tin v\u00E0o \u0111\u00E2y, b\u1EA5m \u0111\u1EC3 t\u1EA3i l\u00EAn ho\u1EB7c ch\u1ECDn t\u1EEB kho Drive\"\n }}\n </div>\n </div>\n } @else {\n <nz-table\n #attTable\n [nzData]=\"attachments()\"\n [nzLoading]=\"loading()\"\n nzSize=\"small\"\n [nzBordered]=\"true\"\n [nzFrontPagination]=\"false\"\n [nzShowPagination]=\"false\"\n >\n <thead>\n <tr>\n <th nzWidth=\"42px\" class=\"text-center\">#</th>\n <th>T\u00EAn t\u00E0i li\u1EC7u</th>\n <th nzWidth=\"105px\" class=\"text-right\">K\u00EDch th\u01B0\u1EDBc</th>\n <th nzWidth=\"135px\">Ng\u01B0\u1EDDi t\u1EA3i</th>\n <th nzWidth=\"135px\" class=\"text-center\">Ng\u00E0y c\u1EADp nh\u1EADt</th>\n <th nzWidth=\"150px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (item of attTable.data; track item.Id; let idx = $index) {\n <tr>\n <td class=\"text-center\">{{ idx + 1 }}</td>\n <td>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-icon\n [nzType]=\"getFileIcon(item)\"\n style=\"font-size: 17px; color: var(--primary-color, #1890ff)\"\n ></nz-icon>\n <a class=\"link-detail\" style=\"font-weight: 500\" (click)=\"previewItem(item)\">{{ item.Name }}</a>\n @if (item.NodeType === DriveNodeType.Shortcut) {\n <nz-tag nzColor=\"purple\">L\u1ED1i t\u1EAFt Drive</nz-tag>\n }\n </div>\n </td>\n <td class=\"text-right\">{{ item.SizeBytes | formatBytes }}</td>\n <td>{{ item.OwnerName || item.UpdatedUser || item.OwnerId }}</td>\n <td class=\"text-center\">{{ item.UpdatedDate | date: \"dd/MM/yyyy HH:mm\" }}</td>\n <td class=\"text-center\">\n <div nz-flex nzJustify=\"center\" [nzGap]=\"4\">\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Xem tr\u1EF1c tuy\u1EBFn\"\n (click)=\"previewItem(item)\"\n >\n <nz-icon nzType=\"eye\"></nz-icon>\n </button>\n @if (item.CanDownload) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"T\u1EA3i xu\u1ED1ng\"\n (click)=\"downloadItem(item)\"\n >\n <nz-icon nzType=\"download\"></nz-icon>\n </button>\n }\n @if (!readonly && item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n (v1, v2...)\"\n (click)=\"openVersionForNode(item)\"\n >\n <nz-icon nzType=\"history\"></nz-icon>\n </button>\n }\n @if (!readonly && (item.CanShare || item.EffectiveAccess >= DriveAccessLevel.Manager)) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Chia s\u1EBB & Ph\u00E2n quy\u1EC1n\"\n (click)=\"openShareForNode(item)\"\n >\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n @if (!readonly) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"G\u1EE1 t\u00E0i li\u1EC7u \u0111\u00EDnh k\u00E8m (Chuy\u1EC3n v\u00E0o th\u00F9ng r\u00E1c)\"\n (click)=\"removeAttachment(item, $event)\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n </div>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n }\n }\n</div>\n\n<!-- DRAWER CH\u1ECCN T\u1EEA KHO DRIVE -->\n<nz-drawer\n [nzVisible]=\"pickerDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"820\"\n nzTitle=\"Ch\u1ECDn t\u00E0i li\u1EC7u t\u1EEB Kho Drive\"\n (nzOnClose)=\"pickerDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n <lib-drive-picker\n [selectMode]=\"'file'\"\n [multiple]=\"!isSingleFileMode\"\n [acceptExtensions]=\"acceptExtensions\"\n (confirmed)=\"onPickedFromDrive($event)\"\n (cancelled)=\"pickerDrawerVisible = false\"\n ></lib-drive-picker>\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER XEM TR\u1EF0C TUY\u1EBEN -->\n<nz-drawer\n [nzVisible]=\"previewDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"'75vw'\"\n [nzBodyStyle]=\"{ padding: '0', height: '100%', display: 'flex', flexDirection: 'column', overflow: 'hidden' }\"\n [nzTitle]=\"previewTitle\"\n (nzOnClose)=\"previewDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n <div class=\"drive-preview-body-fill no-drawer-footer\">\n <extend-view-file-content [previewType]=\"previewType\" [previewContent]=\"previewContent\"></extend-view-file-content>\n </div>\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER L\u1ECACH S\u1EEC PHI\u00CAN B\u1EA2N -->\n<nz-drawer\n [nzVisible]=\"versionDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"740\"\n [nzTitle]=\"'L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n: ' + (activeNode()?.Name || '')\"\n (nzOnClose)=\"versionDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n @if (activeNode(); as node) {\n <lib-drive-version-modal\n [nodeId]=\"node.ShortcutTargetId || node.Id\"\n [nodeName]=\"node.Name\"\n [canEdit]=\"!readonly\"\n [canDownload]=\"node.CanDownload\"\n (closed)=\"versionDrawerVisible = false; reloadAttachments()\"\n ></lib-drive-version-modal>\n }\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER CHIA S\u1EBA & PH\u00C2N QUY\u1EC0N -->\n<nz-drawer\n [nzVisible]=\"shareDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"920\"\n [nzTitle]=\"'Chia s\u1EBB & Ph\u00E2n quy\u1EC1n: ' + (activeNode()?.Name || '')\"\n (nzOnClose)=\"shareDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n @if (activeNode(); as node) {\n <lib-drive-share-modal [nodeId]=\"node.ShortcutTargetId || node.Id\"></lib-drive-share-modal>\n }\n </ng-container>\n</nz-drawer>\n", styles: ["@charset \"UTF-8\";.drive-attachment-box{border:1px solid var(--app-border, #e2e8f0);border-radius:8px;padding:12px;background:var(--app-container-bg, #ffffff);display:flex;flex-direction:column;gap:10px;transition:border-color .15s,background .15s}.drive-attachment-box.drag-active{border:2px dashed var(--primary-color, #1890ff);background:color-mix(in srgb,var(--primary-color, #1890ff) 6%,transparent)}.att-empty-zone{border:1px dashed var(--app-border, #cbd5e1);border-radius:6px;padding:20px;text-align:center;cursor:pointer;color:var(--app-text-muted, #64748b)}.att-empty-zone:hover{border-color:var(--primary-color, #1890ff)}.drive-attachment-box.drive-attachment-compact{padding:6px 10px;border-radius:6px;gap:6px}.drive-attachment-box.drive-attachment-compact.drive-attachment-single{padding:4px 8px;min-height:36px;justify-content:center}.att-compact-single-empty,.att-compact-single-card{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-width:0}.att-compact-empty-trigger{display:flex;align-items:center;gap:6px;min-width:0;flex:1;color:var(--app-text-muted, #64748b);font-size:12.5px;overflow:hidden}.att-compact-empty-trigger.clickable{cursor:pointer}.att-compact-empty-trigger.clickable:hover .att-compact-placeholder{color:var(--primary-color, #1890ff)}.att-compact-clip-icon{font-size:14px;color:var(--primary-color, #1890ff);flex-shrink:0}.att-compact-placeholder{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.att-compact-file-info{display:flex;align-items:center;gap:6px;min-width:0;flex:1;overflow:hidden}.att-compact-index{font-size:12px;color:var(--app-text-muted, #64748b);flex-shrink:0}.att-compact-file-icon{font-size:16px;color:var(--primary-color, #1890ff);flex-shrink:0}.att-compact-filename{font-size:13px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.att-compact-meta{font-size:11.5px;color:var(--app-text-muted, #64748b);white-space:nowrap;flex-shrink:0}.att-compact-actions{flex-shrink:0}.att-mini-tag{margin:0;font-size:11px;line-height:16px;padding:0 5px;flex-shrink:0}.att-compact-header{padding-bottom:4px;border-bottom:1px dashed var(--app-border, #e2e8f0)}.att-compact-empty-multi{display:flex;align-items:center;justify-content:center;gap:6px;padding:8px;border:1px dashed var(--app-border, #cbd5e1);border-radius:5px;font-size:12.5px;color:var(--app-text-muted, #64748b)}.att-compact-empty-multi.clickable{cursor:pointer}.att-compact-empty-multi.clickable:hover{border-color:var(--primary-color, #1890ff);color:var(--primary-color, #1890ff)}.att-compact-list{display:flex;flex-direction:column;gap:4px;overflow-y:auto}.att-compact-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:3px 6px;border-radius:4px;background:var(--app-surface-subtle, #f8fafc);border:1px solid transparent;transition:background .12s,border-color .12s}.att-compact-row:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 5%,#f8fafc);border-color:color-mix(in srgb,var(--primary-color, #1890ff) 25%,transparent)}.drive-preview-body-fill{--drive-preview-fill-height: calc(100vh - 103px) ;display:flex;flex-direction:column;flex:1 1 auto;width:100%;height:100%;min-height:var(--drive-preview-fill-height);overflow:hidden}.drive-preview-body-fill.no-drawer-footer{--drive-preview-fill-height: calc(100vh - 55px) }.drive-preview-body-fill ::ng-deep extend-view-file-content{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;width:100%!important;height:100%!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important}.drive-preview-body-fill ::ng-deep extend-view-file-content>*:not(style):not(script),.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer>div,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .html,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .ink-switch-box,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .zoom,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer #outerContainer,.drive-preview-body-fill ::ng-deep extend-view-file-content pdf-viewer,.drive-preview-body-fill ::ng-deep extend-view-file-content iframe,.drive-preview-body-fill ::ng-deep extend-view-file-content embed,.drive-preview-body-fill ::ng-deep extend-view-file-content object{display:block!important;flex:1 1 auto!important;width:100%!important;height:var(--drive-preview-fill-height)!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important}.drive-preview-body-fill ::ng-deep extend-view-file-content pre{flex:1 1 auto!important;width:100%!important;height:var(--drive-preview-fill-height)!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important;margin:0!important;padding:16px!important;overflow:auto!important;box-sizing:border-box!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: NzFlexModule }, { kind: "directive", type: i3$4.NzFlexDirective, selector: "[nz-flex],nz-flex", inputs: ["nzVertical", "nzJustify", "nzAlign", "nzGap", "nzWrap", "nzFlex"], exportAs: ["nzFlex"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i6.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "directive", type: i6.NzTableCellDirective, selector: "th:not(.nz-disable-th):not([mat-cell]), td:not(.nz-disable-td):not([mat-cell])" }, { kind: "directive", type: i6.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i6.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i6.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i6.NzTrDirective, selector: "tr:not([mat-row]):not([mat-header-row]):not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i2$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i3$3.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i4$1.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i1$2.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzTagModule }, { kind: "component", type: i11.NzTagComponent, selector: "nz-tag", inputs: ["nzMode", "nzColor", "nzChecked", "nzBordered"], outputs: ["nzOnClose", "nzCheckedChange"], exportAs: ["nzTag"] }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "directive", type: i8.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "ngmodule", type: NzDrawerModule }, { kind: "component", type: i14.NzDrawerComponent, selector: "nz-drawer", inputs: ["nzContent", "nzCloseIcon", "nzClosable", "nzMaskClosable", "nzMask", "nzCloseOnNavigation", "nzNoAnimation", "nzKeyboard", "nzTitle", "nzExtra", "nzFooter", "nzPlacement", "nzSize", "nzMaskStyle", "nzBodyStyle", "nzWrapClassName", "nzWidth", "nzHeight", "nzZIndex", "nzOffsetX", "nzOffsetY", "nzVisible"], outputs: ["nzOnViewInit", "nzOnClose", "nzVisibleChange"], exportAs: ["nzDrawer"] }, { kind: "directive", type: i14.NzDrawerContentDirective, selector: "[nzDrawerContent]", exportAs: ["nzDrawerContent"] }, { kind: "ngmodule", type: NzEmptyModule }, { kind: "pipe", type: FormatBytesPipe, name: "formatBytes" }, { kind: "component", type: ExtendViewFileContentComponent, selector: "extend-view-file-content", inputs: ["previewType", "previewContent"] }, { kind: "component", type: DriveShareModalComponent, selector: "lib-drive-share-modal", inputs: ["nodeId", "hideInheritanceToggle"] }, { kind: "component", type: DriveVersionModalComponent, selector: "lib-drive-version-modal", inputs: ["nodeId", "nodeName", "canEdit", "canDownload"], outputs: ["closed"] }, { kind: "component", type: DrivePickerComponent, selector: "lib-drive-picker", inputs: ["selectMode", "multiple", "acceptExtensions", "allowUploadNew", "initialScope"], outputs: ["confirmed", "cancelled"] }] });
|
|
10363
10528
|
}
|
|
10364
10529
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: DriveAttachmentBoxComponent, decorators: [{
|
|
10365
10530
|
type: Component,
|
|
@@ -33246,6 +33411,7 @@ class DriveExplorerStateBase extends BaseComponent {
|
|
|
33246
33411
|
drawerPlacement = 'right';
|
|
33247
33412
|
// Trạng thái mở các Drawer thao tác Folder / File
|
|
33248
33413
|
shareDrawerVisible = false;
|
|
33414
|
+
shareDrawerHideInheritance = false;
|
|
33249
33415
|
versionDrawerVisible = false;
|
|
33250
33416
|
folderDrawerVisible = false;
|
|
33251
33417
|
folderDrawerMode = 'create';
|
|
@@ -33289,14 +33455,14 @@ class DriveExplorerStateBase extends BaseComponent {
|
|
|
33289
33455
|
copyTargetSpaceKey = 'MY_DRIVE';
|
|
33290
33456
|
copyTargetFolderId = null;
|
|
33291
33457
|
copyCustomName = '';
|
|
33292
|
-
// Trạng thái Drawer tạo/cấu hình Mục tùy chỉnh
|
|
33458
|
+
// Trạng thái Drawer tạo/cấu hình Mục tùy chỉnh & Tài liệu Đơn vị
|
|
33293
33459
|
customSpaceDrawerVisible = false;
|
|
33294
33460
|
customSpaceDrawerMode = 'create';
|
|
33295
33461
|
editingCustomSpace = null;
|
|
33296
33462
|
customSpaceName = '';
|
|
33297
33463
|
customSpaceIcon = 'project';
|
|
33298
33464
|
customSpaceVisibleToAll = false;
|
|
33299
|
-
customSpaceDefaultAccessLevel = DriveAccessLevel.
|
|
33465
|
+
customSpaceDefaultAccessLevel = DriveAccessLevel.Downloader;
|
|
33300
33466
|
// ==================== TRẠNG THÁI CÂY THƯ MỤC BÊN TRÁI (SIDEBAR FOLDER TREE) ====================
|
|
33301
33467
|
/** Bật / Tắt hiển thị Cây thư mục trực tiếp trên cột Sidebar bên trái (Lưu lựa chọn vào localStorage) */
|
|
33302
33468
|
showSidebarTree = signal(this.readSidebarStorageFlag('DRIVE_SHOW_SIDEBAR_TREE', true));
|
|
@@ -34026,7 +34192,7 @@ class DriveExplorerNavigationBase extends DriveExplorerStateBase {
|
|
|
34026
34192
|
return result;
|
|
34027
34193
|
}
|
|
34028
34194
|
async syncSidebarTreeWithCurrentExplorerState() {
|
|
34029
|
-
if (!this.showSidebarTree())
|
|
34195
|
+
if (!this.showSidebarTree() || this.drive.loading())
|
|
34030
34196
|
return;
|
|
34031
34197
|
const spaceKey = this.getCurrentSidebarSpaceKey();
|
|
34032
34198
|
if (!spaceKey)
|
|
@@ -34047,7 +34213,10 @@ class DriveExplorerNavigationBase extends DriveExplorerStateBase {
|
|
|
34047
34213
|
if (hasNoSearchFilter && isCompletePage) {
|
|
34048
34214
|
const currentFolders = sortDriveNodesList(this.drive
|
|
34049
34215
|
.items()
|
|
34050
|
-
.filter((x) => this.isFolderLike(x) &&
|
|
34216
|
+
.filter((x) => this.isFolderLike(x) &&
|
|
34217
|
+
!x.IsDeleted &&
|
|
34218
|
+
!x.IsBrokenShortcut &&
|
|
34219
|
+
(spaceKey !== 'MY_DRIVE' || !x.IsOrgNode)), 'Name', false);
|
|
34051
34220
|
if (isAtSpaceRoot) {
|
|
34052
34221
|
this.sidebarTreeChildrenMap.update((prev) => ({
|
|
34053
34222
|
...prev,
|
|
@@ -34237,44 +34406,123 @@ class DriveExplorerNavigationBase extends DriveExplorerStateBase {
|
|
|
34237
34406
|
collapseAllTreeFolders() {
|
|
34238
34407
|
this.expandedTreeFolderIds.set(new Set());
|
|
34239
34408
|
}
|
|
34240
|
-
// ==================== CUSTOM SPACES DRAWER (DRAWER 10) ====================
|
|
34409
|
+
// ==================== ORG DRIVE & CUSTOM SPACES CONFIG + PERMISSIONS DRAWER (DRAWER 10) ====================
|
|
34410
|
+
async openOrgDriveSpaceDrawer() {
|
|
34411
|
+
try {
|
|
34412
|
+
let orgSpace = this.drive.orgDriveSpace();
|
|
34413
|
+
if (!orgSpace || !orgSpace.Id) {
|
|
34414
|
+
orgSpace = await this.drive.getOrgDriveSpace();
|
|
34415
|
+
}
|
|
34416
|
+
if (!orgSpace) {
|
|
34417
|
+
this.error('Không thể tải thông tin cấu hình Tài liệu Đơn vị.');
|
|
34418
|
+
return;
|
|
34419
|
+
}
|
|
34420
|
+
this.customSpaceDrawerMode = 'org_root';
|
|
34421
|
+
this.editingCustomSpace = orgSpace;
|
|
34422
|
+
this.customSpaceName = orgSpace.Name || 'Tài liệu Đơn vị';
|
|
34423
|
+
this.customSpaceIcon = orgSpace.Icon || 'apartment';
|
|
34424
|
+
const orgDefLv = orgSpace.DefaultAccessLevel !== undefined && orgSpace.DefaultAccessLevel !== null
|
|
34425
|
+
? orgSpace.DefaultAccessLevel
|
|
34426
|
+
: DriveAccessLevel.Downloader;
|
|
34427
|
+
this.customSpaceVisibleToAll =
|
|
34428
|
+
orgSpace.IsVisibleToAllUsers !== false && orgDefLv > DriveAccessLevel.None;
|
|
34429
|
+
this.customSpaceDefaultAccessLevel =
|
|
34430
|
+
orgSpace.IsVisibleToAllUsers !== false ? orgDefLv : DriveAccessLevel.None;
|
|
34431
|
+
this.customSpaceDrawerVisible = true;
|
|
34432
|
+
}
|
|
34433
|
+
catch (err) {
|
|
34434
|
+
this.handleError(err);
|
|
34435
|
+
}
|
|
34436
|
+
}
|
|
34241
34437
|
openCustomSpaceDrawer(mode, space) {
|
|
34242
34438
|
this.customSpaceDrawerMode = mode;
|
|
34243
34439
|
this.editingCustomSpace = space || null;
|
|
34244
34440
|
if (mode === 'edit' && space) {
|
|
34245
34441
|
this.customSpaceName = space.Name;
|
|
34246
34442
|
this.customSpaceIcon = space.Icon || 'project';
|
|
34247
|
-
|
|
34248
|
-
|
|
34443
|
+
const hasDefaultLv = space.DefaultAccessLevel !== undefined && space.DefaultAccessLevel !== null
|
|
34444
|
+
? space.DefaultAccessLevel
|
|
34445
|
+
: DriveAccessLevel.Downloader;
|
|
34446
|
+
this.customSpaceVisibleToAll = !!space.IsVisibleToAllUsers && hasDefaultLv > DriveAccessLevel.None;
|
|
34447
|
+
this.customSpaceDefaultAccessLevel = space.IsVisibleToAllUsers
|
|
34448
|
+
? hasDefaultLv
|
|
34449
|
+
: DriveAccessLevel.None;
|
|
34249
34450
|
}
|
|
34250
34451
|
else {
|
|
34251
34452
|
this.customSpaceName = 'Tài liệu dự án';
|
|
34252
34453
|
this.customSpaceIcon = 'project';
|
|
34253
|
-
this.customSpaceVisibleToAll =
|
|
34254
|
-
this.customSpaceDefaultAccessLevel = DriveAccessLevel.
|
|
34454
|
+
this.customSpaceVisibleToAll = true;
|
|
34455
|
+
this.customSpaceDefaultAccessLevel = DriveAccessLevel.Downloader;
|
|
34255
34456
|
}
|
|
34256
34457
|
this.customSpaceDrawerVisible = true;
|
|
34257
34458
|
}
|
|
34459
|
+
onCustomSpaceVisibleToAllChange(visible) {
|
|
34460
|
+
this.customSpaceVisibleToAll = visible;
|
|
34461
|
+
if (!visible) {
|
|
34462
|
+
this.customSpaceDefaultAccessLevel = DriveAccessLevel.None;
|
|
34463
|
+
}
|
|
34464
|
+
else if (this.customSpaceDefaultAccessLevel === undefined ||
|
|
34465
|
+
this.customSpaceDefaultAccessLevel === null ||
|
|
34466
|
+
this.customSpaceDefaultAccessLevel === DriveAccessLevel.None) {
|
|
34467
|
+
this.customSpaceDefaultAccessLevel = DriveAccessLevel.Downloader;
|
|
34468
|
+
}
|
|
34469
|
+
}
|
|
34470
|
+
onCustomSpaceDefaultAccessChange(level) {
|
|
34471
|
+
this.customSpaceDefaultAccessLevel = level;
|
|
34472
|
+
this.customSpaceVisibleToAll = level > DriveAccessLevel.None;
|
|
34473
|
+
}
|
|
34258
34474
|
async submitCustomSpaceDrawer() {
|
|
34475
|
+
if (this.customSpaceDrawerMode === 'org_root') {
|
|
34476
|
+
try {
|
|
34477
|
+
const payload = {
|
|
34478
|
+
Name: 'Tài liệu Đơn vị',
|
|
34479
|
+
Icon: 'apartment',
|
|
34480
|
+
IsVisibleToAllUsers: this.customSpaceVisibleToAll,
|
|
34481
|
+
DefaultAccessLevel: this.customSpaceDefaultAccessLevel !== undefined && this.customSpaceDefaultAccessLevel !== null
|
|
34482
|
+
? this.customSpaceDefaultAccessLevel
|
|
34483
|
+
: DriveAccessLevel.Downloader,
|
|
34484
|
+
};
|
|
34485
|
+
const res = await this.drive.updateOrgDriveSpace(payload);
|
|
34486
|
+
if (res.IsSuccess) {
|
|
34487
|
+
this.success('Đã lưu cấu hình quyền mặc định của "Tài liệu Đơn vị".');
|
|
34488
|
+
}
|
|
34489
|
+
else {
|
|
34490
|
+
this.error(res.ErrorMessage);
|
|
34491
|
+
}
|
|
34492
|
+
}
|
|
34493
|
+
catch (err) {
|
|
34494
|
+
this.handleError(err);
|
|
34495
|
+
}
|
|
34496
|
+
return;
|
|
34497
|
+
}
|
|
34259
34498
|
const name = this.customSpaceName.trim();
|
|
34260
34499
|
if (!name) {
|
|
34261
34500
|
this.warning('Vui lòng nhập tên mục tùy chỉnh (ví dụ: Tài liệu dự án).');
|
|
34262
34501
|
return;
|
|
34263
34502
|
}
|
|
34264
34503
|
try {
|
|
34504
|
+
const effectiveDefLevel = this.customSpaceDefaultAccessLevel !== undefined && this.customSpaceDefaultAccessLevel !== null
|
|
34505
|
+
? this.customSpaceDefaultAccessLevel
|
|
34506
|
+
: DriveAccessLevel.Downloader;
|
|
34507
|
+
const effectiveVisibleToAll = this.customSpaceVisibleToAll && effectiveDefLevel > DriveAccessLevel.None;
|
|
34265
34508
|
const payload = {
|
|
34266
34509
|
Name: name,
|
|
34267
34510
|
Icon: this.customSpaceIcon || 'project',
|
|
34268
|
-
IsVisibleToAllUsers:
|
|
34269
|
-
DefaultAccessLevel:
|
|
34511
|
+
IsVisibleToAllUsers: effectiveVisibleToAll,
|
|
34512
|
+
DefaultAccessLevel: effectiveVisibleToAll ? effectiveDefLevel : DriveAccessLevel.None,
|
|
34270
34513
|
};
|
|
34271
34514
|
if (this.customSpaceDrawerMode === 'create') {
|
|
34272
34515
|
const res = await this.drive.createCustomSpace(payload);
|
|
34273
34516
|
if (res.IsSuccess) {
|
|
34274
34517
|
this.success(`Đã thêm mục "${name}" bên dưới Tài liệu Đơn vị.`);
|
|
34275
|
-
this.customSpaceDrawerVisible = false;
|
|
34276
34518
|
if (res.Data?.Id) {
|
|
34277
|
-
|
|
34519
|
+
const createdSpace = res.Data;
|
|
34520
|
+
this.editingCustomSpace = createdSpace;
|
|
34521
|
+
this.customSpaceDrawerMode = 'edit';
|
|
34522
|
+
this.switchCustomSpace(createdSpace);
|
|
34523
|
+
}
|
|
34524
|
+
else {
|
|
34525
|
+
this.customSpaceDrawerVisible = false;
|
|
34278
34526
|
}
|
|
34279
34527
|
}
|
|
34280
34528
|
else {
|
|
@@ -34284,9 +34532,9 @@ class DriveExplorerNavigationBase extends DriveExplorerStateBase {
|
|
|
34284
34532
|
else if (this.editingCustomSpace) {
|
|
34285
34533
|
const res = await this.drive.updateCustomSpace(this.editingCustomSpace.Id, payload);
|
|
34286
34534
|
if (res.IsSuccess) {
|
|
34287
|
-
this.success(`Đã
|
|
34288
|
-
this.customSpaceDrawerVisible = false;
|
|
34535
|
+
this.success(`Đã lưu cấu hình mục "${name}".`);
|
|
34289
34536
|
this.updateHeaderBreadcrumb();
|
|
34537
|
+
await this.refreshSidebarTreeAfterMutation();
|
|
34290
34538
|
}
|
|
34291
34539
|
else {
|
|
34292
34540
|
this.error(res.ErrorMessage);
|
|
@@ -35025,7 +35273,7 @@ class DriveExplorerDragDropBase extends DriveExplorerTemplatesBase {
|
|
|
35025
35273
|
}
|
|
35026
35274
|
onMainDragOver(event) {
|
|
35027
35275
|
if (this.draggedTemplate()) {
|
|
35028
|
-
if (!this.drive.
|
|
35276
|
+
if (!this.drive.canEditCurrentFolder())
|
|
35029
35277
|
return;
|
|
35030
35278
|
event.preventDefault();
|
|
35031
35279
|
if (event.dataTransfer)
|
|
@@ -35059,8 +35307,8 @@ class DriveExplorerDragDropBase extends DriveExplorerTemplatesBase {
|
|
|
35059
35307
|
event.preventDefault();
|
|
35060
35308
|
event.stopPropagation();
|
|
35061
35309
|
this.resetDragState();
|
|
35062
|
-
if (!this.drive.
|
|
35063
|
-
this.warning('Bạn
|
|
35310
|
+
if (!this.drive.canEditCurrentFolder()) {
|
|
35311
|
+
this.warning('Bạn cần quyền từ mức Chỉnh sửa (Editor) trở lên để tạo cây thư mục tại vị trí này.');
|
|
35064
35312
|
return;
|
|
35065
35313
|
}
|
|
35066
35314
|
await this.applyTemplateToTargetFolder(draggedTpl, this.drive.currentFolderId());
|
|
@@ -35122,7 +35370,7 @@ class DriveExplorerDragDropBase extends DriveExplorerTemplatesBase {
|
|
|
35122
35370
|
}
|
|
35123
35371
|
onSidebarTreeNodeDragOver(event, vm) {
|
|
35124
35372
|
if (this.draggedTemplate()) {
|
|
35125
|
-
if (vm.node.EffectiveAccess < DriveAccessLevel.
|
|
35373
|
+
if (vm.node.EffectiveAccess < DriveAccessLevel.Editor)
|
|
35126
35374
|
return;
|
|
35127
35375
|
event.preventDefault();
|
|
35128
35376
|
event.stopPropagation();
|
|
@@ -35359,7 +35607,7 @@ class DriveExplorerDragDropBase extends DriveExplorerTemplatesBase {
|
|
|
35359
35607
|
if (this.draggedTemplate()) {
|
|
35360
35608
|
if (!this.isFolderLike(targetItem) || targetItem.IsBrokenShortcut)
|
|
35361
35609
|
return;
|
|
35362
|
-
if (targetItem.EffectiveAccess < DriveAccessLevel.
|
|
35610
|
+
if (targetItem.EffectiveAccess < DriveAccessLevel.Editor)
|
|
35363
35611
|
return;
|
|
35364
35612
|
event.preventDefault();
|
|
35365
35613
|
if (event.dataTransfer)
|
|
@@ -35580,6 +35828,10 @@ class DriveExplorerDragDropBase extends DriveExplorerTemplatesBase {
|
|
|
35580
35828
|
return 0;
|
|
35581
35829
|
}
|
|
35582
35830
|
if (entry.isDirectory) {
|
|
35831
|
+
if (!this.drive.canEditCurrentFolder()) {
|
|
35832
|
+
this.warning("Quyền 'Xem & Tải lên' chỉ được phép tải tập tin lên, không được tạo thư mục mới.");
|
|
35833
|
+
return 0;
|
|
35834
|
+
}
|
|
35583
35835
|
let createdFolderId = null;
|
|
35584
35836
|
try {
|
|
35585
35837
|
const res = await this.drive.createFolder(entry.name, parentFolderId);
|
|
@@ -35727,9 +35979,10 @@ class DriveExplorerDrawersBase extends DriveExplorerDragDropBase {
|
|
|
35727
35979
|
}
|
|
35728
35980
|
}
|
|
35729
35981
|
// ==================== SHARE (DRAWER 1), VERSION (DRAWER 2) & SHORTCUT (DRAWER 5) ====================
|
|
35730
|
-
openShareDrawer(item) {
|
|
35982
|
+
openShareDrawer(item, hideInheritance = false) {
|
|
35731
35983
|
this.selectActiveItem(item);
|
|
35732
35984
|
this.activeActionNode.set(item);
|
|
35985
|
+
this.shareDrawerHideInheritance = hideInheritance;
|
|
35733
35986
|
this.shareDrawerVisible = true;
|
|
35734
35987
|
}
|
|
35735
35988
|
openVersionDrawer(item) {
|
|
@@ -36268,6 +36521,10 @@ class DriveExplorerDrawersBase extends DriveExplorerDragDropBase {
|
|
|
36268
36521
|
}
|
|
36269
36522
|
async onPermanentDelete(item) {
|
|
36270
36523
|
this.selectActiveItem(item);
|
|
36524
|
+
if (!this.drive.allowDeleteFromTrash()) {
|
|
36525
|
+
this.warning('Hệ thống đã khóa chức năng xóa vĩnh viễn dữ liệu từ thùng rác theo cấu hình an toàn dữ liệu.');
|
|
36526
|
+
return;
|
|
36527
|
+
}
|
|
36271
36528
|
if (!(await this.confirm(`Xóa vĩnh viễn "${item.Name}"? Hành động này không thể hoàn tác!`)))
|
|
36272
36529
|
return;
|
|
36273
36530
|
try {
|
|
@@ -36286,6 +36543,10 @@ class DriveExplorerDrawersBase extends DriveExplorerDragDropBase {
|
|
|
36286
36543
|
}
|
|
36287
36544
|
}
|
|
36288
36545
|
async onBulkPermanentDelete() {
|
|
36546
|
+
if (!this.drive.allowDeleteFromTrash()) {
|
|
36547
|
+
this.warning('Hệ thống đã khóa chức năng xóa vĩnh viễn dữ liệu từ thùng rác theo cấu hình an toàn dữ liệu.');
|
|
36548
|
+
return;
|
|
36549
|
+
}
|
|
36289
36550
|
const manageable = this.checkedNodes().filter((x) => x.EffectiveAccess >= DriveAccessLevel.Manager);
|
|
36290
36551
|
if (!manageable.length) {
|
|
36291
36552
|
this.warning('Chỉ chủ sở hữu hoặc quản trị viên mới có quyền xóa vĩnh viễn các mục đã chọn.');
|
|
@@ -36316,6 +36577,10 @@ class DriveExplorerDrawersBase extends DriveExplorerDragDropBase {
|
|
|
36316
36577
|
* Dọn sạch toàn bộ Thùng rác (Empty Trash) kèm cảnh báo xác nhận số lượng mục & dung lượng giải phóng
|
|
36317
36578
|
*/
|
|
36318
36579
|
async onEmptyTrash() {
|
|
36580
|
+
if (!this.drive.allowDeleteFromTrash()) {
|
|
36581
|
+
this.warning('Hệ thống đã khóa chức năng dọn sạch thùng rác (xóa vĩnh viễn) theo cấu hình an toàn dữ liệu.');
|
|
36582
|
+
return;
|
|
36583
|
+
}
|
|
36319
36584
|
const totalItems = this.drive.totalCount() || this.drive.items().length;
|
|
36320
36585
|
if (totalItems === 0) {
|
|
36321
36586
|
this.notiService.info('Thùng rác hiện đang trống.');
|
|
@@ -36388,7 +36653,12 @@ class DriveExplorerComponent extends DriveExplorerDrawersBase {
|
|
|
36388
36653
|
const _mode = this.drive.currentViewMode();
|
|
36389
36654
|
const _spaceId = this.drive.currentCustomSpaceId();
|
|
36390
36655
|
const _folderId = this.drive.currentFolderId();
|
|
36656
|
+
const isLoading = this.drive.loading();
|
|
36657
|
+
if (isLoading)
|
|
36658
|
+
return;
|
|
36391
36659
|
queueMicrotask(() => {
|
|
36660
|
+
if (this.drive.loading())
|
|
36661
|
+
return;
|
|
36392
36662
|
if (this.drive.isTreeTableView()) {
|
|
36393
36663
|
const expandedIds = Array.from(this.expandedTreeFolderIds());
|
|
36394
36664
|
if (expandedIds.length > 0) {
|
|
@@ -36467,7 +36737,7 @@ class DriveExplorerComponent extends DriveExplorerDrawersBase {
|
|
|
36467
36737
|
}
|
|
36468
36738
|
}
|
|
36469
36739
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: DriveExplorerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
36470
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: DriveExplorerComponent, isStandalone: true, selector: "lib-drive-explorer", providers: [NzImageService], usesInheritance: true, ngImport: i0, template: "@if (activeShareToken(); as sToken) {\n <lib-drive-share-viewer [token]=\"sToken\" (backToDrive)=\"closeEmbeddedShareViewer()\"></lib-drive-share-viewer>\n} @else {\n <div class=\"drive-shell\" [class.sidebar-wide]=\"sidebarWideMode() && showSidebarTree()\">\n <!-- SIDEBAR \u0110I\u1EC0U H\u01AF\u1EDANG & QUOTA -->\n <aside class=\"drive-sidebar\">\n <div nz-flex nzVertical nzGap=\"small\">\n <button\n nz-button\n nzType=\"primary\"\n nzBlock\n [disabled]=\"!drive.canUploadCurrentFolder()\"\n (click)=\"fileInput.click()\"\n >\n <nz-icon nzType=\"cloud-upload\"></nz-icon> T\u1EA3i t\u1EADp tin l\u00EAn\n </button>\n <input #fileInput type=\"file\" multiple hidden (change)=\"onFilesSelected($event)\" />\n <button\n nz-button\n nzType=\"default\"\n nzBlock\n [disabled]=\"!drive.canUploadCurrentFolder()\"\n (click)=\"openFolderDrawer('create')\"\n >\n <nz-icon nzType=\"folder-add\"></nz-icon> T\u1EA1o th\u01B0 m\u1EE5c m\u1EDBi\n </button>\n </div>\n <!-- THANH T\u00D9Y CH\u1ECCN HI\u1EC2N TH\u1ECA C\u00C2Y TH\u01AF M\u1EE4C B\u00CAN TR\u00C1I (SIDEBAR FOLDER TREE OPTIONS) -->\n <div class=\"sidebar-tree-header-bar\">\n <span class=\"sidebar-tree-header-title\">\n <nz-icon nzType=\"partition\" style=\"color: var(--primary-color, #1890ff)\"></nz-icon>\n <span>C\u00E2y th\u01B0 m\u1EE5c</span>\n </span>\n <div class=\"sidebar-tree-header-actions\">\n @if (showSidebarTree()) {\n <button\n type=\"button\"\n class=\"sidebar-tree-tool-btn\"\n nz-tooltip\n nzTooltipTitle=\"M\u1EDF r\u1ED9ng nhanh c\u00E1c nh\u00E1nh th\u01B0 m\u1EE5c\"\n (click)=\"expandAllSidebarTreeNodes()\"\n >\n <nz-icon nzType=\"node-expand\"></nz-icon>\n </button>\n <button\n type=\"button\"\n class=\"sidebar-tree-tool-btn\"\n nz-tooltip\n nzTooltipTitle=\"Thu g\u1ECDn c\u00E1c nh\u00E1nh th\u01B0 m\u1EE5c\"\n (click)=\"collapseAllSidebarTreeNodes()\"\n >\n <nz-icon nzType=\"node-collapse\"></nz-icon>\n </button>\n <button\n type=\"button\"\n class=\"sidebar-tree-tool-btn\"\n nz-tooltip\n nzTooltipTitle=\"L\u00E0m m\u1EDBi c\u00E2y th\u01B0 m\u1EE5c\"\n (click)=\"refreshAllExpandedSidebarTrees()\"\n >\n <nz-icon nzType=\"reload\"></nz-icon>\n </button>\n <button\n type=\"button\"\n class=\"sidebar-tree-tool-btn\"\n [class.active]=\"sidebarWideMode()\"\n nz-tooltip\n [nzTooltipTitle]=\"\n sidebarWideMode() ? 'Thu g\u1ECDn \u0111\u1ED9 r\u1ED9ng c\u1ED9t tr\u00E1i' : 'M\u1EDF r\u1ED9ng \u0111\u1ED9 r\u1ED9ng c\u1ED9t tr\u00E1i \u0111\u1EC3 xem c\u00E2y th\u01B0 m\u1EE5c r\u00F5 h\u01A1n'\n \"\n (click)=\"onToggleSidebarWideMode()\"\n >\n <nz-icon nzType=\"column-width\"></nz-icon>\n </button>\n }\n <nz-switch\n nzSize=\"small\"\n [ngModel]=\"showSidebarTree()\"\n (ngModelChange)=\"onToggleSidebarTree($event)\"\n nz-tooltip\n nzTooltipTitle=\"B\u1EADt / T\u1EAFt hi\u1EC3n th\u1ECB c\u00E2y th\u01B0 m\u1EE5c tr\u1EF1c ti\u1EBFp b\u00EAn tr\u00E1i\"\n ></nz-switch>\n </div>\n </div>\n\n @if (showSidebarTree()) {\n <div class=\"sidebar-tree-filter-box\">\n <nz-input-group [nzPrefix]=\"sidebarFilterPrefixTpl\" [nzSuffix]=\"sidebarFilterClearTpl\" nzSize=\"small\">\n <input\n nz-input\n type=\"text\"\n placeholder=\"L\u1ECDc nhanh th\u01B0 m\u1EE5c tr\u00EAn c\u00E2y...\"\n [ngModel]=\"sidebarTreeFilter()\"\n (ngModelChange)=\"onSidebarTreeFilterChange($event)\"\n />\n </nz-input-group>\n <ng-template #sidebarFilterPrefixTpl>\n <nz-icon nzType=\"filter\" style=\"color: var(--app-text-muted, #94a3b8); font-size: 12px\"></nz-icon>\n </ng-template>\n <ng-template #sidebarFilterClearTpl>\n @if (sidebarTreeFilter()) {\n <nz-icon\n nzType=\"close-circle\"\n nzTheme=\"fill\"\n class=\"cursor-pointer\"\n style=\"color: var(--app-text-muted, #94a3b8); font-size: 12px\"\n (click)=\"onSidebarTreeFilterChange('')\"\n ></nz-icon>\n }\n </ng-template>\n </div>\n }\n\n <nav class=\"drive-nav\">\n <!-- 1. DRIVE C\u00C1 NH\u00C2N + C\u00C2Y TH\u01AF M\u1EE4C CON -->\n <div class=\"nav-item-with-tree\">\n <a\n [class.active]=\"drive.currentViewMode() === 'MY_DRIVE' && (!drive.currentFolderId() || !showSidebarTree())\"\n [class.space-has-active-child]=\"\n drive.currentViewMode() === 'MY_DRIVE' && !!drive.currentFolderId() && showSidebarTree()\n \"\n [class.nav-drop-active]=\"dragOverNavSpace() === 'MY_DRIVE'\"\n (click)=\"switchView('MY_DRIVE')\"\n (dragover)=\"onNavSpaceDragOver($event, 'MY_DRIVE')\"\n (dragleave)=\"onNavSpaceDragLeave('MY_DRIVE')\"\n (drop)=\"onNavSpaceDrop($event, 'MY_DRIVE')\"\n >\n @if (showSidebarTree()) {\n <button\n type=\"button\"\n class=\"nav-caret-btn\"\n (click)=\"toggleSidebarSpaceTree($event, 'MY_DRIVE')\"\n [title]=\"\n isSidebarSpaceExpanded('MY_DRIVE') ? 'Thu g\u1ECDn c\u00E2y Drive c\u00E1 nh\u00E2n' : 'M\u1EDF c\u00E2y th\u01B0 m\u1EE5c Drive c\u00E1 nh\u00E2n'\n \"\n >\n <nz-icon\n [nzType]=\"\n isSidebarSpaceLoading('MY_DRIVE')\n ? 'loading'\n : isSidebarSpaceExpanded('MY_DRIVE')\n ? 'caret-down'\n : 'caret-right'\n \"\n ></nz-icon>\n </button>\n }\n <nz-icon nzType=\"hdd\"></nz-icon>\n <span style=\"flex: 1\">Drive c\u00E1 nh\u00E2n</span>\n </a>\n <ng-container *ngTemplateOutlet=\"sidebarSpaceTreeTpl; context: { spaceKey: 'MY_DRIVE' }\"></ng-container>\n </div>\n\n <!-- 2. T\u00C0I LI\u1EC6U \u0110\u01A0N V\u1ECA & C\u00C1C M\u1EE4C T\u00D9Y CH\u1EC8NH (CUSTOM SPACES) + C\u00C2Y TH\u01AF M\u1EE4C CON -->\n <div class=\"org-nav-group\">\n <div class=\"nav-item-with-tree\">\n <a\n [class.active]=\"\n drive.currentViewMode() === 'ORG_DRIVE' && (!drive.currentFolderId() || !showSidebarTree())\n \"\n [class.space-has-active-child]=\"\n drive.currentViewMode() === 'ORG_DRIVE' && !!drive.currentFolderId() && showSidebarTree()\n \"\n [class.nav-drop-active]=\"dragOverNavSpace() === 'ORG_DRIVE'\"\n (click)=\"switchView('ORG_DRIVE')\"\n (dragover)=\"onNavSpaceDragOver($event, 'ORG_DRIVE')\"\n (dragleave)=\"onNavSpaceDragLeave('ORG_DRIVE')\"\n (drop)=\"onNavSpaceDrop($event, 'ORG_DRIVE')\"\n >\n @if (showSidebarTree()) {\n <button\n type=\"button\"\n class=\"nav-caret-btn\"\n (click)=\"toggleSidebarSpaceTree($event, 'ORG_DRIVE')\"\n [title]=\"\n isSidebarSpaceExpanded('ORG_DRIVE')\n ? 'Thu g\u1ECDn c\u00E2y T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB'\n : 'M\u1EDF c\u00E2y th\u01B0 m\u1EE5c T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB'\n \"\n >\n <nz-icon\n [nzType]=\"\n isSidebarSpaceLoading('ORG_DRIVE')\n ? 'loading'\n : isSidebarSpaceExpanded('ORG_DRIVE')\n ? 'caret-down'\n : 'caret-right'\n \"\n ></nz-icon>\n </button>\n }\n <nz-icon nzType=\"apartment\"></nz-icon>\n <span style=\"flex: 1\">T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB</span>\n @if (drive.isCurrentUserAdmin()) {\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n nz-tooltip\n nzTooltipTitle=\"Th\u00EAm m\u1EE5c t\u00F9y ch\u1EC9nh b\u00EAn d\u01B0\u1EDBi T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"\n (click)=\"$event.stopPropagation(); openCustomSpaceDrawer('create')\"\n >\n <nz-icon nzType=\"plus\"></nz-icon>\n </button>\n }\n </a>\n <ng-container *ngTemplateOutlet=\"sidebarSpaceTreeTpl; context: { spaceKey: 'ORG_DRIVE' }\"></ng-container>\n </div>\n\n <!-- DANH S\u00C1CH C\u00C1C M\u1EE4C CUSTOM B\u00CAN D\u01AF\u1EDAI \"T\u00C0I LI\u1EC6U \u0110\u01A0N V\u1ECA\" (VD: \"T\u00E0i li\u1EC7u d\u1EF1 \u00E1n\") -->\n @for (sp of drive.customSpaces(); track sp.Id) {\n <div class=\"nav-item-with-tree\">\n <a\n class=\"custom-space-link\"\n [class.active]=\"\n drive.currentViewMode() === 'CUSTOM_SPACE' &&\n drive.currentCustomSpaceId() === sp.Id &&\n (!drive.currentFolderId() || drive.currentFolderId() === sp.Id || !showSidebarTree())\n \"\n [class.space-has-active-child]=\"\n drive.currentViewMode() === 'CUSTOM_SPACE' &&\n drive.currentCustomSpaceId() === sp.Id &&\n !!drive.currentFolderId() &&\n drive.currentFolderId() !== sp.Id &&\n showSidebarTree()\n \"\n [class.nav-drop-active]=\"dragOverCustomSpaceId() === sp.Id\"\n (click)=\"switchCustomSpace(sp)\"\n (dragover)=\"onCustomSpaceDragOver($event, sp)\"\n (dragleave)=\"onCustomSpaceDragLeave(sp)\"\n (drop)=\"onCustomSpaceDrop($event, sp)\"\n >\n @if (showSidebarTree()) {\n <button\n type=\"button\"\n class=\"nav-caret-btn\"\n (click)=\"toggleSidebarSpaceTree($event, 'CUSTOM:' + sp.Id)\"\n [title]=\"\n isSidebarSpaceExpanded('CUSTOM:' + sp.Id) ? 'Thu g\u1ECDn c\u00E2y ' + sp.Name : 'M\u1EDF c\u00E2y th\u01B0 m\u1EE5c ' + sp.Name\n \"\n >\n <nz-icon\n [nzType]=\"\n isSidebarSpaceLoading('CUSTOM:' + sp.Id)\n ? 'loading'\n : isSidebarSpaceExpanded('CUSTOM:' + sp.Id)\n ? 'caret-down'\n : 'caret-right'\n \"\n ></nz-icon>\n </button>\n }\n <nz-icon [nzType]=\"sp.Icon || 'project'\"></nz-icon>\n <span class=\"custom-space-title\" [title]=\"sp.Name\">{{ sp.Name }}</span>\n @if (sp.IsVisibleToAllUsers) {\n <nz-tag nzColor=\"cyan\" class=\"custom-space-badge\">All</nz-tag>\n }\n @if (sp.CanManage || drive.isCurrentUserAdmin()) {\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n (click)=\"$event.stopPropagation(); openCustomSpaceDrawer('edit', sp)\"\n >\n <nz-icon nzType=\"setting\"></nz-icon>\n </button>\n }\n </a>\n <ng-container\n *ngTemplateOutlet=\"sidebarSpaceTreeTpl; context: { spaceKey: 'CUSTOM:' + sp.Id }\"\n ></ng-container>\n </div>\n }\n </div>\n\n <!-- 3. \u0110\u01AF\u1EE2C CHIA S\u1EBA V\u1EDAI T\u00D4I + C\u00C2Y TH\u01AF M\u1EE4C CON -->\n <div class=\"nav-item-with-tree\">\n <a\n [class.active]=\"\n drive.currentViewMode() === 'SHARED_WITH_ME' && (!drive.currentFolderId() || !showSidebarTree())\n \"\n [class.space-has-active-child]=\"\n drive.currentViewMode() === 'SHARED_WITH_ME' && !!drive.currentFolderId() && showSidebarTree()\n \"\n (click)=\"switchView('SHARED_WITH_ME')\"\n >\n @if (showSidebarTree()) {\n <button\n type=\"button\"\n class=\"nav-caret-btn\"\n (click)=\"toggleSidebarSpaceTree($event, 'SHARED_WITH_ME')\"\n [title]=\"\n isSidebarSpaceExpanded('SHARED_WITH_ME')\n ? 'Thu g\u1ECDn c\u00E2y \u0110\u01B0\u1EE3c chia s\u1EBB v\u1EDBi t\u00F4i'\n : 'M\u1EDF c\u00E2y th\u01B0 m\u1EE5c \u0110\u01B0\u1EE3c chia s\u1EBB v\u1EDBi t\u00F4i'\n \"\n >\n <nz-icon\n [nzType]=\"\n isSidebarSpaceLoading('SHARED_WITH_ME')\n ? 'loading'\n : isSidebarSpaceExpanded('SHARED_WITH_ME')\n ? 'caret-down'\n : 'caret-right'\n \"\n ></nz-icon>\n </button>\n }\n <nz-icon nzType=\"share-alt\"></nz-icon>\n <span style=\"flex: 1\">\u0110\u01B0\u1EE3c chia s\u1EBB v\u1EDBi t\u00F4i</span>\n </a>\n <ng-container *ngTemplateOutlet=\"sidebarSpaceTreeTpl; context: { spaceKey: 'SHARED_WITH_ME' }\"></ng-container>\n </div>\n <a [class.active]=\"drive.currentViewMode() === 'RECENT'\" (click)=\"switchView('RECENT')\">\n <nz-icon nzType=\"clock-circle\"></nz-icon> G\u1EA7n \u0111\u00E2y\n </a>\n <a [class.active]=\"drive.currentViewMode() === 'STARRED'\" (click)=\"switchView('STARRED')\">\n <nz-icon nzType=\"star\"></nz-icon> C\u00F3 g\u1EAFn d\u1EA5u sao\n </a>\n <a [class.active]=\"drive.currentViewMode() === 'TRASH'\" (click)=\"switchView('TRASH')\">\n <nz-icon nzType=\"delete\"></nz-icon>\n <span style=\"flex: 1\">Th\u00F9ng r\u00E1c</span>\n @if (drive.currentViewMode() === \"TRASH\" && drive.items().length > 0) {\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n style=\"color: #ef4444\"\n nz-tooltip\n nzTooltipTitle=\"D\u1ECDn s\u1EA1ch th\u00F9ng r\u00E1c (X\u00F3a v\u0129nh vi\u1EC5n t\u1EA5t c\u1EA3)\"\n (click)=\"$event.stopPropagation(); onEmptyTrash()\"\n >\n <nz-icon nzType=\"clear\"></nz-icon>\n </button>\n }\n </a>\n </nav>\n\n <!-- TEMPLATE D\u00D9NG CHUNG HI\u1EC2N TH\u1ECA C\u00C2Y TH\u01AF M\u1EE4C \u0110A C\u1EA4P B\u00CAN TR\u00C1I CHO T\u1EEANG KH\u00D4NG GIAN -->\n <ng-template #sidebarSpaceTreeTpl let-spaceKey=\"spaceKey\">\n @if (isSidebarSpaceExpanded(spaceKey)) {\n @if (getSidebarVisibleTreeNodes(spaceKey); as treeNodes) {\n @if (treeNodes.length > 0) {\n <div class=\"sidebar-tree-container\">\n @for (vm of treeNodes; track vm.folderId) {\n <div\n class=\"sidebar-tree-node\"\n [class.active-tree-node]=\"vm.isActive\"\n [class.context-active-tree-node]=\"isRowActive(vm.node) || selectedRowId() === vm.folderId\"\n [class.active-breadcrumb-ancestor]=\"vm.isInActiveBreadcrumb && !vm.isActive\"\n [class.tree-drop-active]=\"dragOverSidebarFolderId() === vm.folderId\"\n [style.padding-left.px]=\"6 + vm.level * 14\"\n [attr.draggable]=\"vm.node.EffectiveAccess >= DriveAccessLevel.Editor\"\n (dragstart)=\"onSidebarTreeNodeDragStart($event, vm)\"\n (dragend)=\"onRowDragEnd()\"\n (dragover)=\"onSidebarTreeNodeDragOver($event, vm)\"\n (dragleave)=\"onSidebarTreeNodeDragLeave($event, vm)\"\n (drop)=\"onSidebarTreeNodeDrop($event, vm)\"\n (click)=\"onSidebarTreeNodeClick(vm)\"\n (contextmenu)=\"onContextMenu($event, menu, vm.node)\"\n >\n @if (!vm.hasKnownNoChildren) {\n <button\n type=\"button\"\n class=\"tree-node-caret\"\n (click)=\"toggleSidebarFolderNode($event, vm)\"\n [title]=\"vm.isExpanded ? 'Thu g\u1ECDn nh\u00E1nh' : 'M\u1EDF r\u1ED9ng th\u01B0 m\u1EE5c con'\"\n >\n <nz-icon\n [nzType]=\"vm.isLoading ? 'loading' : vm.isExpanded ? 'caret-down' : 'caret-right'\"\n ></nz-icon>\n </button>\n } @else {\n <span class=\"tree-node-caret-spacer\"></span>\n }\n\n <nz-icon\n class=\"tree-node-folder-icon\"\n [nzType]=\"vm.isExpanded || vm.isActive ? 'folder-open' : 'folder-fill'\"\n [style.color]=\"vm.isActive ? 'var(--primary-color, #1890ff)' : '#f59e0b'\"\n ></nz-icon>\n\n <span class=\"tree-node-label\" [title]=\"vm.node.Name\">\n {{ vm.node.Name }}\n </span>\n\n @if (vm.node.EffectiveAccess >= DriveAccessLevel.Uploader) {\n <button\n type=\"button\"\n class=\"tree-node-quick-btn\"\n title=\"T\u1EA1o th\u01B0 m\u1EE5c con trong '{{ vm.node.Name }}'\"\n (click)=\"openCreateSubfolderFromSidebar($event, vm)\"\n >\n <nz-icon nzType=\"plus\"></nz-icon>\n </button>\n }\n </div>\n }\n </div>\n } @else if (isSidebarSpaceLoading(spaceKey)) {\n <div class=\"sidebar-tree-empty\">\n <nz-icon nzType=\"loading\" style=\"margin-right: 4px\"></nz-icon> \u0110ang t\u1EA3i c\u00E2y th\u01B0 m\u1EE5c...\n </div>\n } @else if (sidebarTreeFilter().trim()) {\n <!-- <div class=\"sidebar-tree-empty\">Kh\u00F4ng kh\u1EDBp th\u01B0 m\u1EE5c n\u00E0o</div> -->\n } @else {\n <!-- <div class=\"sidebar-tree-empty\">Ch\u01B0a c\u00F3 th\u01B0 m\u1EE5c con</div> -->\n }\n }\n }\n </ng-template>\n <!-- KHUNG M\u1EAAU C\u00C2Y TH\u01AF M\u1EE4C (H\u1ED6 TR\u1EE2 K\u00C9O TH\u1EA2 V\u00C0O TH\u01AF M\u1EE4C \u0110\u00CDCH HO\u1EB6C B\u1EA4M T\u1EA0O NHANH) -->\n @if (drive.isCurrentUserAdmin()) {\n <div class=\"template-sidebar-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"margin-bottom: 6px\">\n <span style=\"font-size: 12px; font-weight: 600\">\n <nz-icon nzType=\"apartment\" style=\"color: #d97706; margin-right: 4px\"></nz-icon>\n M\u1EABu c\u00E2y th\u01B0 m\u1EE5c ({{ drive.folderTemplates().length }})\n </span>\n <button\n type=\"button\"\n nz-button\n nzType=\"link\"\n nzSize=\"small\"\n style=\"padding: 0 4px; font-size: 12px\"\n (click)=\"openTemplateDrawer('create')\"\n >\n <!-- nz-tooltip\n nzTooltipTitle=\"\u0110\u1ECBnh ngh\u0129a m\u1EABu c\u00E2y th\u01B0 m\u1EE5c m\u1EDBi\" -->\n <nz-icon nzType=\"plus\"></nz-icon> T\u1EA1o m\u1EABu\n </button>\n </div>\n\n @if (drive.folderTemplates().length === 0) {\n <div class=\"quota-sub\" style=\"font-size: 11px\">\n Ch\u01B0a c\u00F3 m\u1EABu n\u00E0o. B\u1EA5m <strong>+ T\u1EA1o m\u1EABu</strong> \u0111\u1EC3 \u0111\u1ECBnh ngh\u0129a c\u00E2y th\u01B0 m\u1EE5c chu\u1EA9n.\n </div>\n } @else {\n <div class=\"template-chip-list\">\n @for (tpl of drive.folderTemplates(); track tpl.Id) {\n <div\n class=\"template-drag-item\"\n draggable=\"true\"\n (dragstart)=\"onTemplateDragStart($event, tpl)\"\n (dragend)=\"onTemplateDragEnd()\"\n >\n <!-- nz-tooltip\n [nzTooltipTitle]=\"\n 'K\u00E9o th\u1EA3 m\u1EABu [' +\n tpl.Name +\n '] (' +\n tpl.TotalFolderCount +\n ' th\u01B0 m\u1EE5c) v\u00E0o m\u1ED9t Th\u01B0 m\u1EE5c \u0111\u00EDch tr\u00EAn b\u1EA3ng, ho\u1EB7c b\u1EA5m \u0111\u1EC3 t\u1EA1o t\u1EA1i \u0111\u00E2y'\n \" -->\n <div\n nz-flex\n nzAlign=\"center\"\n [nzGap]=\"6\"\n style=\"flex: 1; min-width: 0\"\n (click)=\"openFolderDrawer('create', undefined, tpl)\"\n >\n <nz-icon nzType=\"folder-add\" style=\"color: #d97706; font-size: 15px\"></nz-icon>\n <div style=\"flex: 1; min-width: 0\">\n <div class=\"template-item-title\">{{ tpl.Name }}</div>\n <div class=\"template-item-sub\">\n <code>{{ tpl.Code }}</code> \u2022 {{ tpl.TotalFolderCount }} m\u1EE5c\n @if (tpl.TotalPermissionCount > 0) {\n <span style=\"color: #0284c7; font-weight: 600\">\n \u2022 \uD83D\uDEE1 {{ tpl.TotalPermissionCount }} quy\u1EC1n</span\n >\n }\n </div>\n </div>\n </div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"2\">\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n [disabled]=\"!drive.canUploadCurrentFolder()\"\n (click)=\"$event.stopPropagation(); applyTemplateToTargetFolder(tpl, drive.currentFolderId())\"\n >\n <!-- nz-tooltip\n nzTooltipTitle=\"\u00C1p d\u1EE5ng ngay v\u00E0o th\u01B0 m\u1EE5c \u0111ang m\u1EDF\" -->\n <nz-icon nzType=\"thunderbolt\" style=\"color: var(--primary-color)\"></nz-icon>\n </button>\n @if (tpl.CanManage || drive.isCurrentUserAdmin()) {\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n (click)=\"$event.stopPropagation(); openTemplateDrawer('edit', tpl)\"\n >\n <!-- nz-tooltip\n nzTooltipTitle=\"S\u1EEDa / X\u00F3a m\u1EABu c\u00E2y th\u01B0 m\u1EE5c\" -->\n <nz-icon nzType=\"setting\"></nz-icon>\n </button>\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n <!-- H\u1ED8P C\u1EA4U H\u00CCNH CH\u1EBE \u0110\u1ED8 TH\u01AF M\u1EE4C V\u1EACT L\u00DD vs \u1EA2O H\u00D3A -->\n @if (drive.isCurrentUserAdmin() && false) {\n <div class=\"storage-mode-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <span style=\"font-size: 12px; font-weight: 600\">Th\u01B0 m\u1EE5c v\u1EADt l\u00FD (Disk)</span>\n <nz-switch\n nzSize=\"small\"\n [ngModel]=\"drive.usePhysicalFolders()\"\n (ngModelChange)=\"onTogglePhysicalMode($event)\"\n ></nz-switch>\n\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Khi b\u1EADt: T\u1EA1o c\u00E2y th\u01B0 m\u1EE5c & t\u00EAn file th\u1EADt 1-1 tr\u00EAn \u1ED5 c\u1EE9ng m\u00E1y ch\u1EE7\"\n -->\n </div>\n <div class=\"quota-sub\">\n Ch\u1EBF \u0111\u1ED9: <strong>{{ drive.usePhysicalFolders() ? \"V\u1EADt l\u00FD 1:1 (Physical)\" : \"\u1EA2o h\u00F3a (Virtual)\" }}</strong>\n </div>\n @if (drive.usePhysicalFolders()) {\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"margin-top: 8px\">\n <span style=\"font-size: 12px\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Khi b\u1EADt: T\u1EA5t c\u1EA3 User c\u00F9ng d\u00F9ng chung 1 RootPath duy nh\u1EA5t \u0111\u1EC3 l\u01B0u tr\u1EEF t\u00E0i li\u1EC7u d\u1EF1 \u00E1n\"\n -->\n D\u00F9ng chung RootPath\n </span>\n <nz-switch\n nzSize=\"small\"\n [ngModel]=\"drive.useSharedPhysicalRoot()\"\n (ngModelChange)=\"onToggleSharedRootMode($event)\"\n ></nz-switch>\n </div>\n <div class=\"quota-sub\">\n Ph\u1EA1m vi \u0111\u0129a:\n <strong>{{ drive.useSharedPhysicalRoot() ? \"Chung to\u00E0n d\u1EF1 \u00E1n\" : \"T\u00E1ch theo t\u1EEBng User\" }}</strong>\n </div>\n <div nz-flex nzVertical [nzGap]=\"6\" style=\"margin-top: 8px\">\n <button nz-button nzType=\"dashed\" nzSize=\"small\" nzBlock (click)=\"onSyncPhysicalDisk()\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Qu\u00E9t c\u00E1c file/th\u01B0 m\u1EE5c copy tr\u1EF1c ti\u1EBFp tr\u00EAn \u1ED5 \u0111\u0129a Server \u0111\u1EC3 n\u1EA1p v\u00E0o Drive\"\n -->\n <nz-icon nzType=\"sync\"></nz-icon> \u0110\u1ED3ng b\u1ED9 t\u1EEB \u1ED5 \u0111\u0129a\n </button>\n <button nz-button nzType=\"default\" nzSize=\"small\" nzBlock (click)=\"openRelocateDrawer(null)\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"\u0110\u1ED5i \u0111\u01B0\u1EDDng d\u1EABn RootPath ho\u1EB7c \u00E1nh x\u1EA1 sang \u1ED5 c\u1EE9ng l\u01B0u tr\u1EEF kh\u00E1c\"\n -->\n <nz-icon nzType=\"folder-open\"></nz-icon> \u0110\u1ED5i RootPath / \u1ED4 \u0111\u0129a\n </button>\n </div>\n }\n </div>\n }\n <!-- H\u1ED8P TI\u1EBEN TR\u00CCNH UPLOAD (H\u1ED6 TR\u1EE2 T\u1EA2I TI\u1EBEP KHI L\u1ED6I / T\u1EA0M D\u1EEANG / H\u1EE6Y) -->\n @if (drive.userUploadQueue().length > 0) {\n <div class=\"upload-queue-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"margin-bottom: 6px\">\n <strong>Ti\u1EBFn tr\u00ECnh t\u1EA3i l\u00EAn ({{ drive.userUploadQueue().length }})</strong>\n <a (click)=\"drive.clearCompletedUploads()\" style=\"font-size: 12px\">\u1EA8n \u0111\u00E3 xong</a>\n </div>\n <input #resumeFileInput type=\"file\" hidden (change)=\"onResumeFileSelected($event)\" />\n @for (task of drive.userUploadQueue(); track task.id) {\n <div class=\"upload-task-row\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" [nzGap]=\"4\">\n <div class=\"upload-task-name\" [title]=\"task.fileName\">{{ task.fileName }}</div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"2\">\n @if (task.status === \"uploading\" && (task.fileSize || 0) >= 20971520) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n (click)=\"drive.pauseUploadTask(task.id)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"T\u1EA1m d\u1EEBng t\u1EA3i l\u00EAn\"\n -->\n <nz-icon nzType=\"pause-circle\"></nz-icon>\n </button>\n }\n @if (task.status === \"error\" || task.status === \"paused\") {\n <button\n type=\"button\"\n nz-button\n nzType=\"link\"\n nzSize=\"small\"\n style=\"padding: 0 4px; font-size: 12px; font-weight: 600\"\n (click)=\"onResumeUploadClick(task, resumeFileInput)\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"task.errorMessage || 'T\u1EA3i l\u00EAn ti\u1EBFp t\u1EEB ph\u1EA7n tr\u0103m \u0111\u00E3 l\u01B0u (Resume Upload)'\"\n -->\n <nz-icon nzType=\"reload\"></nz-icon> T\u1EA3i ti\u1EBFp\n </button>\n }\n @if (task.status !== \"uploading\") {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n style=\"padding: 0 4px\"\n (click)=\"drive.removeUploadTask(task.id)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"X\u00F3a kh\u1ECFi danh s\u00E1ch & h\u1EE7y phi\u00EAn t\u1EA1m\"\n -->\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n }\n </div>\n </div>\n <nz-progress\n [nzPercent]=\"task.progress\"\n nzSize=\"small\"\n [nzStatus]=\"\n task.status === 'error'\n ? 'exception'\n : task.status === 'success'\n ? 'success'\n : task.status === 'paused'\n ? 'normal'\n : 'active'\n \"\n ></nz-progress>\n @if (task.status === \"error\") {\n <div style=\"font-size: 11px; color: #ef4444; margin-top: 2px\">\n {{ task.errorMessage || \"B\u1ECB ng\u1EAFt k\u1EBFt n\u1ED1i.\" }} \u2014 B\u1EA5m <strong>T\u1EA3i ti\u1EBFp</strong> \u0111\u1EC3 n\u1ED1i l\u1EA1i t\u1EEB\n {{ task.progress }}%.\n </div>\n }\n @if (task.status === \"paused\") {\n <div style=\"font-size: 11px; color: #f59e0b; margin-top: 2px\">\n \u0110\u00E3 t\u1EA1m d\u1EEBng \u1EDF {{ task.progress }}% \u2014 B\u1EA5m <strong>T\u1EA3i ti\u1EBFp</strong> \u0111\u1EC3 ti\u1EBFp t\u1EE5c.\n </div>\n }\n </div>\n }\n </div>\n }\n <!-- H\u1ED8P TI\u1EBEN TR\u00CCNH DOWNLOAD (H\u1ED6 TR\u1EE2 THEO D\u00D5I % & H\u1EE6Y T\u1EA2I T\u1EE8C TH\u1EDCI \u0110\u1ED0I V\u1EDAI FILE N\u1EB6NG) -->\n @if (drive.userDownloadQueue().length > 0) {\n <div class=\"upload-queue-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"margin-bottom: 6px\">\n <strong>Ti\u1EBFn tr\u00ECnh t\u1EA3i xu\u1ED1ng ({{ drive.userDownloadQueue().length }})</strong>\n <a (click)=\"drive.clearCompletedDownloads()\" style=\"font-size: 12px\">\u1EA8n \u0111\u00E3 xong</a>\n </div>\n @for (dlTask of drive.userDownloadQueue(); track dlTask.id) {\n <div class=\"upload-task-row\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" [nzGap]=\"4\">\n <div class=\"upload-task-name\" [title]=\"dlTask.fileName\">{{ dlTask.fileName }}</div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"2\">\n @if (dlTask.status === \"downloading\") {\n <button\n type=\"button\"\n nz-button\n nzType=\"link\"\n nzDanger\n nzSize=\"small\"\n style=\"padding: 0 4px; font-size: 12px; font-weight: 600\"\n (click)=\"drive.cancelDownloadTask(dlTask.id)\"\n >\n <nz-icon nzType=\"stop\"></nz-icon> H\u1EE7y t\u1EA3i\n </button>\n } @else {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n style=\"padding: 0 4px\"\n (click)=\"drive.removeDownloadTask(dlTask.id)\"\n >\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n }\n </div>\n </div>\n <nz-progress\n [nzPercent]=\"dlTask.progress\"\n nzSize=\"small\"\n [nzStatus]=\"\n dlTask.status === 'error' || dlTask.status === 'cancelled'\n ? 'exception'\n : dlTask.status === 'success'\n ? 'success'\n : 'active'\n \"\n ></nz-progress>\n <div style=\"font-size: 11px; color: var(--app-text-muted, #64748b); margin-top: 2px\">\n @if (dlTask.status === \"downloading\") {\n \u0110ang t\u1EA3i: {{ dlTask.loadedBytes | formatBytes }}\n @if (dlTask.totalBytes) {\n / {{ dlTask.totalBytes | formatBytes }}\n }\n } @else if (dlTask.status === \"cancelled\") {\n <span style=\"color: #f59e0b\">\u0110\u00E3 h\u1EE7y t\u1EA3i xu\u1ED1ng gi\u1EEFa ch\u1EEBng.</span>\n } @else if (dlTask.status === \"error\") {\n <span style=\"color: #ef4444\">{{ dlTask.errorMessage || \"L\u1ED7i khi t\u1EA3i xu\u1ED1ng.\" }}</span>\n } @else {\n <span style=\"color: #10b981\">\u0110\u00E3 t\u1EA3i xu\u1ED1ng ho\u00E0n t\u1EA5t.</span>\n }\n </div>\n </div>\n }\n </div>\n }\n <div class=\"quota-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <div class=\"quota-title\" style=\"margin-bottom: 0\">\n <nz-icon nzType=\"cloud\"></nz-icon> Dung l\u01B0\u1EE3ng ({{ drive.quotaPercent() }}%)\n </div>\n @if (drive.isCurrentUserAdmin()) {\n <nz-tag nzColor=\"gold\" style=\"margin-right: 0; font-size: 11px\">Admin</nz-tag>\n }\n </div>\n <nz-progress [nzPercent]=\"drive.quotaPercent()\" nzSize=\"small\" [nzShowInfo]=\"false\"></nz-progress>\n <div class=\"quota-sub\">{{ drive.usedBytes() | formatBytes }} / {{ drive.quotaLimitBytes() | formatBytes }}</div>\n @if (drive.isCurrentUserAdmin()) {\n <button\n nz-button\n nzType=\"dashed\"\n nzSize=\"small\"\n nzBlock\n style=\"margin-top: 8px\"\n (click)=\"openPermissionMatrixDrawer(drive.currentFolderId())\"\n >\n <nz-icon nzType=\"table\"></nz-icon>\n Ma tr\u1EADn ph\u00E2n quy\u1EC1n\n </button>\n <button\n nz-button\n nzType=\"dashed\"\n nzSize=\"small\"\n nzBlock\n style=\"margin-top: 8px\"\n (click)=\"openQuotaAdminDrawer()\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"\u0110\u1EB7t Quota m\u1EB7c \u0111\u1ECBnh to\u00E0n h\u1EC7 th\u1ED1ng v\u00E0 thi\u1EBFt l\u1EADp Quota ri\u00EAng cho t\u1EEBng ng\u01B0\u1EDDi d\u00F9ng (Ch\u1EC9 Admin)\"\n -->\n <nz-icon nzType=\"setting\"></nz-icon> Qu\u1EA3n l\u00FD Quota (Admin)\n </button>\n }\n </div>\n </aside>\n <!-- KHU V\u1EF0C N\u1ED8I DUNG CH\u00CDNH (H\u1ED6 TR\u1EE2 K\u00C9O TH\u1EA2 FILE & FOLDER T\u1EEA FILE EXPLORER) -->\n <main\n class=\"drive-main\"\n [class.external-drag-active]=\"isExternalFileDragging()\"\n (dragenter)=\"onMainDragEnter($event)\"\n (dragover)=\"onMainDragOver($event)\"\n (dragleave)=\"onMainDragLeave($event)\"\n (drop)=\"onMainDrop($event)\"\n >\n @if (isExternalFileDragging()) {\n <div class=\"external-drop-banner\">\n <nz-icon nzType=\"cloud-upload\" class=\"drop-banner-icon\"></nz-icon>\n <div>\n <div class=\"drop-banner-title\">\n @if (dragOverFolderName(); as targetName) {\n Th\u1EA3 t\u1EADp tin / th\u01B0 m\u1EE5c t\u1EEB m\u00E1y t\u00EDnh \u0111\u1EC3 t\u1EA3i th\u1EB3ng v\u00E0o th\u01B0 m\u1EE5c: <strong>\"{{ targetName }}\"</strong>\n } @else {\n Th\u1EA3 t\u1EADp tin ho\u1EB7c th\u01B0 m\u1EE5c t\u1EEB File Explorer v\u00E0o \u0111\u00E2y \u0111\u1EC3 t\u1EA3i l\u00EAn th\u01B0 m\u1EE5c hi\u1EC7n t\u1EA1i\n }\n </div>\n <div class=\"drop-banner-sub\">\n H\u1ED7 tr\u1EE3 k\u00E9o th\u1EA3 nhi\u1EC1u file c\u00F9ng l\u00FAc ho\u1EB7c k\u00E9o nguy\u00EAn c\u1EA3 c\u00E2y th\u01B0 m\u1EE5c t\u1EEB m\u00E1y t\u00EDnh (T\u1EF1 \u0111\u1ED9ng Chunk Upload n\u1EBFu\n file ≥ 20MB)\n </div>\n </div>\n </div>\n }\n <!-- TOOLBAR + PAGINATION -->\n <header class=\"drive-toolbar\">\n <div>\n <nz-breadcrumb>\n <nz-breadcrumb-item\n (click)=\"navigateToFolder(null)\"\n (dragover)=\"onBreadcrumbDragOver($event, '__ROOT__')\"\n (dragleave)=\"onBreadcrumbDragLeave('__ROOT__')\"\n (drop)=\"onBreadcrumbDrop($event, null)\"\n [class.bc-drop-active]=\"dragOverBreadcrumbId() === '__ROOT__'\"\n class=\"cursor-pointer\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"K\u00E9o th\u1EA3 m\u1EE5c v\u00E0o \u0111\u00E2y \u0111\u1EC3 chuy\u1EC3n v\u1EC1 th\u01B0 m\u1EE5c g\u1ED1c\"\n -->\n <nz-icon nzType=\"home\"></nz-icon>\n {{ getRootTitle() }}\n </nz-breadcrumb-item>\n @for (bc of drive.breadcrumbs(); track bc.Id) {\n @if (drive.currentViewMode() !== \"CUSTOM_SPACE\" || bc.Id !== drive.currentCustomSpaceId()) {\n <nz-breadcrumb-item\n (click)=\"navigateToFolder(bc.Id)\"\n (dragover)=\"onBreadcrumbDragOver($event, bc.Id)\"\n (dragleave)=\"onBreadcrumbDragLeave(bc.Id)\"\n (drop)=\"onBreadcrumbDrop($event, bc.Id)\"\n [class.bc-drop-active]=\"dragOverBreadcrumbId() === bc.Id\"\n class=\"cursor-pointer\"\n >\n {{ bc.Name }}\n </nz-breadcrumb-item>\n }\n }\n </nz-breadcrumb>\n <!-- @if (drive.isCurrentUserAdmin() && drive.usePhysicalFolders() && drive.currentPhysicalPath(); as physPath) {\n <div class=\"physical-path-bar\">\n <nz-icon nzType=\"folder-open\"></nz-icon>\n <span>\n \u0110\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD: <code>{{ physPath }}</code>\n </span>\n <icon-copy [textToCopy]=\"physPath\" tooltip=\"Sao ch\u00E9p \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD tr\u00EAn Server\"></icon-copy>\n </div>\n } -->\n </div>\n <div class=\"toolbar-actions\">\n <nz-input-group [nzSuffix]=\"suffixIconSearch\" style=\"width: 250px\">\n <input\n type=\"text\"\n nz-input\n placeholder=\"T\u00ECm ki\u1EBFm t\u00E0i li\u1EC7u, th\u01B0 m\u1EE5c...\"\n [ngModel]=\"drive.keyword()\"\n (ngModelChange)=\"drive.keyword.set($event)\"\n (keyup.enter)=\"onSearch()\"\n />\n </nz-input-group>\n <ng-template #suffixIconSearch>\n <nz-icon nzType=\"search\" class=\"cursor-pointer\" (click)=\"onSearch()\"></nz-icon>\n </ng-template>\n <label\n nz-checkbox\n [ngModel]=\"drive.includeSubfolders()\"\n (ngModelChange)=\"onToggleIncludeSubfolders($event)\"\n style=\"user-select: none; white-space: nowrap; font-size: 13px\"\n nz-tooltip\n nzTooltipTitle=\"T\u00ECm c\u1EA3 th\u01B0 m\u1EE5c con\"\n >\n </label>\n <!-- T\u00D9Y CH\u1ECCN CH\u1EBE \u0110\u1ED8 XEM: C\u00C2Y TH\u01AF M\u1EE4C B\u00CAN TR\u00C1I + B\u1EA2NG PH\u1EB2NG vs TREE TABLE -->\n <div class=\"view-mode-switch\" nz-flex nzAlign=\"center\" [nzGap]=\"4\">\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"showSidebarTree() ? 'primary' : 'default'\"\n (click)=\"onToggleSidebarTree(!showSidebarTree())\"\n nz-tooltip\n [nzTooltipTitle]=\"\n showSidebarTree()\n ? '\u0110ang b\u1EADt C\u00E2y th\u01B0 m\u1EE5c b\u00EAn tr\u00E1i (Nh\u1EA5n \u0111\u1EC3 \u1EA9n)'\n : 'Hi\u1EC3n th\u1ECB C\u00E2y th\u01B0 m\u1EE5c tr\u1EF1c ti\u1EBFp \u1EDF c\u1ED9t b\u00EAn tr\u00E1i'\n \"\n >\n <nz-icon nzType=\"partition\"></nz-icon>\n </button>\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"!drive.isTreeTableView() ? 'primary' : 'default'\"\n (click)=\"onToggleTreeTableView(false)\"\n nz-tooltip\n nzTooltipTitle=\"Flat Table\"\n >\n <nz-icon nzType=\"unordered-list\"></nz-icon>\n <!-- B\u1EA3ng ph\u1EB3ng -->\n </button>\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"drive.isTreeTableView() ? 'primary' : 'default'\"\n (click)=\"onToggleTreeTableView(true)\"\n nz-tooltip\n nzTooltipTitle=\"Tree Table\"\n >\n <nz-icon nzType=\"apartment\"></nz-icon>\n <!-- Tree Table -->\n </button>\n @if (drive.isTreeTableView()) {\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"dashed\"\n (click)=\"expandAllTreeFolders()\"\n nz-tooltip\n nzTooltipTitle=\"M\u1EDF r\u1ED9ng\"\n >\n <nz-icon nzType=\"node-expand\"></nz-icon>\n </button>\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"dashed\"\n (click)=\"collapseAllTreeFolders()\"\n nz-tooltip\n nzTooltipTitle=\"Thu g\u1ECDn\"\n >\n <nz-icon nzType=\"node-collapse\"></nz-icon>\n </button>\n }\n </div>\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n nz-tooltip\n [nzTooltipTitle]=\"drive.sortDesc() ? 'A \u2192 Z' : 'Z \u2192 A'\"\n (click)=\"toggleSortDirection()\"\n >\n <nz-icon [nzType]=\"drive.sortDesc() ? 'sort-descending' : 'sort-ascending'\"></nz-icon>\n </button>\n @if (drive.currentViewMode() === \"TRASH\") {\n <button\n type=\"button\"\n nz-button\n nzDanger\n nzType=\"primary\"\n nzSize=\"small\"\n [disabled]=\"drive.items().length === 0 || emptyingTrash()\"\n [nzLoading]=\"emptyingTrash()\"\n nz-tooltip\n nzTooltipTitle=\"X\u00F3a v\u0129nh vi\u1EC5n to\u00E0n b\u1ED9 c\u00E1c m\u1EE5c trong th\u00F9ng r\u00E1c v\u00E0 gi\u1EA3i ph\u00F3ng dung l\u01B0\u1EE3ng Quota\"\n (click)=\"onEmptyTrash()\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n D\u1ECDn s\u1EA1ch th\u00F9ng r\u00E1c\n @if (drive.totalCount() > 0) {\n <span>({{ drive.totalCount() }})</span>\n }\n </button>\n }\n <button\n nz-button\n nzType=\"default\"\n nzSize=\"small\"\n (click)=\"refreshExplorer()\"\n nz-tooltip\n nzTooltipTitle=\"L\u00E0m m\u1EDBi\"\n >\n <nz-icon nzType=\"reload\"></nz-icon>\n </button>\n <nz-pagination\n [nzSize]=\"'small'\"\n [nzPageIndex]=\"drive.pageIndex()\"\n [nzPageSize]=\"drive.pageSize()\"\n [nzTotal]=\"drive.totalCount()\"\n [nzShowSizeChanger]=\"true\"\n [nzPageSizeOptions]=\"AppGlobals.pageSizeOptions\"\n (nzPageIndexChange)=\"drive.loadNodes($event, drive.pageSize())\"\n (nzPageSizeChange)=\"drive.loadNodes(1, $event)\"\n >\n </nz-pagination>\n </div>\n </header>\n @if (drive.currentViewMode() === \"TRASH\" && drive.items().length > 0) {\n <div class=\"trash-info-banner\">\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-icon nzType=\"info-circle\" style=\"color: #ef4444; font-size: 16px\"></nz-icon>\n <span>\n C\u00E1c m\u1EE5c trong th\u00F9ng r\u00E1c v\u1EABn t\u00EDnh v\u00E0o dung l\u01B0\u1EE3ng h\u1EA1n ng\u1EA1ch (Quota) cho \u0111\u1EBFn khi b\u1ECB x\u00F3a v\u0129nh vi\u1EC5n.\n </span>\n </div>\n <button\n type=\"button\"\n nz-button\n nzDanger\n nzType=\"link\"\n nzSize=\"small\"\n style=\"font-weight: 600; padding: 0\"\n [nzLoading]=\"emptyingTrash()\"\n (click)=\"onEmptyTrash()\"\n >\n <nz-icon nzType=\"clear\"></nz-icon> D\u1ECDn s\u1EA1ch th\u00F9ng r\u00E1c ngay\n </button>\n </div>\n }\n <!-- THANH THAO T\u00C1C H\u00C0NG LO\u1EA0T KHI T\u00CDCH CH\u1ECCN NHI\u1EC0U FILE / FOLDER (BULK ACTION BAR) -->\n @if (checkedCount() > 0) {\n <div class=\"bulk-action-bar\">\n <div class=\"bulk-action-summary\">\n <label\n nz-checkbox\n [ngModel]=\"isAllCurrentPageChecked()\"\n [nzIndeterminate]=\"isCurrentPageIndeterminate()\"\n (ngModelChange)=\"onToggleCheckAllCurrentPage($event)\"\n ></label>\n <nz-tag nzColor=\"processing\" style=\"margin: 0; font-weight: 600\"> \u0110\u00E3 ch\u1ECDn {{ checkedCount() }} m\u1EE5c </nz-tag>\n <span class=\"bulk-action-meta\">\n (\n @if (checkedFolderCount() > 0) {\n <span>{{ checkedFolderCount() }} th\u01B0 m\u1EE5c</span>\n }\n @if (checkedFolderCount() > 0 && checkedFileCount() > 0) {\n <span>, </span>\n }\n @if (checkedFileCount() > 0) {\n <span>{{ checkedFileCount() }} t\u1EADp tin \u2022 {{ checkedTotalBytes() | formatBytes }}</span>\n }\n )\n </span>\n @if (!isAllCurrentPageChecked() && displayedTableItems().length > 0) {\n <a style=\"font-size: 12px; font-weight: 500\" (click)=\"onToggleCheckAllCurrentPage(true)\">\n Ch\u1ECDn t\u1EA5t c\u1EA3 trang ({{ displayedTableItems().length }})\n </a>\n }\n <a style=\"font-size: 12px; color: #ef4444\" (click)=\"clearCheckedSelection()\"> B\u1ECF ch\u1ECDn </a>\n </div>\n\n <div class=\"bulk-action-buttons\">\n @if (drive.currentViewMode() !== \"TRASH\") {\n @if (canBulkEditChecked()) {\n <button\n type=\"button\"\n nz-button\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Di chuy\u1EC3n to\u00E0n b\u1ED9 c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn sang th\u01B0 m\u1EE5c ho\u1EB7c kh\u00F4ng gian kh\u00E1c\"\n (click)=\"openBulkMoveDrawer()\"\n >\n <nz-icon nzType=\"drag\"></nz-icon> Di chuy\u1EC3n ({{ checkedCount() }})\n </button>\n }\n <button\n type=\"button\"\n nz-button\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Sao ch\u00E9p \u0111\u1EC7 quy c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn t\u1EDBi th\u01B0 m\u1EE5c kh\u00E1c\"\n (click)=\"openBulkCopyDrawer()\"\n >\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p ({{ checkedCount() }})\n </button>\n @if (canBulkManageChecked()) {\n <button\n type=\"button\"\n nz-button\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"G\u00E1n ho\u1EB7c thu h\u1ED3i quy\u1EC1n h\u00E0ng lo\u1EA1t cho c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn\"\n (click)=\"openBulkPermissionMatrixDrawer()\"\n >\n <nz-icon nzType=\"usergroup-add\"></nz-icon> Ph\u00E2n quy\u1EC1n ({{ checkedCount() }})\n </button>\n }\n @if (canBulkDownloadChecked()) {\n <button\n type=\"button\"\n nz-button\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"T\u1EA3i xu\u1ED1ng c\u00E1c t\u1EADp tin \u0111\u00E3 ch\u1ECDn\"\n (click)=\"onBulkDownloadChecked()\"\n >\n <nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng\n </button>\n }\n <button\n type=\"button\"\n nz-button\n nzSize=\"small\"\n [nzLoading]=\"bulkActionLoading()\"\n nz-tooltip\n [nzTooltipTitle]=\"\n allCheckedAreStarred() ? 'B\u1ECF d\u1EA5u sao c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn' : 'G\u1EAFn d\u1EA5u sao cho c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn'\n \"\n (click)=\"onBulkToggleStar()\"\n >\n <nz-icon nzType=\"star\" [nzTheme]=\"allCheckedAreStarred() ? 'fill' : 'outline'\"></nz-icon>\n {{ allCheckedAreStarred() ? \"B\u1ECF sao\" : \"G\u1EAFn sao\" }}\n </button>\n @if (canBulkEditChecked()) {\n <button\n type=\"button\"\n nz-button\n nzDanger\n nzType=\"primary\"\n nzSize=\"small\"\n [nzLoading]=\"bulkActionLoading()\"\n nz-tooltip\n nzTooltipTitle=\"Chuy\u1EC3n to\u00E0n b\u1ED9 c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn v\u00E0o th\u00F9ng r\u00E1c\"\n (click)=\"onBulkSoftDelete()\"\n >\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a v\u00E0o th\u00F9ng r\u00E1c ({{ checkedCount() }})\n </button>\n }\n } @else {\n @if (canBulkEditChecked()) {\n <button\n type=\"button\"\n nz-button\n nzType=\"primary\"\n nzSize=\"small\"\n [nzLoading]=\"bulkActionLoading()\"\n (click)=\"onBulkRestoreFromTrash()\"\n >\n <nz-icon nzType=\"rollback\"></nz-icon> Kh\u00F4i ph\u1EE5c ({{ checkedCount() }})\n </button>\n }\n @if (canBulkManageChecked()) {\n <button\n type=\"button\"\n nz-button\n nzDanger\n nzType=\"primary\"\n nzSize=\"small\"\n [nzLoading]=\"bulkActionLoading()\"\n (click)=\"onBulkPermanentDelete()\"\n >\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a v\u0129nh vi\u1EC5n ({{ checkedCount() }})\n </button>\n }\n }\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"B\u1ECF ch\u1ECDn t\u1EA5t c\u1EA3\"\n (click)=\"clearCheckedSelection()\"\n >\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </div>\n }\n <!-- DANH S\u00C1CH T\u1EACP TIN / TH\u01AF M\u1EE4C (H\u1ED6 TR\u1EE2 C\u1EA2 FLAT TABLE V\u00C0 TREE TABLE) -->\n <nz-table\n #explorerTable\n [nzData]=\"displayedTableItems()\"\n [nzLoading]=\"drive.loading()\"\n [nzBordered]=\"true\"\n [nzFrontPagination]=\"false\"\n [nzShowPagination]=\"false\"\n nzSize=\"small\"\n >\n <thead>\n <tr>\n <th nzWidth=\"40px\" class=\"text-center checkbox-col-th\" (click)=\"$event.stopPropagation()\">\n <label\n nz-checkbox\n [ngModel]=\"isAllCurrentPageChecked()\"\n [nzIndeterminate]=\"isCurrentPageIndeterminate()\"\n [nzDisabled]=\"displayedTableItems().length === 0\"\n (ngModelChange)=\"onToggleCheckAllCurrentPage($event)\"\n nz-tooltip\n nzTooltipTitle=\"Ch\u1ECDn / B\u1ECF ch\u1ECDn t\u1EA5t c\u1EA3 c\u00E1c d\u00F2ng tr\u00EAn trang n\u00E0y\"\n ></label>\n </th>\n <th nzWidth=\"45px\" class=\"text-center\">#</th>\n <th class=\"sortable-th\" (click)=\"onSortColumn('Name')\">\n <div class=\"th-sort-wrap\">\n <span>T\u00EAn t\u00E0i li\u1EC7u / Th\u01B0 m\u1EE5c</span>\n <span class=\"sort-icon\" [class.active]=\"drive.sortBy() === 'Name'\">\n <nz-icon\n [nzType]=\"\n drive.sortBy() === 'Name' ? (drive.sortDesc() ? 'sort-descending' : 'sort-ascending') : 'swap'\n \"\n ></nz-icon>\n </span>\n </div>\n </th>\n <!-- <th nzWidth=\"150px\" class=\"sortable-th\" (click)=\"onSortColumn('OwnerName')\">\n <div class=\"th-sort-wrap\">\n <span>Ch\u1EE7 s\u1EDF h\u1EEFu</span>\n @if (drive.sortBy() === \"OwnerName\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th> -->\n <th nzWidth=\"130px\" class=\"text-center sortable-th\" (click)=\"onSortColumn('AccessLevel')\">\n <div class=\"th-sort-wrap justify-center\">\n <span>Quy\u1EC1n truy c\u1EADp</span>\n @if (drive.sortBy() === \"AccessLevel\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"110px\" class=\"text-right sortable-th\" (click)=\"onSortColumn('SizeBytes')\">\n <div class=\"th-sort-wrap justify-end\">\n <span>K\u00EDch th\u01B0\u1EDBc</span>\n @if (drive.sortBy() === \"SizeBytes\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"100px\" class=\"text-center sortable-th\" (click)=\"onSortColumn('CreatedUser')\">\n <div class=\"th-sort-wrap justify-center\">\n <span>Ng\u01B0\u1EDDi t\u1EA1o</span>\n @if (drive.sortBy() === \"CreatedUser\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"145px\" class=\"text-center sortable-th\" (click)=\"onSortColumn('UpdatedDate')\">\n <div class=\"th-sort-wrap justify-center\">\n <span>C\u1EADp nh\u1EADt cu\u1ED1i</span>\n @if (drive.sortBy() === \"UpdatedDate\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <!-- <th nzWidth=\"210px\" class=\"text-center\">Thao t\u00E1c</th> -->\n </tr>\n </thead>\n <tbody>\n @for (item of explorerTable.data; track item.Id; let i = $index) {\n <tr\n [attr.data-node-id]=\"item.Id\"\n [attr.draggable]=\"drive.currentViewMode() !== 'TRASH' && item.EffectiveAccess >= DriveAccessLevel.Editor\"\n (dragstart)=\"onRowDragStart($event, item)\"\n (dragend)=\"onRowDragEnd()\"\n (dragover)=\"onRowDragOver($event, item)\"\n (dragleave)=\"onRowDragLeave($event, item)\"\n (drop)=\"onRowDrop($event, item)\"\n (click)=\"onRowSelect(item, $event, i)\"\n (dblclick)=\"onRowDoubleClick(item, $event)\"\n (contextmenu)=\"onContextMenu($event, menu, item)\"\n class=\"drive-row\"\n [class.row-checked]=\"isItemChecked(item.Id)\"\n [class.active]=\"isRowActive(item)\"\n [class.row-active]=\"isRowActive(item)\"\n [class.ant-table-row-selected]=\"isRowActive(item)\"\n [class.dragging-row]=\"draggedNode()?.Id === item.Id\"\n [class.drop-target-active]=\"dragOverFolderId() === item.Id\"\n >\n <td class=\"text-center checkbox-col-td\" (click)=\"onCheckboxCellClick($event, item, i)\">\n <label\n nz-checkbox\n [ngModel]=\"isItemChecked(item.Id)\"\n (ngModelChange)=\"onToggleItemCheck(item, $event, i)\"\n (click)=\"$event.stopPropagation()\"\n ></label>\n </td>\n <td class=\"text-center\">{{ i + 1 + (drive.pageIndex() - 1) * drive.pageSize() }}</td>\n <td\n [nzIndentSize]=\"drive.isTreeTableView() ? (item.treeLevel || 0) * 22 : 0\"\n [nzShowExpand]=\"drive.isTreeTableView() && isFolderLike(item) && !item.IsBrokenShortcut\"\n [nzExpand]=\"!!item.treeExpanded\"\n (nzExpandChange)=\"toggleExpandTreeFolder(item, $event)\"\n >\n <div class=\"node-name-cell\">\n <span class=\"node-icon-wrap\">\n <nz-icon\n [nzType]=\"isFolderLike(item) ? 'folder-fill' : getFileIcon(item)\"\n [style.color]=\"isFolderLike(item) ? '#f59e0b' : 'var(--primary-color)'\"\n class=\"node-icon\"\n ></nz-icon>\n @if (item.NodeType === DriveNodeType.Shortcut) {\n <span class=\"shortcut-badge\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'L\u1ED1i t\u1EAFt tr\u1ECF t\u1EDBi: ' + (item.ShortcutTargetName || item.Name)\"\n -->\n <nz-icon nzType=\"select\"></nz-icon>\n </span>\n }\n </span>\n <span\n class=\"node-title link-detail\"\n (click)=\"\n drive.isTreeTableView()\n ? toggleExpandTreeFolder(item, !item.treeExpanded)\n : onRowSingleClick(item, $event)\n \"\n >{{ item.Name }}</span\n >\n @if (drive.keyword().trim() && item.ParentFolderName && item.ParentId !== drive.currentFolderId()) {\n <nz-tag\n nzColor=\"default\"\n style=\"margin-left: 6px; cursor: pointer\"\n (click)=\"$event.stopPropagation(); navigateToFolder(item.ParentId || null)\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'\u0110ang n\u1EB1m trong th\u01B0 m\u1EE5c: ' + item.ParentFolderName + ' (Nh\u1EA5n \u0111\u1EC3 m\u1EDF th\u01B0 m\u1EE5c)'\"\n -->\n <nz-icon nzType=\"folder\"></nz-icon> {{ item.ParentFolderName }}\n </nz-tag>\n }\n @if (item.NodeType === DriveNodeType.Shortcut) {\n @if (item.IsBrokenShortcut) {\n <nz-tag nzColor=\"error\" style=\"margin-left: 6px\">M\u1EE5c g\u1ED1c \u0111\u00E3 x\u00F3a</nz-tag>\n } @else {\n <nz-tag nzColor=\"purple\" style=\"margin-left: 6px\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'\u0110\u00EDch: ' + (item.ShortcutTargetName || item.Name)\"\n -->\n <nz-icon nzType=\"link\"></nz-icon> L\u1ED1i t\u1EAFt\n </nz-tag>\n }\n }\n @if (item.IsStarred) {\n <nz-icon nzType=\"star\" nzTheme=\"fill\" style=\"color: #eab308; margin-left: 4px\"></nz-icon>\n }\n @if (item.IsShared) {\n <nz-tag nzColor=\"processing\" style=\"margin-left: 6px\">\u0110\u00E3 chia s\u1EBB</nz-tag>\n }\n @if (!item.InheritPermissions) {\n <nz-tag nzColor=\"warning\" nz-tooltip nzTooltipTitle=\"\u0110\u00E3 ng\u1EAFt k\u1EBF th\u1EEBa quy\u1EC1n t\u1EEB th\u01B0 m\u1EE5c cha\">\n \u0110\u1ED9c l\u1EADp\n </nz-tag>\n }\n </div>\n </td>\n <!-- <td>{{ item.OwnerName || item.OwnerId }}</td> -->\n <td class=\"text-center\">\n <nz-tag\n [nzColor]=\"\n item.EffectiveAccess >= DriveAccessLevel.Editor\n ? 'green'\n : item.EffectiveAccess >= DriveAccessLevel.Uploader\n ? 'cyan'\n : 'default'\n \"\n >\n {{\n item.EffectiveAccess >= DriveAccessLevel.Manager\n ? \"Qu\u1EA3n tr\u1ECB\"\n : item.EffectiveAccess >= DriveAccessLevel.Editor\n ? \"Ch\u1EC9nh s\u1EEDa\"\n : item.EffectiveAccess >= DriveAccessLevel.Uploader\n ? \"Xem & T\u1EA3i l\u00EAn\"\n : item.CanDownload && item.EffectiveAccess >= DriveAccessLevel.Downloader\n ? \"Xem & T\u1EA3i\"\n : \"Ch\u1EC9 xem\"\n }}\n </nz-tag>\n </td>\n <td class=\"text-right\">\n {{ isFolderLike(item) ? \"\u2014\" : (item.SizeBytes | formatBytes) }}\n </td>\n <td>\n {{ item.CreatedUser }}\n </td>\n <td class=\"text-center\">\n <span\n nz-tooltip\n [nzTooltipTitle]=\"tooltipTemplate\"\n nzTooltipOverlayClassName=\"nowrap-tooltip\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n {{ item.UpdatedDate | date: \"dd/MM/yyyy HH:mm\" }}\n </span>\n\n <ng-template #tooltipTemplate> Ng\u01B0\u1EDDi c\u1EADp nh\u1EADt: {{ item.UpdatedUser }} </ng-template>\n </td>\n <!-- <td class=\"text-center\">\n <div class=\"action-btn-group\">\n @if (drive.currentViewMode() !== \"TRASH\") {\n @if (item.CanShare || item.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openShareDrawer(item)\"\n nz-tooltip\n nzTooltipTitle=\"Chia s\u1EBB & Ph\u00E2n quy\u1EC1n\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n @if (item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openMoveDrawer(item)\"\n nz-tooltip\n nzTooltipTitle=\"Chuy\u1EC3n th\u01B0 m\u1EE5c\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"drag\"></nz-icon>\n </button>\n }\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openCopyDrawer(item)\"\n nz-tooltip\n nzTooltipTitle=\"Sao ch\u00E9p\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"copy\"></nz-icon>\n </button>\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openShortcutDrawer(item)\"\n nz-tooltip\n nzTooltipTitle=\"T\u1EA1o l\u1ED1i t\u1EAFt\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"link\"></nz-icon>\n </button>\n @if (\n item.NodeType === DriveNodeType.Folder &&\n drive.usePhysicalFolders() &&\n item.EffectiveAccess >= DriveAccessLevel.Manager\n ) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openRelocateDrawer(item)\"\n nz-tooltip\n nzTooltipTitle=\"\u0110\u1ED5i \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD / \u00C1nh x\u1EA1 \u1ED5 c\u1EE9ng l\u01B0u tr\u1EEF\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"hdd\"></nz-icon>\n </button>\n }\n @if (\n isFileLike(item) &&\n !item.IsBrokenShortcut &&\n item.CanDownload &&\n item.EffectiveAccess >= DriveAccessLevel.Downloader\n ) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); onDownloadItem(item)\"\n nz-tooltip\n nzTooltipTitle=\"T\u1EA3i xu\u1ED1ng\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"download\"></nz-icon>\n </button>\n }\n @if (\n isFileLike(item) && !item.IsBrokenShortcut && item.EffectiveAccess >= DriveAccessLevel.Editor\n ) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openVersionDrawer(item)\"\n nz-tooltip\n nzTooltipTitle=\"L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"history\"></nz-icon>\n </button>\n }\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openFolderDrawer('rename', item)\"\n nz-tooltip\n [nzTooltipTitle]=\"\n item.EffectiveAccess >= DriveAccessLevel.Editor\n ? '\u0110\u1ED5i t\u00EAn & Chi ti\u1EBFt'\n : 'Xem chi ti\u1EBFt & Nh\u1EADt k\u00FD'\n \"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon\n [nzType]=\"item.EffectiveAccess >= DriveAccessLevel.Editor ? 'edit' : 'info-circle'\"\n ></nz-icon>\n </button>\n @if (item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-warn\"\n (click)=\"$event.stopPropagation(); onSoftDelete(item)\"\n nz-tooltip\n nzTooltipTitle=\"Chuy\u1EC3n v\u00E0o th\u00F9ng r\u00E1c\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n } @else {\n @if (item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); onRestore(item)\"\n nz-tooltip\n nzTooltipTitle=\"Kh\u00F4i ph\u1EE5c\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"rollback\"></nz-icon>\n </button>\n }\n @if (item.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-warn\"\n (click)=\"$event.stopPropagation(); onPermanentDelete(item)\"\n nz-tooltip\n nzTooltipTitle=\"X\u00F3a v\u0129nh vi\u1EC5n\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n }\n </div>\n </td> -->\n </tr>\n }\n </tbody>\n </nz-table>\n <!-- CONTEXT MENU CHU\u1ED8T PH\u1EA2I (H\u1ED6 TR\u1EE2 C\u1EA2 THAO T\u00C1C \u0110\u01A0N L\u1EBA & THAO T\u00C1C H\u00C0NG LO\u1EA0T KHI T\u00CDCH CH\u1ECCN NHI\u1EC0U M\u1EE4C) -->\n <nz-dropdown-menu #menu=\"nzDropdownMenu\">\n @if (selectedContextItem(); as ctx) {\n <ul nz-menu>\n @if (checkedCount() > 1 && isItemChecked(ctx.Id)) {\n <li nz-menu-group [nzTitle]=\"'\u26A1 Thao t\u00E1c h\u00E0ng lo\u1EA1t (' + checkedCount() + ' m\u1EE5c \u0111\u00E3 ch\u1ECDn)'\">\n <ul>\n @if (drive.currentViewMode() === \"TRASH\") {\n @if (canBulkEditChecked()) {\n <li nz-menu-item (click)=\"onBulkRestoreFromTrash()\">\n <nz-icon nzType=\"rollback\"></nz-icon> Kh\u00F4i ph\u1EE5c {{ checkedCount() }} m\u1EE5c \u0111\u00E3 ch\u1ECDn\n </li>\n }\n @if (canBulkManageChecked()) {\n <li nz-menu-item nzDanger (click)=\"onBulkPermanentDelete()\">\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a v\u0129nh vi\u1EC5n {{ checkedCount() }} m\u1EE5c \u0111\u00E3 ch\u1ECDn\n </li>\n }\n } @else {\n @if (canBulkEditChecked()) {\n <li nz-menu-item (click)=\"openBulkMoveDrawer()\">\n <nz-icon nzType=\"drag\"></nz-icon> Di chuy\u1EC3n {{ checkedCount() }} m\u1EE5c \u0111\u00E3 ch\u1ECDn...\n </li>\n }\n <li nz-menu-item (click)=\"openBulkCopyDrawer()\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p {{ checkedCount() }} m\u1EE5c \u0111\u00E3 ch\u1ECDn...\n </li>\n @if (canBulkManageChecked()) {\n <li nz-menu-item (click)=\"openBulkPermissionMatrixDrawer()\">\n <nz-icon nzType=\"usergroup-add\"></nz-icon> Ph\u00E2n quy\u1EC1n h\u00E0ng lo\u1EA1t ({{ checkedCount() }} m\u1EE5c)...\n </li>\n }\n @if (canBulkDownloadChecked()) {\n <li nz-menu-item (click)=\"onBulkDownloadChecked()\">\n <nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng c\u00E1c t\u1EADp tin \u0111\u00E3 ch\u1ECDn\n </li>\n }\n <li nz-menu-item (click)=\"onBulkToggleStar()\">\n <nz-icon nzType=\"star\"></nz-icon>\n {{\n allCheckedAreStarred()\n ? \"B\u1ECF d\u1EA5u sao (\" + checkedCount() + \" m\u1EE5c)\"\n : \"G\u1EAFn d\u1EA5u sao (\" + checkedCount() + \" m\u1EE5c)\"\n }}\n </li>\n @if (canBulkEditChecked()) {\n <li nz-menu-item nzDanger (click)=\"onBulkSoftDelete()\">\n <nz-icon nzType=\"delete\"></nz-icon> Chuy\u1EC3n {{ checkedCount() }} m\u1EE5c v\u00E0o th\u00F9ng r\u00E1c\n </li>\n }\n }\n <li nz-menu-item (click)=\"clearCheckedSelection()\">\n <nz-icon nzType=\"close-circle\"></nz-icon> B\u1ECF ch\u1ECDn t\u1EA5t c\u1EA3 ({{ checkedCount() }} m\u1EE5c)\n </li>\n </ul>\n </li>\n <li nz-menu-divider></li>\n }\n @if (drive.currentViewMode() === \"TRASH\") {\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-item (click)=\"onRestore(ctx)\"><nz-icon nzType=\"rollback\"></nz-icon> Kh\u00F4i ph\u1EE5c m\u1EE5c n\u00E0y</li>\n }\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Manager) {\n <li nz-menu-item nzDanger (click)=\"onPermanentDelete(ctx)\">\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a v\u0129nh vi\u1EC5n m\u1EE5c n\u00E0y\n </li>\n }\n <li nz-menu-divider></li>\n <li nz-menu-item nzDanger (click)=\"onEmptyTrash()\">\n <nz-icon nzType=\"clear\"></nz-icon> D\u1ECDn s\u1EA1ch to\u00E0n b\u1ED9 th\u00F9ng r\u00E1c...\n </li>\n } @else {\n @if (ctx.NodeType === DriveNodeType.File) {\n <li nz-menu-item (click)=\"previewFile(ctx)\">\n <nz-icon nzType=\"eye\"></nz-icon> Xem tr\u1EF1c ti\u1EBFp (Drawer Preview)\n </li>\n @if (ctx.CanDownload && ctx.EffectiveAccess >= DriveAccessLevel.Downloader) {\n <li nz-menu-item (click)=\"onDownloadItem(ctx)\"><nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng</li>\n }\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-item (click)=\"openVersionDrawer(ctx)\">\n <nz-icon nzType=\"history\"></nz-icon> L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n...\n </li>\n }\n <li nz-menu-divider></li>\n }\n @if (ctx.CanShare || ctx.EffectiveAccess >= DriveAccessLevel.Manager) {\n <li nz-menu-item (click)=\"openShareDrawer(ctx)\">\n <nz-icon nzType=\"usergroup-add\"></nz-icon> Ph\u00E2n quy\u1EC1n & Chia s\u1EBB...\n </li>\n }\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-item (click)=\"openMoveDrawer(ctx)\">\n <nz-icon nzType=\"drag\"></nz-icon> Di chuy\u1EC3n sang th\u01B0 m\u1EE5c kh\u00E1c...\n </li>\n }\n <li nz-menu-item (click)=\"openCopyDrawer(ctx)\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p t\u1EDBi (Copy to)...\n </li>\n <li nz-menu-item (click)=\"openShortcutDrawer(ctx)\">\n <nz-icon nzType=\"link\"></nz-icon> T\u1EA1o l\u1ED1i t\u1EAFt (Shortcut)...\n </li>\n @if (\n ctx.NodeType === DriveNodeType.Folder &&\n drive.usePhysicalFolders() &&\n ctx.EffectiveAccess >= DriveAccessLevel.Manager\n ) {\n <li nz-menu-item (click)=\"openRelocateDrawer(ctx)\">\n <nz-icon nzType=\"hdd\"></nz-icon> \u0110\u1ED5i \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD / Chuy\u1EC3n \u1ED5 \u0111\u0129a...\n </li>\n }\n <li nz-menu-item (click)=\"openFolderDrawer('rename', ctx)\">\n <nz-icon [nzType]=\"ctx.EffectiveAccess >= DriveAccessLevel.Editor ? 'edit' : 'info-circle'\"></nz-icon>\n {{\n ctx.EffectiveAccess >= DriveAccessLevel.Editor ? \"\u0110\u1ED5i t\u00EAn & Chi ti\u1EBFt...\" : \"Xem chi ti\u1EBFt & Nh\u1EADt k\u00FD...\"\n }}\n </li>\n <li nz-menu-item (click)=\"drive.toggleStar(ctx.Id)\">\n <nz-icon nzType=\"star\"></nz-icon> {{ ctx.IsStarred ? \"B\u1ECF d\u1EA5u sao\" : \"Th\u00EAm d\u1EA5u sao\" }}\n </li>\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-divider></li>\n <li nz-menu-item nzDanger (click)=\"onSoftDelete(ctx)\">\n <nz-icon nzType=\"delete\"></nz-icon> Chuy\u1EC3n v\u00E0o th\u00F9ng r\u00E1c\n </li>\n }\n @if (ctx.NodeType === DriveNodeType.Folder) {\n <li nz-menu-item (click)=\"openTemplateDrawer('create', undefined, ctx)\">\n <nz-icon nzType=\"apartment\"></nz-icon> L\u01B0u c\u1EA5u tr\u00FAc th\u01B0 m\u1EE5c l\u00E0m M\u1EABu...\n </li>\n }\n }\n </ul>\n }\n </nz-dropdown-menu>\n </main>\n </div>\n <!-- ========================================================================= -->\n <!-- DRAWER 1: CHIA S\u1EBA & PH\u00C2N QUY\u1EC0N (ACL / RBAC / SHARE LINKS) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"shareDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"920\"\n [nzClosable]=\"false\"\n [nzTitle]=\"shareDrawerTitleTpl\"\n [nzFooter]=\"shareDrawerFooterTpl\"\n (nzOnClose)=\"shareDrawerVisible = false\"\n >\n <ng-template #shareDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n @if (activeActionNode(); as node) {\n <nz-icon\n [nzType]=\"node.NodeType === DriveNodeType.Folder ? 'folder-fill' : getFileIcon(node)\"\n [style.color]=\"node.NodeType === DriveNodeType.Folder ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 18px\"\n ></nz-icon>\n <strong>Chia s\u1EBB & Ph\u00E2n quy\u1EC1n: {{ node.Name }}</strong>\n <nz-tag nzColor=\"blue\">{{ node.NodeType === DriveNodeType.Folder ? \"Th\u01B0 m\u1EE5c\" : \"T\u1EADp tin\" }}</nz-tag>\n }\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"shareDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (activeActionNode(); as node) {\n <lib-drive-share-modal [nodeId]=\"node.Id\"></lib-drive-share-modal>\n }\n </ng-container>\n <ng-template #shareDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"shareDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 2: L\u1ECACH S\u1EEC PHI\u00CAN B\u1EA2N T\u1EACP TIN (FILE VERSIONS) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"versionDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"760\"\n [nzClosable]=\"false\"\n [nzTitle]=\"versionDrawerTitleTpl\"\n [nzFooter]=\"versionDrawerFooterTpl\"\n (nzOnClose)=\"versionDrawerVisible = false\"\n >\n <ng-template #versionDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"history\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n: {{ activeActionNode()?.Name }}</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"versionDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (activeActionNode(); as node) {\n <lib-drive-version-modal\n [nodeId]=\"node.Id\"\n [nodeName]=\"node.Name\"\n [canEdit]=\"node.EffectiveAccess >= DriveAccessLevel.Editor\"\n [canDownload]=\"node.CanDownload && node.EffectiveAccess >= DriveAccessLevel.Downloader\"\n (closed)=\"versionDrawerVisible = false\"\n ></lib-drive-version-modal>\n }\n </ng-container>\n <ng-template #versionDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"versionDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 3: T\u1EA0O TH\u01AF M\u1EE4C M\u1EDAI / \u0110\u1ED4I T\u00CAN & CHI TI\u1EBET THU\u1ED8C T\u00CDNH + ACTIVITY LOG -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"folderDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"480\"\n [nzClosable]=\"false\"\n [nzTitle]=\"folderDrawerTitleTpl\"\n [nzFooter]=\"folderDrawerFooterTpl\"\n (nzOnClose)=\"folderDrawerVisible = false\"\n >\n <ng-template #folderDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon\n [nzType]=\"folderDrawerMode === 'create' ? 'folder-add' : canRenameTargetNode() ? 'edit' : 'info-circle'\"\n style=\"font-size: 18px; color: var(--primary-color)\"\n ></nz-icon>\n <strong>\n {{\n folderDrawerMode === \"create\"\n ? \"T\u1EA1o th\u01B0 m\u1EE5c m\u1EDBi\"\n : canRenameTargetNode()\n ? \"\u0110\u1ED5i t\u00EAn & Chi ti\u1EBFt m\u1EE5c\"\n : \"Chi ti\u1EBFt & Nh\u1EADt k\u00FD ho\u1EA1t \u0111\u1ED9ng\"\n }}\n </strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"folderDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n @if (folderDrawerMode === \"create\" && folderDrawerParentOverride; as parentOverride) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">T\u1EA1o b\u00EAn trong th\u01B0 m\u1EE5c cha:</span>\n <nz-tag nzColor=\"gold\"> <nz-icon nzType=\"folder-open\"></nz-icon> {{ parentOverride.Name }} </nz-tag>\n </div>\n </div>\n }\n <div>\n <label class=\"drawer-field-label\">\n {{ folderDrawerMode === \"create\" ? \"T\u00EAn th\u01B0 m\u1EE5c m\u1EDBi\" : \"T\u00EAn hi\u1EC3n th\u1ECB\" }}\n </label>\n <input\n nz-input\n [(ngModel)]=\"folderDrawerInputName\"\n [disabled]=\"folderDrawerMode === 'rename' && !canRenameTargetNode()\"\n [appAutoFocus]=\"folderDrawerVisible && (folderDrawerMode === 'create' || canRenameTargetNode())\"\n placeholder=\"Nh\u1EADp t\u00EAn th\u01B0 m\u1EE5c / t\u00E0i li\u1EC7u...\"\n (keyup.enter)=\"submitFolderDrawer()\"\n />\n </div>\n @if (folderDrawerMode === \"create\" && drive.usePhysicalFolders() && drive.currentPhysicalPath(); as phys) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Ch\u1EBF \u0111\u1ED9 l\u01B0u tr\u1EEF:</span>\n <nz-tag nzColor=\"green\">Th\u01B0 m\u1EE5c v\u1EADt l\u00FD (Disk)</nz-tag>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Th\u01B0 m\u1EE5c cha tr\u00EAn \u0111\u0129a:</span>\n <code class=\"break-word\">{{ phys }}</code>\n </div>\n </div>\n }\n @if (folderDrawerMode === \"rename\" && folderDrawerTargetNode; as target) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"target.NodeType === DriveNodeType.Folder ? 'folder-fill' : getFileIcon(target)\"\n [style.color]=\"target.NodeType === DriveNodeType.Folder ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ target.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n {{\n target.NodeType === DriveNodeType.Folder\n ? \"Th\u01B0 m\u1EE5c\"\n : \"T\u1EADp tin (\" + (target.Extension || target.MimeType || \"File\") + \")\"\n }}\n </div>\n </div>\n </div>\n <nz-divider style=\"margin: 10px 0\"></nz-divider>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Ch\u1EE7 s\u1EDF h\u1EEFu:</span>\n <strong>{{ target.OwnerName || target.OwnerId }}</strong>\n </div>\n @if (target.NodeType === DriveNodeType.File) {\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">K\u00EDch th\u01B0\u1EDBc:</span>\n <span>{{ target.SizeBytes | formatBytes }}</span>\n </div>\n }\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Quy\u1EC1n c\u1EE7a b\u1EA1n:</span>\n <nz-tag\n [nzColor]=\"\n target.EffectiveAccess >= DriveAccessLevel.Editor\n ? 'green'\n : target.EffectiveAccess >= DriveAccessLevel.Uploader\n ? 'cyan'\n : 'default'\n \"\n >\n {{\n target.EffectiveAccess >= DriveAccessLevel.Manager\n ? \"Qu\u1EA3n tr\u1ECB (Manager)\"\n : target.EffectiveAccess >= DriveAccessLevel.Editor\n ? \"Ch\u1EC9nh s\u1EEDa (Editor)\"\n : target.EffectiveAccess >= DriveAccessLevel.Uploader\n ? \"Xem & T\u1EA3i l\u00EAn (Uploader)\"\n : target.CanDownload && target.EffectiveAccess >= DriveAccessLevel.Downloader\n ? \"Xem & T\u1EA3i xu\u1ED1ng\"\n : \"Ch\u1EC9 xem (Viewer)\"\n }}\n </nz-tag>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">K\u1EBF th\u1EEBa quy\u1EC1n:</span>\n <nz-tag [nzColor]=\"target.InheritPermissions ? 'blue' : 'warning'\">\n {{ target.InheritPermissions ? \"\u0110ang k\u1EBF th\u1EEBa\" : \"\u0110\u1ED9c l\u1EADp\" }}\n </nz-tag>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">C\u1EADp nh\u1EADt cu\u1ED1i:</span>\n <span>{{ target.UpdatedDate | date: \"dd/MM/yyyy HH:mm\" }}</span>\n </div>\n @if (target.PhysicalRelativePath) {\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">\u0110\u01B0\u1EDDng d\u1EABn \u0111\u0129a:</span>\n <code class=\"break-word\">{{ target.PhysicalRelativePath }}</code>\n </div>\n }\n @if (drive.isCurrentUserAdmin() && drive.usePhysicalFolders() && drive.currentPhysicalPath(); as physPath) {\n <div class=\"physical-path-bar\">\n <span style=\"word-break: break-all\">\n \u0110\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD: <code style=\"padding-top: 0px\">{{ physPath }}</code>\n </span>\n <icon-copy [textToCopy]=\"physPath\" tooltip=\"Sao ch\u00E9p \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD tr\u00EAn Server\"></icon-copy>\n </div>\n }\n </div>\n <div>\n <label class=\"drawer-field-label\">Thao t\u00E1c nhanh</label>\n <div nz-flex nzWrap=\"wrap\" [nzGap]=\"8\">\n @if (target.CanShare || target.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openShareDrawer(target)\">\n <nz-icon nzType=\"share-alt\"></nz-icon> Chia s\u1EBB & Ph\u00E2n quy\u1EC1n\n </button>\n }\n @if (target.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openMoveDrawer(target)\">\n <nz-icon nzType=\"drag\"></nz-icon> Di chuy\u1EC3n\n </button>\n }\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openCopyDrawer(target)\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p t\u1EDBi\n </button>\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openShortcutDrawer(target)\">\n <nz-icon nzType=\"link\"></nz-icon> T\u1EA1o l\u1ED1i t\u1EAFt\n </button>\n @if (\n target.NodeType === DriveNodeType.Folder &&\n drive.usePhysicalFolders() &&\n target.EffectiveAccess >= DriveAccessLevel.Manager\n ) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openRelocateDrawer(target)\">\n <nz-icon nzType=\"hdd\"></nz-icon> \u0110\u1ED5i \u1ED5 \u0111\u0129a v\u1EADt l\u00FD\n </button>\n }\n @if (target.NodeType === DriveNodeType.File) {\n @if (target.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openVersionDrawer(target)\">\n <nz-icon nzType=\"history\"></nz-icon> L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n\n </button>\n }\n @if (target.CanDownload && target.EffectiveAccess >= DriveAccessLevel.Downloader) {\n <button nz-button nzSize=\"small\" (click)=\"onDownloadItem(target)\">\n <nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng\n </button>\n }\n }\n <button nz-button nzSize=\"small\" (click)=\"drive.toggleStar(target.Id)\">\n <nz-icon nzType=\"star\" [nzTheme]=\"target.IsStarred ? 'fill' : 'outline'\"></nz-icon>\n {{ target.IsStarred ? \"B\u1ECF sao\" : \"G\u1EAFn sao\" }}\n </button>\n </div>\n </div>\n <!-- NH\u1EACT K\u00DD HO\u1EA0T \u0110\u1ED8NG (ACTIVITY LOG) -->\n <div>\n <label class=\"drawer-field-label\">\n <nz-icon nzType=\"OrderedList\"></nz-icon> Nh\u1EADt k\u00FD ho\u1EA1t \u0111\u1ED9ng g\u1EA7n \u0111\u00E2y ({{ nodeActivities().length }})\n </label>\n <div class=\"drawer-meta-card\" style=\"max-height: 240px; overflow-y: auto\">\n @if (nodeActivities().length === 0) {\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">Ch\u01B0a c\u00F3 nh\u1EADt k\u00FD ho\u1EA1t \u0111\u1ED9ng.</div>\n } @else {\n @for (act of nodeActivities(); track act.Id) {\n <div style=\"padding: 6px 0; border-bottom: 1px dashed var(--app-border, #e2e8f0); font-size: 12px\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <nz-tag nzColor=\"blue\">{{ formatActivityAction(act.ActionType) }}</nz-tag>\n <span style=\"color: var(--app-text-muted, #64748b)\">{{\n act.CreatedDate | date: \"dd/MM/yyyy HH:mm:ss\"\n }}</span>\n </div>\n <div style=\"margin-top: 4px\">\n Th\u1EF1c hi\u1EC7n b\u1EDFi: <strong>{{ act.ActorUserName || act.ActorUserId || \"H\u1EC7 th\u1ED1ng\" }}</strong>\n </div>\n @if (act.DetailJson) {\n <div style=\"margin-top: 2px; color: var(--app-text-muted, #64748b); word-break: break-all\">\n <code>{{ formatActivityDetail(act) }}</code>\n </div>\n }\n </div>\n }\n }\n </div>\n </div>\n }\n @if (folderDrawerMode === \"create\") {\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <label class=\"drawer-field-label\" style=\"margin-bottom: 0\">\n <nz-icon nzType=\"apartment\" style=\"color: #d97706; margin-right: 4px\"></nz-icon>\n T\u1EA1o nhanh t\u1EEB M\u1EABu c\u00E2y th\u01B0 m\u1EE5c (T\u00F9y ch\u1ECDn)\n </label>\n <a style=\"font-size: 12px\" (click)=\"folderDrawerVisible = false; openTemplateDrawer('create')\">\n + \u0110\u1ECBnh ngh\u0129a m\u1EABu m\u1EDBi\n </a>\n </div>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Kh\u00F4ng d\u00F9ng m\u1EABu (Ch\u1EC9 t\u1EA1o 1 th\u01B0 m\u1EE5c \u0111\u01A1n) --\"\n [(ngModel)]=\"folderDrawerSelectedTemplateId\"\n (ngModelChange)=\"onFolderDrawerTemplateSelect($event)\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Ch\u1EC9 t\u1EA1o 1 th\u01B0 m\u1EE5c \u0111\u01A1n\"></nz-option>\n @for (tpl of drive.folderTemplates(); track tpl.Id) {\n <nz-option\n [nzValue]=\"tpl.Id\"\n [nzLabel]=\"'\uD83D\uDDC2 ' + tpl.Name + ' [' + tpl.Code + '] (' + tpl.TotalFolderCount + ' th\u01B0 m\u1EE5c)'\"\n ></nz-option>\n }\n </nz-select>\n\n @if (folderDrawerSelectedTemplateId) {\n <label nz-checkbox [(ngModel)]=\"folderDrawerUseWrapperFolder\" style=\"font-size: 12px; margin-top: 4px\">\n \u0110\u1EB7t to\u00E0n b\u1ED9 c\u00E2y th\u01B0 m\u1EE5c m\u1EABu b\u00EAn trong th\u01B0 m\u1EE5c g\u1ED1c\n <strong>\"{{ folderDrawerInputName || \"...\" }}\"</strong>\n </label>\n <div class=\"quota-sub\" style=\"margin-top: 2px\">\n N\u1EBFu b\u1ECF t\u00EDch, c\u00E1c nh\u00E1nh th\u01B0 m\u1EE5c con c\u1EE7a m\u1EABu s\u1EBD \u0111\u01B0\u1EE3c t\u1EA1o tr\u1EF1c ti\u1EBFp ngay trong th\u01B0 m\u1EE5c \u0111ang m\u1EDF.\n </div>\n }\n </div>\n }\n </div>\n </ng-container>\n <ng-template #folderDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"folderDrawerVisible = false\">\u0110\u00F3ng</button>\n @if (folderDrawerMode === \"create\" || canRenameTargetNode()) {\n <button nz-button nzType=\"primary\" (click)=\"submitFolderDrawer()\">\n <nz-icon nzType=\"check\"></nz-icon>\n {{ folderDrawerMode === \"create\" ? \"T\u1EA1o th\u01B0 m\u1EE5c\" : \"L\u01B0u t\u00EAn m\u1EDBi\" }}\n </button>\n }\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 4: XEM TR\u1EF0C TUY\u1EBEN T\u00C0I LI\u1EC6U (PREVIEW DRAWER) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"previewDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"'75vw'\"\n [nzClosable]=\"false\"\n [nzBodyStyle]=\"{ padding: '0', height: '100%', display: 'flex', flexDirection: 'column', overflow: 'hidden' }\"\n [nzTitle]=\"previewDrawerTitleTpl\"\n [nzFooter]=\"previewDrawerFooterTpl\"\n (nzOnClose)=\"previewDrawerVisible = false\"\n >\n <ng-template #previewDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"eye\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>{{ previewFileName }}</strong>\n </div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n @if (activeActionNode(); as node) {\n @if (node.CanDownload && node.EffectiveAccess >= DriveAccessLevel.Downloader) {\n <button nz-button nzSize=\"small\" nzType=\"primary\" (click)=\"onDownloadItem(node)\">\n <nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng\n </button>\n }\n @if (node.CanShare || node.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button nz-button nzSize=\"small\" (click)=\"previewDrawerVisible = false; openShareDrawer(node)\">\n <nz-icon nzType=\"share-alt\"></nz-icon> Chia s\u1EBB\n </button>\n }\n @if (node.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button nz-button nzSize=\"small\" (click)=\"previewDrawerVisible = false; openVersionDrawer(node)\">\n <nz-icon nzType=\"history\"></nz-icon> Phi\u00EAn b\u1EA3n\n </button>\n }\n }\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"previewDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div class=\"drive-preview-body-fill\">\n <extend-view-file-content\n [previewType]=\"previewType\"\n [previewContent]=\"previewContent\"\n ></extend-view-file-content>\n </div>\n </ng-container>\n <ng-template #previewDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button type=\"button\" nz-button (click)=\"previewDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 5: T\u1EA0O L\u1ED0I T\u1EAET (CREATE SHORTCUT DRAWER CHO FILE & FOLDER) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"shortcutDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"460\"\n [nzClosable]=\"false\"\n [nzTitle]=\"shortcutDrawerTitleTpl\"\n [nzFooter]=\"shortcutDrawerFooterTpl\"\n (nzOnClose)=\"shortcutDrawerVisible = false\"\n >\n <ng-template #shortcutDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"link\" style=\"font-size: 18px; color: #7c3aed\"></nz-icon>\n <strong>T\u1EA1o l\u1ED1i t\u1EAFt (Shortcut)</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"shortcutDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (shortcutSourceNode(); as src) {\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"isFolderLike(src) ? 'folder-fill' : getFileIcon(src)\"\n [style.color]=\"isFolderLike(src) ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ src.ShortcutTargetName || src.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n M\u1EE5c g\u1ED1c: {{ isFolderLike(src) ? \"Th\u01B0 m\u1EE5c\" : \"T\u1EADp tin\" }} \u2022 Ch\u1EE7 s\u1EDF h\u1EEFu:\n {{ src.OwnerName || src.OwnerId }}\n </div>\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">T\u00EAn l\u1ED1i t\u1EAFt</label>\n <input\n nz-input\n [(ngModel)]=\"shortcutInputName\"\n [appAutoFocus]=\"shortcutDrawerVisible\"\n placeholder=\"Nh\u1EADp t\u00EAn hi\u1EC3n th\u1ECB c\u1EE7a l\u1ED1i t\u1EAFt...\"\n (keyup.enter)=\"submitShortcutDrawer()\"\n />\n </div>\n <div>\n <label class=\"drawer-field-label\">Kh\u00F4ng gian l\u01B0u l\u1ED1i t\u1EAFt</label>\n <nz-select\n [(ngModel)]=\"shortcutSpaceKey\"\n (ngModelChange)=\"onShortcutSpaceKeyChange($event)\"\n style=\"width: 100%\"\n >\n <nz-option nzValue=\"MY_DRIVE\" nzLabel=\"Drive c\u00E1 nh\u00E2n (My Drive)\"></nz-option>\n <nz-option nzValue=\"ORG_DRIVE\" nzLabel=\"Kho T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (Org Drive)\"></nz-option>\n @for (sp of drive.customSpaces(); track sp.Id) {\n <nz-option [nzValue]=\"'CUSTOM:' + sp.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + sp.Name\"></nz-option>\n }\n </nz-select>\n </div>\n <div>\n <label class=\"drawer-field-label\">Th\u01B0 m\u1EE5c \u0111\u00EDch ch\u1EE9a l\u1ED1i t\u1EAFt</label>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Th\u01B0 m\u1EE5c g\u1ED1c (Root) --\"\n [(ngModel)]=\"shortcutDestFolderId\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Th\u01B0 m\u1EE5c g\u1ED1c (Root)\"></nz-option>\n @for (f of availableFolders(); track f.Id) {\n <nz-option [nzValue]=\"f.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + f.Name\"></nz-option>\n }\n </nz-select>\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n L\u1ED1i t\u1EAFt tr\u1ECF tr\u1EF1c ti\u1EBFp t\u1EDBi m\u1EE5c g\u1ED1c m\u00E0 kh\u00F4ng t\u1ED1n th\u00EAm dung l\u01B0\u1EE3ng l\u01B0u tr\u1EEF (0 B).\n </div>\n </div>\n </div>\n }\n </ng-container>\n <ng-template #shortcutDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"shortcutDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitShortcutDrawer()\">\n <nz-icon nzType=\"link\"></nz-icon> T\u1EA1o l\u1ED1i t\u1EAFt\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 6: DI CHUY\u1EC2N FILE / FOLDER SANG TH\u01AF M\u1EE4C HO\u1EB6C KH\u00D4NG GIAN KH\u00C1C -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"moveDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"460\"\n [nzClosable]=\"false\"\n [nzTitle]=\"moveDrawerTitleTpl\"\n [nzFooter]=\"moveDrawerFooterTpl\"\n (nzOnClose)=\"moveDrawerVisible = false\"\n >\n <ng-template #moveDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"drag\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>Di chuy\u1EC3n sang th\u01B0 m\u1EE5c / kh\u00F4ng gian kh\u00E1c</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"moveDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (moveSourceNode(); as src) {\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"isFolderLike(src) ? 'folder-fill' : getFileIcon(src)\"\n [style.color]=\"isFolderLike(src) ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n @if (moveSourceNodes().length > 1) {\n <div style=\"font-weight: 600\">\u0110ang ch\u1ECDn di chuy\u1EC3n {{ moveSourceNodes().length }} m\u1EE5c c\u00F9ng l\u00FAc</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n Bao g\u1ED3m: {{ moveSourceNodes()[0].Name }} v\u00E0 {{ moveSourceNodes().length - 1 }} m\u1EE5c kh\u00E1c\n </div>\n } @else {\n <div style=\"font-weight: 600\">{{ src.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n Lo\u1EA1i:\n {{\n src.NodeType === DriveNodeType.Folder\n ? \"Th\u01B0 m\u1EE5c\"\n : src.NodeType === DriveNodeType.Shortcut\n ? \"L\u1ED1i t\u1EAFt\"\n : \"T\u1EADp tin\"\n }}\n \u2022 Kh\u00F4ng gian hi\u1EC7n t\u1EA1i: {{ src.IsOrgNode ? \"T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\" : \"Drive c\u00E1 nh\u00E2n\" }}\n </div>\n }\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">Kh\u00F4ng gian \u0111\u00EDch</label>\n <nz-select\n [(ngModel)]=\"moveTargetSpaceKey\"\n (ngModelChange)=\"onMoveSpaceKeyChange($event)\"\n style=\"width: 100%\"\n >\n <nz-option nzValue=\"MY_DRIVE\" nzLabel=\"Drive c\u00E1 nh\u00E2n (My Drive)\"></nz-option>\n <nz-option nzValue=\"ORG_DRIVE\" nzLabel=\"Kho T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (Org Drive)\"></nz-option>\n @for (sp of drive.customSpaces(); track sp.Id) {\n <nz-option [nzValue]=\"'CUSTOM:' + sp.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + sp.Name\"></nz-option>\n }\n </nz-select>\n </div>\n <div>\n <label class=\"drawer-field-label\">Ch\u1ECDn th\u01B0 m\u1EE5c \u0111\u00EDch</label>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Th\u01B0 m\u1EE5c g\u1ED1c (Root) --\"\n [(ngModel)]=\"moveTargetFolderId\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Th\u01B0 m\u1EE5c g\u1ED1c (Root)\"></nz-option>\n @for (f of moveTargetFolders(); track f.Id) {\n <nz-option [nzValue]=\"f.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + f.Name\"></nz-option>\n }\n </nz-select>\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n B\u1EA1n c\u00F3 th\u1EC3 k\u00E9o th\u1EA3 tr\u1EF1c ti\u1EBFp d\u00F2ng t\u00E0i li\u1EC7u/th\u01B0 m\u1EE5c v\u00E0o m\u1EE5c <strong>\"Drive c\u00E1 nh\u00E2n\"</strong> ho\u1EB7c\n <strong>\"T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"</strong> \u1EDF thanh menu b\u00EAn tr\u00E1i \u0111\u1EC3 chuy\u1EC3n nhanh qua l\u1EA1i gi\u1EEFa 2 kh\u00F4ng gian.\n </div>\n </div>\n </div>\n }\n </ng-container>\n <ng-template #moveDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"moveDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitMoveDrawer()\">\n <nz-icon nzType=\"check\"></nz-icon> Di chuy\u1EC3n t\u1EDBi \u0111\u00E2y\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 9: SAO CH\u00C9P T\u1EDAI (COPY TO DRAWER CHO FILE / FOLDER / SHORTCUT) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"copyDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"460\"\n [nzClosable]=\"false\"\n [nzTitle]=\"copyDrawerTitleTpl\"\n [nzFooter]=\"copyDrawerFooterTpl\"\n (nzOnClose)=\"copyDrawerVisible = false\"\n >\n <ng-template #copyDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"copy\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>Sao ch\u00E9p t\u1EDBi (Copy To)</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"copyDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (copySourceNode(); as src) {\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"isFolderLike(src) ? 'folder-fill' : getFileIcon(src)\"\n [style.color]=\"isFolderLike(src) ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n @if (copySourceNodes().length > 1) {\n <div style=\"font-weight: 600\">\u0110ang ch\u1ECDn sao ch\u00E9p {{ copySourceNodes().length }} m\u1EE5c c\u00F9ng l\u00FAc</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n Bao g\u1ED3m: {{ copySourceNodes()[0].Name }} v\u00E0 {{ copySourceNodes().length - 1 }} m\u1EE5c kh\u00E1c\n </div>\n } @else {\n <div style=\"font-weight: 600\">{{ src.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n M\u1EE5c ngu\u1ED3n:\n {{\n src.NodeType === DriveNodeType.Folder\n ? \"Th\u01B0 m\u1EE5c (Sao ch\u00E9p \u0111\u1EC7 quy to\u00E0n b\u1ED9 nh\u00E1nh con)\"\n : src.NodeType === DriveNodeType.Shortcut\n ? \"L\u1ED1i t\u1EAFt\"\n : \"T\u1EADp tin\"\n }}\n </div>\n }\n </div>\n </div>\n </div>\n @if (copySourceNodes().length <= 1) {\n <div>\n <label class=\"drawer-field-label\">T\u00EAn b\u1EA3n sao (\u0110\u1EC3 tr\u1ED1ng \u0111\u1EC3 h\u1EC7 th\u1ED1ng t\u1EF1 \u0111\u1EB7t t\u00EAn)</label>\n <input\n nz-input\n [(ngModel)]=\"copyCustomName\"\n [appAutoFocus]=\"copyDrawerVisible\"\n placeholder=\"Nh\u1EADp t\u00EAn m\u1EDBi cho b\u1EA3n sao...\"\n (keyup.enter)=\"submitCopyDrawer()\"\n />\n </div>\n }\n <div>\n <label class=\"drawer-field-label\">Kh\u00F4ng gian \u0111\u00EDch</label>\n <nz-select\n [(ngModel)]=\"copyTargetSpaceKey\"\n (ngModelChange)=\"onCopySpaceKeyChange($event)\"\n style=\"width: 100%\"\n >\n <nz-option nzValue=\"MY_DRIVE\" nzLabel=\"Drive c\u00E1 nh\u00E2n (My Drive)\"></nz-option>\n <nz-option nzValue=\"ORG_DRIVE\" nzLabel=\"Kho T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (Org Drive)\"></nz-option>\n @for (sp of drive.customSpaces(); track sp.Id) {\n <nz-option [nzValue]=\"'CUSTOM:' + sp.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + sp.Name\"></nz-option>\n }\n </nz-select>\n </div>\n <div>\n <label class=\"drawer-field-label\">Ch\u1ECDn th\u01B0 m\u1EE5c \u0111\u00EDch ch\u1EE9a b\u1EA3n sao</label>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Th\u01B0 m\u1EE5c g\u1ED1c (Root) --\"\n [(ngModel)]=\"copyTargetFolderId\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Th\u01B0 m\u1EE5c g\u1ED1c (Root)\"></nz-option>\n @for (f of copyTargetFolders(); track f.Id) {\n <nz-option [nzValue]=\"f.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + f.Name\"></nz-option>\n }\n </nz-select>\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n B\u1EA3n sao ho\u00E0n to\u00E0n \u0111\u1ED9c l\u1EADp v\u1EDBi m\u1EE5c g\u1ED1c v\u00E0 \u0111\u01B0\u1EE3c t\u00EDnh v\u00E0o h\u1EA1n ng\u1EA1ch c\u1EE7a ng\u01B0\u1EDDi t\u1EA1o b\u1EA3n sao.\n </div>\n </div>\n </div>\n }\n </ng-container>\n <ng-template #copyDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"copyDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitCopyDrawer()\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p t\u1EDBi \u0111\u00E2y\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 7: \u0110\u1ED4I \u0110\u01AF\u1EDCNG D\u1EAAN V\u1EACT L\u00DD / \u00C1NH X\u1EA0 \u1ED4 C\u1EE8NG M\u1EDAI KHI K\u1EBET TH\u00DAC D\u1EF0 \u00C1N -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"relocateDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"500\"\n [nzClosable]=\"false\"\n [nzTitle]=\"relocateDrawerTitleTpl\"\n [nzFooter]=\"relocateDrawerFooterTpl\"\n (nzOnClose)=\"relocateDrawerVisible = false\"\n >\n <ng-template #relocateDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"hdd\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>\n {{ relocateTargetFolder() ? \"\u00C1nh x\u1EA1 / Chuy\u1EC3n \u1ED5 \u0111\u0129a th\u01B0 m\u1EE5c\" : \"C\u1EA5u h\u00ECnh RootPath l\u01B0u tr\u1EEF chung\" }}\n </strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"relocateDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n @if (relocateTargetFolder(); as folder) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon nzType=\"folder-fill\" style=\"font-size: 22px; color: #f59e0b\"></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ folder.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n \u0110\u01B0\u1EDDng d\u1EABn hi\u1EC7n t\u1EA1i:\n <code>{{ folder.PhysicalRelativePath || drive.currentPhysicalPath() || \"M\u1EB7c \u0111\u1ECBnh\" }}</code>\n </div>\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">\u0110\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD m\u1EDBi c\u1EE7a th\u01B0 m\u1EE5c (H\u1ED7 tr\u1EE3 \u1ED5 c\u1EE9ng kh\u00E1c / NAS)</label>\n <input\n nz-input\n [(ngModel)]=\"relocateNewPath\"\n [appAutoFocus]=\"relocateDrawerVisible\"\n placeholder=\"VD: E:Archive_2026DuAn_A ho\u1EB7c \\\\NAS01StorageDuAn_A\"\n (keyup.enter)=\"submitRelocateDrawer()\"\n />\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n Khi d\u1EF1 \u00E1n k\u1EBFt th\u00FAc v\u00E0 h\u1EA1 t\u1EA7ng chuy\u1EC3n th\u01B0 m\u1EE5c sang \u1ED5 c\u1EE9ng kh\u00E1c, \u0111\u1EB7t \u0111\u01B0\u1EDDng d\u1EABn m\u1EDBi t\u1EA1i \u0111\u00E2y \u0111\u1EC3 to\u00E0n b\u1ED9 th\u01B0\n m\u1EE5c con v\u00E0 file b\u00EAn trong t\u1EF1 \u0111\u1ED9ng map sang \u1ED5 c\u1EE9ng m\u1EDBi.\n </div>\n </div>\n <div class=\"drawer-meta-card\">\n <label nz-checkbox [(ngModel)]=\"relocateMoveFilesOnDisk\">\n <strong>T\u1EF1 \u0111\u1ED9ng di chuy\u1EC3n d\u1EEF li\u1EC7u v\u1EADt l\u00FD t\u1EEB \u0111\u01B0\u1EDDng d\u1EABn c\u0169 sang \u1ED5 \u0111\u0129a m\u1EDBi</strong>\n </label>\n <div class=\"quota-sub\" style=\"margin-left: 24px\">\n N\u1EBFu b\u1ED9 ph\u1EADn H\u1EA1 t\u1EA7ng \u0111\u00E3 copy/move s\u1EB5n th\u01B0 m\u1EE5c sang \u1ED5 c\u1EE9ng m\u1EDBi r\u1ED3i, h\u00E3y <strong>b\u1ECF ch\u1ECDn</strong> m\u1EE5c n\u00E0y \u0111\u1EC3\n h\u1EC7 th\u1ED1ng ch\u1EC9 c\u1EADp nh\u1EADt l\u1EA1i \u00E1nh x\u1EA1 \u0111\u01B0\u1EDDng d\u1EABn trong Database.\n </div>\n <label nz-checkbox [(ngModel)]=\"relocateSyncNewFiles\" style=\"margin-top: 6px\">\n <strong>\u0110\u1ED3ng b\u1ED9 b\u1ED5 sung c\u00E1c file/folder c\u00F3 s\u1EB5n t\u1EA1i \u0111\u01B0\u1EDDng d\u1EABn m\u1EDBi v\u00E0o Drive</strong>\n </label>\n </div>\n } @else {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">RootPath hi\u1EC7n t\u1EA1i:</span>\n <code class=\"break-word\">{{ drive.storageRootPath() || drive.currentPhysicalPath() }}</code>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Ch\u1EBF \u0111\u1ED9 th\u01B0 m\u1EE5c g\u1ED1c:</span>\n <nz-tag [nzColor]=\"drive.useSharedPhysicalRoot() ? 'green' : 'blue'\">\n {{\n drive.useSharedPhysicalRoot() ? \"D\u00F9ng chung 1 RootPath cho t\u1EA5t c\u1EA3 User\" : \"T\u00E1ch theo t\u1EEBng Username\"\n }}\n </nz-tag>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">\u0110\u01B0\u1EDDng d\u1EABn RootPath chung m\u1EDBi tr\u00EAn Server</label>\n <input\n nz-input\n [(ngModel)]=\"relocateNewPath\"\n [appAutoFocus]=\"relocateDrawerVisible\"\n placeholder=\"VD: D:ProjectStorageDriveRoot ho\u1EB7c E:ArchiveDrive\"\n (keyup.enter)=\"submitRelocateDrawer()\"\n />\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n T\u1EA5t c\u1EA3 c\u00E1c th\u01B0 m\u1EE5c ch\u01B0a ghim \u1ED5 \u0111\u0129a ri\u00EAng s\u1EBD t\u1EF1 \u0111\u1ED9ng \u0111\u1ECDc/ghi theo RootPath m\u1EDBi n\u00E0y.\n </div>\n </div>\n }\n </div>\n </ng-container>\n <ng-template #relocateDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"relocateDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitRelocateDrawer()\">\n <nz-icon nzType=\"save\"></nz-icon> L\u01B0u \u00E1nh x\u1EA1 v\u1EADt l\u00FD\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 8: QU\u1EA2N L\u00DD H\u1EA0N NG\u1EA0CH DUNG L\u01AF\u1EE2NG (DEFAULT QUOTA & PER-USER QUOTA) -->\n <!-- CH\u1EC8 D\u00C0NH RI\u00CANG CHO QU\u1EA2N TR\u1ECA VI\u00CAN (ADMIN) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"quotaAdminDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"980\"\n [nzClosable]=\"false\"\n [nzTitle]=\"quotaAdminDrawerTitleTpl\"\n [nzFooter]=\"quotaAdminDrawerFooterTpl\"\n (nzOnClose)=\"quotaAdminDrawerVisible = false\"\n >\n <ng-template #quotaAdminDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"pie-chart\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>Qu\u1EA3n l\u00FD H\u1EA1n ng\u1EA1ch Dung l\u01B0\u1EE3ng (Quota Management)</strong>\n <nz-tag nzColor=\"gold\">Ch\u1EC9 Admin</nz-tag>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"quotaAdminDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n <!-- PH\u1EA6N 1: C\u1EA4U H\u00CCNH QUOTA M\u1EB6C \u0110\u1ECANH TO\u00C0N H\u1EC6 TH\u1ED0NG -->\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <div>\n <div style=\"font-size: 14px; font-weight: 600\">\n <nz-icon nzType=\"cloud-server\" style=\"color: var(--primary-color); margin-right: 6px\"></nz-icon>\n 1. C\u1EA5u h\u00ECnh Quota m\u1EB7c \u0111\u1ECBnh (Default Quota)\n </div>\n <div class=\"quota-sub\">\n \u00C1p d\u1EE5ng t\u1EF1 \u0111\u1ED9ng cho ng\u01B0\u1EDDi d\u00F9ng m\u1EDBi ho\u1EB7c ng\u01B0\u1EDDi d\u00F9ng ch\u01B0a \u0111\u01B0\u1EE3c g\u00E1n h\u1EA1n ng\u1EA1ch ri\u00EAng.\n </div>\n </div>\n @if (quotaOverview(); as ov) {\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-tag nzColor=\"blue\">\n M\u1EB7c \u0111\u1ECBnh hi\u1EC7n t\u1EA1i: <strong>{{ ov.DefaultUserQuotaBytes | formatBytes }}</strong>\n </nz-tag>\n <nz-tag nzColor=\"purple\">\n T\u1ED5ng \u0111\u00E3 d\u00F9ng to\u00E0n h\u1EC7 th\u1ED1ng: <strong>{{ ov.TotalSystemUsedBytes | formatBytes }}</strong>\n </nz-tag>\n </div>\n }\n </div>\n <nz-divider style=\"margin: 8px 0\"></nz-divider>\n <div nz-flex nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <span style=\"font-size: 13px; font-weight: 500\">M\u1EE9c Quota m\u1EB7c \u0111\u1ECBnh:</span>\n <input\n nz-input\n type=\"number\"\n min=\"1\"\n [(ngModel)]=\"defaultQuotaInputValue\"\n style=\"width: 120px\"\n placeholder=\"Nh\u1EADp dung l\u01B0\u1EE3ng\"\n />\n <nz-select [(ngModel)]=\"defaultQuotaInputUnit\" style=\"width: 90px\">\n <nz-option nzValue=\"MB\" nzLabel=\"MB\"></nz-option>\n <nz-option nzValue=\"GB\" nzLabel=\"GB\"></nz-option>\n <nz-option nzValue=\"TB\" nzLabel=\"TB\"></nz-option>\n </nz-select>\n <!-- C\u00E1c n\u00FAt ch\u1ECDn nhanh (Quick Presets) -->\n <div nz-flex nzAlign=\"center\" [nzGap]=\"4\">\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(1, 'GB')\">1 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(5, 'GB')\">5 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(10, 'GB')\">10 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(20, 'GB')\">20 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(50, 'GB')\">50 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(100, 'GB')\">100 GB</button>\n </div>\n <button nz-button nzType=\"primary\" (click)=\"onSaveDefaultQuota()\">\n <nz-icon nzType=\"save\"></nz-icon> L\u01B0u Quota m\u1EB7c \u0111\u1ECBnh\n </button>\n </div>\n <div style=\"margin-top: 4px\">\n <label nz-checkbox [(ngModel)]=\"applyDefaultToExistingUsers\">\n \u0110\u1ED3ng th\u1EDDi c\u1EADp nh\u1EADt m\u1EE9c Quota m\u1EB7c \u0111\u1ECBnh m\u1EDBi n\u00E0y cho t\u1EA5t c\u1EA3 c\u00E1c ng\u01B0\u1EDDi d\u00F9ng hi\u1EC7n c\u00F3\n </label>\n </div>\n </div>\n <!-- PH\u1EA6N 2: \u0110\u1EB6T QUOTA RI\u00CANG CHO T\u1EEANG NG\u01AF\u1EDCI D\u00D9NG -->\n <div>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\" style=\"margin-bottom: 10px\">\n <div>\n <div style=\"font-size: 14px; font-weight: 600\">\n <nz-icon nzType=\"team\" style=\"color: var(--primary-color); margin-right: 6px\"></nz-icon>\n 2. Thi\u1EBFt l\u1EADp Quota cho t\u1EEBng ng\u01B0\u1EDDi d\u00F9ng ({{ quotaUsers().length }})\n </div>\n <div class=\"quota-sub\">\n T\u00F9y ch\u1EC9nh h\u1EA1n ng\u1EA1ch dung l\u01B0\u1EE3ng ri\u00EAng cho t\u1EEBng c\u00E1 nh\u00E2n ho\u1EB7c \u0111\u1EB7t l\u1EA1i v\u1EC1 m\u1EE9c m\u1EB7c \u0111\u1ECBnh.\n </div>\n </div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-input-group [nzSuffix]=\"quotaUserSearchSuffix\" style=\"width: 260px\">\n <input\n nz-input\n type=\"text\"\n placeholder=\"T\u00ECm theo t\u00E0i kho\u1EA3n, h\u1ECD t\u00EAn, email...\"\n [(ngModel)]=\"quotaUserSearchKeyword\"\n (keyup.enter)=\"reloadQuotaOverview()\"\n />\n </nz-input-group>\n <ng-template #quotaUserSearchSuffix>\n <nz-icon nzType=\"search\" class=\"cursor-pointer\" (click)=\"reloadQuotaOverview()\"></nz-icon>\n </ng-template>\n <button nz-button nzType=\"default\" (click)=\"reloadQuotaOverview()\" nz-tooltip nzTooltipTitle=\"T\u1EA3i l\u1EA1i\">\n <nz-icon nzType=\"reload\"></nz-icon>\n </button>\n </div>\n </div>\n <nz-table\n #userQuotaTable\n [nzData]=\"quotaUsers()\"\n [nzLoading]=\"quotaLoading()\"\n nzSize=\"small\"\n [nzBordered]=\"true\"\n [nzPageSize]=\"10\"\n [nzShowPagination]=\"true\"\n >\n <thead>\n <tr>\n <th nzWidth=\"45px\" class=\"text-center\">#</th>\n <th>Ng\u01B0\u1EDDi d\u00F9ng</th>\n <th nzWidth=\"220px\">\u0110\u00E3 d\u00F9ng / H\u1EA1n ng\u1EA1ch</th>\n <th nzWidth=\"105px\" class=\"text-center\">Lo\u1EA1i Quota</th>\n <th nzWidth=\"210px\">\u0110\u1EB7t h\u1EA1n ng\u1EA1ch m\u1EDBi</th>\n <th nzWidth=\"145px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (u of userQuotaTable.data; track u.UserId; let idx = $index) {\n <tr>\n <td class=\"text-center\">{{ idx + 1 }}</td>\n <td>\n <div style=\"font-weight: 600\">{{ u.FullName || u.UserName }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n <code>{{ u.UserName }}</code>\n @if (u.OrgName) {\n <span> \u2022 {{ u.OrgName }}</span>\n }\n @if (u.Email) {\n <span> \u2022 {{ u.Email }}</span>\n }\n </div>\n </td>\n <td>\n <div nz-flex nzJustify=\"space-between\" style=\"font-size: 12px; margin-bottom: 2px\">\n <span\n >{{ u.UsedBytes | formatBytes }} / <strong>{{ u.QuotaLimitBytes | formatBytes }}</strong></span\n >\n <span>{{ getUserQuotaPercent(u) }}%</span>\n </div>\n <nz-progress\n [nzPercent]=\"getUserQuotaPercent(u)\"\n nzSize=\"small\"\n [nzShowInfo]=\"false\"\n [nzStatus]=\"getUserQuotaPercent(u) >= 95 ? 'exception' : 'normal'\"\n ></nz-progress>\n </td>\n <td class=\"text-center\">\n @if (u.IsCustomQuota) {\n <nz-tag nzColor=\"orange\">T\u00F9y ch\u1EC9nh</nz-tag>\n } @else {\n <nz-tag nzColor=\"default\">M\u1EB7c \u0111\u1ECBnh</nz-tag>\n }\n </td>\n <td>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"6\">\n <input nz-input type=\"number\" min=\"1\" [(ngModel)]=\"u.editQuotaValue\" style=\"width: 90px\" />\n <nz-select [(ngModel)]=\"u.editQuotaUnit\" style=\"width: 80px\">\n <nz-option nzValue=\"MB\" nzLabel=\"MB\"></nz-option>\n <nz-option nzValue=\"GB\" nzLabel=\"GB\"></nz-option>\n <nz-option nzValue=\"TB\" nzLabel=\"TB\"></nz-option>\n </nz-select>\n </div>\n </td>\n <td class=\"text-center\">\n <div nz-flex nzJustify=\"center\" [nzGap]=\"6\">\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"onSaveUserQuota(u)\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"L\u01B0u h\u1EA1n ng\u1EA1ch ri\u00EAng cho ng\u01B0\u1EDDi d\u00F9ng n\u00E0y\"\n -->\n <nz-icon nzType=\"check\"></nz-icon> L\u01B0u\n </button>\n <button\n nz-button\n nzType=\"default\"\n nzSize=\"small\"\n [disabled]=\"!u.IsCustomQuota\"\n nz-tooltip\n nzTooltipTitle=\"\u0110\u1EB7t l\u1EA1i v\u1EC1 m\u1EE9c Quota m\u1EB7c \u0111\u1ECBnh c\u1EE7a h\u1EC7 th\u1ED1ng\"\n (click)=\"onResetUserQuota(u)\"\n >\n <nz-icon nzType=\"undo\"></nz-icon>\n </button>\n </div>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n </div>\n </div>\n </ng-container>\n <ng-template #quotaAdminDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"quotaAdminDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 10: TH\u00CAM / C\u1EA4U H\u00CCNH M\u1EE4C CUSTOM B\u00CAN D\u01AF\u1EDAI \"T\u00C0I LI\u1EC6U \u0110\u01A0N V\u1ECA\" -->\n <!-- (V\u00ED d\u1EE5: \"T\u00E0i li\u1EC7u d\u1EF1 \u00E1n\" - Admin c\u00F3 th\u1EC3 b\u1EADt hi\u1EC3n th\u1ECB cho t\u1EA5t c\u1EA3 User) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"customSpaceDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"480\"\n [nzClosable]=\"false\"\n [nzTitle]=\"customSpaceDrawerTitleTpl\"\n [nzFooter]=\"customSpaceDrawerFooterTpl\"\n (nzOnClose)=\"customSpaceDrawerVisible = false\"\n >\n <ng-template #customSpaceDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n (click)=\"toggleDrawerPlacement()\"\n >\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon\n [nzType]=\"customSpaceIcon || 'project'\"\n style=\"font-size: 18px; color: var(--primary-color)\"\n ></nz-icon>\n <strong>{{\n customSpaceDrawerMode === \"create\" ? \"Th\u00EAm m\u1EE5c t\u00F9y ch\u1EC9nh d\u01B0\u1EDBi T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\" : \"C\u1EA5u h\u00ECnh m\u1EE5c t\u00F9y ch\u1EC9nh\"\n }}</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"customSpaceDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div>\n <label class=\"drawer-field-label\">T\u00EAn m\u1EE5c hi\u1EC3n th\u1ECB tr\u00EAn thanh menu tr\u00E1i</label>\n <input\n nz-input\n [(ngModel)]=\"customSpaceName\"\n [appAutoFocus]=\"customSpaceDrawerVisible\"\n placeholder=\"V\u00ED d\u1EE5: T\u00E0i li\u1EC7u d\u1EF1 \u00E1n, H\u1ED3 s\u01A1 th\u1EA7u, Quy tr\u00ECnh ISO...\"\n (keyup.enter)=\"submitCustomSpaceDrawer()\"\n />\n <div class=\"quota-sub\" style=\"margin-top: 4px\">\n M\u1EE5c n\u00E0y s\u1EBD xu\u1EA5t hi\u1EC7n ngay b\u00EAn d\u01B0\u1EDBi m\u1EE5c <strong>\"T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"</strong> tr\u00EAn thanh \u0111i\u1EC1u h\u01B0\u1EDBng b\u00EAn tr\u00E1i.\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">Bi\u1EC3u t\u01B0\u1EE3ng (Icon)</label>\n <nz-select [(ngModel)]=\"customSpaceIcon\" style=\"width: 100%\">\n <nz-option nzValue=\"project\" nzLabel=\"\uD83D\uDCCA D\u1EF1 \u00E1n (project)\"></nz-option>\n <nz-option nzValue=\"folder-open\" nzLabel=\"\uD83D\uDCC2 Th\u01B0 m\u1EE5c m\u1EDF (folder-open)\"></nz-option>\n <nz-option nzValue=\"book\" nzLabel=\"\uD83D\uDCD8 T\u00E0i li\u1EC7u / C\u1EA9m nang (book)\"></nz-option>\n <nz-option nzValue=\"safety-certificate\" nzLabel=\"\uD83D\uDEE1 Quy chu\u1EA9n / ISO (safety-certificate)\"></nz-option>\n <nz-option nzValue=\"solution\" nzLabel=\"\uD83D\uDCCB H\u1ED3 s\u01A1 nghi\u1EC7p v\u1EE5 (solution)\"></nz-option>\n <nz-option nzValue=\"database\" nzLabel=\"\uD83D\uDDC4 Kho d\u1EEF li\u1EC7u (database)\"></nz-option>\n </nz-select>\n </div>\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <div>\n <div style=\"font-weight: 600; font-size: 13px\">Hi\u1EC3n th\u1ECB cho t\u1EA5t c\u1EA3 ng\u01B0\u1EDDi d\u00F9ng (All Users)</div>\n <div class=\"quota-sub\">\n @if (drive.isCurrentUserAdmin()) {\n Khi b\u1EADt: T\u1EA5t c\u1EA3 t\u00E0i kho\u1EA3n trong h\u1EC7 th\u1ED1ng \u0111\u1EC1u nh\u00ECn th\u1EA5y v\u00E0 truy c\u1EADp \u0111\u01B0\u1EE3c m\u1EE5c n\u00E0y b\u00EAn d\u01B0\u1EDBi \"T\u00E0i li\u1EC7u \u0110\u01A1n\n v\u1ECB\".\n } @else {\n Ch\u1EC9 Qu\u1EA3n tr\u1ECB vi\u00EAn (Admin) m\u1EDBi c\u00F3 quy\u1EC1n b\u1EADt hi\u1EC3n th\u1ECB chung cho to\u00E0n b\u1ED9 ng\u01B0\u1EDDi d\u00F9ng.\n }\n </div>\n </div>\n <nz-switch\n [(ngModel)]=\"customSpaceVisibleToAll\"\n [nzDisabled]=\"!drive.isCurrentUserAdmin()\"\n nzCheckedChildren=\"All Users\"\n nzUnCheckedChildren=\"C\u00E1 nh\u00E2n\"\n ></nz-switch>\n </div>\n @if (customSpaceVisibleToAll) {\n <nz-divider style=\"margin: 8px 0\"></nz-divider>\n <div>\n <label class=\"drawer-field-label\">M\u1EE9c quy\u1EC1n m\u1EB7c \u0111\u1ECBnh cho to\u00E0n b\u1ED9 ng\u01B0\u1EDDi d\u00F9ng</label>\n <nz-select\n [(ngModel)]=\"customSpaceDefaultAccessLevel\"\n [nzDisabled]=\"!drive.isCurrentUserAdmin()\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"DriveAccessLevel.None\" nzLabel=\"None\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Viewer\" nzLabel=\"Ch\u1EC9 xem (Viewer)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Downloader\" nzLabel=\"Xem & T\u1EA3i xu\u1ED1ng\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Uploader\" nzLabel=\"Xem & T\u1EA3i l\u00EAn (Kh\u00F4ng \u0111\u01B0\u1EE3c x\u00F3a)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Editor\" nzLabel=\"Ch\u1EC9nh s\u1EEDa (Editor)\"></nz-option>\n </nz-select>\n </div>\n }\n </div>\n </div>\n </ng-container>\n <ng-template #customSpaceDrawerFooterTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div>\n @if (customSpaceDrawerMode === \"edit\" && editingCustomSpace) {\n <button nz-button nzDanger nzType=\"default\" (click)=\"onDeleteCustomSpace(editingCustomSpace)\">\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a m\u1EE5c n\u00E0y\n </button>\n }\n </div>\n <div nz-flex [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"customSpaceDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitCustomSpaceDrawer()\">\n <nz-icon nzType=\"check\"></nz-icon>\n {{ customSpaceDrawerMode === \"create\" ? \"T\u1EA1o m\u1EE5c m\u1EDBi\" : \"L\u01B0u thay \u0111\u1ED5i\" }}\n </button>\n </div>\n </div>\n </ng-template>\n </nz-drawer>\n\n <nz-drawer\n [nzVisible]=\"matrixDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"'92vw'\"\n nzTitle=\"Ma tr\u1EADn Ph\u00E2n quy\u1EC1n T\u00E0i li\u1EC7u & Th\u01B0 m\u1EE5c\"\n (nzOnClose)=\"matrixDrawerVisible = false\"\n >\n <!-- (ACL / RBAC Matrix) -->\n <ng-container *nzDrawerContent>\n <lib-drive-permission-matrix\n [rootFolderId]=\"matrixRootNodeId\"\n [initialTabIndex]=\"matrixInitialTabIndex\"\n [preselectedNodeIds]=\"matrixPreselectedNodeIds()\"\n [viewMode]=\"\n drive.currentViewMode() === 'ORG_DRIVE'\n ? 'ORG_DRIVE'\n : drive.currentViewMode() === 'CUSTOM_SPACE'\n ? 'CUSTOM_SPACE'\n : 'MY_DRIVE'\n \"\n [customSpaceId]=\"drive.currentCustomSpaceId()\"\n (saved)=\"drive.loadNodes()\"\n (closed)=\"matrixDrawerVisible = false\"\n >\n </lib-drive-permission-matrix>\n </ng-container>\n </nz-drawer>\n\n <!-- ========================================================================= -->\n <!-- DRAWER 11: \u0110\u1ECANH NGH\u0128A & C\u1EA4U H\u00CCNH C\u00C2Y TH\u01AF M\u1EE4C M\u1EAAU K\u00C8M PH\u00C2N QUY\u1EC0N T\u1EF0 \u0110\u1ED8NG -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"templateDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"760\"\n [nzClosable]=\"false\"\n [nzTitle]=\"templateDrawerTitleTpl\"\n [nzFooter]=\"templateDrawerFooterTpl\"\n (nzOnClose)=\"templateDrawerVisible = false\"\n >\n <ng-template #templateDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n (click)=\"toggleDrawerPlacement()\"\n >\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"apartment\" style=\"font-size: 18px; color: #d97706\"></nz-icon>\n <strong>\n {{ templateDrawerMode === \"create\" ? \"\u0110\u1ECBnh ngh\u0129a M\u1EABu C\u00E2y Th\u01B0 M\u1EE5c M\u1EDBi\" : \"C\u1EADp nh\u1EADt M\u1EABu C\u00E2y Th\u01B0 M\u1EE5c\" }}\n </strong>\n @if (totalConfiguredTemplatePermissions() > 0) {\n <nz-tag nzColor=\"cyan\">\uD83D\uDEE1 {{ totalConfiguredTemplatePermissions() }} quy\u1EC1n c\u00E0i s\u1EB5n</nz-tag>\n }\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"templateDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"14\">\n <div nz-flex [nzGap]=\"12\" nzWrap=\"wrap\">\n <div style=\"flex: 1.4; min-width: 220px\">\n <label class=\"drawer-field-label\">T\u00EAn m\u1EABu c\u00E2y th\u01B0 m\u1EE5c *</label>\n <input\n nz-input\n [(ngModel)]=\"templateInputName\"\n [appAutoFocus]=\"templateDrawerVisible\"\n placeholder=\"VD: H\u1ED3 s\u01A1 D\u1EF1 \u00E1n \u0110\u1EA5u th\u1EA7u, H\u1ED3 s\u01A1 H\u1EE3p \u0111\u1ED3ng...\"\n />\n </div>\n <div style=\"flex: 1; min-width: 170px\">\n <label class=\"drawer-field-label\">M\u00E3 m\u1EABu (D\u00F9ng g\u1ECDi API t\u1EEB Module kh\u00E1c)</label>\n <input nz-input [(ngModel)]=\"templateInputCode\" placeholder=\"VD: MAU_DU_AN, MAU_HOP_DONG...\" />\n </div>\n </div>\n\n <div>\n <label class=\"drawer-field-label\">M\u00F4 t\u1EA3 ng\u1EAFn</label>\n <input\n nz-input\n [(ngModel)]=\"templateInputDesc\"\n placeholder=\"M\u00F4 t\u1EA3 m\u1EE5c \u0111\u00EDch s\u1EED d\u1EE5ng ho\u1EB7c ph\u00E2n h\u1EC7 \u00E1p d\u1EE5ng...\"\n />\n </div>\n\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" [nzGap]=\"12\">\n <div style=\"flex: 1\">\n <div style=\"font-weight: 600; font-size: 13px\">T\u1EA1o th\u01B0 m\u1EE5c g\u1ED1c b\u1ECDc ngo\u00E0i khi k\u00E9o th\u1EA3</div>\n <div class=\"quota-sub\">\n Khi b\u1EADt: K\u00E9o th\u1EA3 m\u1EABu v\u00E0o th\u01B0 m\u1EE5c \u0111\u00EDch s\u1EBD t\u1EA1o 1 th\u01B0 m\u1EE5c mang t\u00EAn m\u1EABu r\u1ED3i ch\u1EE9a c\u00E2y con b\u00EAn trong.\n </div>\n </div>\n <nz-switch\n style=\"flex-shrink: 0\"\n [(ngModel)]=\"templateCreateWrapperRoot\"\n nzCheckedChildren=\"C\u00F3 b\u1ECDc g\u1ED1c\"\n nzUnCheckedChildren=\"Bung tr\u1EF1c ti\u1EBFp\"\n ></nz-switch>\n </div>\n\n <nz-divider style=\"margin: 6px 0\"></nz-divider>\n\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" [nzGap]=\"12\">\n <div style=\"flex: 1\">\n <div style=\"font-weight: 600; font-size: 13px\">Chia s\u1EBB m\u1EABu n\u00E0y cho to\u00E0n b\u1ED9 ng\u01B0\u1EDDi d\u00F9ng & ph\u00E2n h\u1EC7</div>\n <div class=\"quota-sub\">Cho ph\u00E9p m\u1ECDi ng\u01B0\u1EDDi d\u00F9ng v\u00E0 c\u00E1c Module nghi\u1EC7p v\u1EE5 kh\u00E1c s\u1EED d\u1EE5ng chung m\u1EABu n\u00E0y.</div>\n </div>\n <nz-switch\n style=\"flex-shrink: 0\"\n [(ngModel)]=\"templateVisibleToAll\"\n [nzDisabled]=\"!drive.isCurrentUserAdmin()\"\n nzCheckedChildren=\"To\u00E0n h\u1EC7 th\u1ED1ng\"\n nzUnCheckedChildren=\"C\u00E1 nh\u00E2n\"\n ></nz-switch>\n </div>\n </div>\n\n <!-- SO\u1EA0N TH\u1EA2O C\u1EA4U TR\u00DAC C\u00C2Y \u0110A C\u1EA4P & XEM TR\u01AF\u1EDAC TR\u1EF0C QUAN (NH\u1EA4N V\u00C0O D\u00D2NG \u0110\u1EC2 G\u00C1N QUY\u1EC0N RI\u00CANG) -->\n <div>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"6\" style=\"margin-bottom: 6px\">\n <label class=\"drawer-field-label\" style=\"margin-bottom: 0\">\n 1. C\u1EA5u tr\u00FAc C\u00E2y th\u01B0 m\u1EE5c (M\u1ED7i d\u00F2ng 1 th\u01B0 m\u1EE5c, th\u1EE5t l\u1EC1 2 kho\u1EA3ng tr\u1EAFng \u0111\u1EC3 t\u1EA1o c\u1EA5p con)\n </label>\n <div nz-flex [nzGap]=\"4\">\n <button type=\"button\" nz-button nzSize=\"small\" (click)=\"loadPresetTemplateStructure('PROJECT')\">\n M\u1EABu D\u1EF1 \u00E1n\n </button>\n <button type=\"button\" nz-button nzSize=\"small\" (click)=\"loadPresetTemplateStructure('CONTRACT')\">\n M\u1EABu H\u1EE3p \u0111\u1ED3ng\n </button>\n <button type=\"button\" nz-button nzSize=\"small\" (click)=\"loadPresetTemplateStructure('TRAINING')\">\n M\u1EABu \u0110\u00E0o t\u1EA1o / KHCN\n </button>\n </div>\n </div>\n\n <div class=\"template-editor-grid\">\n <div>\n <textarea\n nz-input\n rows=\"11\"\n [(ngModel)]=\"templateIndentedText\"\n style=\"font-family: monospace; font-size: 12.5px; line-height: 1.55\"\n placeholder=\"- 01. H\u1ED3 s\u01A1 ph\u00E1p l\u00FD - 01.1. T\u1EDD tr\u00ECnh - 01.2. Quy\u1EBFt \u0111\u1ECBnh - 02. H\u1EE3p \u0111\u1ED3ng & Nghi\u1EC7m thu\"\n ></textarea>\n </div>\n\n <div class=\"template-tree-preview\">\n <div\n nz-flex\n nzJustify=\"space-between\"\n nzAlign=\"center\"\n style=\"font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--app-text-muted, #64748b)\"\n >\n <span>Xem tr\u01B0\u1EDBc ({{ previewTemplateFlatNodes().length }} th\u01B0 m\u1EE5c) \u2014 Nh\u1EA5n \u0111\u1EC3 g\u00E1n quy\u1EC1n:</span>\n </div>\n\n <!-- D\u00F2ng ch\u1ECDn Quy\u1EC1n g\u1ED1c to\u00E0n b\u1ED9 m\u1EABu -->\n <div\n class=\"preview-tree-row selectable-preview-row\"\n [class.active-perm-target]=\"selectedTemplatePermTarget() === '__ROOT__'\"\n (click)=\"selectTemplatePermissionTarget('__ROOT__')\"\n >\n <nz-icon nzType=\"global\" style=\"color: #0284c7; margin-right: 6px\"></nz-icon>\n <strong style=\"flex: 1; font-size: 12px\">To\u00E0n b\u1ED9 c\u00E2y th\u01B0 m\u1EE5c m\u1EABu (Quy\u1EC1n g\u1ED1c)</strong>\n @if (templateRootPermissions().length > 0) {\n <nz-tag nzColor=\"blue\" style=\"margin: 0; font-size: 10.5px; line-height: 16px; padding: 0 5px\">\n \uD83D\uDEE1 {{ templateRootPermissions().length }}\n </nz-tag>\n }\n </div>\n\n @for (node of previewTemplateFlatNodes(); track node.RelativePath) {\n <div\n class=\"preview-tree-row selectable-preview-row\"\n [class.active-perm-target]=\"selectedTemplatePermTarget() === node.RelativePath\"\n [style.padding-left.px]=\"8 + node.Level * 16\"\n (click)=\"selectTemplatePermissionTarget(node.RelativePath)\"\n >\n <!-- nz-tooltip\n nzTooltipTitle=\"Nh\u1EA5n \u0111\u1EC3 c\u1EA5u h\u00ECnh ph\u00E2n quy\u1EC1n ri\u00EAng cho nh\u00E1nh th\u01B0 m\u1EE5c n\u00E0y\" -->\n <nz-icon nzType=\"folder-fill\" style=\"color: #f59e0b; margin-right: 6px\"></nz-icon>\n <span style=\"flex: 1; overflow: hidden; text-overflow: ellipsis\">{{ node.Name }}</span>\n @if (node.BreakInheritance) {\n <nz-tag\n nzColor=\"warning\"\n style=\"margin: 0 2px 0 0; font-size: 10px; line-height: 15px; padding: 0 4px\"\n nz-tooltip\n nzTooltipTitle=\"Ng\u1EAFt k\u1EBF th\u1EEBa quy\u1EC1n t\u1EEB th\u01B0 m\u1EE5c cha\"\n >\n \u0110\u1ED9c l\u1EADp\n </nz-tag>\n }\n @if (node.PermissionsCount > 0) {\n <nz-tag nzColor=\"cyan\" style=\"margin: 0; font-size: 10px; line-height: 15px; padding: 0 5px\">\n \uD83D\uDEE1 {{ node.PermissionsCount }}\n </nz-tag>\n }\n </div>\n }\n </div>\n </div>\n </div>\n\n <!-- ========================================================================= -->\n <!-- 2. C\u1EA4U H\u00CCNH PH\u00C2N QUY\u1EC0N M\u1EB6C \u0110\u1ECANH CHO M\u1EAAU C\u00C2Y TH\u01AF M\u1EE4C (ACL & RBAC) -->\n <!-- ========================================================================= -->\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <div>\n <div style=\"font-weight: 600; font-size: 13px\">\n <nz-icon nzType=\"safety-certificate\" style=\"color: #0284c7; margin-right: 4px\"></nz-icon>\n 2. Ph\u00E2n quy\u1EC1n c\u00E0i s\u1EB5n khi t\u1EA1o m\u1EDBi t\u1EEB M\u1EABu c\u00E2y th\u01B0 m\u1EE5c\n </div>\n <div class=\"quota-sub\">\n @if (selectedTemplatePermTarget() === \"__ROOT__\") {\n \u0110ang c\u1EA5u h\u00ECnh cho: <strong style=\"color: #0284c7\">\uD83C\uDF10 To\u00E0n b\u1ED9 c\u00E2y th\u01B0 m\u1EE5c m\u1EABu (Quy\u1EC1n g\u1ED1c)</strong> \u2014 T\u1EF1\n \u0111\u1ED9ng k\u1EBF th\u1EEBa xu\u1ED1ng m\u1ECDi th\u01B0 m\u1EE5c con.\n } @else {\n \u0110ang c\u1EA5u h\u00ECnh ri\u00EAng cho nh\u00E1nh:\n <strong style=\"color: #d97706\">\uD83D\uDCC2 {{ selectedTemplatePermTarget() }}</strong>\n <a style=\"margin-left: 8px; font-weight: 600\" (click)=\"selectTemplatePermissionTarget('__ROOT__')\">\n \u21A9 Quay v\u1EC1 Quy\u1EC1n g\u1ED1c to\u00E0n m\u1EABu\n </a>\n }\n </div>\n </div>\n\n @if (selectedTemplatePermTarget() !== \"__ROOT__\") {\n <div nz-flex nzAlign=\"center\" [nzGap]=\"6\">\n <span style=\"font-size: 12px\">Ng\u1EAFt k\u1EBF th\u1EEBa cha:</span>\n <nz-switch\n nzSize=\"small\"\n [ngModel]=\"activeTemplateTargetBreakInheritance()\"\n (ngModelChange)=\"onToggleTemplateNodeBreakInheritance($event)\"\n nzCheckedChildren=\"\u0110\u1ED9c l\u1EADp\"\n nzUnCheckedChildren=\"K\u1EBF th\u1EEBa\"\n nz-tooltip\n nzTooltipTitle=\"Khi b\u1EADt \u0110\u1ED9c l\u1EADp: Th\u01B0 m\u1EE5c con n\u00E0y s\u1EBD ng\u1EAFt k\u1EBF th\u1EEBa quy\u1EC1n t\u1EEB th\u01B0 m\u1EE5c cha v\u00E0 ch\u1EC9 \u00E1p d\u1EE5ng danh s\u00E1ch quy\u1EC1n ri\u00EAng b\u00EAn d\u01B0\u1EDBi\"\n ></nz-switch>\n </div>\n }\n </div>\n\n <!-- Thanh ch\u1ECDn \u0110\u1ED1i t\u01B0\u1EE3ng (User / \u0110\u01A1n v\u1ECB / Vai tr\u00F2) & M\u1EE9c quy\u1EC1n -->\n <div nz-flex nzWrap=\"wrap\" [nzGap]=\"6\" nzAlign=\"center\" style=\"margin-top: 6px\">\n <nz-select\n [(ngModel)]=\"templatePermGranteeType\"\n (ngModelChange)=\"onTemplatePermGranteeTypeChange()\"\n nzSize=\"small\"\n style=\"width: 140px\"\n >\n <nz-option [nzValue]=\"DriveGranteeType.Org\" nzLabel=\"\uD83C\uDFE2 \u0110\u01A1n v\u1ECB (Org)\"></nz-option>\n <nz-option [nzValue]=\"DriveGranteeType.Role\" nzLabel=\"\uD83D\uDEE1 Vai tr\u00F2 (Role)\"></nz-option>\n <nz-option [nzValue]=\"DriveGranteeType.User\" nzLabel=\"\uD83D\uDC64 C\u00E1 nh\u00E2n (User)\"></nz-option>\n </nz-select>\n\n <nz-select\n nzShowSearch\n nzServerSearch\n nzSize=\"small\"\n nzPlaceHolder=\"T\u00ECm ch\u1ECDn User / \u0110\u01A1n v\u1ECB / Vai tr\u00F2...\"\n [(ngModel)]=\"templatePermSelectedGrantee\"\n (nzOnSearch)=\"onSearchTemplateGrantee($event)\"\n style=\"flex: 1; min-width: 210px\"\n >\n @for (g of templateGranteeOptions(); track g.GranteeId) {\n <nz-option [nzValue]=\"g\" [nzLabel]=\"g.DisplayName + ' (' + g.Code + ')'\"></nz-option>\n }\n </nz-select>\n\n <nz-select\n [(ngModel)]=\"templatePermAccessLevel\"\n [nzDisabled]=\"templatePermIsDeny\"\n nzSize=\"small\"\n style=\"width: 155px\"\n >\n <nz-option [nzValue]=\"DriveAccessLevel.Viewer\" nzLabel=\"\uD83D\uDC41 Ch\u1EC9 xem (10)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Downloader\" nzLabel=\"\u2B07 Xem & T\u1EA3i (20)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Uploader\" nzLabel=\"\u2601 Xem & T\u1EA3i l\u00EAn (35)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Editor\" nzLabel=\"\u270E Ch\u1EC9nh s\u1EEDa (40)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Manager\" nzLabel=\"\uD83D\uDC51 Qu\u1EA3n tr\u1ECB (50)\"></nz-option>\n </nz-select>\n\n <label\n nz-checkbox\n [(ngModel)]=\"templatePermIsDeny\"\n nz-tooltip\n nzTooltipTitle=\"C\u1EA5m truy c\u1EADp (Explicit Deny) \u0111\u1ED1i v\u1EDBi \u0111\u1ED1i t\u01B0\u1EE3ng n\u00E0y tr\u00EAn nh\u00E1nh \u0111ang ch\u1ECDn\"\n style=\"font-size: 12px\"\n >\n C\u1EA5m (Deny)\n </label>\n\n <button\n type=\"button\"\n nz-button\n nzType=\"primary\"\n nzSize=\"small\"\n [disabled]=\"!templatePermSelectedGrantee\"\n (click)=\"addPermissionToTemplateTarget()\"\n >\n <nz-icon nzType=\"user-add\"></nz-icon> Th\u00EAm quy\u1EC1n\n </button>\n </div>\n\n <!-- Danh s\u00E1ch c\u00E1c quy\u1EC1n \u0111\u00E3 \u0111\u1EB7t cho m\u1EE5c \u0111ang ch\u1ECDn -->\n @if (activeTemplateTargetPermissions().length === 0) {\n <div class=\"quota-sub\" style=\"padding: 8px 4px 2px\">\n @if (selectedTemplatePermTarget() === \"__ROOT__\") {\n Ch\u01B0a \u0111\u1EB7t quy\u1EC1n m\u1EB7c \u0111\u1ECBnh cho to\u00E0n m\u1EABu. H\u00E3y ch\u1ECDn \u0110\u01A1n v\u1ECB / Vai tr\u00F2 / C\u00E1 nh\u00E2n \u1EDF tr\u00EAn r\u1ED3i b\u1EA5m\n <strong>+ Th\u00EAm quy\u1EC1n</strong> (ho\u1EB7c b\u1EA5m v\u00E0o t\u1EEBng th\u01B0 m\u1EE5c b\u00EAn khung Xem tr\u01B0\u1EDBc \u0111\u1EC3 \u0111\u1EB7t quy\u1EC1n ri\u00EAng cho\n nh\u00E1nh con).\n } @else {\n Nh\u00E1nh <strong>\"{{ selectedTemplatePermTarget() }}\"</strong> ch\u01B0a c\u00F3 quy\u1EC1n ri\u00EAng (m\u1EB7c \u0111\u1ECBnh k\u1EBF th\u1EEBa t\u1EEB th\u01B0\n m\u1EE5c cha).\n }\n </div>\n } @else {\n <nz-table\n #tplPermTable\n [nzData]=\"activeTemplateTargetPermissions()\"\n nzSize=\"small\"\n [nzBordered]=\"true\"\n [nzFrontPagination]=\"false\"\n [nzShowPagination]=\"false\"\n style=\"margin-top: 6px\"\n >\n <thead>\n <tr>\n <th>\u0110\u1ED1i t\u01B0\u1EE3ng nh\u1EADn quy\u1EC1n</th>\n <th nzWidth=\"185px\">M\u1EE9c quy\u1EC1n \u00E1p d\u1EE5ng</th>\n <th nzWidth=\"95px\" class=\"text-center\">T\u1EA3i xu\u1ED1ng</th>\n <th nzWidth=\"65px\" class=\"text-center\">X\u00F3a</th>\n </tr>\n </thead>\n <tbody>\n @for (p of tplPermTable.data; track p.GranteeType + \":\" + p.GranteeId) {\n <tr>\n <td>\n <nz-tag\n [nzColor]=\"\n p.GranteeType === DriveGranteeType.User\n ? 'blue'\n : p.GranteeType === DriveGranteeType.Org\n ? 'cyan'\n : 'purple'\n \"\n >\n {{\n p.GranteeType === DriveGranteeType.User\n ? \"User\"\n : p.GranteeType === DriveGranteeType.Org\n ? \"\u0110\u01A1n v\u1ECB\"\n : \"Role\"\n }}\n </nz-tag>\n <strong>{{ p.GranteeName || p.GranteeId }}</strong>\n </td>\n <td>\n <nz-select\n nzSize=\"small\"\n [ngModel]=\"p.IsDeny ? 'DENY' : p.AccessLevel\"\n (ngModelChange)=\"updateTemplatePermissionLevel(p, $event)\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"DriveAccessLevel.Viewer\" nzLabel=\"\uD83D\uDC41 Ch\u1EC9 xem (10)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Downloader\" nzLabel=\"\u2B07 Xem & T\u1EA3i (20)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Uploader\" nzLabel=\"\u2601 Xem & T\u1EA3i l\u00EAn (35)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Editor\" nzLabel=\"\u270E Ch\u1EC9nh s\u1EEDa (40)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Manager\" nzLabel=\"\uD83D\uDC51 Qu\u1EA3n tr\u1ECB (50)\"></nz-option>\n <nz-option nzValue=\"DENY\" nzLabel=\"\uD83D\uDEAB C\u1EA5m (Deny)\"></nz-option>\n </nz-select>\n </td>\n <td class=\"text-center\">\n <nz-tag [nzColor]=\"p.CanDownload && !p.IsDeny ? 'green' : 'default'\">\n {{ p.CanDownload && !p.IsDeny ? \"Cho ph\u00E9p\" : \"Ch\u1EB7n\" }}\n </nz-tag>\n </td>\n <td class=\"text-center\">\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"G\u1EE1 quy\u1EC1n n\u00E0y kh\u1ECFi m\u1EABu\"\n (click)=\"removePermissionFromTemplateTarget(p)\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n }\n </div>\n </div>\n </ng-container>\n\n <ng-template #templateDrawerFooterTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div>\n @if (templateDrawerMode === \"edit\" && editingTemplate) {\n <button nz-button nzDanger nzType=\"default\" (click)=\"onDeleteTemplate(editingTemplate)\">\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a m\u1EABu n\u00E0y\n </button>\n }\n </div>\n <div nz-flex [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"templateDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitTemplateDrawer()\">\n <nz-icon nzType=\"save\"></nz-icon>\n {{ templateDrawerMode === \"create\" ? \"L\u01B0u m\u1EABu c\u00E2y th\u01B0 m\u1EE5c\" : \"C\u1EADp nh\u1EADt m\u1EABu\" }}\n </button>\n </div>\n </div>\n </ng-template>\n </nz-drawer>\n}\n", styles: ["@charset \"UTF-8\";.drive-shell{display:grid;grid-template-columns:245px 1fr;min-height:calc(100vh - 85px);background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px;overflow:hidden}.drive-sidebar{padding:14px;background:var(--app-sidebar-bg, #f8fafc);border-right:1px solid var(--app-border, #e2e8f0);display:flex;flex-direction:column;gap:14px}.drive-nav{display:flex;flex-direction:column;gap:4px}.drive-nav a{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:6px;color:var(--app-text, #334155);cursor:pointer;transition:background .15s}.drive-nav a.space-has-active-child{color:var(--primary-color, #1890ff);font-weight:600;background:color-mix(in srgb,var(--primary-color, #1890ff) 7%,transparent)}.drive-nav a:hover,.drive-nav a.active{background:color-mix(in srgb,var(--primary-color, #1890ff) 16%,transparent);color:var(--primary-color, #1890ff);font-weight:600}.org-nav-group{display:flex;flex-direction:column;gap:2px}.custom-space-link{font-size:13px}.custom-space-title{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.custom-space-badge{margin:0!important;font-size:10px;line-height:16px;padding:0 4px}.nav-inline-btn{border:none;background:transparent;color:inherit;cursor:pointer;padding:2px 4px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;opacity:.7}.nav-inline-btn:hover{opacity:1;background:color-mix(in srgb,var(--primary-color, #1890ff) 18%,transparent)}.storage-mode-box{padding:10px 12px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px}.upload-queue-box{padding:10px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px;max-height:180px;overflow-y:auto}.upload-task-row{margin-bottom:6px}.upload-task-name{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.quota-box{margin-top:auto;padding:12px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px}.quota-title{font-size:13px;font-weight:600;margin-bottom:6px}.quota-sub{font-size:12px;color:var(--app-text-muted, #64748b);margin-top:4px}.drive-shell.sidebar-wide{grid-template-columns:335px 1fr}.sidebar-tree-header-bar{display:flex;justify-content:space-between;align-items:center;padding:6px 10px;border-radius:6px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0)}.sidebar-tree-header-title{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600;color:var(--app-text, #334155)}.sidebar-tree-header-actions{display:inline-flex;align-items:center;gap:3px}.sidebar-tree-tool-btn{border:none;background:transparent;color:var(--app-text-muted, #64748b);width:22px;height:22px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;font-size:12px;transition:background .15s,color .15s}.sidebar-tree-tool-btn:hover,.sidebar-tree-tool-btn.active{background:color-mix(in srgb,var(--primary-color, #1890ff) 14%,transparent);color:var(--primary-color, #1890ff)}.sidebar-tree-filter-box{margin-top:-6px}.nav-item-with-tree{display:flex;flex-direction:column}.nav-caret-btn{border:none;background:transparent;color:inherit;width:18px;height:18px;padding:0;margin-left:-4px;margin-right:-2px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;font-size:11px;opacity:.75;flex-shrink:0;transition:transform .15s,background .15s,opacity .15s}.nav-caret-btn:hover{opacity:1;background:color-mix(in srgb,var(--primary-color, #1890ff) 18%,transparent)}.sidebar-tree-container{display:flex;flex-direction:column;gap:1px;margin:2px 0 6px 14px;padding-left:6px;border-left:1.5px dashed var(--app-border, #cbd5e1);max-height:320px;overflow-y:auto;overflow-x:hidden}.drive-shell.sidebar-wide .sidebar-tree-container{max-height:420px}.sidebar-tree-node{display:flex;align-items:center;gap:5px;padding:5px 8px;border-radius:5px;font-size:12.5px;color:var(--app-text, #334155);cursor:pointer;-webkit-user-select:none;user-select:none;transition:background .12s,color .12s;min-width:0}.sidebar-tree-node:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 10%,transparent)}.sidebar-tree-node.active-breadcrumb-ancestor{font-weight:600;color:var(--primary-color, #1890ff)}.sidebar-tree-node.active-tree-node,.sidebar-tree-node.context-active-tree-node{background:color-mix(in srgb,var(--primary-color, #1890ff) 16%,transparent);color:var(--primary-color, #1890ff);font-weight:600;box-shadow:inset 2.5px 0 0 var(--primary-color, #1890ff)}.sidebar-tree-node.tree-drop-active{background:color-mix(in srgb,var(--primary-color, #1890ff) 22%,transparent)!important;outline:1.5px dashed var(--primary-color, #1890ff);color:var(--primary-color, #1890ff);font-weight:600}.tree-node-caret{width:16px;height:16px;border:none;background:transparent;color:var(--app-text-muted, #64748b);padding:0;border-radius:3px;display:inline-flex;align-items:center;justify-content:center;font-size:10px;cursor:pointer;flex-shrink:0}.tree-node-caret:hover{color:var(--primary-color, #1890ff);background:color-mix(in srgb,var(--primary-color, #1890ff) 16%,transparent)}.tree-node-caret-spacer{width:16px;height:16px;display:inline-block;flex-shrink:0}.tree-node-folder-icon{font-size:15px;flex-shrink:0}.tree-node-label{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.35}.tree-node-quick-btn{border:none;background:transparent;color:var(--app-text-muted, #64748b);width:20px;height:20px;padding:0;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;opacity:0;cursor:pointer;flex-shrink:0;font-size:11px;transition:opacity .12s,background .12s,color .12s}.sidebar-tree-node:hover .tree-node-quick-btn{opacity:.85}.tree-node-quick-btn:hover{opacity:1!important;color:var(--primary-color, #1890ff);background:color-mix(in srgb,var(--primary-color, #1890ff) 18%,transparent)}.sidebar-tree-empty{padding:4px 8px 4px 20px;font-size:11.5px;color:var(--app-text-muted, #94a3b8);font-style:italic}.drive-main{position:relative;padding:16px;display:flex;flex-direction:column;gap:12px;transition:background .15s,border-color .15s}.drive-main.external-drag-active{background:color-mix(in srgb,var(--primary-color, #1890ff) 6%,var(--app-container-bg, #ffffff));outline:2px dashed var(--primary-color, #1890ff);outline-offset:-6px}.external-drop-banner{pointer-events:none;display:flex;align-items:center;gap:14px;padding:12px 18px;border-radius:8px;background:color-mix(in srgb,var(--primary-color, #1890ff) 14%,var(--app-container-bg, #ffffff));border:1px dashed var(--primary-color, #1890ff);color:var(--app-text, #1e293b)}.drop-banner-icon{font-size:28px;color:var(--primary-color, #1890ff)}.drop-banner-title{font-size:14px;font-weight:500}.drop-banner-sub{font-size:12px;color:var(--app-text-muted, #64748b);margin-top:2px}.drive-toolbar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;padding-bottom:10px;border-bottom:1px solid var(--app-border, #f1f5f9)}.bulk-action-bar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;padding:8px 14px;border-radius:8px;background:color-mix(in srgb,var(--primary-color, #1890ff) 9%,var(--app-container-bg, #ffffff));border:1px solid color-mix(in srgb,var(--primary-color, #1890ff) 32%,var(--app-border, #cbd5e1));box-shadow:0 2px 8px #1890ff14}.bulk-action-summary{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:13px;color:var(--app-text, #1e293b)}.bulk-action-meta{font-size:12px;color:var(--app-text-muted, #64748b)}.bulk-action-buttons{display:flex;align-items:center;flex-wrap:wrap;gap:6px}.checkbox-col-th,.checkbox-col-td{-webkit-user-select:none;user-select:none;cursor:pointer}.trash-info-banner{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;padding:9px 14px;border-radius:8px;background:#ef44440f;border:1px solid rgba(239,68,68,.24);font-size:13px;color:var(--app-text, #334155)}.physical-path-bar{display:flex;align-items:center;gap:6px;margin-top:4px;font-size:12px;color:var(--app-text-muted, #64748b)}.toolbar-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.drive-row{cursor:pointer;transition:background .15s,outline .15s}.drive-row.row-checked>td,.drive-row.row-active>td,.drive-row.active>td{background:color-mix(in srgb,var(--primary-color, #1890ff) 11%,var(--app-container-bg, #ffffff))!important}.drive-row.row-checked>td:first-child,.drive-row.row-active>td:first-child,.drive-row.active>td:first-child{box-shadow:inset 3.5px 0 0 var(--primary-color, #1890ff)!important}.drive-row:not(.row-active):not(.row-checked):not(:hover):not(.drop-target-active)>td{background:transparent!important;box-shadow:none!important}.drive-row.dragging-row{opacity:.45}.drive-row.drop-target-active>td{background:color-mix(in srgb,var(--primary-color, #1890ff) 18%,transparent)!important;border-top:1px dashed var(--primary-color, #1890ff);border-bottom:1px dashed var(--primary-color, #1890ff)}.bc-drop-active,.drive-nav a.nav-drop-active{background:color-mix(in srgb,var(--primary-color, #1890ff) 22%,transparent)!important;outline:1.5px dashed var(--primary-color, #1890ff);color:var(--primary-color, #1890ff);font-weight:600}.node-name-cell{display:flex;align-items:center;gap:8px}.node-icon-wrap{position:relative;display:inline-flex;align-items:center;justify-content:center}.node-icon{font-size:18px}.shortcut-badge{position:absolute;right:-5px;bottom:-3px;width:13px;height:13px;border-radius:50%;background:#7c3aed;color:#fff;font-size:9px;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 0 0 1.5px var(--app-container-bg, #ffffff)}.node-title{font-weight:500}.action-btn-group{display:inline-flex;align-items:center;justify-content:center;gap:4px}.action-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;background:transparent;border-radius:6px;cursor:pointer;font-size:15px;transition:background .15s,transform .1s}.action-icon-btn:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 12%,transparent);transform:translateY(-1px)}.action-icon-btn.color-warn:hover{background:#ef44441f}.sortable-th{cursor:pointer;-webkit-user-select:none;user-select:none;transition:background .15s,color .15s}.sortable-th:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 8%,var(--app-sidebar-bg, #f8fafc))!important;color:var(--primary-color, #1890ff)}.th-sort-wrap{display:inline-flex;align-items:center;gap:6px;width:100%}.th-sort-wrap.justify-center{justify-content:center}.th-sort-wrap.justify-end{justify-content:flex-end}.sort-icon{font-size:13px;opacity:.35;transition:opacity .15s,color .15s}.sort-icon.active{opacity:1;color:var(--primary-color, #1890ff)}.sortable-th:hover .sort-icon{opacity:.85}.drawer-field-label{display:block;font-size:13px;font-weight:600;margin-bottom:6px;color:var(--app-text, #334155)}.drawer-meta-card{padding:12px 14px;background:var(--app-sidebar-bg, #f8fafc);border:1px solid var(--app-border, #e2e8f0);border-radius:8px;display:flex;flex-direction:column;gap:8px}.drawer-meta-header{display:flex;align-items:center;gap:10px}.drawer-meta-row{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px}.meta-label{color:var(--app-text-muted, #64748b)}.template-sidebar-box{padding:10px 12px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px}.template-chip-list{display:flex;flex-direction:column;gap:6px;max-height:175px;overflow-y:auto}.template-drag-item{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:6px 8px;border-radius:6px;border:1px dashed var(--app-border, #cbd5e1);background:var(--app-sidebar-bg, #f8fafc);cursor:grab;transition:all .15s}.template-drag-item:hover{border-color:var(--primary-color, #1890ff);background:color-mix(in srgb,var(--primary-color, #1890ff) 10%,transparent)}.template-item-title{font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.template-item-sub{font-size:10.5px;color:var(--app-text-muted, #64748b)}.template-editor-grid{display:grid;grid-template-columns:1.15fr 1fr;gap:10px}.template-tree-preview{border:1px solid var(--app-border, #e2e8f0);border-radius:6px;padding:10px;background:var(--app-sidebar-bg, #f8fafc);max-height:450px;overflow-y:auto}.preview-tree-row{display:flex;align-items:center;font-size:12.5px;padding:2.5px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.selectable-preview-row{cursor:pointer;padding:4px 6px;border-radius:5px;transition:background .12s,border-color .12s;border:1px solid transparent}.selectable-preview-row:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 10%,transparent)}.selectable-preview-row.active-perm-target{background:color-mix(in srgb,var(--primary-color, #1890ff) 16%,transparent);border-color:var(--primary-color, #1890ff);font-weight:600}.drive-preview-body-fill{--drive-preview-fill-height: calc(100vh - 103px) ;display:flex;flex-direction:column;flex:1 1 auto;width:100%;height:100%;min-height:var(--drive-preview-fill-height);overflow:hidden}.drive-preview-body-fill.no-drawer-footer{--drive-preview-fill-height: calc(100vh - 55px) }.drive-preview-body-fill ::ng-deep extend-view-file-content{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;width:100%!important;height:100%!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important}.drive-preview-body-fill ::ng-deep extend-view-file-content>*:not(style):not(script),.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer>div,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .html,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .ink-switch-box,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .zoom,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer #outerContainer,.drive-preview-body-fill ::ng-deep extend-view-file-content pdf-viewer,.drive-preview-body-fill ::ng-deep extend-view-file-content iframe,.drive-preview-body-fill ::ng-deep extend-view-file-content embed,.drive-preview-body-fill ::ng-deep extend-view-file-content object{display:block!important;flex:1 1 auto!important;width:100%!important;height:var(--drive-preview-fill-height)!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important}.drive-preview-body-fill ::ng-deep extend-view-file-content pre{flex:1 1 auto!important;width:100%!important;height:var(--drive-preview-fill-height)!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important;margin:0!important;padding:16px!important;overflow:auto!important;box-sizing:border-box!important}::ng-deep .nowrap-tooltip{max-width:none!important}::ng-deep .nowrap-tooltip .ant-tooltip-inner{white-space:nowrap!important;max-width:none!important;width:max-content!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: NzGridModule }, { kind: "ngmodule", type: NzFlexModule }, { kind: "directive", type: i3$4.NzFlexDirective, selector: "[nz-flex],nz-flex", inputs: ["nzVertical", "nzJustify", "nzAlign", "nzGap", "nzWrap", "nzFlex"], exportAs: ["nzFlex"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i6.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "directive", type: i6.NzTableCellDirective, selector: "th:not(.nz-disable-th):not([mat-cell]), td:not(.nz-disable-td):not([mat-cell])" }, { kind: "directive", type: i6.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i6.NzTdAddOnComponent, selector: "td[nzChecked], td[nzDisabled], td[nzIndeterminate], td[nzIndentSize], td[nzExpand], td[nzShowExpand], td[nzShowCheckbox]", inputs: ["nzChecked", "nzDisabled", "nzIndeterminate", "nzLabel", "nzIndentSize", "nzShowExpand", "nzShowCheckbox", "nzExpand", "nzExpandIcon"], outputs: ["nzCheckedChange", "nzExpandChange"] }, { kind: "component", type: i6.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i6.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i6.NzTrDirective, selector: "tr:not([mat-row]):not([mat-header-row]):not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "ngmodule", type: NzPaginationModule }, { kind: "component", type: i7.NzPaginationComponent, selector: "nz-pagination", inputs: ["nzShowTotal", "nzItemRender", "nzSize", "nzPageSizeOptions", "nzShowSizeChanger", "nzShowQuickJumper", "nzSimple", "nzDisabled", "nzResponsive", "nzHideOnSinglePage", "nzTotal", "nzPageIndex", "nzPageSize"], outputs: ["nzPageSizeChange", "nzPageIndexChange"], exportAs: ["nzPagination"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i2$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i3$3.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i4$1.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i1$2.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i12.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: i12.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "directive", type: i12.NzInputGroupWhitSuffixOrPrefixDirective, selector: "nz-input-group[nzSuffix], nz-input-group[nzPrefix]" }, { kind: "ngmodule", type: NzBreadCrumbModule }, { kind: "component", type: i10.NzBreadCrumbComponent, selector: "nz-breadcrumb", inputs: ["nzAutoGenerate", "nzSeparator", "nzRouteLabel", "nzRouteLabelFn", "nzRouteFn"], exportAs: ["nzBreadcrumb"] }, { kind: "component", type: i10.NzBreadCrumbItemComponent, selector: "nz-breadcrumb-item", inputs: ["nzOverlay"], exportAs: ["nzBreadcrumbItem"] }, { kind: "ngmodule", type: NzDropDownModule }, { kind: "directive", type: i4$2.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "component", type: i4$2.NzMenuItemComponent, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i4$2.NzMenuDividerDirective, selector: "[nz-menu-divider]", exportAs: ["nzMenuDivider"] }, { kind: "component", type: i4$2.NzMenuGroupComponent, selector: "[nz-menu-group]", inputs: ["nzTitle"], exportAs: ["nzMenuGroup"] }, { kind: "component", type: i5$3.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "ngmodule", type: NzModalModule }, { kind: "ngmodule", type: NzDrawerModule }, { kind: "component", type: i14.NzDrawerComponent, selector: "nz-drawer", inputs: ["nzContent", "nzCloseIcon", "nzClosable", "nzMaskClosable", "nzMask", "nzCloseOnNavigation", "nzNoAnimation", "nzKeyboard", "nzTitle", "nzExtra", "nzFooter", "nzPlacement", "nzSize", "nzMaskStyle", "nzBodyStyle", "nzWrapClassName", "nzWidth", "nzHeight", "nzZIndex", "nzOffsetX", "nzOffsetY", "nzVisible"], outputs: ["nzOnViewInit", "nzOnClose", "nzVisibleChange"], exportAs: ["nzDrawer"] }, { kind: "directive", type: i14.NzDrawerContentDirective, selector: "[nzDrawerContent]", exportAs: ["nzDrawerContent"] }, { kind: "ngmodule", type: NzProgressModule }, { kind: "component", type: i18$1.NzProgressComponent, selector: "nz-progress", inputs: ["nzShowInfo", "nzWidth", "nzStrokeColor", "nzSize", "nzFormat", "nzSuccessPercent", "nzPercent", "nzStrokeWidth", "nzGapDegree", "nzStatus", "nzType", "nzGapPosition", "nzStrokeLinecap", "nzSteps"], exportAs: ["nzProgress"] }, { kind: "ngmodule", type: NzTagModule }, { kind: "component", type: i11.NzTagComponent, selector: "nz-tag", inputs: ["nzMode", "nzColor", "nzChecked", "nzBordered"], outputs: ["nzOnClose", "nzCheckedChange"], exportAs: ["nzTag"] }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "directive", type: i8.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "ngmodule", type: NzEmptyModule }, { kind: "ngmodule", type: NzDividerModule }, { kind: "component", type: i21.NzDividerComponent, selector: "nz-divider", inputs: ["nzText", "nzType", "nzOrientation", "nzVariant", "nzDashed", "nzPlain"], exportAs: ["nzDivider"] }, { kind: "ngmodule", type: NzSwitchModule }, { kind: "component", type: i13$2.NzSwitchComponent, selector: "nz-switch", inputs: ["nzLoading", "nzDisabled", "nzControl", "nzCheckedChildren", "nzUnCheckedChildren", "nzSize", "nzId"], exportAs: ["nzSwitch"] }, { kind: "ngmodule", type: NzSelectModule }, { kind: "component", type: i13$1.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i13$1.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }, { kind: "ngmodule", type: NzCheckboxModule }, { kind: "component", type: i3$2.NzCheckboxComponent, selector: "[nz-checkbox]", inputs: ["nzValue", "nzAutoFocus", "nzDisabled", "nzIndeterminate", "nzChecked", "nzId", "nzName"], outputs: ["nzCheckedChange"], exportAs: ["nzCheckbox"] }, { kind: "pipe", type: FormatBytesPipe, name: "formatBytes" }, { kind: "directive", type: AutoFocusDirective, selector: "[appAutoFocus]", inputs: ["appAutoFocus"] }, { kind: "component", type: ExtendViewFileContentComponent, selector: "extend-view-file-content", inputs: ["previewType", "previewContent"] }, { kind: "component", type: DriveShareModalComponent, selector: "lib-drive-share-modal", inputs: ["nodeId"] }, { kind: "component", type: DriveVersionModalComponent, selector: "lib-drive-version-modal", inputs: ["nodeId", "nodeName", "canEdit", "canDownload"], outputs: ["closed"] }, { kind: "component", type: DriveShareViewerComponent, selector: "lib-drive-share-viewer", inputs: ["token"], outputs: ["backToDrive"] }, { kind: "component", type: IconCopy, selector: "icon-copy", inputs: ["textToCopy", "tooltip", "size"] }, { kind: "component", type: DrivePermissionMatrixComponent, selector: "lib-drive-permission-matrix", inputs: ["viewMode", "scope", "customSpaceId", "rootFolderId", "rootNodeId", "initialTabIndex", "preselectedNodeIds"], outputs: ["saved", "closed"] }] });
|
|
36740
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: DriveExplorerComponent, isStandalone: true, selector: "lib-drive-explorer", providers: [NzImageService], usesInheritance: true, ngImport: i0, template: "@if (activeShareToken(); as sToken) {\n <lib-drive-share-viewer [token]=\"sToken\" (backToDrive)=\"closeEmbeddedShareViewer()\"></lib-drive-share-viewer>\n} @else {\n <div class=\"drive-shell\" [class.sidebar-wide]=\"sidebarWideMode() && showSidebarTree()\">\n <!-- SIDEBAR \u0110I\u1EC0U H\u01AF\u1EDANG & QUOTA -->\n <aside class=\"drive-sidebar\">\n <div nz-flex nzVertical nzGap=\"small\">\n <button\n nz-button\n nzType=\"primary\"\n nzBlock\n [disabled]=\"!drive.canUploadCurrentFolder()\"\n (click)=\"fileInput.click()\"\n >\n <nz-icon nzType=\"cloud-upload\"></nz-icon> T\u1EA3i t\u1EADp tin l\u00EAn\n </button>\n <input #fileInput type=\"file\" multiple hidden (change)=\"onFilesSelected($event)\" />\n <button\n nz-button\n nzType=\"default\"\n nzBlock\n [disabled]=\"!drive.canEditCurrentFolder()\"\n (click)=\"openFolderDrawer('create')\"\n >\n <nz-icon nzType=\"folder-add\"></nz-icon> T\u1EA1o th\u01B0 m\u1EE5c m\u1EDBi\n </button>\n </div>\n <!-- THANH T\u00D9Y CH\u1ECCN HI\u1EC2N TH\u1ECA C\u00C2Y TH\u01AF M\u1EE4C B\u00CAN TR\u00C1I (SIDEBAR FOLDER TREE OPTIONS) -->\n <div class=\"sidebar-tree-header-bar\">\n <span class=\"sidebar-tree-header-title\">\n <nz-icon nzType=\"partition\" style=\"color: var(--primary-color, #1890ff)\"></nz-icon>\n <span>C\u00E2y th\u01B0 m\u1EE5c</span>\n </span>\n <div class=\"sidebar-tree-header-actions\">\n @if (showSidebarTree()) {\n <button\n type=\"button\"\n class=\"sidebar-tree-tool-btn\"\n nz-tooltip\n nzTooltipTitle=\"M\u1EDF r\u1ED9ng nhanh c\u00E1c nh\u00E1nh th\u01B0 m\u1EE5c\"\n (click)=\"expandAllSidebarTreeNodes()\"\n >\n <nz-icon nzType=\"node-expand\"></nz-icon>\n </button>\n <button\n type=\"button\"\n class=\"sidebar-tree-tool-btn\"\n nz-tooltip\n nzTooltipTitle=\"Thu g\u1ECDn c\u00E1c nh\u00E1nh th\u01B0 m\u1EE5c\"\n (click)=\"collapseAllSidebarTreeNodes()\"\n >\n <nz-icon nzType=\"node-collapse\"></nz-icon>\n </button>\n <button\n type=\"button\"\n class=\"sidebar-tree-tool-btn\"\n nz-tooltip\n nzTooltipTitle=\"L\u00E0m m\u1EDBi c\u00E2y th\u01B0 m\u1EE5c\"\n (click)=\"refreshAllExpandedSidebarTrees()\"\n >\n <nz-icon nzType=\"reload\"></nz-icon>\n </button>\n <button\n type=\"button\"\n class=\"sidebar-tree-tool-btn\"\n [class.active]=\"sidebarWideMode()\"\n nz-tooltip\n [nzTooltipTitle]=\"\n sidebarWideMode() ? 'Thu g\u1ECDn \u0111\u1ED9 r\u1ED9ng c\u1ED9t tr\u00E1i' : 'M\u1EDF r\u1ED9ng \u0111\u1ED9 r\u1ED9ng c\u1ED9t tr\u00E1i \u0111\u1EC3 xem c\u00E2y th\u01B0 m\u1EE5c r\u00F5 h\u01A1n'\n \"\n (click)=\"onToggleSidebarWideMode()\"\n >\n <nz-icon nzType=\"column-width\"></nz-icon>\n </button>\n }\n <nz-switch\n nzSize=\"small\"\n [ngModel]=\"showSidebarTree()\"\n (ngModelChange)=\"onToggleSidebarTree($event)\"\n nz-tooltip\n nzTooltipTitle=\"B\u1EADt / T\u1EAFt hi\u1EC3n th\u1ECB c\u00E2y th\u01B0 m\u1EE5c tr\u1EF1c ti\u1EBFp b\u00EAn tr\u00E1i\"\n ></nz-switch>\n </div>\n </div>\n\n @if (showSidebarTree()) {\n <div class=\"sidebar-tree-filter-box\">\n <nz-input-group [nzPrefix]=\"sidebarFilterPrefixTpl\" [nzSuffix]=\"sidebarFilterClearTpl\" nzSize=\"small\">\n <input\n nz-input\n type=\"text\"\n placeholder=\"L\u1ECDc nhanh th\u01B0 m\u1EE5c tr\u00EAn c\u00E2y...\"\n [ngModel]=\"sidebarTreeFilter()\"\n (ngModelChange)=\"onSidebarTreeFilterChange($event)\"\n />\n </nz-input-group>\n <ng-template #sidebarFilterPrefixTpl>\n <nz-icon nzType=\"filter\" style=\"color: var(--app-text-muted, #94a3b8); font-size: 12px\"></nz-icon>\n </ng-template>\n <ng-template #sidebarFilterClearTpl>\n @if (sidebarTreeFilter()) {\n <nz-icon\n nzType=\"close-circle\"\n nzTheme=\"fill\"\n class=\"cursor-pointer\"\n style=\"color: var(--app-text-muted, #94a3b8); font-size: 12px\"\n (click)=\"onSidebarTreeFilterChange('')\"\n ></nz-icon>\n }\n </ng-template>\n </div>\n }\n\n <nav class=\"drive-nav\">\n <!-- 1. DRIVE C\u00C1 NH\u00C2N + C\u00C2Y TH\u01AF M\u1EE4C CON -->\n <div class=\"nav-item-with-tree\">\n <a\n [class.active]=\"drive.currentViewMode() === 'MY_DRIVE' && (!drive.currentFolderId() || !showSidebarTree())\"\n [class.space-has-active-child]=\"\n drive.currentViewMode() === 'MY_DRIVE' && !!drive.currentFolderId() && showSidebarTree()\n \"\n [class.nav-drop-active]=\"dragOverNavSpace() === 'MY_DRIVE'\"\n (click)=\"switchView('MY_DRIVE')\"\n (dragover)=\"onNavSpaceDragOver($event, 'MY_DRIVE')\"\n (dragleave)=\"onNavSpaceDragLeave('MY_DRIVE')\"\n (drop)=\"onNavSpaceDrop($event, 'MY_DRIVE')\"\n >\n @if (showSidebarTree()) {\n <button\n type=\"button\"\n class=\"nav-caret-btn\"\n (click)=\"toggleSidebarSpaceTree($event, 'MY_DRIVE')\"\n [title]=\"\n isSidebarSpaceExpanded('MY_DRIVE') ? 'Thu g\u1ECDn c\u00E2y Drive c\u00E1 nh\u00E2n' : 'M\u1EDF c\u00E2y th\u01B0 m\u1EE5c Drive c\u00E1 nh\u00E2n'\n \"\n >\n <nz-icon\n [nzType]=\"\n isSidebarSpaceLoading('MY_DRIVE')\n ? 'loading'\n : isSidebarSpaceExpanded('MY_DRIVE')\n ? 'caret-down'\n : 'caret-right'\n \"\n ></nz-icon>\n </button>\n }\n <nz-icon nzType=\"hdd\"></nz-icon>\n <span style=\"flex: 1\">Drive c\u00E1 nh\u00E2n</span>\n </a>\n <ng-container *ngTemplateOutlet=\"sidebarSpaceTreeTpl; context: { spaceKey: 'MY_DRIVE' }\"></ng-container>\n </div>\n\n <!-- 2. T\u00C0I LI\u1EC6U \u0110\u01A0N V\u1ECA & C\u00C1C M\u1EE4C T\u00D9Y CH\u1EC8NH (CUSTOM SPACES) + C\u00C2Y TH\u01AF M\u1EE4C CON -->\n <div class=\"org-nav-group\">\n <div class=\"nav-item-with-tree\">\n <a\n [class.active]=\"\n drive.currentViewMode() === 'ORG_DRIVE' && (!drive.currentFolderId() || !showSidebarTree())\n \"\n [class.space-has-active-child]=\"\n drive.currentViewMode() === 'ORG_DRIVE' && !!drive.currentFolderId() && showSidebarTree()\n \"\n [class.nav-drop-active]=\"dragOverNavSpace() === 'ORG_DRIVE'\"\n (click)=\"switchView('ORG_DRIVE')\"\n (dragover)=\"onNavSpaceDragOver($event, 'ORG_DRIVE')\"\n (dragleave)=\"onNavSpaceDragLeave('ORG_DRIVE')\"\n (drop)=\"onNavSpaceDrop($event, 'ORG_DRIVE')\"\n >\n @if (showSidebarTree()) {\n <button\n type=\"button\"\n class=\"nav-caret-btn\"\n (click)=\"toggleSidebarSpaceTree($event, 'ORG_DRIVE')\"\n [title]=\"\n isSidebarSpaceExpanded('ORG_DRIVE')\n ? 'Thu g\u1ECDn c\u00E2y T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB'\n : 'M\u1EDF c\u00E2y th\u01B0 m\u1EE5c T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB'\n \"\n >\n <nz-icon\n [nzType]=\"\n isSidebarSpaceLoading('ORG_DRIVE')\n ? 'loading'\n : isSidebarSpaceExpanded('ORG_DRIVE')\n ? 'caret-down'\n : 'caret-right'\n \"\n ></nz-icon>\n </button>\n }\n <nz-icon nzType=\"apartment\"></nz-icon>\n <span style=\"flex: 1\">T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB</span>\n @if (drive.isCurrentUserAdmin() || drive.orgDriveSpace()?.CanManage) {\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n nz-tooltip\n nzTooltipTitle=\"Ph\u00E2n quy\u1EC1n & C\u1EA5u h\u00ECnh T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"\n (click)=\"$event.stopPropagation(); openOrgDriveSpaceDrawer()\"\n >\n <nz-icon nzType=\"setting\"></nz-icon>\n </button>\n }\n @if (drive.isCurrentUserAdmin()) {\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n nz-tooltip\n nzTooltipTitle=\"Th\u00EAm m\u1EE5c t\u00F9y ch\u1EC9nh b\u00EAn d\u01B0\u1EDBi T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"\n (click)=\"$event.stopPropagation(); openCustomSpaceDrawer('create')\"\n >\n <nz-icon nzType=\"plus\"></nz-icon>\n </button>\n }\n </a>\n <ng-container *ngTemplateOutlet=\"sidebarSpaceTreeTpl; context: { spaceKey: 'ORG_DRIVE' }\"></ng-container>\n </div>\n\n <!-- DANH S\u00C1CH C\u00C1C M\u1EE4C CUSTOM B\u00CAN D\u01AF\u1EDAI \"T\u00C0I LI\u1EC6U \u0110\u01A0N V\u1ECA\" (VD: \"T\u00E0i li\u1EC7u d\u1EF1 \u00E1n\") -->\n @for (sp of drive.customSpaces(); track sp.Id) {\n <div class=\"nav-item-with-tree\">\n <a\n class=\"custom-space-link\"\n [class.active]=\"\n drive.currentViewMode() === 'CUSTOM_SPACE' &&\n drive.currentCustomSpaceId() === sp.Id &&\n (!drive.currentFolderId() || drive.currentFolderId() === sp.Id || !showSidebarTree())\n \"\n [class.space-has-active-child]=\"\n drive.currentViewMode() === 'CUSTOM_SPACE' &&\n drive.currentCustomSpaceId() === sp.Id &&\n !!drive.currentFolderId() &&\n drive.currentFolderId() !== sp.Id &&\n showSidebarTree()\n \"\n [class.nav-drop-active]=\"dragOverCustomSpaceId() === sp.Id\"\n (click)=\"switchCustomSpace(sp)\"\n (dragover)=\"onCustomSpaceDragOver($event, sp)\"\n (dragleave)=\"onCustomSpaceDragLeave(sp)\"\n (drop)=\"onCustomSpaceDrop($event, sp)\"\n >\n @if (showSidebarTree()) {\n <button\n type=\"button\"\n class=\"nav-caret-btn\"\n (click)=\"toggleSidebarSpaceTree($event, 'CUSTOM:' + sp.Id)\"\n [title]=\"\n isSidebarSpaceExpanded('CUSTOM:' + sp.Id) ? 'Thu g\u1ECDn c\u00E2y ' + sp.Name : 'M\u1EDF c\u00E2y th\u01B0 m\u1EE5c ' + sp.Name\n \"\n >\n <nz-icon\n [nzType]=\"\n isSidebarSpaceLoading('CUSTOM:' + sp.Id)\n ? 'loading'\n : isSidebarSpaceExpanded('CUSTOM:' + sp.Id)\n ? 'caret-down'\n : 'caret-right'\n \"\n ></nz-icon>\n </button>\n }\n <nz-icon [nzType]=\"sp.Icon || 'project'\"></nz-icon>\n <span class=\"custom-space-title\" [title]=\"sp.Name\">{{ sp.Name }}</span>\n @if (sp.IsVisibleToAllUsers) {\n <nz-tag nzColor=\"cyan\" class=\"custom-space-badge\">All</nz-tag>\n }\n @if (sp.CanManage || drive.isCurrentUserAdmin()) {\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n nz-tooltip\n [nzTooltipTitle]=\"'Ph\u00E2n quy\u1EC1n & C\u1EA5u h\u00ECnh ' + sp.Name\"\n (click)=\"$event.stopPropagation(); openCustomSpaceDrawer('edit', sp)\"\n >\n <nz-icon nzType=\"setting\"></nz-icon>\n </button>\n }\n </a>\n <ng-container\n *ngTemplateOutlet=\"sidebarSpaceTreeTpl; context: { spaceKey: 'CUSTOM:' + sp.Id }\"\n ></ng-container>\n </div>\n }\n </div>\n\n <!-- 3. \u0110\u01AF\u1EE2C CHIA S\u1EBA V\u1EDAI T\u00D4I + C\u00C2Y TH\u01AF M\u1EE4C CON -->\n <div class=\"nav-item-with-tree\">\n <a\n [class.active]=\"\n drive.currentViewMode() === 'SHARED_WITH_ME' && (!drive.currentFolderId() || !showSidebarTree())\n \"\n [class.space-has-active-child]=\"\n drive.currentViewMode() === 'SHARED_WITH_ME' && !!drive.currentFolderId() && showSidebarTree()\n \"\n (click)=\"switchView('SHARED_WITH_ME')\"\n >\n @if (showSidebarTree()) {\n <button\n type=\"button\"\n class=\"nav-caret-btn\"\n (click)=\"toggleSidebarSpaceTree($event, 'SHARED_WITH_ME')\"\n [title]=\"\n isSidebarSpaceExpanded('SHARED_WITH_ME')\n ? 'Thu g\u1ECDn c\u00E2y \u0110\u01B0\u1EE3c chia s\u1EBB v\u1EDBi t\u00F4i'\n : 'M\u1EDF c\u00E2y th\u01B0 m\u1EE5c \u0110\u01B0\u1EE3c chia s\u1EBB v\u1EDBi t\u00F4i'\n \"\n >\n <nz-icon\n [nzType]=\"\n isSidebarSpaceLoading('SHARED_WITH_ME')\n ? 'loading'\n : isSidebarSpaceExpanded('SHARED_WITH_ME')\n ? 'caret-down'\n : 'caret-right'\n \"\n ></nz-icon>\n </button>\n }\n <nz-icon nzType=\"share-alt\"></nz-icon>\n <span style=\"flex: 1\">\u0110\u01B0\u1EE3c chia s\u1EBB v\u1EDBi t\u00F4i</span>\n </a>\n <ng-container *ngTemplateOutlet=\"sidebarSpaceTreeTpl; context: { spaceKey: 'SHARED_WITH_ME' }\"></ng-container>\n </div>\n <a [class.active]=\"drive.currentViewMode() === 'RECENT'\" (click)=\"switchView('RECENT')\">\n <nz-icon nzType=\"clock-circle\"></nz-icon> G\u1EA7n \u0111\u00E2y\n </a>\n <a [class.active]=\"drive.currentViewMode() === 'STARRED'\" (click)=\"switchView('STARRED')\">\n <nz-icon nzType=\"star\"></nz-icon> C\u00F3 g\u1EAFn d\u1EA5u sao\n </a>\n <a [class.active]=\"drive.currentViewMode() === 'TRASH'\" (click)=\"switchView('TRASH')\">\n <nz-icon nzType=\"delete\"></nz-icon>\n <span style=\"flex: 1\">Th\u00F9ng r\u00E1c</span>\n @if (drive.currentViewMode() === \"TRASH\" && drive.items().length > 0 && drive.allowDeleteFromTrash()) {\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n style=\"color: #ef4444\"\n nz-tooltip\n nzTooltipTitle=\"D\u1ECDn s\u1EA1ch th\u00F9ng r\u00E1c (X\u00F3a v\u0129nh vi\u1EC5n t\u1EA5t c\u1EA3)\"\n (click)=\"$event.stopPropagation(); onEmptyTrash()\"\n >\n <nz-icon nzType=\"clear\"></nz-icon>\n </button>\n }\n </a>\n </nav>\n\n <!-- TEMPLATE D\u00D9NG CHUNG HI\u1EC2N TH\u1ECA C\u00C2Y TH\u01AF M\u1EE4C \u0110A C\u1EA4P B\u00CAN TR\u00C1I CHO T\u1EEANG KH\u00D4NG GIAN -->\n <ng-template #sidebarSpaceTreeTpl let-spaceKey=\"spaceKey\">\n @if (isSidebarSpaceExpanded(spaceKey)) {\n @if (getSidebarVisibleTreeNodes(spaceKey); as treeNodes) {\n @if (treeNodes.length > 0) {\n <div class=\"sidebar-tree-container\">\n @for (vm of treeNodes; track vm.folderId) {\n <div\n class=\"sidebar-tree-node\"\n [class.active-tree-node]=\"vm.isActive\"\n [class.context-active-tree-node]=\"isRowActive(vm.node) || selectedRowId() === vm.folderId\"\n [class.active-breadcrumb-ancestor]=\"vm.isInActiveBreadcrumb && !vm.isActive\"\n [class.tree-drop-active]=\"dragOverSidebarFolderId() === vm.folderId\"\n [style.padding-left.px]=\"6 + vm.level * 14\"\n [attr.draggable]=\"vm.node.EffectiveAccess >= DriveAccessLevel.Editor\"\n (dragstart)=\"onSidebarTreeNodeDragStart($event, vm)\"\n (dragend)=\"onRowDragEnd()\"\n (dragover)=\"onSidebarTreeNodeDragOver($event, vm)\"\n (dragleave)=\"onSidebarTreeNodeDragLeave($event, vm)\"\n (drop)=\"onSidebarTreeNodeDrop($event, vm)\"\n (click)=\"onSidebarTreeNodeClick(vm)\"\n (contextmenu)=\"onContextMenu($event, menu, vm.node)\"\n >\n @if (!vm.hasKnownNoChildren) {\n <button\n type=\"button\"\n class=\"tree-node-caret\"\n (click)=\"toggleSidebarFolderNode($event, vm)\"\n [title]=\"vm.isExpanded ? 'Thu g\u1ECDn nh\u00E1nh' : 'M\u1EDF r\u1ED9ng th\u01B0 m\u1EE5c con'\"\n >\n <nz-icon\n [nzType]=\"vm.isLoading ? 'loading' : vm.isExpanded ? 'caret-down' : 'caret-right'\"\n ></nz-icon>\n </button>\n } @else {\n <span class=\"tree-node-caret-spacer\"></span>\n }\n\n <nz-icon\n class=\"tree-node-folder-icon\"\n [nzType]=\"vm.isExpanded || vm.isActive ? 'folder-open' : 'folder-fill'\"\n [style.color]=\"vm.isActive ? 'var(--primary-color, #1890ff)' : '#f59e0b'\"\n ></nz-icon>\n\n <span class=\"tree-node-label\" [title]=\"vm.node.Name\">\n {{ vm.node.Name }}\n </span>\n\n @if (vm.node.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n class=\"tree-node-quick-btn\"\n title=\"T\u1EA1o th\u01B0 m\u1EE5c con trong '{{ vm.node.Name }}'\"\n (click)=\"openCreateSubfolderFromSidebar($event, vm)\"\n >\n <nz-icon nzType=\"plus\"></nz-icon>\n </button>\n }\n </div>\n }\n </div>\n } @else if (isSidebarSpaceLoading(spaceKey)) {\n <div class=\"sidebar-tree-empty\">\n <nz-icon nzType=\"loading\" style=\"margin-right: 4px\"></nz-icon> \u0110ang t\u1EA3i c\u00E2y th\u01B0 m\u1EE5c...\n </div>\n } @else if (sidebarTreeFilter().trim()) {\n <!-- <div class=\"sidebar-tree-empty\">Kh\u00F4ng kh\u1EDBp th\u01B0 m\u1EE5c n\u00E0o</div> -->\n } @else {\n <!-- <div class=\"sidebar-tree-empty\">Ch\u01B0a c\u00F3 th\u01B0 m\u1EE5c con</div> -->\n }\n }\n }\n </ng-template>\n <!-- KHUNG M\u1EAAU C\u00C2Y TH\u01AF M\u1EE4C (H\u1ED6 TR\u1EE2 K\u00C9O TH\u1EA2 V\u00C0O TH\u01AF M\u1EE4C \u0110\u00CDCH HO\u1EB6C B\u1EA4M T\u1EA0O NHANH) -->\n @if (drive.isCurrentUserAdmin()) {\n <div class=\"template-sidebar-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"margin-bottom: 6px\">\n <span style=\"font-size: 12px; font-weight: 600\">\n <nz-icon nzType=\"apartment\" style=\"color: #d97706; margin-right: 4px\"></nz-icon>\n M\u1EABu c\u00E2y th\u01B0 m\u1EE5c ({{ drive.folderTemplates().length }})\n </span>\n <button\n type=\"button\"\n nz-button\n nzType=\"link\"\n nzSize=\"small\"\n style=\"padding: 0 4px; font-size: 12px\"\n (click)=\"openTemplateDrawer('create')\"\n >\n <!-- nz-tooltip\n nzTooltipTitle=\"\u0110\u1ECBnh ngh\u0129a m\u1EABu c\u00E2y th\u01B0 m\u1EE5c m\u1EDBi\" -->\n <nz-icon nzType=\"plus\"></nz-icon> T\u1EA1o m\u1EABu\n </button>\n </div>\n\n @if (drive.folderTemplates().length === 0) {\n <div class=\"quota-sub\" style=\"font-size: 11px\">\n Ch\u01B0a c\u00F3 m\u1EABu n\u00E0o. B\u1EA5m <strong>+ T\u1EA1o m\u1EABu</strong> \u0111\u1EC3 \u0111\u1ECBnh ngh\u0129a c\u00E2y th\u01B0 m\u1EE5c chu\u1EA9n.\n </div>\n } @else {\n <div class=\"template-chip-list\">\n @for (tpl of drive.folderTemplates(); track tpl.Id) {\n <div\n class=\"template-drag-item\"\n draggable=\"true\"\n (dragstart)=\"onTemplateDragStart($event, tpl)\"\n (dragend)=\"onTemplateDragEnd()\"\n >\n <!-- nz-tooltip\n [nzTooltipTitle]=\"\n 'K\u00E9o th\u1EA3 m\u1EABu [' +\n tpl.Name +\n '] (' +\n tpl.TotalFolderCount +\n ' th\u01B0 m\u1EE5c) v\u00E0o m\u1ED9t Th\u01B0 m\u1EE5c \u0111\u00EDch tr\u00EAn b\u1EA3ng, ho\u1EB7c b\u1EA5m \u0111\u1EC3 t\u1EA1o t\u1EA1i \u0111\u00E2y'\n \" -->\n <div\n nz-flex\n nzAlign=\"center\"\n [nzGap]=\"6\"\n style=\"flex: 1; min-width: 0\"\n (click)=\"openFolderDrawer('create', undefined, tpl)\"\n >\n <nz-icon nzType=\"folder-add\" style=\"color: #d97706; font-size: 15px\"></nz-icon>\n <div style=\"flex: 1; min-width: 0\">\n <div class=\"template-item-title\">{{ tpl.Name }}</div>\n <div class=\"template-item-sub\">\n <code>{{ tpl.Code }}</code> \u2022 {{ tpl.TotalFolderCount }} m\u1EE5c\n @if (tpl.TotalPermissionCount > 0) {\n <span style=\"color: #0284c7; font-weight: 600\">\n \u2022 \uD83D\uDEE1 {{ tpl.TotalPermissionCount }} quy\u1EC1n</span\n >\n }\n </div>\n </div>\n </div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"2\">\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n [disabled]=\"!drive.canEditCurrentFolder()\"\n (click)=\"$event.stopPropagation(); applyTemplateToTargetFolder(tpl, drive.currentFolderId())\"\n >\n <!-- nz-tooltip\n nzTooltipTitle=\"\u00C1p d\u1EE5ng ngay v\u00E0o th\u01B0 m\u1EE5c \u0111ang m\u1EDF\" -->\n <nz-icon nzType=\"thunderbolt\" style=\"color: var(--primary-color)\"></nz-icon>\n </button>\n @if (tpl.CanManage || drive.isCurrentUserAdmin()) {\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n (click)=\"$event.stopPropagation(); openTemplateDrawer('edit', tpl)\"\n >\n <!-- nz-tooltip\n nzTooltipTitle=\"S\u1EEDa / X\u00F3a m\u1EABu c\u00E2y th\u01B0 m\u1EE5c\" -->\n <nz-icon nzType=\"setting\"></nz-icon>\n </button>\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n <!-- H\u1ED8P C\u1EA4U H\u00CCNH CH\u1EBE \u0110\u1ED8 TH\u01AF M\u1EE4C V\u1EACT L\u00DD vs \u1EA2O H\u00D3A -->\n @if (drive.isCurrentUserAdmin() && false) {\n <div class=\"storage-mode-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <span style=\"font-size: 12px; font-weight: 600\">Th\u01B0 m\u1EE5c v\u1EADt l\u00FD (Disk)</span>\n <nz-switch\n nzSize=\"small\"\n [ngModel]=\"drive.usePhysicalFolders()\"\n (ngModelChange)=\"onTogglePhysicalMode($event)\"\n ></nz-switch>\n\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Khi b\u1EADt: T\u1EA1o c\u00E2y th\u01B0 m\u1EE5c & t\u00EAn file th\u1EADt 1-1 tr\u00EAn \u1ED5 c\u1EE9ng m\u00E1y ch\u1EE7\"\n -->\n </div>\n <div class=\"quota-sub\">\n Ch\u1EBF \u0111\u1ED9: <strong>{{ drive.usePhysicalFolders() ? \"V\u1EADt l\u00FD 1:1 (Physical)\" : \"\u1EA2o h\u00F3a (Virtual)\" }}</strong>\n </div>\n @if (drive.usePhysicalFolders()) {\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"margin-top: 8px\">\n <span style=\"font-size: 12px\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Khi b\u1EADt: T\u1EA5t c\u1EA3 User c\u00F9ng d\u00F9ng chung 1 RootPath duy nh\u1EA5t \u0111\u1EC3 l\u01B0u tr\u1EEF t\u00E0i li\u1EC7u d\u1EF1 \u00E1n\"\n -->\n D\u00F9ng chung RootPath\n </span>\n <nz-switch\n nzSize=\"small\"\n [ngModel]=\"drive.useSharedPhysicalRoot()\"\n (ngModelChange)=\"onToggleSharedRootMode($event)\"\n ></nz-switch>\n </div>\n <div class=\"quota-sub\">\n Ph\u1EA1m vi \u0111\u0129a:\n <strong>{{ drive.useSharedPhysicalRoot() ? \"Chung to\u00E0n d\u1EF1 \u00E1n\" : \"T\u00E1ch theo t\u1EEBng User\" }}</strong>\n </div>\n <div nz-flex nzVertical [nzGap]=\"6\" style=\"margin-top: 8px\">\n <button nz-button nzType=\"dashed\" nzSize=\"small\" nzBlock (click)=\"onSyncPhysicalDisk()\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Qu\u00E9t c\u00E1c file/th\u01B0 m\u1EE5c copy tr\u1EF1c ti\u1EBFp tr\u00EAn \u1ED5 \u0111\u0129a Server \u0111\u1EC3 n\u1EA1p v\u00E0o Drive\"\n -->\n <nz-icon nzType=\"sync\"></nz-icon> \u0110\u1ED3ng b\u1ED9 t\u1EEB \u1ED5 \u0111\u0129a\n </button>\n <button nz-button nzType=\"default\" nzSize=\"small\" nzBlock (click)=\"openRelocateDrawer(null)\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"\u0110\u1ED5i \u0111\u01B0\u1EDDng d\u1EABn RootPath ho\u1EB7c \u00E1nh x\u1EA1 sang \u1ED5 c\u1EE9ng l\u01B0u tr\u1EEF kh\u00E1c\"\n -->\n <nz-icon nzType=\"folder-open\"></nz-icon> \u0110\u1ED5i RootPath / \u1ED4 \u0111\u0129a\n </button>\n </div>\n }\n </div>\n }\n <!-- H\u1ED8P TI\u1EBEN TR\u00CCNH UPLOAD (H\u1ED6 TR\u1EE2 T\u1EA2I TI\u1EBEP KHI L\u1ED6I / T\u1EA0M D\u1EEANG / H\u1EE6Y) -->\n @if (drive.userUploadQueue().length > 0) {\n <div class=\"upload-queue-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"margin-bottom: 6px\">\n <strong>Ti\u1EBFn tr\u00ECnh t\u1EA3i l\u00EAn ({{ drive.userUploadQueue().length }})</strong>\n <a (click)=\"drive.clearCompletedUploads()\" style=\"font-size: 12px\">\u1EA8n \u0111\u00E3 xong</a>\n </div>\n <input #resumeFileInput type=\"file\" hidden (change)=\"onResumeFileSelected($event)\" />\n @for (task of drive.userUploadQueue(); track task.id) {\n <div class=\"upload-task-row\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" [nzGap]=\"4\">\n <div class=\"upload-task-name\" [title]=\"task.fileName\">{{ task.fileName }}</div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"2\">\n @if (task.status === \"uploading\" && (task.fileSize || 0) >= 20971520) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n (click)=\"drive.pauseUploadTask(task.id)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"T\u1EA1m d\u1EEBng t\u1EA3i l\u00EAn\"\n -->\n <nz-icon nzType=\"pause-circle\"></nz-icon>\n </button>\n }\n @if (task.status === \"error\" || task.status === \"paused\") {\n <button\n type=\"button\"\n nz-button\n nzType=\"link\"\n nzSize=\"small\"\n style=\"padding: 0 4px; font-size: 12px; font-weight: 600\"\n (click)=\"onResumeUploadClick(task, resumeFileInput)\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"task.errorMessage || 'T\u1EA3i l\u00EAn ti\u1EBFp t\u1EEB ph\u1EA7n tr\u0103m \u0111\u00E3 l\u01B0u (Resume Upload)'\"\n -->\n <nz-icon nzType=\"reload\"></nz-icon> T\u1EA3i ti\u1EBFp\n </button>\n }\n @if (task.status !== \"uploading\") {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n style=\"padding: 0 4px\"\n (click)=\"drive.removeUploadTask(task.id)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"X\u00F3a kh\u1ECFi danh s\u00E1ch & h\u1EE7y phi\u00EAn t\u1EA1m\"\n -->\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n }\n </div>\n </div>\n <nz-progress\n [nzPercent]=\"task.progress\"\n nzSize=\"small\"\n [nzStatus]=\"\n task.status === 'error'\n ? 'exception'\n : task.status === 'success'\n ? 'success'\n : task.status === 'paused'\n ? 'normal'\n : 'active'\n \"\n ></nz-progress>\n @if (task.status === \"error\") {\n <div style=\"font-size: 11px; color: #ef4444; margin-top: 2px\">\n {{ task.errorMessage || \"B\u1ECB ng\u1EAFt k\u1EBFt n\u1ED1i.\" }} \u2014 B\u1EA5m <strong>T\u1EA3i ti\u1EBFp</strong> \u0111\u1EC3 n\u1ED1i l\u1EA1i t\u1EEB\n {{ task.progress }}%.\n </div>\n }\n @if (task.status === \"paused\") {\n <div style=\"font-size: 11px; color: #f59e0b; margin-top: 2px\">\n \u0110\u00E3 t\u1EA1m d\u1EEBng \u1EDF {{ task.progress }}% \u2014 B\u1EA5m <strong>T\u1EA3i ti\u1EBFp</strong> \u0111\u1EC3 ti\u1EBFp t\u1EE5c.\n </div>\n }\n </div>\n }\n </div>\n }\n <!-- H\u1ED8P TI\u1EBEN TR\u00CCNH DOWNLOAD (H\u1ED6 TR\u1EE2 THEO D\u00D5I % & H\u1EE6Y T\u1EA2I T\u1EE8C TH\u1EDCI \u0110\u1ED0I V\u1EDAI FILE N\u1EB6NG) -->\n @if (drive.userDownloadQueue().length > 0) {\n <div class=\"upload-queue-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"margin-bottom: 6px\">\n <strong>Ti\u1EBFn tr\u00ECnh t\u1EA3i xu\u1ED1ng ({{ drive.userDownloadQueue().length }})</strong>\n <a (click)=\"drive.clearCompletedDownloads()\" style=\"font-size: 12px\">\u1EA8n \u0111\u00E3 xong</a>\n </div>\n @for (dlTask of drive.userDownloadQueue(); track dlTask.id) {\n <div class=\"upload-task-row\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" [nzGap]=\"4\">\n <div class=\"upload-task-name\" [title]=\"dlTask.fileName\">{{ dlTask.fileName }}</div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"2\">\n @if (dlTask.status === \"downloading\") {\n <button\n type=\"button\"\n nz-button\n nzType=\"link\"\n nzDanger\n nzSize=\"small\"\n style=\"padding: 0 4px; font-size: 12px; font-weight: 600\"\n (click)=\"drive.cancelDownloadTask(dlTask.id)\"\n >\n <nz-icon nzType=\"stop\"></nz-icon> H\u1EE7y t\u1EA3i\n </button>\n } @else {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n style=\"padding: 0 4px\"\n (click)=\"drive.removeDownloadTask(dlTask.id)\"\n >\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n }\n </div>\n </div>\n <nz-progress\n [nzPercent]=\"dlTask.progress\"\n nzSize=\"small\"\n [nzStatus]=\"\n dlTask.status === 'error' || dlTask.status === 'cancelled'\n ? 'exception'\n : dlTask.status === 'success'\n ? 'success'\n : 'active'\n \"\n ></nz-progress>\n <div style=\"font-size: 11px; color: var(--app-text-muted, #64748b); margin-top: 2px\">\n @if (dlTask.status === \"downloading\") {\n \u0110ang t\u1EA3i: {{ dlTask.loadedBytes | formatBytes }}\n @if (dlTask.totalBytes) {\n / {{ dlTask.totalBytes | formatBytes }}\n }\n } @else if (dlTask.status === \"cancelled\") {\n <span style=\"color: #f59e0b\">\u0110\u00E3 h\u1EE7y t\u1EA3i xu\u1ED1ng gi\u1EEFa ch\u1EEBng.</span>\n } @else if (dlTask.status === \"error\") {\n <span style=\"color: #ef4444\">{{ dlTask.errorMessage || \"L\u1ED7i khi t\u1EA3i xu\u1ED1ng.\" }}</span>\n } @else {\n <span style=\"color: #10b981\">\u0110\u00E3 t\u1EA3i xu\u1ED1ng ho\u00E0n t\u1EA5t.</span>\n }\n </div>\n </div>\n }\n </div>\n }\n <div class=\"quota-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <div class=\"quota-title\" style=\"margin-bottom: 0\">\n <nz-icon nzType=\"cloud\"></nz-icon> Dung l\u01B0\u1EE3ng ({{ drive.quotaPercent() }}%)\n </div>\n @if (drive.isCurrentUserAdmin()) {\n <nz-tag nzColor=\"gold\" style=\"margin-right: 0; font-size: 11px\">Admin</nz-tag>\n }\n </div>\n <nz-progress [nzPercent]=\"drive.quotaPercent()\" nzSize=\"small\" [nzShowInfo]=\"false\"></nz-progress>\n <div class=\"quota-sub\">{{ drive.usedBytes() | formatBytes }} / {{ drive.quotaLimitBytes() | formatBytes }}</div>\n @if (drive.isCurrentUserAdmin()) {\n <button\n nz-button\n nzType=\"dashed\"\n nzSize=\"small\"\n nzBlock\n style=\"margin-top: 8px\"\n (click)=\"openPermissionMatrixDrawer(drive.currentFolderId())\"\n >\n <nz-icon nzType=\"table\"></nz-icon>\n Ma tr\u1EADn ph\u00E2n quy\u1EC1n\n </button>\n <button\n nz-button\n nzType=\"dashed\"\n nzSize=\"small\"\n nzBlock\n style=\"margin-top: 8px\"\n (click)=\"openQuotaAdminDrawer()\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"\u0110\u1EB7t Quota m\u1EB7c \u0111\u1ECBnh to\u00E0n h\u1EC7 th\u1ED1ng v\u00E0 thi\u1EBFt l\u1EADp Quota ri\u00EAng cho t\u1EEBng ng\u01B0\u1EDDi d\u00F9ng (Ch\u1EC9 Admin)\"\n -->\n <nz-icon nzType=\"setting\"></nz-icon> Qu\u1EA3n l\u00FD Quota (Admin)\n </button>\n }\n </div>\n </aside>\n <!-- KHU V\u1EF0C N\u1ED8I DUNG CH\u00CDNH (H\u1ED6 TR\u1EE2 K\u00C9O TH\u1EA2 FILE & FOLDER T\u1EEA FILE EXPLORER) -->\n <main\n class=\"drive-main\"\n [class.external-drag-active]=\"isExternalFileDragging()\"\n (dragenter)=\"onMainDragEnter($event)\"\n (dragover)=\"onMainDragOver($event)\"\n (dragleave)=\"onMainDragLeave($event)\"\n (drop)=\"onMainDrop($event)\"\n >\n @if (isExternalFileDragging()) {\n <div class=\"external-drop-banner\">\n <nz-icon nzType=\"cloud-upload\" class=\"drop-banner-icon\"></nz-icon>\n <div>\n <div class=\"drop-banner-title\">\n @if (dragOverFolderName(); as targetName) {\n Th\u1EA3 t\u1EADp tin / th\u01B0 m\u1EE5c t\u1EEB m\u00E1y t\u00EDnh \u0111\u1EC3 t\u1EA3i th\u1EB3ng v\u00E0o th\u01B0 m\u1EE5c: <strong>\"{{ targetName }}\"</strong>\n } @else {\n Th\u1EA3 t\u1EADp tin ho\u1EB7c th\u01B0 m\u1EE5c t\u1EEB File Explorer v\u00E0o \u0111\u00E2y \u0111\u1EC3 t\u1EA3i l\u00EAn th\u01B0 m\u1EE5c hi\u1EC7n t\u1EA1i\n }\n </div>\n <div class=\"drop-banner-sub\">\n H\u1ED7 tr\u1EE3 k\u00E9o th\u1EA3 nhi\u1EC1u file c\u00F9ng l\u00FAc ho\u1EB7c k\u00E9o nguy\u00EAn c\u1EA3 c\u00E2y th\u01B0 m\u1EE5c t\u1EEB m\u00E1y t\u00EDnh (T\u1EF1 \u0111\u1ED9ng Chunk Upload n\u1EBFu\n file ≥ 20MB)\n </div>\n </div>\n </div>\n }\n <!-- TOOLBAR + PAGINATION -->\n <header class=\"drive-toolbar\">\n <div>\n <nz-breadcrumb>\n <nz-breadcrumb-item\n (click)=\"navigateToFolder(null)\"\n (dragover)=\"onBreadcrumbDragOver($event, '__ROOT__')\"\n (dragleave)=\"onBreadcrumbDragLeave('__ROOT__')\"\n (drop)=\"onBreadcrumbDrop($event, null)\"\n [class.bc-drop-active]=\"dragOverBreadcrumbId() === '__ROOT__'\"\n class=\"cursor-pointer\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"K\u00E9o th\u1EA3 m\u1EE5c v\u00E0o \u0111\u00E2y \u0111\u1EC3 chuy\u1EC3n v\u1EC1 th\u01B0 m\u1EE5c g\u1ED1c\"\n -->\n <nz-icon nzType=\"home\"></nz-icon>\n {{ getRootTitle() }}\n </nz-breadcrumb-item>\n @for (bc of drive.breadcrumbs(); track bc.Id) {\n @if (drive.currentViewMode() !== \"CUSTOM_SPACE\" || bc.Id !== drive.currentCustomSpaceId()) {\n <nz-breadcrumb-item\n (click)=\"navigateToFolder(bc.Id)\"\n (dragover)=\"onBreadcrumbDragOver($event, bc.Id)\"\n (dragleave)=\"onBreadcrumbDragLeave(bc.Id)\"\n (drop)=\"onBreadcrumbDrop($event, bc.Id)\"\n [class.bc-drop-active]=\"dragOverBreadcrumbId() === bc.Id\"\n class=\"cursor-pointer\"\n >\n {{ bc.Name }}\n </nz-breadcrumb-item>\n }\n }\n </nz-breadcrumb>\n <!-- @if (drive.isCurrentUserAdmin() && drive.usePhysicalFolders() && drive.currentPhysicalPath(); as physPath) {\n <div class=\"physical-path-bar\">\n <nz-icon nzType=\"folder-open\"></nz-icon>\n <span>\n \u0110\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD: <code>{{ physPath }}</code>\n </span>\n <icon-copy [textToCopy]=\"physPath\" tooltip=\"Sao ch\u00E9p \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD tr\u00EAn Server\"></icon-copy>\n </div>\n } -->\n </div>\n <div class=\"toolbar-actions\">\n <nz-input-group [nzSuffix]=\"suffixIconSearch\" style=\"width: 250px\">\n <input\n type=\"text\"\n nz-input\n placeholder=\"T\u00ECm ki\u1EBFm t\u00E0i li\u1EC7u, th\u01B0 m\u1EE5c...\"\n [ngModel]=\"drive.keyword()\"\n (ngModelChange)=\"drive.keyword.set($event)\"\n (keyup.enter)=\"onSearch()\"\n />\n </nz-input-group>\n <ng-template #suffixIconSearch>\n <nz-icon nzType=\"search\" class=\"cursor-pointer\" (click)=\"onSearch()\"></nz-icon>\n </ng-template>\n <label\n nz-checkbox\n [ngModel]=\"drive.includeSubfolders()\"\n (ngModelChange)=\"onToggleIncludeSubfolders($event)\"\n style=\"user-select: none; white-space: nowrap; font-size: 13px\"\n nz-tooltip\n nzTooltipTitle=\"T\u00ECm c\u1EA3 th\u01B0 m\u1EE5c con\"\n >\n </label>\n <!-- T\u00D9Y CH\u1ECCN CH\u1EBE \u0110\u1ED8 XEM: C\u00C2Y TH\u01AF M\u1EE4C B\u00CAN TR\u00C1I + B\u1EA2NG PH\u1EB2NG vs TREE TABLE -->\n <div class=\"view-mode-switch\" nz-flex nzAlign=\"center\" [nzGap]=\"4\">\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"showSidebarTree() ? 'primary' : 'default'\"\n (click)=\"onToggleSidebarTree(!showSidebarTree())\"\n nz-tooltip\n [nzTooltipTitle]=\"\n showSidebarTree()\n ? '\u0110ang b\u1EADt C\u00E2y th\u01B0 m\u1EE5c b\u00EAn tr\u00E1i (Nh\u1EA5n \u0111\u1EC3 \u1EA9n)'\n : 'Hi\u1EC3n th\u1ECB C\u00E2y th\u01B0 m\u1EE5c tr\u1EF1c ti\u1EBFp \u1EDF c\u1ED9t b\u00EAn tr\u00E1i'\n \"\n >\n <nz-icon nzType=\"partition\"></nz-icon>\n </button>\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"!drive.isTreeTableView() ? 'primary' : 'default'\"\n (click)=\"onToggleTreeTableView(false)\"\n nz-tooltip\n nzTooltipTitle=\"Flat Table\"\n >\n <nz-icon nzType=\"unordered-list\"></nz-icon>\n <!-- B\u1EA3ng ph\u1EB3ng -->\n </button>\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"drive.isTreeTableView() ? 'primary' : 'default'\"\n (click)=\"onToggleTreeTableView(true)\"\n nz-tooltip\n nzTooltipTitle=\"Tree Table\"\n >\n <nz-icon nzType=\"apartment\"></nz-icon>\n <!-- Tree Table -->\n </button>\n @if (drive.isTreeTableView()) {\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"dashed\"\n (click)=\"expandAllTreeFolders()\"\n nz-tooltip\n nzTooltipTitle=\"M\u1EDF r\u1ED9ng\"\n >\n <nz-icon nzType=\"node-expand\"></nz-icon>\n </button>\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"dashed\"\n (click)=\"collapseAllTreeFolders()\"\n nz-tooltip\n nzTooltipTitle=\"Thu g\u1ECDn\"\n >\n <nz-icon nzType=\"node-collapse\"></nz-icon>\n </button>\n }\n </div>\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n nz-tooltip\n [nzTooltipTitle]=\"drive.sortDesc() ? 'A \u2192 Z' : 'Z \u2192 A'\"\n (click)=\"toggleSortDirection()\"\n >\n <nz-icon [nzType]=\"drive.sortDesc() ? 'sort-descending' : 'sort-ascending'\"></nz-icon>\n </button>\n @if (drive.currentViewMode() === \"TRASH\" && drive.allowDeleteFromTrash()) {\n <button\n type=\"button\"\n nz-button\n nzDanger\n nzType=\"primary\"\n nzSize=\"small\"\n [disabled]=\"drive.items().length === 0 || emptyingTrash()\"\n [nzLoading]=\"emptyingTrash()\"\n nz-tooltip\n nzTooltipTitle=\"X\u00F3a v\u0129nh vi\u1EC5n to\u00E0n b\u1ED9 c\u00E1c m\u1EE5c trong th\u00F9ng r\u00E1c v\u00E0 gi\u1EA3i ph\u00F3ng dung l\u01B0\u1EE3ng Quota\"\n (click)=\"onEmptyTrash()\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n D\u1ECDn s\u1EA1ch th\u00F9ng r\u00E1c\n @if (drive.totalCount() > 0) {\n <span>({{ drive.totalCount() }})</span>\n }\n </button>\n }\n <button\n nz-button\n nzType=\"default\"\n nzSize=\"small\"\n (click)=\"refreshExplorer()\"\n nz-tooltip\n nzTooltipTitle=\"L\u00E0m m\u1EDBi\"\n >\n <nz-icon nzType=\"reload\"></nz-icon>\n </button>\n <nz-pagination\n [nzSize]=\"'small'\"\n [nzPageIndex]=\"drive.pageIndex()\"\n [nzPageSize]=\"drive.pageSize()\"\n [nzTotal]=\"drive.totalCount()\"\n [nzShowSizeChanger]=\"true\"\n [nzPageSizeOptions]=\"AppGlobals.pageSizeOptions\"\n (nzPageIndexChange)=\"drive.loadNodes($event, drive.pageSize())\"\n (nzPageSizeChange)=\"drive.loadNodes(1, $event)\"\n >\n </nz-pagination>\n </div>\n </header>\n @if (drive.currentViewMode() === \"TRASH\" && drive.items().length > 0) {\n <div class=\"trash-info-banner\">\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-icon nzType=\"info-circle\" style=\"color: #ef4444; font-size: 16px\"></nz-icon>\n @if (drive.allowDeleteFromTrash()) {\n <span>\n C\u00E1c m\u1EE5c trong th\u00F9ng r\u00E1c v\u1EABn t\u00EDnh v\u00E0o dung l\u01B0\u1EE3ng h\u1EA1n ng\u1EA1ch (Quota) cho \u0111\u1EBFn khi b\u1ECB x\u00F3a v\u0129nh vi\u1EC5n.\n </span>\n } @else {\n <span>\n Ch\u1EBF \u0111\u1ED9 b\u1EA3o v\u1EC7 d\u1EEF li\u1EC7u \u0111ang b\u1EADt: H\u1EC7 th\u1ED1ng \u0111\u00E3 kh\u00F3a ch\u1EE9c n\u0103ng x\u00F3a v\u0129nh vi\u1EC5n t\u1EEB th\u00F9ng r\u00E1c (k\u1EC3 c\u1EA3 Qu\u1EA3n tr\u1ECB\n vi\u00EAn). B\u1EA1n ch\u1EC9 c\u00F3 th\u1EC3 kh\u00F4i ph\u1EE5c l\u1EA1i d\u1EEF li\u1EC7u.\n </span>\n }\n </div>\n @if (drive.allowDeleteFromTrash()) {\n <button\n type=\"button\"\n nz-button\n nzDanger\n nzType=\"link\"\n nzSize=\"small\"\n style=\"font-weight: 600; padding: 0\"\n [nzLoading]=\"emptyingTrash()\"\n (click)=\"onEmptyTrash()\"\n >\n <nz-icon nzType=\"clear\"></nz-icon> D\u1ECDn s\u1EA1ch th\u00F9ng r\u00E1c ngay\n </button>\n }\n </div>\n }\n <!-- THANH THAO T\u00C1C H\u00C0NG LO\u1EA0T KHI T\u00CDCH CH\u1ECCN NHI\u1EC0U FILE / FOLDER (BULK ACTION BAR) -->\n @if (checkedCount() > 0) {\n <div class=\"bulk-action-bar\">\n <div class=\"bulk-action-summary\">\n <label\n nz-checkbox\n [ngModel]=\"isAllCurrentPageChecked()\"\n [nzIndeterminate]=\"isCurrentPageIndeterminate()\"\n (ngModelChange)=\"onToggleCheckAllCurrentPage($event)\"\n ></label>\n <nz-tag nzColor=\"processing\" style=\"margin: 0; font-weight: 600\"> \u0110\u00E3 ch\u1ECDn {{ checkedCount() }} m\u1EE5c </nz-tag>\n <span class=\"bulk-action-meta\">\n (\n @if (checkedFolderCount() > 0) {\n <span>{{ checkedFolderCount() }} th\u01B0 m\u1EE5c</span>\n }\n @if (checkedFolderCount() > 0 && checkedFileCount() > 0) {\n <span>, </span>\n }\n @if (checkedFileCount() > 0) {\n <span>{{ checkedFileCount() }} t\u1EADp tin \u2022 {{ checkedTotalBytes() | formatBytes }}</span>\n }\n )\n </span>\n @if (!isAllCurrentPageChecked() && displayedTableItems().length > 0) {\n <a style=\"font-size: 12px; font-weight: 500\" (click)=\"onToggleCheckAllCurrentPage(true)\">\n Ch\u1ECDn t\u1EA5t c\u1EA3 trang ({{ displayedTableItems().length }})\n </a>\n }\n <a style=\"font-size: 12px; color: #ef4444\" (click)=\"clearCheckedSelection()\"> B\u1ECF ch\u1ECDn </a>\n </div>\n\n <div class=\"bulk-action-buttons\">\n @if (drive.currentViewMode() !== \"TRASH\") {\n @if (canBulkEditChecked()) {\n <button\n type=\"button\"\n nz-button\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Di chuy\u1EC3n to\u00E0n b\u1ED9 c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn sang th\u01B0 m\u1EE5c ho\u1EB7c kh\u00F4ng gian kh\u00E1c\"\n (click)=\"openBulkMoveDrawer()\"\n >\n <nz-icon nzType=\"drag\"></nz-icon> Di chuy\u1EC3n ({{ checkedCount() }})\n </button>\n }\n <button\n type=\"button\"\n nz-button\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Sao ch\u00E9p \u0111\u1EC7 quy c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn t\u1EDBi th\u01B0 m\u1EE5c kh\u00E1c\"\n (click)=\"openBulkCopyDrawer()\"\n >\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p ({{ checkedCount() }})\n </button>\n @if (canBulkManageChecked()) {\n <button\n type=\"button\"\n nz-button\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"G\u00E1n ho\u1EB7c thu h\u1ED3i quy\u1EC1n h\u00E0ng lo\u1EA1t cho c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn\"\n (click)=\"openBulkPermissionMatrixDrawer()\"\n >\n <nz-icon nzType=\"usergroup-add\"></nz-icon> Ph\u00E2n quy\u1EC1n ({{ checkedCount() }})\n </button>\n }\n @if (canBulkDownloadChecked()) {\n <button\n type=\"button\"\n nz-button\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"T\u1EA3i xu\u1ED1ng c\u00E1c t\u1EADp tin \u0111\u00E3 ch\u1ECDn\"\n (click)=\"onBulkDownloadChecked()\"\n >\n <nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng\n </button>\n }\n <button\n type=\"button\"\n nz-button\n nzSize=\"small\"\n [nzLoading]=\"bulkActionLoading()\"\n nz-tooltip\n [nzTooltipTitle]=\"\n allCheckedAreStarred() ? 'B\u1ECF d\u1EA5u sao c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn' : 'G\u1EAFn d\u1EA5u sao cho c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn'\n \"\n (click)=\"onBulkToggleStar()\"\n >\n <nz-icon nzType=\"star\" [nzTheme]=\"allCheckedAreStarred() ? 'fill' : 'outline'\"></nz-icon>\n {{ allCheckedAreStarred() ? \"B\u1ECF sao\" : \"G\u1EAFn sao\" }}\n </button>\n @if (canBulkEditChecked()) {\n <button\n type=\"button\"\n nz-button\n nzDanger\n nzType=\"primary\"\n nzSize=\"small\"\n [nzLoading]=\"bulkActionLoading()\"\n nz-tooltip\n nzTooltipTitle=\"Chuy\u1EC3n to\u00E0n b\u1ED9 c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn v\u00E0o th\u00F9ng r\u00E1c\"\n (click)=\"onBulkSoftDelete()\"\n >\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a v\u00E0o th\u00F9ng r\u00E1c ({{ checkedCount() }})\n </button>\n }\n } @else {\n @if (canBulkEditChecked()) {\n <button\n type=\"button\"\n nz-button\n nzType=\"primary\"\n nzSize=\"small\"\n [nzLoading]=\"bulkActionLoading()\"\n (click)=\"onBulkRestoreFromTrash()\"\n >\n <nz-icon nzType=\"rollback\"></nz-icon> Kh\u00F4i ph\u1EE5c ({{ checkedCount() }})\n </button>\n }\n @if (canBulkManageChecked() && drive.allowDeleteFromTrash()) {\n <button\n type=\"button\"\n nz-button\n nzDanger\n nzType=\"primary\"\n nzSize=\"small\"\n [nzLoading]=\"bulkActionLoading()\"\n (click)=\"onBulkPermanentDelete()\"\n >\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a v\u0129nh vi\u1EC5n ({{ checkedCount() }})\n </button>\n }\n }\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"B\u1ECF ch\u1ECDn t\u1EA5t c\u1EA3\"\n (click)=\"clearCheckedSelection()\"\n >\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </div>\n }\n <!-- DANH S\u00C1CH T\u1EACP TIN / TH\u01AF M\u1EE4C (H\u1ED6 TR\u1EE2 C\u1EA2 FLAT TABLE V\u00C0 TREE TABLE) -->\n <nz-table\n #explorerTable\n [nzData]=\"displayedTableItems()\"\n [nzLoading]=\"drive.loading()\"\n [nzBordered]=\"true\"\n [nzFrontPagination]=\"false\"\n [nzShowPagination]=\"false\"\n nzSize=\"small\"\n >\n <thead>\n <tr>\n <th nzWidth=\"40px\" class=\"text-center checkbox-col-th\" (click)=\"$event.stopPropagation()\">\n <label\n nz-checkbox\n [ngModel]=\"isAllCurrentPageChecked()\"\n [nzIndeterminate]=\"isCurrentPageIndeterminate()\"\n [nzDisabled]=\"displayedTableItems().length === 0\"\n (ngModelChange)=\"onToggleCheckAllCurrentPage($event)\"\n nz-tooltip\n nzTooltipTitle=\"Ch\u1ECDn / B\u1ECF ch\u1ECDn t\u1EA5t c\u1EA3 c\u00E1c d\u00F2ng tr\u00EAn trang n\u00E0y\"\n ></label>\n </th>\n <th nzWidth=\"45px\" class=\"text-center\">#</th>\n <th class=\"sortable-th\" (click)=\"onSortColumn('Name')\">\n <div class=\"th-sort-wrap\">\n <span>T\u00EAn t\u00E0i li\u1EC7u / Th\u01B0 m\u1EE5c</span>\n <span class=\"sort-icon\" [class.active]=\"drive.sortBy() === 'Name'\">\n <nz-icon\n [nzType]=\"\n drive.sortBy() === 'Name' ? (drive.sortDesc() ? 'sort-descending' : 'sort-ascending') : 'swap'\n \"\n ></nz-icon>\n </span>\n </div>\n </th>\n <!-- <th nzWidth=\"150px\" class=\"sortable-th\" (click)=\"onSortColumn('OwnerName')\">\n <div class=\"th-sort-wrap\">\n <span>Ch\u1EE7 s\u1EDF h\u1EEFu</span>\n @if (drive.sortBy() === \"OwnerName\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th> -->\n <th nzWidth=\"100px\" class=\"text-center sortable-th\" (click)=\"onSortColumn('AccessLevel')\">\n <div class=\"th-sort-wrap justify-center\">\n <span>Quy\u1EC1n truy c\u1EADp</span>\n @if (drive.sortBy() === \"AccessLevel\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"90px\" class=\"text-right sortable-th\" (click)=\"onSortColumn('SizeBytes')\">\n <div class=\"th-sort-wrap justify-end\">\n <span>K\u00EDch th\u01B0\u1EDBc</span>\n @if (drive.sortBy() === \"SizeBytes\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"100px\" class=\"text-center sortable-th\" (click)=\"onSortColumn('CreatedUser')\">\n <div class=\"th-sort-wrap justify-center\">\n <span>Ng\u01B0\u1EDDi t\u1EA1o</span>\n @if (drive.sortBy() === \"CreatedUser\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"145px\" class=\"text-center sortable-th\" (click)=\"onSortColumn('UpdatedDate')\">\n <div class=\"th-sort-wrap justify-center\">\n <span>C\u1EADp nh\u1EADt cu\u1ED1i</span>\n @if (drive.sortBy() === \"UpdatedDate\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <!-- <th nzWidth=\"210px\" class=\"text-center\">Thao t\u00E1c</th> -->\n </tr>\n </thead>\n <tbody>\n @for (item of explorerTable.data; track item.Id; let i = $index) {\n <tr\n [attr.data-node-id]=\"item.Id\"\n [attr.draggable]=\"drive.currentViewMode() !== 'TRASH' && item.EffectiveAccess >= DriveAccessLevel.Editor\"\n (dragstart)=\"onRowDragStart($event, item)\"\n (dragend)=\"onRowDragEnd()\"\n (dragover)=\"onRowDragOver($event, item)\"\n (dragleave)=\"onRowDragLeave($event, item)\"\n (drop)=\"onRowDrop($event, item)\"\n (click)=\"onRowSelect(item, $event, i)\"\n (dblclick)=\"onRowDoubleClick(item, $event)\"\n (contextmenu)=\"onContextMenu($event, menu, item)\"\n class=\"drive-row\"\n [class.row-checked]=\"isItemChecked(item.Id)\"\n [class.active]=\"isRowActive(item)\"\n [class.row-active]=\"isRowActive(item)\"\n [class.ant-table-row-selected]=\"isRowActive(item)\"\n [class.dragging-row]=\"draggedNode()?.Id === item.Id\"\n [class.drop-target-active]=\"dragOverFolderId() === item.Id\"\n >\n <td class=\"text-center checkbox-col-td\" (click)=\"onCheckboxCellClick($event, item, i)\">\n <label\n nz-checkbox\n [ngModel]=\"isItemChecked(item.Id)\"\n (ngModelChange)=\"onToggleItemCheck(item, $event, i)\"\n (click)=\"$event.stopPropagation()\"\n ></label>\n </td>\n <td class=\"text-center\">{{ i + 1 + (drive.pageIndex() - 1) * drive.pageSize() }}</td>\n <td\n [nzIndentSize]=\"drive.isTreeTableView() ? (item.treeLevel || 0) * 22 : 0\"\n [nzShowExpand]=\"drive.isTreeTableView() && isFolderLike(item) && !item.IsBrokenShortcut\"\n [nzExpand]=\"!!item.treeExpanded\"\n (nzExpandChange)=\"toggleExpandTreeFolder(item, $event)\"\n >\n <div class=\"node-name-cell\">\n <span class=\"node-icon-wrap\">\n <nz-icon\n [nzType]=\"isFolderLike(item) ? 'folder-fill' : getFileIcon(item)\"\n [style.color]=\"isFolderLike(item) ? '#f59e0b' : 'var(--primary-color)'\"\n class=\"node-icon\"\n ></nz-icon>\n @if (item.NodeType === DriveNodeType.Shortcut) {\n <span class=\"shortcut-badge\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'L\u1ED1i t\u1EAFt tr\u1ECF t\u1EDBi: ' + (item.ShortcutTargetName || item.Name)\"\n -->\n <nz-icon nzType=\"select\"></nz-icon>\n </span>\n }\n </span>\n <span\n class=\"node-title link-detail\"\n (click)=\"\n drive.isTreeTableView()\n ? toggleExpandTreeFolder(item, !item.treeExpanded)\n : onRowSingleClick(item, $event)\n \"\n >{{ item.Name }}</span\n >\n @if (drive.keyword().trim() && item.ParentFolderName && item.ParentId !== drive.currentFolderId()) {\n <nz-tag\n nzColor=\"default\"\n style=\"margin-left: 6px; cursor: pointer\"\n (click)=\"$event.stopPropagation(); navigateToFolder(item.ParentId || null)\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'\u0110ang n\u1EB1m trong th\u01B0 m\u1EE5c: ' + item.ParentFolderName + ' (Nh\u1EA5n \u0111\u1EC3 m\u1EDF th\u01B0 m\u1EE5c)'\"\n -->\n <nz-icon nzType=\"folder\"></nz-icon> {{ item.ParentFolderName }}\n </nz-tag>\n }\n @if (item.NodeType === DriveNodeType.Shortcut) {\n @if (item.IsBrokenShortcut) {\n <nz-tag nzColor=\"error\" style=\"margin-left: 6px\">M\u1EE5c g\u1ED1c \u0111\u00E3 x\u00F3a</nz-tag>\n } @else {\n <nz-tag nzColor=\"purple\" style=\"margin-left: 6px\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'\u0110\u00EDch: ' + (item.ShortcutTargetName || item.Name)\"\n -->\n <nz-icon nzType=\"link\"></nz-icon> L\u1ED1i t\u1EAFt\n </nz-tag>\n }\n }\n @if (item.IsStarred) {\n <nz-icon nzType=\"star\" nzTheme=\"fill\" style=\"color: #eab308; margin-left: 4px\"></nz-icon>\n }\n @if (item.IsShared) {\n <nz-tag nzColor=\"processing\" style=\"margin-left: 6px\" title=\"\u0110\u00E3 chia s\u1EBB\">\n <nz-icon nzType=\"share-alt\" nzTheme=\"outline\" />\n </nz-tag>\n }\n @if (!item.InheritPermissions) {\n <nz-tag nzColor=\"warning\" title=\"\u0110\u00E3 ng\u1EAFt k\u1EBF th\u1EEBa quy\u1EC1n t\u1EEB th\u01B0 m\u1EE5c cha\">\n <!-- \u0110\u1ED9c l\u1EADp -->\n <nz-icon nzType=\"line\" nzTheme=\"outline\" />\n <nz-icon nzType=\"link\" nzTheme=\"outline\" />\n </nz-tag>\n }\n </div>\n </td>\n <!-- <td>{{ item.OwnerName || item.OwnerId }}</td> -->\n <td class=\"text-center\">\n <nz-tag\n [nzColor]=\"\n item.EffectiveAccess >= DriveAccessLevel.Editor\n ? 'green'\n : item.EffectiveAccess >= DriveAccessLevel.Uploader\n ? 'cyan'\n : 'default'\n \"\n >\n <!-- {{\n item.EffectiveAccess >= DriveAccessLevel.Manager\n ? \"Qu\u1EA3n tr\u1ECB\"\n : item.EffectiveAccess >= DriveAccessLevel.Editor\n ? \"Ch\u1EC9nh s\u1EEDa\"\n : item.EffectiveAccess >= DriveAccessLevel.Uploader\n ? \"Xem & T\u1EA3i l\u00EAn\"\n : item.CanDownload && item.EffectiveAccess >= DriveAccessLevel.Downloader\n ? \"Xem & T\u1EA3i\"\n : \"Ch\u1EC9 xem\"\n }} -->\n @if (item.EffectiveAccess >= DriveAccessLevel.Manager) {\n <nz-icon nzType=\"crown\" nzTheme=\"outline\" title=\"Qu\u1EA3n tr\u1ECB\" />\n } @else if (item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <nz-icon nzType=\"edit\" nzTheme=\"outline\" title=\"Ch\u1EC9nh s\u1EEDa\" />\n } @else if (item.EffectiveAccess >= DriveAccessLevel.Uploader) {\n <nz-icon nzType=\"eye\" nzTheme=\"outline\" title=\"Xem\" /> \n <nz-icon nzType=\"upload\" nzTheme=\"outline\" title=\"T\u1EA3i l\u00EAn\" />\n } @else if (item.EffectiveAccess >= DriveAccessLevel.Downloader) {\n <nz-icon nzType=\"eye\" nzTheme=\"outline\" title=\"Xem\" /> \n <nz-icon nzType=\"download\" nzTheme=\"outline\" title=\"T\u1EA3i xu\u1ED1ng\" />\n } @else {\n <nz-icon nzType=\"eye\" nzTheme=\"outline\" title=\"Xem\" />\n }\n </nz-tag>\n </td>\n <td class=\"text-right\">\n {{ isFolderLike(item) ? \"\u2014\" : (item.SizeBytes | formatBytes) }}\n </td>\n <td>\n {{ item.CreatedUser || item.OwnerName || item.OwnerId }}\n </td>\n <td class=\"text-center\">\n <span\n nz-tooltip\n [nzTooltipTitle]=\"tooltipTemplate\"\n nzTooltipOverlayClassName=\"nowrap-tooltip\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n {{ item.UpdatedDate | date: \"dd/MM/yyyy HH:mm\" }}\n </span>\n\n <ng-template #tooltipTemplate> Ng\u01B0\u1EDDi c\u1EADp nh\u1EADt: {{ item.UpdatedUser }} </ng-template>\n </td>\n <!-- <td class=\"text-center\">\n <div class=\"action-btn-group\">\n @if (drive.currentViewMode() !== \"TRASH\") {\n @if (item.CanShare || item.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openShareDrawer(item)\"\n nz-tooltip\n nzTooltipTitle=\"Chia s\u1EBB & Ph\u00E2n quy\u1EC1n\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n @if (item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openMoveDrawer(item)\"\n nz-tooltip\n nzTooltipTitle=\"Chuy\u1EC3n th\u01B0 m\u1EE5c\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"drag\"></nz-icon>\n </button>\n }\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openCopyDrawer(item)\"\n nz-tooltip\n nzTooltipTitle=\"Sao ch\u00E9p\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"copy\"></nz-icon>\n </button>\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openShortcutDrawer(item)\"\n nz-tooltip\n nzTooltipTitle=\"T\u1EA1o l\u1ED1i t\u1EAFt\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"link\"></nz-icon>\n </button>\n @if (\n item.NodeType === DriveNodeType.Folder &&\n drive.usePhysicalFolders() &&\n item.EffectiveAccess >= DriveAccessLevel.Manager\n ) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openRelocateDrawer(item)\"\n nz-tooltip\n nzTooltipTitle=\"\u0110\u1ED5i \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD / \u00C1nh x\u1EA1 \u1ED5 c\u1EE9ng l\u01B0u tr\u1EEF\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"hdd\"></nz-icon>\n </button>\n }\n @if (\n isFileLike(item) &&\n !item.IsBrokenShortcut &&\n item.CanDownload &&\n item.EffectiveAccess >= DriveAccessLevel.Downloader\n ) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); onDownloadItem(item)\"\n nz-tooltip\n nzTooltipTitle=\"T\u1EA3i xu\u1ED1ng\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"download\"></nz-icon>\n </button>\n }\n @if (\n isFileLike(item) && !item.IsBrokenShortcut && item.EffectiveAccess >= DriveAccessLevel.Editor\n ) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openVersionDrawer(item)\"\n nz-tooltip\n nzTooltipTitle=\"L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"history\"></nz-icon>\n </button>\n }\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openFolderDrawer('rename', item)\"\n nz-tooltip\n [nzTooltipTitle]=\"\n item.EffectiveAccess >= DriveAccessLevel.Editor\n ? '\u0110\u1ED5i t\u00EAn & Chi ti\u1EBFt'\n : 'Xem chi ti\u1EBFt & Nh\u1EADt k\u00FD'\n \"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon\n [nzType]=\"item.EffectiveAccess >= DriveAccessLevel.Editor ? 'edit' : 'info-circle'\"\n ></nz-icon>\n </button>\n @if (item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-warn\"\n (click)=\"$event.stopPropagation(); onSoftDelete(item)\"\n nz-tooltip\n nzTooltipTitle=\"Chuy\u1EC3n v\u00E0o th\u00F9ng r\u00E1c\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n } @else {\n @if (item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); onRestore(item)\"\n nz-tooltip\n nzTooltipTitle=\"Kh\u00F4i ph\u1EE5c\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"rollback\"></nz-icon>\n </button>\n }\n @if (item.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-warn\"\n (click)=\"$event.stopPropagation(); onPermanentDelete(item)\"\n nz-tooltip\n nzTooltipTitle=\"X\u00F3a v\u0129nh vi\u1EC5n\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n }\n </div>\n </td> -->\n </tr>\n }\n </tbody>\n </nz-table>\n <!-- CONTEXT MENU CHU\u1ED8T PH\u1EA2I (H\u1ED6 TR\u1EE2 C\u1EA2 THAO T\u00C1C \u0110\u01A0N L\u1EBA & THAO T\u00C1C H\u00C0NG LO\u1EA0T KHI T\u00CDCH CH\u1ECCN NHI\u1EC0U M\u1EE4C) -->\n <nz-dropdown-menu #menu=\"nzDropdownMenu\">\n @if (selectedContextItem(); as ctx) {\n <ul nz-menu>\n @if (checkedCount() > 1 && isItemChecked(ctx.Id)) {\n <li nz-menu-group [nzTitle]=\"'\u26A1 Thao t\u00E1c h\u00E0ng lo\u1EA1t (' + checkedCount() + ' m\u1EE5c \u0111\u00E3 ch\u1ECDn)'\">\n <ul>\n @if (drive.currentViewMode() === \"TRASH\") {\n @if (canBulkEditChecked()) {\n <li nz-menu-item (click)=\"onBulkRestoreFromTrash()\">\n <nz-icon nzType=\"rollback\"></nz-icon> Kh\u00F4i ph\u1EE5c {{ checkedCount() }} m\u1EE5c \u0111\u00E3 ch\u1ECDn\n </li>\n }\n @if (canBulkManageChecked() && drive.allowDeleteFromTrash()) {\n <li nz-menu-item nzDanger (click)=\"onBulkPermanentDelete()\">\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a v\u0129nh vi\u1EC5n {{ checkedCount() }} m\u1EE5c \u0111\u00E3 ch\u1ECDn\n </li>\n }\n } @else {\n @if (canBulkEditChecked()) {\n <li nz-menu-item (click)=\"openBulkMoveDrawer()\">\n <nz-icon nzType=\"drag\"></nz-icon> Di chuy\u1EC3n {{ checkedCount() }} m\u1EE5c \u0111\u00E3 ch\u1ECDn...\n </li>\n }\n <li nz-menu-item (click)=\"openBulkCopyDrawer()\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p {{ checkedCount() }} m\u1EE5c \u0111\u00E3 ch\u1ECDn...\n </li>\n @if (canBulkManageChecked()) {\n <li nz-menu-item (click)=\"openBulkPermissionMatrixDrawer()\">\n <nz-icon nzType=\"usergroup-add\"></nz-icon> Ph\u00E2n quy\u1EC1n h\u00E0ng lo\u1EA1t ({{ checkedCount() }} m\u1EE5c)...\n </li>\n }\n @if (canBulkDownloadChecked()) {\n <li nz-menu-item (click)=\"onBulkDownloadChecked()\">\n <nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng c\u00E1c t\u1EADp tin \u0111\u00E3 ch\u1ECDn\n </li>\n }\n <li nz-menu-item (click)=\"onBulkToggleStar()\">\n <nz-icon nzType=\"star\"></nz-icon>\n {{\n allCheckedAreStarred()\n ? \"B\u1ECF d\u1EA5u sao (\" + checkedCount() + \" m\u1EE5c)\"\n : \"G\u1EAFn d\u1EA5u sao (\" + checkedCount() + \" m\u1EE5c)\"\n }}\n </li>\n @if (canBulkEditChecked()) {\n <li nz-menu-item nzDanger (click)=\"onBulkSoftDelete()\">\n <nz-icon nzType=\"delete\"></nz-icon> Chuy\u1EC3n {{ checkedCount() }} m\u1EE5c v\u00E0o th\u00F9ng r\u00E1c\n </li>\n }\n }\n <li nz-menu-item (click)=\"clearCheckedSelection()\">\n <nz-icon nzType=\"close-circle\"></nz-icon> B\u1ECF ch\u1ECDn t\u1EA5t c\u1EA3 ({{ checkedCount() }} m\u1EE5c)\n </li>\n </ul>\n </li>\n <li nz-menu-divider></li>\n }\n @if (drive.currentViewMode() === \"TRASH\") {\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-item (click)=\"onRestore(ctx)\"><nz-icon nzType=\"rollback\"></nz-icon> Kh\u00F4i ph\u1EE5c m\u1EE5c n\u00E0y</li>\n }\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Manager && drive.allowDeleteFromTrash()) {\n <li nz-menu-item nzDanger (click)=\"onPermanentDelete(ctx)\">\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a v\u0129nh vi\u1EC5n m\u1EE5c n\u00E0y\n </li>\n }\n @if (drive.allowDeleteFromTrash()) {\n <li nz-menu-divider></li>\n <li nz-menu-item nzDanger (click)=\"onEmptyTrash()\">\n <nz-icon nzType=\"clear\"></nz-icon> D\u1ECDn s\u1EA1ch to\u00E0n b\u1ED9 th\u00F9ng r\u00E1c...\n </li>\n }\n } @else {\n @if (ctx.NodeType === DriveNodeType.File) {\n <li nz-menu-item (click)=\"previewFile(ctx)\">\n <nz-icon nzType=\"eye\"></nz-icon> Xem tr\u1EF1c ti\u1EBFp (Drawer Preview)\n </li>\n @if (ctx.CanDownload && ctx.EffectiveAccess >= DriveAccessLevel.Downloader) {\n <li nz-menu-item (click)=\"onDownloadItem(ctx)\"><nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng</li>\n }\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-item (click)=\"openVersionDrawer(ctx)\">\n <nz-icon nzType=\"history\"></nz-icon> L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n...\n </li>\n }\n <li nz-menu-divider></li>\n }\n @if (ctx.CanShare || ctx.EffectiveAccess >= DriveAccessLevel.Manager) {\n <li nz-menu-item (click)=\"openShareDrawer(ctx)\">\n <nz-icon nzType=\"usergroup-add\"></nz-icon> Ph\u00E2n quy\u1EC1n & Chia s\u1EBB...\n </li>\n }\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-item (click)=\"openMoveDrawer(ctx)\">\n <nz-icon nzType=\"drag\"></nz-icon> Di chuy\u1EC3n sang th\u01B0 m\u1EE5c kh\u00E1c...\n </li>\n }\n <li nz-menu-item (click)=\"openCopyDrawer(ctx)\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p t\u1EDBi (Copy to)...\n </li>\n <li nz-menu-item (click)=\"openShortcutDrawer(ctx)\">\n <nz-icon nzType=\"link\"></nz-icon> T\u1EA1o l\u1ED1i t\u1EAFt (Shortcut)...\n </li>\n @if (\n ctx.NodeType === DriveNodeType.Folder &&\n drive.usePhysicalFolders() &&\n ctx.EffectiveAccess >= DriveAccessLevel.Manager\n ) {\n <li nz-menu-item (click)=\"openRelocateDrawer(ctx)\">\n <nz-icon nzType=\"hdd\"></nz-icon> \u0110\u1ED5i \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD / Chuy\u1EC3n \u1ED5 \u0111\u0129a...\n </li>\n }\n <li nz-menu-item (click)=\"openFolderDrawer('rename', ctx)\">\n <nz-icon [nzType]=\"ctx.EffectiveAccess >= DriveAccessLevel.Editor ? 'edit' : 'info-circle'\"></nz-icon>\n {{\n ctx.EffectiveAccess >= DriveAccessLevel.Editor ? \"\u0110\u1ED5i t\u00EAn & Chi ti\u1EBFt...\" : \"Xem chi ti\u1EBFt & Nh\u1EADt k\u00FD...\"\n }}\n </li>\n <li nz-menu-item (click)=\"drive.toggleStar(ctx.Id)\">\n <nz-icon nzType=\"star\"></nz-icon> {{ ctx.IsStarred ? \"B\u1ECF d\u1EA5u sao\" : \"Th\u00EAm d\u1EA5u sao\" }}\n </li>\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-divider></li>\n <li nz-menu-item nzDanger (click)=\"onSoftDelete(ctx)\">\n <nz-icon nzType=\"delete\"></nz-icon> Chuy\u1EC3n v\u00E0o th\u00F9ng r\u00E1c\n </li>\n }\n @if (ctx.NodeType === DriveNodeType.Folder) {\n <li nz-menu-item (click)=\"openTemplateDrawer('create', undefined, ctx)\">\n <nz-icon nzType=\"apartment\"></nz-icon> L\u01B0u c\u1EA5u tr\u00FAc th\u01B0 m\u1EE5c l\u00E0m M\u1EABu...\n </li>\n }\n }\n </ul>\n }\n </nz-dropdown-menu>\n </main>\n </div>\n <!-- ========================================================================= -->\n <!-- DRAWER 1: CHIA S\u1EBA & PH\u00C2N QUY\u1EC0N (ACL / RBAC / SHARE LINKS) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"shareDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"920\"\n [nzClosable]=\"false\"\n [nzTitle]=\"shareDrawerTitleTpl\"\n [nzFooter]=\"shareDrawerFooterTpl\"\n (nzOnClose)=\"shareDrawerVisible = false\"\n >\n <ng-template #shareDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n @if (activeActionNode(); as node) {\n <nz-icon\n [nzType]=\"node.NodeType === DriveNodeType.Folder ? 'folder-fill' : getFileIcon(node)\"\n [style.color]=\"node.NodeType === DriveNodeType.Folder ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 18px\"\n ></nz-icon>\n <strong>Chia s\u1EBB & Ph\u00E2n quy\u1EC1n: {{ node.Name }}</strong>\n <nz-tag nzColor=\"blue\">{{ node.NodeType === DriveNodeType.Folder ? \"Th\u01B0 m\u1EE5c\" : \"T\u1EADp tin\" }}</nz-tag>\n }\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"shareDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (activeActionNode(); as node) {\n <lib-drive-share-modal\n [nodeId]=\"node.Id\"\n [hideInheritanceToggle]=\"shareDrawerHideInheritance\"\n ></lib-drive-share-modal>\n }\n </ng-container>\n <ng-template #shareDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"shareDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 2: L\u1ECACH S\u1EEC PHI\u00CAN B\u1EA2N T\u1EACP TIN (FILE VERSIONS) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"versionDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"760\"\n [nzClosable]=\"false\"\n [nzTitle]=\"versionDrawerTitleTpl\"\n [nzFooter]=\"versionDrawerFooterTpl\"\n (nzOnClose)=\"versionDrawerVisible = false\"\n >\n <ng-template #versionDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"history\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n: {{ activeActionNode()?.Name }}</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"versionDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (activeActionNode(); as node) {\n <lib-drive-version-modal\n [nodeId]=\"node.Id\"\n [nodeName]=\"node.Name\"\n [canEdit]=\"node.EffectiveAccess >= DriveAccessLevel.Editor\"\n [canDownload]=\"node.CanDownload && node.EffectiveAccess >= DriveAccessLevel.Downloader\"\n (closed)=\"versionDrawerVisible = false\"\n ></lib-drive-version-modal>\n }\n </ng-container>\n <ng-template #versionDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"versionDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 3: T\u1EA0O TH\u01AF M\u1EE4C M\u1EDAI / \u0110\u1ED4I T\u00CAN & CHI TI\u1EBET THU\u1ED8C T\u00CDNH + ACTIVITY LOG -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"folderDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"480\"\n [nzClosable]=\"false\"\n [nzTitle]=\"folderDrawerTitleTpl\"\n [nzFooter]=\"folderDrawerFooterTpl\"\n (nzOnClose)=\"folderDrawerVisible = false\"\n >\n <ng-template #folderDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon\n [nzType]=\"folderDrawerMode === 'create' ? 'folder-add' : canRenameTargetNode() ? 'edit' : 'info-circle'\"\n style=\"font-size: 18px; color: var(--primary-color)\"\n ></nz-icon>\n <strong>\n {{\n folderDrawerMode === \"create\"\n ? \"T\u1EA1o th\u01B0 m\u1EE5c m\u1EDBi\"\n : canRenameTargetNode()\n ? \"\u0110\u1ED5i t\u00EAn & Chi ti\u1EBFt m\u1EE5c\"\n : \"Chi ti\u1EBFt & Nh\u1EADt k\u00FD ho\u1EA1t \u0111\u1ED9ng\"\n }}\n </strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"folderDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n @if (folderDrawerMode === \"create\" && folderDrawerParentOverride; as parentOverride) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">T\u1EA1o b\u00EAn trong th\u01B0 m\u1EE5c cha:</span>\n <nz-tag nzColor=\"gold\"> <nz-icon nzType=\"folder-open\"></nz-icon> {{ parentOverride.Name }} </nz-tag>\n </div>\n </div>\n }\n <div>\n <label class=\"drawer-field-label\">\n {{ folderDrawerMode === \"create\" ? \"T\u00EAn th\u01B0 m\u1EE5c m\u1EDBi\" : \"T\u00EAn hi\u1EC3n th\u1ECB\" }}\n </label>\n <input\n nz-input\n [(ngModel)]=\"folderDrawerInputName\"\n [disabled]=\"folderDrawerMode === 'rename' && !canRenameTargetNode()\"\n [appAutoFocus]=\"folderDrawerVisible && (folderDrawerMode === 'create' || canRenameTargetNode())\"\n placeholder=\"Nh\u1EADp t\u00EAn th\u01B0 m\u1EE5c / t\u00E0i li\u1EC7u...\"\n (keyup.enter)=\"submitFolderDrawer()\"\n />\n </div>\n @if (folderDrawerMode === \"create\" && drive.usePhysicalFolders() && drive.currentPhysicalPath(); as phys) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Ch\u1EBF \u0111\u1ED9 l\u01B0u tr\u1EEF:</span>\n <nz-tag nzColor=\"green\">Th\u01B0 m\u1EE5c v\u1EADt l\u00FD (Disk)</nz-tag>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Th\u01B0 m\u1EE5c cha tr\u00EAn \u0111\u0129a:</span>\n <code class=\"break-word\">{{ phys }}</code>\n </div>\n </div>\n }\n @if (folderDrawerMode === \"rename\" && folderDrawerTargetNode; as target) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"target.NodeType === DriveNodeType.Folder ? 'folder-fill' : getFileIcon(target)\"\n [style.color]=\"target.NodeType === DriveNodeType.Folder ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ target.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n {{\n target.NodeType === DriveNodeType.Folder\n ? \"Th\u01B0 m\u1EE5c\"\n : \"T\u1EADp tin (\" + (target.Extension || target.MimeType || \"File\") + \")\"\n }}\n </div>\n </div>\n </div>\n <nz-divider style=\"margin: 10px 0\"></nz-divider>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Ch\u1EE7 s\u1EDF h\u1EEFu:</span>\n <strong>{{ target.OwnerName || target.OwnerId }}</strong>\n </div>\n @if (target.NodeType === DriveNodeType.File) {\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">K\u00EDch th\u01B0\u1EDBc:</span>\n <span>{{ target.SizeBytes | formatBytes }}</span>\n </div>\n }\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Quy\u1EC1n c\u1EE7a b\u1EA1n:</span>\n <nz-tag\n [nzColor]=\"\n target.EffectiveAccess >= DriveAccessLevel.Editor\n ? 'green'\n : target.EffectiveAccess >= DriveAccessLevel.Uploader\n ? 'cyan'\n : 'default'\n \"\n >\n {{\n target.EffectiveAccess >= DriveAccessLevel.Manager\n ? \"Qu\u1EA3n tr\u1ECB (Manager)\"\n : target.EffectiveAccess >= DriveAccessLevel.Editor\n ? \"Ch\u1EC9nh s\u1EEDa (Editor)\"\n : target.EffectiveAccess >= DriveAccessLevel.Uploader\n ? \"Xem & T\u1EA3i l\u00EAn (Uploader)\"\n : target.CanDownload && target.EffectiveAccess >= DriveAccessLevel.Downloader\n ? \"Xem & T\u1EA3i xu\u1ED1ng\"\n : \"Ch\u1EC9 xem (Viewer)\"\n }}\n </nz-tag>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">K\u1EBF th\u1EEBa quy\u1EC1n:</span>\n <nz-tag [nzColor]=\"target.InheritPermissions ? 'blue' : 'warning'\">\n {{ target.InheritPermissions ? \"\u0110ang k\u1EBF th\u1EEBa\" : \"\u0110\u1ED9c l\u1EADp\" }}\n </nz-tag>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">C\u1EADp nh\u1EADt cu\u1ED1i:</span>\n <span>{{ target.UpdatedDate | date: \"dd/MM/yyyy HH:mm\" }}</span>\n </div>\n @if (target.PhysicalRelativePath) {\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">\u0110\u01B0\u1EDDng d\u1EABn \u0111\u0129a:</span>\n <code class=\"break-word\">{{ target.PhysicalRelativePath }}</code>\n </div>\n }\n @if (drive.isCurrentUserAdmin() && drive.usePhysicalFolders() && drive.currentPhysicalPath(); as physPath) {\n <div class=\"physical-path-bar\">\n <span style=\"word-break: break-all\">\n \u0110\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD: <code style=\"padding-top: 0px\">{{ physPath }}</code>\n </span>\n <icon-copy [textToCopy]=\"physPath\" tooltip=\"Sao ch\u00E9p \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD tr\u00EAn Server\"></icon-copy>\n </div>\n }\n </div>\n <div>\n <label class=\"drawer-field-label\">Thao t\u00E1c nhanh</label>\n <div nz-flex nzWrap=\"wrap\" [nzGap]=\"8\">\n @if (target.CanShare || target.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openShareDrawer(target)\">\n <nz-icon nzType=\"share-alt\"></nz-icon> Chia s\u1EBB & Ph\u00E2n quy\u1EC1n\n </button>\n }\n @if (target.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openMoveDrawer(target)\">\n <nz-icon nzType=\"drag\"></nz-icon> Di chuy\u1EC3n\n </button>\n }\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openCopyDrawer(target)\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p t\u1EDBi\n </button>\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openShortcutDrawer(target)\">\n <nz-icon nzType=\"link\"></nz-icon> T\u1EA1o l\u1ED1i t\u1EAFt\n </button>\n @if (\n target.NodeType === DriveNodeType.Folder &&\n drive.usePhysicalFolders() &&\n target.EffectiveAccess >= DriveAccessLevel.Manager\n ) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openRelocateDrawer(target)\">\n <nz-icon nzType=\"hdd\"></nz-icon> \u0110\u1ED5i \u1ED5 \u0111\u0129a v\u1EADt l\u00FD\n </button>\n }\n @if (target.NodeType === DriveNodeType.File) {\n @if (target.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openVersionDrawer(target)\">\n <nz-icon nzType=\"history\"></nz-icon> L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n\n </button>\n }\n @if (target.CanDownload && target.EffectiveAccess >= DriveAccessLevel.Downloader) {\n <button nz-button nzSize=\"small\" (click)=\"onDownloadItem(target)\">\n <nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng\n </button>\n }\n }\n <button nz-button nzSize=\"small\" (click)=\"drive.toggleStar(target.Id)\">\n <nz-icon nzType=\"star\" [nzTheme]=\"target.IsStarred ? 'fill' : 'outline'\"></nz-icon>\n {{ target.IsStarred ? \"B\u1ECF sao\" : \"G\u1EAFn sao\" }}\n </button>\n </div>\n </div>\n <!-- NH\u1EACT K\u00DD HO\u1EA0T \u0110\u1ED8NG (ACTIVITY LOG) -->\n <div>\n <label class=\"drawer-field-label\">\n <nz-icon nzType=\"OrderedList\"></nz-icon> Nh\u1EADt k\u00FD ho\u1EA1t \u0111\u1ED9ng g\u1EA7n \u0111\u00E2y ({{ nodeActivities().length }})\n </label>\n <div class=\"drawer-meta-card\" style=\"max-height: 240px; overflow-y: auto\">\n @if (nodeActivities().length === 0) {\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">Ch\u01B0a c\u00F3 nh\u1EADt k\u00FD ho\u1EA1t \u0111\u1ED9ng.</div>\n } @else {\n @for (act of nodeActivities(); track act.Id) {\n <div style=\"padding: 6px 0; border-bottom: 1px dashed var(--app-border, #e2e8f0); font-size: 12px\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <nz-tag nzColor=\"blue\">{{ formatActivityAction(act.ActionType) }}</nz-tag>\n <span style=\"color: var(--app-text-muted, #64748b)\">{{\n act.CreatedDate | date: \"dd/MM/yyyy HH:mm:ss\"\n }}</span>\n </div>\n <div style=\"margin-top: 4px\">\n Th\u1EF1c hi\u1EC7n b\u1EDFi: <strong>{{ act.ActorUserName || act.ActorUserId || \"H\u1EC7 th\u1ED1ng\" }}</strong>\n </div>\n @if (act.DetailJson) {\n <div style=\"margin-top: 2px; color: var(--app-text-muted, #64748b); word-break: break-all\">\n <code>{{ formatActivityDetail(act) }}</code>\n </div>\n }\n </div>\n }\n }\n </div>\n </div>\n }\n @if (folderDrawerMode === \"create\") {\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <label class=\"drawer-field-label\" style=\"margin-bottom: 0\">\n <nz-icon nzType=\"apartment\" style=\"color: #d97706; margin-right: 4px\"></nz-icon>\n T\u1EA1o nhanh t\u1EEB M\u1EABu c\u00E2y th\u01B0 m\u1EE5c (T\u00F9y ch\u1ECDn)\n </label>\n <a style=\"font-size: 12px\" (click)=\"folderDrawerVisible = false; openTemplateDrawer('create')\">\n + \u0110\u1ECBnh ngh\u0129a m\u1EABu m\u1EDBi\n </a>\n </div>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Kh\u00F4ng d\u00F9ng m\u1EABu (Ch\u1EC9 t\u1EA1o 1 th\u01B0 m\u1EE5c \u0111\u01A1n) --\"\n [(ngModel)]=\"folderDrawerSelectedTemplateId\"\n (ngModelChange)=\"onFolderDrawerTemplateSelect($event)\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Ch\u1EC9 t\u1EA1o 1 th\u01B0 m\u1EE5c \u0111\u01A1n\"></nz-option>\n @for (tpl of drive.folderTemplates(); track tpl.Id) {\n <nz-option\n [nzValue]=\"tpl.Id\"\n [nzLabel]=\"'\uD83D\uDDC2 ' + tpl.Name + ' [' + tpl.Code + '] (' + tpl.TotalFolderCount + ' th\u01B0 m\u1EE5c)'\"\n ></nz-option>\n }\n </nz-select>\n\n @if (folderDrawerSelectedTemplateId) {\n <label nz-checkbox [(ngModel)]=\"folderDrawerUseWrapperFolder\" style=\"font-size: 12px; margin-top: 4px\">\n \u0110\u1EB7t to\u00E0n b\u1ED9 c\u00E2y th\u01B0 m\u1EE5c m\u1EABu b\u00EAn trong th\u01B0 m\u1EE5c g\u1ED1c\n <strong>\"{{ folderDrawerInputName || \"...\" }}\"</strong>\n </label>\n <div class=\"quota-sub\" style=\"margin-top: 2px\">\n N\u1EBFu b\u1ECF t\u00EDch, c\u00E1c nh\u00E1nh th\u01B0 m\u1EE5c con c\u1EE7a m\u1EABu s\u1EBD \u0111\u01B0\u1EE3c t\u1EA1o tr\u1EF1c ti\u1EBFp ngay trong th\u01B0 m\u1EE5c \u0111ang m\u1EDF.\n </div>\n }\n </div>\n }\n </div>\n </ng-container>\n <ng-template #folderDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"folderDrawerVisible = false\">\u0110\u00F3ng</button>\n @if (folderDrawerMode === \"create\" || canRenameTargetNode()) {\n <button nz-button nzType=\"primary\" (click)=\"submitFolderDrawer()\">\n <nz-icon nzType=\"check\"></nz-icon>\n {{ folderDrawerMode === \"create\" ? \"T\u1EA1o th\u01B0 m\u1EE5c\" : \"L\u01B0u t\u00EAn m\u1EDBi\" }}\n </button>\n }\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 4: XEM TR\u1EF0C TUY\u1EBEN T\u00C0I LI\u1EC6U (PREVIEW DRAWER) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"previewDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"'75vw'\"\n [nzClosable]=\"false\"\n [nzBodyStyle]=\"{ padding: '0', height: '100%', display: 'flex', flexDirection: 'column', overflow: 'hidden' }\"\n [nzTitle]=\"previewDrawerTitleTpl\"\n [nzFooter]=\"previewDrawerFooterTpl\"\n (nzOnClose)=\"previewDrawerVisible = false\"\n >\n <ng-template #previewDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"eye\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>{{ previewFileName }}</strong>\n </div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n @if (activeActionNode(); as node) {\n @if (node.CanDownload && node.EffectiveAccess >= DriveAccessLevel.Downloader) {\n <button nz-button nzSize=\"small\" nzType=\"primary\" (click)=\"onDownloadItem(node)\">\n <nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng\n </button>\n }\n @if (node.CanShare || node.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button nz-button nzSize=\"small\" (click)=\"previewDrawerVisible = false; openShareDrawer(node)\">\n <nz-icon nzType=\"share-alt\"></nz-icon> Chia s\u1EBB\n </button>\n }\n @if (node.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button nz-button nzSize=\"small\" (click)=\"previewDrawerVisible = false; openVersionDrawer(node)\">\n <nz-icon nzType=\"history\"></nz-icon> Phi\u00EAn b\u1EA3n\n </button>\n }\n }\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"previewDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div class=\"drive-preview-body-fill\">\n <extend-view-file-content\n [previewType]=\"previewType\"\n [previewContent]=\"previewContent\"\n ></extend-view-file-content>\n </div>\n </ng-container>\n <ng-template #previewDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button type=\"button\" nz-button (click)=\"previewDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 5: T\u1EA0O L\u1ED0I T\u1EAET (CREATE SHORTCUT DRAWER CHO FILE & FOLDER) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"shortcutDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"460\"\n [nzClosable]=\"false\"\n [nzTitle]=\"shortcutDrawerTitleTpl\"\n [nzFooter]=\"shortcutDrawerFooterTpl\"\n (nzOnClose)=\"shortcutDrawerVisible = false\"\n >\n <ng-template #shortcutDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"link\" style=\"font-size: 18px; color: #7c3aed\"></nz-icon>\n <strong>T\u1EA1o l\u1ED1i t\u1EAFt (Shortcut)</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"shortcutDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (shortcutSourceNode(); as src) {\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"isFolderLike(src) ? 'folder-fill' : getFileIcon(src)\"\n [style.color]=\"isFolderLike(src) ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ src.ShortcutTargetName || src.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n M\u1EE5c g\u1ED1c: {{ isFolderLike(src) ? \"Th\u01B0 m\u1EE5c\" : \"T\u1EADp tin\" }} \u2022 Ch\u1EE7 s\u1EDF h\u1EEFu:\n {{ src.OwnerName || src.OwnerId }}\n </div>\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">T\u00EAn l\u1ED1i t\u1EAFt</label>\n <input\n nz-input\n [(ngModel)]=\"shortcutInputName\"\n [appAutoFocus]=\"shortcutDrawerVisible\"\n placeholder=\"Nh\u1EADp t\u00EAn hi\u1EC3n th\u1ECB c\u1EE7a l\u1ED1i t\u1EAFt...\"\n (keyup.enter)=\"submitShortcutDrawer()\"\n />\n </div>\n <div>\n <label class=\"drawer-field-label\">Kh\u00F4ng gian l\u01B0u l\u1ED1i t\u1EAFt</label>\n <nz-select\n [(ngModel)]=\"shortcutSpaceKey\"\n (ngModelChange)=\"onShortcutSpaceKeyChange($event)\"\n style=\"width: 100%\"\n >\n <nz-option nzValue=\"MY_DRIVE\" nzLabel=\"Drive c\u00E1 nh\u00E2n (My Drive)\"></nz-option>\n <nz-option nzValue=\"ORG_DRIVE\" nzLabel=\"Kho T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (Org Drive)\"></nz-option>\n @for (sp of drive.customSpaces(); track sp.Id) {\n <nz-option [nzValue]=\"'CUSTOM:' + sp.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + sp.Name\"></nz-option>\n }\n </nz-select>\n </div>\n <div>\n <label class=\"drawer-field-label\">Th\u01B0 m\u1EE5c \u0111\u00EDch ch\u1EE9a l\u1ED1i t\u1EAFt</label>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Th\u01B0 m\u1EE5c g\u1ED1c (Root) --\"\n [(ngModel)]=\"shortcutDestFolderId\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Th\u01B0 m\u1EE5c g\u1ED1c (Root)\"></nz-option>\n @for (f of availableFolders(); track f.Id) {\n <nz-option [nzValue]=\"f.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + f.Name\"></nz-option>\n }\n </nz-select>\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n L\u1ED1i t\u1EAFt tr\u1ECF tr\u1EF1c ti\u1EBFp t\u1EDBi m\u1EE5c g\u1ED1c m\u00E0 kh\u00F4ng t\u1ED1n th\u00EAm dung l\u01B0\u1EE3ng l\u01B0u tr\u1EEF (0 B).\n </div>\n </div>\n </div>\n }\n </ng-container>\n <ng-template #shortcutDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"shortcutDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitShortcutDrawer()\">\n <nz-icon nzType=\"link\"></nz-icon> T\u1EA1o l\u1ED1i t\u1EAFt\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 6: DI CHUY\u1EC2N FILE / FOLDER SANG TH\u01AF M\u1EE4C HO\u1EB6C KH\u00D4NG GIAN KH\u00C1C -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"moveDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"460\"\n [nzClosable]=\"false\"\n [nzTitle]=\"moveDrawerTitleTpl\"\n [nzFooter]=\"moveDrawerFooterTpl\"\n (nzOnClose)=\"moveDrawerVisible = false\"\n >\n <ng-template #moveDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"drag\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>Di chuy\u1EC3n sang th\u01B0 m\u1EE5c / kh\u00F4ng gian kh\u00E1c</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"moveDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (moveSourceNode(); as src) {\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"isFolderLike(src) ? 'folder-fill' : getFileIcon(src)\"\n [style.color]=\"isFolderLike(src) ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n @if (moveSourceNodes().length > 1) {\n <div style=\"font-weight: 600\">\u0110ang ch\u1ECDn di chuy\u1EC3n {{ moveSourceNodes().length }} m\u1EE5c c\u00F9ng l\u00FAc</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n Bao g\u1ED3m: {{ moveSourceNodes()[0].Name }} v\u00E0 {{ moveSourceNodes().length - 1 }} m\u1EE5c kh\u00E1c\n </div>\n } @else {\n <div style=\"font-weight: 600\">{{ src.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n Lo\u1EA1i:\n {{\n src.NodeType === DriveNodeType.Folder\n ? \"Th\u01B0 m\u1EE5c\"\n : src.NodeType === DriveNodeType.Shortcut\n ? \"L\u1ED1i t\u1EAFt\"\n : \"T\u1EADp tin\"\n }}\n \u2022 Kh\u00F4ng gian hi\u1EC7n t\u1EA1i: {{ src.IsOrgNode ? \"T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\" : \"Drive c\u00E1 nh\u00E2n\" }}\n </div>\n }\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">Kh\u00F4ng gian \u0111\u00EDch</label>\n <nz-select\n [(ngModel)]=\"moveTargetSpaceKey\"\n (ngModelChange)=\"onMoveSpaceKeyChange($event)\"\n style=\"width: 100%\"\n >\n <nz-option nzValue=\"MY_DRIVE\" nzLabel=\"Drive c\u00E1 nh\u00E2n (My Drive)\"></nz-option>\n <nz-option nzValue=\"ORG_DRIVE\" nzLabel=\"Kho T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (Org Drive)\"></nz-option>\n @for (sp of drive.customSpaces(); track sp.Id) {\n <nz-option [nzValue]=\"'CUSTOM:' + sp.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + sp.Name\"></nz-option>\n }\n </nz-select>\n </div>\n <div>\n <label class=\"drawer-field-label\">Ch\u1ECDn th\u01B0 m\u1EE5c \u0111\u00EDch</label>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Th\u01B0 m\u1EE5c g\u1ED1c (Root) --\"\n [(ngModel)]=\"moveTargetFolderId\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Th\u01B0 m\u1EE5c g\u1ED1c (Root)\"></nz-option>\n @for (f of moveTargetFolders(); track f.Id) {\n <nz-option [nzValue]=\"f.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + f.Name\"></nz-option>\n }\n </nz-select>\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n M\u1EB9o: B\u1EA1n c\u00F3 th\u1EC3 k\u00E9o th\u1EA3 tr\u1EF1c ti\u1EBFp d\u00F2ng t\u00E0i li\u1EC7u/th\u01B0 m\u1EE5c v\u00E0o m\u1EE5c <strong>\"Drive c\u00E1 nh\u00E2n\"</strong> ho\u1EB7c\n <strong>\"T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"</strong> \u1EDF thanh menu b\u00EAn tr\u00E1i \u0111\u1EC3 chuy\u1EC3n nhanh qua l\u1EA1i gi\u1EEFa 2 kh\u00F4ng gian.\n </div>\n </div>\n </div>\n }\n </ng-container>\n <ng-template #moveDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"moveDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitMoveDrawer()\">\n <nz-icon nzType=\"check\"></nz-icon> Di chuy\u1EC3n t\u1EDBi \u0111\u00E2y\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 9: SAO CH\u00C9P T\u1EDAI (COPY TO DRAWER CHO FILE / FOLDER / SHORTCUT) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"copyDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"460\"\n [nzClosable]=\"false\"\n [nzTitle]=\"copyDrawerTitleTpl\"\n [nzFooter]=\"copyDrawerFooterTpl\"\n (nzOnClose)=\"copyDrawerVisible = false\"\n >\n <ng-template #copyDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"copy\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>Sao ch\u00E9p t\u1EDBi (Copy To)</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"copyDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (copySourceNode(); as src) {\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"isFolderLike(src) ? 'folder-fill' : getFileIcon(src)\"\n [style.color]=\"isFolderLike(src) ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n @if (copySourceNodes().length > 1) {\n <div style=\"font-weight: 600\">\u0110ang ch\u1ECDn sao ch\u00E9p {{ copySourceNodes().length }} m\u1EE5c c\u00F9ng l\u00FAc</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n Bao g\u1ED3m: {{ copySourceNodes()[0].Name }} v\u00E0 {{ copySourceNodes().length - 1 }} m\u1EE5c kh\u00E1c\n </div>\n } @else {\n <div style=\"font-weight: 600\">{{ src.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n M\u1EE5c ngu\u1ED3n:\n {{\n src.NodeType === DriveNodeType.Folder\n ? \"Th\u01B0 m\u1EE5c (Sao ch\u00E9p \u0111\u1EC7 quy to\u00E0n b\u1ED9 nh\u00E1nh con)\"\n : src.NodeType === DriveNodeType.Shortcut\n ? \"L\u1ED1i t\u1EAFt\"\n : \"T\u1EADp tin\"\n }}\n </div>\n }\n </div>\n </div>\n </div>\n @if (copySourceNodes().length <= 1) {\n <div>\n <label class=\"drawer-field-label\">T\u00EAn b\u1EA3n sao (\u0110\u1EC3 tr\u1ED1ng \u0111\u1EC3 h\u1EC7 th\u1ED1ng t\u1EF1 \u0111\u1EB7t t\u00EAn)</label>\n <input\n nz-input\n [(ngModel)]=\"copyCustomName\"\n [appAutoFocus]=\"copyDrawerVisible\"\n placeholder=\"Nh\u1EADp t\u00EAn m\u1EDBi cho b\u1EA3n sao...\"\n (keyup.enter)=\"submitCopyDrawer()\"\n />\n </div>\n }\n <div>\n <label class=\"drawer-field-label\">Kh\u00F4ng gian \u0111\u00EDch</label>\n <nz-select\n [(ngModel)]=\"copyTargetSpaceKey\"\n (ngModelChange)=\"onCopySpaceKeyChange($event)\"\n style=\"width: 100%\"\n >\n <nz-option nzValue=\"MY_DRIVE\" nzLabel=\"Drive c\u00E1 nh\u00E2n (My Drive)\"></nz-option>\n <nz-option nzValue=\"ORG_DRIVE\" nzLabel=\"Kho T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (Org Drive)\"></nz-option>\n @for (sp of drive.customSpaces(); track sp.Id) {\n <nz-option [nzValue]=\"'CUSTOM:' + sp.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + sp.Name\"></nz-option>\n }\n </nz-select>\n </div>\n <div>\n <label class=\"drawer-field-label\">Ch\u1ECDn th\u01B0 m\u1EE5c \u0111\u00EDch ch\u1EE9a b\u1EA3n sao</label>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Th\u01B0 m\u1EE5c g\u1ED1c (Root) --\"\n [(ngModel)]=\"copyTargetFolderId\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Th\u01B0 m\u1EE5c g\u1ED1c (Root)\"></nz-option>\n @for (f of copyTargetFolders(); track f.Id) {\n <nz-option [nzValue]=\"f.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + f.Name\"></nz-option>\n }\n </nz-select>\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n B\u1EA3n sao ho\u00E0n to\u00E0n \u0111\u1ED9c l\u1EADp v\u1EDBi m\u1EE5c g\u1ED1c v\u00E0 \u0111\u01B0\u1EE3c t\u00EDnh v\u00E0o h\u1EA1n ng\u1EA1ch c\u1EE7a ng\u01B0\u1EDDi t\u1EA1o b\u1EA3n sao.\n </div>\n </div>\n </div>\n }\n </ng-container>\n <ng-template #copyDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"copyDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitCopyDrawer()\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p t\u1EDBi \u0111\u00E2y\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 7: \u0110\u1ED4I \u0110\u01AF\u1EDCNG D\u1EAAN V\u1EACT L\u00DD / \u00C1NH X\u1EA0 \u1ED4 C\u1EE8NG M\u1EDAI KHI K\u1EBET TH\u00DAC D\u1EF0 \u00C1N -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"relocateDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"500\"\n [nzClosable]=\"false\"\n [nzTitle]=\"relocateDrawerTitleTpl\"\n [nzFooter]=\"relocateDrawerFooterTpl\"\n (nzOnClose)=\"relocateDrawerVisible = false\"\n >\n <ng-template #relocateDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"hdd\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>\n {{ relocateTargetFolder() ? \"\u00C1nh x\u1EA1 / Chuy\u1EC3n \u1ED5 \u0111\u0129a th\u01B0 m\u1EE5c\" : \"C\u1EA5u h\u00ECnh RootPath l\u01B0u tr\u1EEF chung\" }}\n </strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"relocateDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n @if (relocateTargetFolder(); as folder) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon nzType=\"folder-fill\" style=\"font-size: 22px; color: #f59e0b\"></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ folder.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n \u0110\u01B0\u1EDDng d\u1EABn hi\u1EC7n t\u1EA1i:\n <code>{{ folder.PhysicalRelativePath || drive.currentPhysicalPath() || \"M\u1EB7c \u0111\u1ECBnh\" }}</code>\n </div>\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">\u0110\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD m\u1EDBi c\u1EE7a th\u01B0 m\u1EE5c (H\u1ED7 tr\u1EE3 \u1ED5 c\u1EE9ng kh\u00E1c / NAS)</label>\n <input\n nz-input\n [(ngModel)]=\"relocateNewPath\"\n [appAutoFocus]=\"relocateDrawerVisible\"\n placeholder=\"VD: E:Archive_2026DuAn_A ho\u1EB7c \\\\NAS01StorageDuAn_A\"\n (keyup.enter)=\"submitRelocateDrawer()\"\n />\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n Khi d\u1EF1 \u00E1n k\u1EBFt th\u00FAc v\u00E0 h\u1EA1 t\u1EA7ng chuy\u1EC3n th\u01B0 m\u1EE5c sang \u1ED5 c\u1EE9ng kh\u00E1c, \u0111\u1EB7t \u0111\u01B0\u1EDDng d\u1EABn m\u1EDBi t\u1EA1i \u0111\u00E2y \u0111\u1EC3 to\u00E0n b\u1ED9 th\u01B0\n m\u1EE5c con v\u00E0 file b\u00EAn trong t\u1EF1 \u0111\u1ED9ng map sang \u1ED5 c\u1EE9ng m\u1EDBi.\n </div>\n </div>\n <div class=\"drawer-meta-card\">\n <label nz-checkbox [(ngModel)]=\"relocateMoveFilesOnDisk\">\n <strong>T\u1EF1 \u0111\u1ED9ng di chuy\u1EC3n d\u1EEF li\u1EC7u v\u1EADt l\u00FD t\u1EEB \u0111\u01B0\u1EDDng d\u1EABn c\u0169 sang \u1ED5 \u0111\u0129a m\u1EDBi</strong>\n </label>\n <div class=\"quota-sub\" style=\"margin-left: 24px\">\n N\u1EBFu b\u1ED9 ph\u1EADn H\u1EA1 t\u1EA7ng \u0111\u00E3 copy/move s\u1EB5n th\u01B0 m\u1EE5c sang \u1ED5 c\u1EE9ng m\u1EDBi r\u1ED3i, h\u00E3y <strong>b\u1ECF ch\u1ECDn</strong> m\u1EE5c n\u00E0y \u0111\u1EC3\n h\u1EC7 th\u1ED1ng ch\u1EC9 c\u1EADp nh\u1EADt l\u1EA1i \u00E1nh x\u1EA1 \u0111\u01B0\u1EDDng d\u1EABn trong Database.\n </div>\n <label nz-checkbox [(ngModel)]=\"relocateSyncNewFiles\" style=\"margin-top: 6px\">\n <strong>\u0110\u1ED3ng b\u1ED9 b\u1ED5 sung c\u00E1c file/folder c\u00F3 s\u1EB5n t\u1EA1i \u0111\u01B0\u1EDDng d\u1EABn m\u1EDBi v\u00E0o Drive</strong>\n </label>\n </div>\n } @else {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">RootPath hi\u1EC7n t\u1EA1i:</span>\n <code class=\"break-word\">{{ drive.storageRootPath() || drive.currentPhysicalPath() }}</code>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Ch\u1EBF \u0111\u1ED9 th\u01B0 m\u1EE5c g\u1ED1c:</span>\n <nz-tag [nzColor]=\"drive.useSharedPhysicalRoot() ? 'green' : 'blue'\">\n {{\n drive.useSharedPhysicalRoot() ? \"D\u00F9ng chung 1 RootPath cho t\u1EA5t c\u1EA3 User\" : \"T\u00E1ch theo t\u1EEBng Username\"\n }}\n </nz-tag>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">\u0110\u01B0\u1EDDng d\u1EABn RootPath chung m\u1EDBi tr\u00EAn Server</label>\n <input\n nz-input\n [(ngModel)]=\"relocateNewPath\"\n [appAutoFocus]=\"relocateDrawerVisible\"\n placeholder=\"VD: D:ProjectStorageDriveRoot ho\u1EB7c E:ArchiveDrive\"\n (keyup.enter)=\"submitRelocateDrawer()\"\n />\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n T\u1EA5t c\u1EA3 c\u00E1c th\u01B0 m\u1EE5c ch\u01B0a ghim \u1ED5 \u0111\u0129a ri\u00EAng s\u1EBD t\u1EF1 \u0111\u1ED9ng \u0111\u1ECDc/ghi theo RootPath m\u1EDBi n\u00E0y.\n </div>\n </div>\n }\n </div>\n </ng-container>\n <ng-template #relocateDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"relocateDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitRelocateDrawer()\">\n <nz-icon nzType=\"save\"></nz-icon> L\u01B0u \u00E1nh x\u1EA1 v\u1EADt l\u00FD\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 8: QU\u1EA2N L\u00DD H\u1EA0N NG\u1EA0CH DUNG L\u01AF\u1EE2NG (DEFAULT QUOTA & PER-USER QUOTA) -->\n <!-- CH\u1EC8 D\u00C0NH RI\u00CANG CHO QU\u1EA2N TR\u1ECA VI\u00CAN (ADMIN) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"quotaAdminDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"980\"\n [nzClosable]=\"false\"\n [nzTitle]=\"quotaAdminDrawerTitleTpl\"\n [nzFooter]=\"quotaAdminDrawerFooterTpl\"\n (nzOnClose)=\"quotaAdminDrawerVisible = false\"\n >\n <ng-template #quotaAdminDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"pie-chart\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>Qu\u1EA3n l\u00FD H\u1EA1n ng\u1EA1ch Dung l\u01B0\u1EE3ng (Quota Management)</strong>\n <nz-tag nzColor=\"gold\">Ch\u1EC9 Admin</nz-tag>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"quotaAdminDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n <!-- PH\u1EA6N 1: C\u1EA4U H\u00CCNH QUOTA M\u1EB6C \u0110\u1ECANH TO\u00C0N H\u1EC6 TH\u1ED0NG -->\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <div>\n <div style=\"font-size: 14px; font-weight: 600\">\n <nz-icon nzType=\"cloud-server\" style=\"color: var(--primary-color); margin-right: 6px\"></nz-icon>\n 1. C\u1EA5u h\u00ECnh Quota m\u1EB7c \u0111\u1ECBnh (Default Quota)\n </div>\n <div class=\"quota-sub\">\n \u00C1p d\u1EE5ng t\u1EF1 \u0111\u1ED9ng cho ng\u01B0\u1EDDi d\u00F9ng m\u1EDBi ho\u1EB7c ng\u01B0\u1EDDi d\u00F9ng ch\u01B0a \u0111\u01B0\u1EE3c g\u00E1n h\u1EA1n ng\u1EA1ch ri\u00EAng.\n </div>\n </div>\n @if (quotaOverview(); as ov) {\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-tag nzColor=\"blue\">\n M\u1EB7c \u0111\u1ECBnh hi\u1EC7n t\u1EA1i: <strong>{{ ov.DefaultUserQuotaBytes | formatBytes }}</strong>\n </nz-tag>\n <nz-tag nzColor=\"purple\">\n T\u1ED5ng \u0111\u00E3 d\u00F9ng to\u00E0n h\u1EC7 th\u1ED1ng: <strong>{{ ov.TotalSystemUsedBytes | formatBytes }}</strong>\n </nz-tag>\n </div>\n }\n </div>\n <nz-divider style=\"margin: 8px 0\"></nz-divider>\n <div nz-flex nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <span style=\"font-size: 13px; font-weight: 500\">M\u1EE9c Quota m\u1EB7c \u0111\u1ECBnh:</span>\n <input\n nz-input\n type=\"number\"\n min=\"1\"\n [(ngModel)]=\"defaultQuotaInputValue\"\n style=\"width: 120px\"\n placeholder=\"Nh\u1EADp dung l\u01B0\u1EE3ng\"\n />\n <nz-select [(ngModel)]=\"defaultQuotaInputUnit\" style=\"width: 90px\">\n <nz-option nzValue=\"MB\" nzLabel=\"MB\"></nz-option>\n <nz-option nzValue=\"GB\" nzLabel=\"GB\"></nz-option>\n <nz-option nzValue=\"TB\" nzLabel=\"TB\"></nz-option>\n </nz-select>\n <!-- C\u00E1c n\u00FAt ch\u1ECDn nhanh (Quick Presets) -->\n <div nz-flex nzAlign=\"center\" [nzGap]=\"4\">\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(1, 'GB')\">1 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(5, 'GB')\">5 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(10, 'GB')\">10 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(20, 'GB')\">20 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(50, 'GB')\">50 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(100, 'GB')\">100 GB</button>\n </div>\n <button nz-button nzType=\"primary\" (click)=\"onSaveDefaultQuota()\">\n <nz-icon nzType=\"save\"></nz-icon> L\u01B0u Quota m\u1EB7c \u0111\u1ECBnh\n </button>\n </div>\n <div style=\"margin-top: 4px\">\n <label nz-checkbox [(ngModel)]=\"applyDefaultToExistingUsers\">\n \u0110\u1ED3ng th\u1EDDi c\u1EADp nh\u1EADt m\u1EE9c Quota m\u1EB7c \u0111\u1ECBnh m\u1EDBi n\u00E0y cho t\u1EA5t c\u1EA3 c\u00E1c ng\u01B0\u1EDDi d\u00F9ng hi\u1EC7n c\u00F3\n </label>\n </div>\n </div>\n <!-- PH\u1EA6N 2: \u0110\u1EB6T QUOTA RI\u00CANG CHO T\u1EEANG NG\u01AF\u1EDCI D\u00D9NG -->\n <div>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\" style=\"margin-bottom: 10px\">\n <div>\n <div style=\"font-size: 14px; font-weight: 600\">\n <nz-icon nzType=\"team\" style=\"color: var(--primary-color); margin-right: 6px\"></nz-icon>\n 2. Thi\u1EBFt l\u1EADp Quota cho t\u1EEBng ng\u01B0\u1EDDi d\u00F9ng ({{ quotaUsers().length }})\n </div>\n <div class=\"quota-sub\">\n T\u00F9y ch\u1EC9nh h\u1EA1n ng\u1EA1ch dung l\u01B0\u1EE3ng ri\u00EAng cho t\u1EEBng c\u00E1 nh\u00E2n ho\u1EB7c \u0111\u1EB7t l\u1EA1i v\u1EC1 m\u1EE9c m\u1EB7c \u0111\u1ECBnh.\n </div>\n </div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-input-group [nzSuffix]=\"quotaUserSearchSuffix\" style=\"width: 260px\">\n <input\n nz-input\n type=\"text\"\n placeholder=\"T\u00ECm theo t\u00E0i kho\u1EA3n, h\u1ECD t\u00EAn, email...\"\n [(ngModel)]=\"quotaUserSearchKeyword\"\n (keyup.enter)=\"reloadQuotaOverview()\"\n />\n </nz-input-group>\n <ng-template #quotaUserSearchSuffix>\n <nz-icon nzType=\"search\" class=\"cursor-pointer\" (click)=\"reloadQuotaOverview()\"></nz-icon>\n </ng-template>\n <button nz-button nzType=\"default\" (click)=\"reloadQuotaOverview()\" nz-tooltip nzTooltipTitle=\"T\u1EA3i l\u1EA1i\">\n <nz-icon nzType=\"reload\"></nz-icon>\n </button>\n </div>\n </div>\n <nz-table\n #userQuotaTable\n [nzData]=\"quotaUsers()\"\n [nzLoading]=\"quotaLoading()\"\n nzSize=\"small\"\n [nzBordered]=\"true\"\n [nzPageSize]=\"10\"\n [nzShowPagination]=\"true\"\n >\n <thead>\n <tr>\n <th nzWidth=\"45px\" class=\"text-center\">#</th>\n <th>Ng\u01B0\u1EDDi d\u00F9ng</th>\n <th nzWidth=\"220px\">\u0110\u00E3 d\u00F9ng / H\u1EA1n ng\u1EA1ch</th>\n <th nzWidth=\"105px\" class=\"text-center\">Lo\u1EA1i Quota</th>\n <th nzWidth=\"210px\">\u0110\u1EB7t h\u1EA1n ng\u1EA1ch m\u1EDBi</th>\n <th nzWidth=\"145px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (u of userQuotaTable.data; track u.UserId; let idx = $index) {\n <tr>\n <td class=\"text-center\">{{ idx + 1 }}</td>\n <td>\n <div style=\"font-weight: 600\">{{ u.FullName || u.UserName }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n <code>{{ u.UserName }}</code>\n @if (u.OrgName) {\n <span> \u2022 {{ u.OrgName }}</span>\n }\n @if (u.Email) {\n <span> \u2022 {{ u.Email }}</span>\n }\n </div>\n </td>\n <td>\n <div nz-flex nzJustify=\"space-between\" style=\"font-size: 12px; margin-bottom: 2px\">\n <span\n >{{ u.UsedBytes | formatBytes }} / <strong>{{ u.QuotaLimitBytes | formatBytes }}</strong></span\n >\n <span>{{ getUserQuotaPercent(u) }}%</span>\n </div>\n <nz-progress\n [nzPercent]=\"getUserQuotaPercent(u)\"\n nzSize=\"small\"\n [nzShowInfo]=\"false\"\n [nzStatus]=\"getUserQuotaPercent(u) >= 95 ? 'exception' : 'normal'\"\n ></nz-progress>\n </td>\n <td class=\"text-center\">\n @if (u.IsCustomQuota) {\n <nz-tag nzColor=\"orange\">T\u00F9y ch\u1EC9nh</nz-tag>\n } @else {\n <nz-tag nzColor=\"default\">M\u1EB7c \u0111\u1ECBnh</nz-tag>\n }\n </td>\n <td>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"6\">\n <input nz-input type=\"number\" min=\"1\" [(ngModel)]=\"u.editQuotaValue\" style=\"width: 90px\" />\n <nz-select [(ngModel)]=\"u.editQuotaUnit\" style=\"width: 80px\">\n <nz-option nzValue=\"MB\" nzLabel=\"MB\"></nz-option>\n <nz-option nzValue=\"GB\" nzLabel=\"GB\"></nz-option>\n <nz-option nzValue=\"TB\" nzLabel=\"TB\"></nz-option>\n </nz-select>\n </div>\n </td>\n <td class=\"text-center\">\n <div nz-flex nzJustify=\"center\" [nzGap]=\"6\">\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"onSaveUserQuota(u)\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"L\u01B0u h\u1EA1n ng\u1EA1ch ri\u00EAng cho ng\u01B0\u1EDDi d\u00F9ng n\u00E0y\"\n -->\n <nz-icon nzType=\"check\"></nz-icon> L\u01B0u\n </button>\n <button\n nz-button\n nzType=\"default\"\n nzSize=\"small\"\n [disabled]=\"!u.IsCustomQuota\"\n nz-tooltip\n nzTooltipTitle=\"\u0110\u1EB7t l\u1EA1i v\u1EC1 m\u1EE9c Quota m\u1EB7c \u0111\u1ECBnh c\u1EE7a h\u1EC7 th\u1ED1ng\"\n (click)=\"onResetUserQuota(u)\"\n >\n <nz-icon nzType=\"undo\"></nz-icon>\n </button>\n </div>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n </div>\n </div>\n </ng-container>\n <ng-template #quotaAdminDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"quotaAdminDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 10: C\u1EA4U H\u00CCNH & PH\u00C2N QUY\u1EC0N C\u1EE4 TH\u1EC2 CHO \"T\u00C0I LI\u1EC6U \u0110\u01A0N V\u1ECA\" -->\n <!-- V\u00C0 \"T\u00C0I LI\u1EC6U D\u1EF0 \u00C1N\" (CUSTOM SPACES) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"customSpaceDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"customSpaceDrawerMode === 'create' ? 520 : 900\"\n [nzClosable]=\"false\"\n [nzTitle]=\"customSpaceDrawerTitleTpl\"\n [nzFooter]=\"customSpaceDrawerFooterTpl\"\n (nzOnClose)=\"customSpaceDrawerVisible = false\"\n >\n <ng-template #customSpaceDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n (click)=\"toggleDrawerPlacement()\"\n >\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon\n [nzType]=\"customSpaceDrawerMode === 'org_root' ? 'apartment' : customSpaceIcon || 'project'\"\n style=\"font-size: 18px; color: var(--primary-color)\"\n ></nz-icon>\n <strong>\n {{\n customSpaceDrawerMode === \"org_root\"\n ? \"C\u1EA5u h\u00ECnh & Ph\u00E2n quy\u1EC1n c\u1EE5 th\u1EC3: T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"\n : customSpaceDrawerMode === \"create\"\n ? \"Th\u00EAm m\u1EE5c t\u00F9y ch\u1EC9nh d\u01B0\u1EDBi T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"\n : \"C\u1EA5u h\u00ECnh & Ph\u00E2n quy\u1EC1n c\u1EE5 th\u1EC3: \" + (editingCustomSpace?.Name || customSpaceName)\n }}\n </strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"customSpaceDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n @if (customSpaceDrawerMode !== \"org_root\") {\n <div nz-flex [nzGap]=\"12\" nzWrap=\"wrap\">\n <div style=\"flex: 1.5; min-width: 240px\">\n <label class=\"drawer-field-label\">T\u00EAn m\u1EE5c hi\u1EC3n th\u1ECB tr\u00EAn thanh menu tr\u00E1i</label>\n <input\n nz-input\n [(ngModel)]=\"customSpaceName\"\n [appAutoFocus]=\"customSpaceDrawerVisible && customSpaceDrawerMode === 'create'\"\n placeholder=\"V\u00ED d\u1EE5: T\u00E0i li\u1EC7u d\u1EF1 \u00E1n, H\u1ED3 s\u01A1 th\u1EA7u, Quy tr\u00ECnh ISO...\"\n (keyup.enter)=\"submitCustomSpaceDrawer()\"\n />\n </div>\n <div style=\"flex: 1; min-width: 200px\">\n <label class=\"drawer-field-label\">Bi\u1EC3u t\u01B0\u1EE3ng (Icon)</label>\n <nz-select [(ngModel)]=\"customSpaceIcon\" style=\"width: 100%\">\n <nz-option nzValue=\"project\" nzLabel=\"\uD83D\uDCCA D\u1EF1 \u00E1n (project)\"></nz-option>\n <nz-option nzValue=\"folder-open\" nzLabel=\"\uD83D\uDCC2 Th\u01B0 m\u1EE5c m\u1EDF (folder-open)\"></nz-option>\n <nz-option nzValue=\"book\" nzLabel=\"\uD83D\uDCD8 T\u00E0i li\u1EC7u / C\u1EA9m nang (book)\"></nz-option>\n <nz-option nzValue=\"safety-certificate\" nzLabel=\"\uD83D\uDEE1 Quy chu\u1EA9n / ISO (safety-certificate)\"></nz-option>\n <nz-option nzValue=\"solution\" nzLabel=\"\uD83D\uDCCB H\u1ED3 s\u01A1 nghi\u1EC7p v\u1EE5 (solution)\"></nz-option>\n <nz-option nzValue=\"database\" nzLabel=\"\uD83D\uDDC4 Kho d\u1EEF li\u1EC7u (database)\"></nz-option>\n </nz-select>\n </div>\n </div>\n }\n\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" [nzGap]=\"12\" nzWrap=\"wrap\">\n <div style=\"flex: 1; min-width: 240px\">\n <div style=\"font-weight: 600; font-size: 13px\">\n {{\n customSpaceDrawerMode === \"org_root\"\n ? \"1. Ph\u1EA1m vi truy c\u1EADp m\u1EB7c \u0111\u1ECBnh t\u1EA1i g\u1ED1c 'T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB'\"\n : \"1. Hi\u1EC3n th\u1ECB cho t\u1EA5t c\u1EA3 ng\u01B0\u1EDDi d\u00F9ng (All Users) & Quy\u1EC1n m\u1EB7c \u0111\u1ECBnh\"\n }}\n </div>\n <div class=\"quota-sub\">\n @if (customSpaceDrawerMode === \"org_root\") {\n M\u1EB7c \u0111\u1ECBnh ng\u01B0\u1EDDi d\u00F9ng th\u01B0\u1EDDng ch\u1EC9 \u0111\u01B0\u1EE3c <strong>Xem & T\u1EA3i xu\u1ED1ng</strong> t\u1EA1i g\u1ED1c \"T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\" (kh\u00F4ng\n \u0111\u01B0\u1EE3c t\u1EF1 \u00FD t\u1EA1o th\u01B0 m\u1EE5c ho\u1EB7c \u0111\u1EA9y t\u1EADp tin l\u00EAn g\u1ED1c tr\u1EEB khi \u0111\u01B0\u1EE3c c\u1EA5p quy\u1EC1n c\u1EE5 th\u1EC3 \u1EDF b\u1EA3ng b\u00EAn d\u01B0\u1EDBi).\n } @else if (drive.isCurrentUserAdmin()) {\n Khi b\u1EADt All Users: M\u1ECDi t\u00E0i kho\u1EA3n \u0111\u1EC1u th\u1EA5y m\u1EE5c n\u00E0y v\u1EDBi m\u1EE9c quy\u1EC1n m\u1EB7c \u0111\u1ECBnh b\u00EAn d\u01B0\u1EDBi; c\u00E1c \u0111\u1ED1i t\u01B0\u1EE3ng \u0111\u01B0\u1EE3c\n c\u1EA5p quy\u1EC1n ri\u00EAng \u1EDF b\u1EA3ng Ph\u00E2n quy\u1EC1n c\u1EE5 th\u1EC3 s\u1EBD \u01B0u ti\u00EAn \u00E1p d\u1EE5ng theo quy\u1EC1n ri\u00EAng.\n } @else {\n Ch\u1EC9 Qu\u1EA3n tr\u1ECB vi\u00EAn (Admin) m\u1EDBi c\u00F3 quy\u1EC1n thay \u0111\u1ED5i ph\u1EA1m vi hi\u1EC3n th\u1ECB chung to\u00E0n h\u1EC7 th\u1ED1ng.\n }\n </div>\n </div>\n <nz-switch\n [(ngModel)]=\"customSpaceVisibleToAll\"\n (ngModelChange)=\"onCustomSpaceVisibleToAllChange($event)\"\n nzCheckedChildren=\"All Users\"\n nzUnCheckedChildren=\"Theo quy\u1EC1n ri\u00EAng\"\n ></nz-switch>\n </div>\n <nz-divider style=\"margin: 10px 0\"></nz-divider>\n <div nz-flex nzAlign=\"center\" nzJustify=\"space-between\" nzWrap=\"wrap\" [nzGap]=\"10\">\n <div style=\"flex: 1; min-width: 240px\">\n <label class=\"drawer-field-label\" style=\"margin-bottom: 4px\">\n M\u1EE9c quy\u1EC1n m\u1EB7c \u0111\u1ECBnh cho ng\u01B0\u1EDDi d\u00F9ng chung (ch\u01B0a c\u00F3 trong b\u1EA3ng ph\u00E2n quy\u1EC1n ri\u00EAng)\n </label>\n <nz-select\n [(ngModel)]=\"customSpaceDefaultAccessLevel\"\n (ngModelChange)=\"onCustomSpaceDefaultAccessChange($event)\"\n style=\"width: 100%\"\n >\n <nz-option\n [nzValue]=\"DriveAccessLevel.None\"\n nzLabel=\"\uD83D\uDEAB Kh\u00F4ng c\u1EA5p quy\u1EC1n m\u1EB7c \u0111\u1ECBnh (Ch\u1EC9 nh\u1EEFng ng\u01B0\u1EDDi \u0111\u01B0\u1EE3c ph\u00E2n quy\u1EC1n c\u1EE5 th\u1EC3 b\u00EAn d\u01B0\u1EDBi)\"\n ></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Viewer\" nzLabel=\"\uD83D\uDC41 Ch\u1EC9 xem (Viewer)\"></nz-option>\n <nz-option\n [nzValue]=\"DriveAccessLevel.Downloader\"\n nzLabel=\"\u2B07 Xem & T\u1EA3i xu\u1ED1ng (Ch\u1EB7n t\u1EF1 \u00FD t\u1EA1o folder & \u0111\u1EA9y file l\u00EAn g\u1ED1c)\"\n ></nz-option>\n <nz-option\n [nzValue]=\"DriveAccessLevel.Uploader\"\n nzLabel=\"\u2601 Xem & T\u1EA3i l\u00EAn (Ch\u1EC9 \u0111\u01B0\u1EE3c \u0111\u1EA9y file l\u00EAn, KH\u00D4NG \u0111\u01B0\u1EE3c t\u1EA1o folder & kh\u00F4ng \u0111\u01B0\u1EE3c x\u00F3a)\"\n ></nz-option>\n <nz-option\n [nzValue]=\"DriveAccessLevel.Editor\"\n nzLabel=\"\u270E Ch\u1EC9nh s\u1EEDa (Editor - \u0110\u01B0\u1EE3c t\u1EA1o folder & \u0111\u1EA9y file)\"\n ></nz-option>\n </nz-select>\n </div>\n <button\n type=\"button\"\n nz-button\n nzType=\"primary\"\n style=\"margin-top: 20px\"\n (click)=\"submitCustomSpaceDrawer()\"\n >\n <nz-icon nzType=\"save\"></nz-icon>\n {{ customSpaceDrawerMode === \"create\" ? \"T\u1EA1o m\u1EE5c & Ti\u1EBFp t\u1EE5c ph\u00E2n quy\u1EC1n\" : \"L\u01B0u c\u1EA5u h\u00ECnh chung\" }}\n </button>\n </div>\n </div>\n\n <!-- B\u1EA2NG PH\u00C2N QUY\u1EC0N C\u1EE4 TH\u1EC2 (ACL & RBAC: USER / \u0110\u01A0N V\u1ECA / VAI TR\u00D2) CHO \"T\u00C0I LI\u1EC6U \u0110\u01A0N V\u1ECA\" & \"T\u00C0I LI\u1EC6U D\u1EF0 \u00C1N\" -->\n @if (customSpaceDrawerMode !== \"create\" && editingCustomSpace?.Id; as spaceNodeId) {\n <div class=\"drawer-meta-card\">\n <div style=\"font-weight: 600; font-size: 13px; margin-bottom: 4px\">\n <nz-icon nzType=\"safety-certificate\" style=\"color: var(--primary-color); margin-right: 6px\"></nz-icon>\n 2. Ph\u00E2n quy\u1EC1n c\u1EE5 th\u1EC3 theo C\u00E1 nh\u00E2n (User) / \u0110\u01A1n v\u1ECB (App_Org) / Vai tr\u00F2 (App_Role)\n </div>\n <div class=\"quota-sub\" style=\"margin-bottom: 12px\">\n C\u1EA5p quy\u1EC1n ri\u00EAng (v\u00ED d\u1EE5: <strong>Ch\u1EC9nh s\u1EEDa</strong> \u0111\u1EC3 \u0111\u01B0\u1EE3c t\u1EA1o th\u01B0 m\u1EE5c & t\u1EA3i file,\n <strong>Xem & T\u1EA3i l\u00EAn</strong> \u0111\u1EC3 ch\u1EC9 t\u1EA3i file, ho\u1EB7c <strong>C\u1EA5m - Deny</strong>) cho t\u1EEBng ng\u01B0\u1EDDi d\u00F9ng,\n ph\u00F2ng ban ho\u1EB7c vai tr\u00F2 tr\u00EAn\n <strong>{{ customSpaceDrawerMode === \"org_root\" ? \"T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\" : editingCustomSpace?.Name }}</strong\n >.\n </div>\n <lib-drive-share-modal [nodeId]=\"spaceNodeId\" [hideInheritanceToggle]=\"true\"></lib-drive-share-modal>\n </div>\n }\n </div>\n </ng-container>\n <ng-template #customSpaceDrawerFooterTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div>\n @if (customSpaceDrawerMode === \"edit\" && editingCustomSpace) {\n <button nz-button nzDanger nzType=\"default\" (click)=\"onDeleteCustomSpace(editingCustomSpace)\">\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a m\u1EE5c n\u00E0y\n </button>\n }\n </div>\n <div nz-flex [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"customSpaceDrawerVisible = false\">\u0110\u00F3ng</button>\n <button nz-button nzType=\"primary\" (click)=\"submitCustomSpaceDrawer()\">\n <nz-icon nzType=\"check\"></nz-icon>\n {{ customSpaceDrawerMode === \"create\" ? \"T\u1EA1o m\u1EE5c m\u1EDBi\" : \"L\u01B0u c\u1EA5u h\u00ECnh chung\" }}\n </button>\n </div>\n </div>\n </ng-template>\n </nz-drawer>\n\n <nz-drawer\n [nzVisible]=\"matrixDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"'92vw'\"\n nzTitle=\"Ma tr\u1EADn Ph\u00E2n quy\u1EC1n T\u00E0i li\u1EC7u & Th\u01B0 m\u1EE5c\"\n (nzOnClose)=\"matrixDrawerVisible = false\"\n >\n <!-- (ACL / RBAC Matrix) -->\n <ng-container *nzDrawerContent>\n <lib-drive-permission-matrix\n [rootFolderId]=\"matrixRootNodeId\"\n [initialTabIndex]=\"matrixInitialTabIndex\"\n [preselectedNodeIds]=\"matrixPreselectedNodeIds()\"\n [viewMode]=\"\n drive.currentViewMode() === 'ORG_DRIVE'\n ? 'ORG_DRIVE'\n : drive.currentViewMode() === 'CUSTOM_SPACE'\n ? 'CUSTOM_SPACE'\n : 'MY_DRIVE'\n \"\n [customSpaceId]=\"drive.currentCustomSpaceId()\"\n (saved)=\"drive.loadNodes()\"\n (closed)=\"matrixDrawerVisible = false\"\n >\n </lib-drive-permission-matrix>\n </ng-container>\n </nz-drawer>\n\n <!-- ========================================================================= -->\n <!-- DRAWER 11: \u0110\u1ECANH NGH\u0128A & C\u1EA4U H\u00CCNH C\u00C2Y TH\u01AF M\u1EE4C M\u1EAAU K\u00C8M PH\u00C2N QUY\u1EC0N T\u1EF0 \u0110\u1ED8NG -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"templateDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"760\"\n [nzClosable]=\"false\"\n [nzTitle]=\"templateDrawerTitleTpl\"\n [nzFooter]=\"templateDrawerFooterTpl\"\n (nzOnClose)=\"templateDrawerVisible = false\"\n >\n <ng-template #templateDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n (click)=\"toggleDrawerPlacement()\"\n >\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"apartment\" style=\"font-size: 18px; color: #d97706\"></nz-icon>\n <strong>\n {{ templateDrawerMode === \"create\" ? \"\u0110\u1ECBnh ngh\u0129a M\u1EABu C\u00E2y Th\u01B0 M\u1EE5c M\u1EDBi\" : \"C\u1EADp nh\u1EADt M\u1EABu C\u00E2y Th\u01B0 M\u1EE5c\" }}\n </strong>\n @if (totalConfiguredTemplatePermissions() > 0) {\n <nz-tag nzColor=\"cyan\">\uD83D\uDEE1 {{ totalConfiguredTemplatePermissions() }} quy\u1EC1n c\u00E0i s\u1EB5n</nz-tag>\n }\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"templateDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"14\">\n <div nz-flex [nzGap]=\"12\" nzWrap=\"wrap\">\n <div style=\"flex: 1.4; min-width: 220px\">\n <label class=\"drawer-field-label\">T\u00EAn m\u1EABu c\u00E2y th\u01B0 m\u1EE5c *</label>\n <input\n nz-input\n [(ngModel)]=\"templateInputName\"\n [appAutoFocus]=\"templateDrawerVisible\"\n placeholder=\"VD: H\u1ED3 s\u01A1 D\u1EF1 \u00E1n \u0110\u1EA5u th\u1EA7u, H\u1ED3 s\u01A1 H\u1EE3p \u0111\u1ED3ng...\"\n />\n </div>\n <div style=\"flex: 1; min-width: 170px\">\n <label class=\"drawer-field-label\">M\u00E3 m\u1EABu (D\u00F9ng g\u1ECDi API t\u1EEB Module kh\u00E1c)</label>\n <input nz-input [(ngModel)]=\"templateInputCode\" placeholder=\"VD: MAU_DU_AN, MAU_HOP_DONG...\" />\n </div>\n </div>\n\n <div>\n <label class=\"drawer-field-label\">M\u00F4 t\u1EA3 ng\u1EAFn</label>\n <input\n nz-input\n [(ngModel)]=\"templateInputDesc\"\n placeholder=\"M\u00F4 t\u1EA3 m\u1EE5c \u0111\u00EDch s\u1EED d\u1EE5ng ho\u1EB7c ph\u00E2n h\u1EC7 \u00E1p d\u1EE5ng...\"\n />\n </div>\n\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" [nzGap]=\"12\">\n <div style=\"flex: 1\">\n <div style=\"font-weight: 600; font-size: 13px\">T\u1EA1o th\u01B0 m\u1EE5c g\u1ED1c b\u1ECDc ngo\u00E0i khi k\u00E9o th\u1EA3</div>\n <div class=\"quota-sub\">\n Khi b\u1EADt: K\u00E9o th\u1EA3 m\u1EABu v\u00E0o th\u01B0 m\u1EE5c \u0111\u00EDch s\u1EBD t\u1EA1o 1 th\u01B0 m\u1EE5c mang t\u00EAn m\u1EABu r\u1ED3i ch\u1EE9a c\u00E2y con b\u00EAn trong.\n </div>\n </div>\n <nz-switch\n style=\"flex-shrink: 0\"\n [(ngModel)]=\"templateCreateWrapperRoot\"\n nzCheckedChildren=\"C\u00F3 b\u1ECDc g\u1ED1c\"\n nzUnCheckedChildren=\"Bung tr\u1EF1c ti\u1EBFp\"\n ></nz-switch>\n </div>\n\n <nz-divider style=\"margin: 6px 0\"></nz-divider>\n\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" [nzGap]=\"12\">\n <div style=\"flex: 1\">\n <div style=\"font-weight: 600; font-size: 13px\">Chia s\u1EBB m\u1EABu n\u00E0y cho to\u00E0n b\u1ED9 ng\u01B0\u1EDDi d\u00F9ng & ph\u00E2n h\u1EC7</div>\n <div class=\"quota-sub\">Cho ph\u00E9p m\u1ECDi ng\u01B0\u1EDDi d\u00F9ng v\u00E0 c\u00E1c Module nghi\u1EC7p v\u1EE5 kh\u00E1c s\u1EED d\u1EE5ng chung m\u1EABu n\u00E0y.</div>\n </div>\n <nz-switch\n style=\"flex-shrink: 0\"\n [(ngModel)]=\"templateVisibleToAll\"\n [nzDisabled]=\"!drive.isCurrentUserAdmin()\"\n nzCheckedChildren=\"To\u00E0n h\u1EC7 th\u1ED1ng\"\n nzUnCheckedChildren=\"C\u00E1 nh\u00E2n\"\n ></nz-switch>\n </div>\n </div>\n\n <!-- SO\u1EA0N TH\u1EA2O C\u1EA4U TR\u00DAC C\u00C2Y \u0110A C\u1EA4P & XEM TR\u01AF\u1EDAC TR\u1EF0C QUAN (NH\u1EA4N V\u00C0O D\u00D2NG \u0110\u1EC2 G\u00C1N QUY\u1EC0N RI\u00CANG) -->\n <div>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"6\" style=\"margin-bottom: 6px\">\n <label class=\"drawer-field-label\" style=\"margin-bottom: 0\">\n 1. C\u1EA5u tr\u00FAc C\u00E2y th\u01B0 m\u1EE5c (M\u1ED7i d\u00F2ng 1 th\u01B0 m\u1EE5c, th\u1EE5t l\u1EC1 2 kho\u1EA3ng tr\u1EAFng \u0111\u1EC3 t\u1EA1o c\u1EA5p con)\n </label>\n <div nz-flex [nzGap]=\"4\">\n <button type=\"button\" nz-button nzSize=\"small\" (click)=\"loadPresetTemplateStructure('PROJECT')\">\n M\u1EABu D\u1EF1 \u00E1n\n </button>\n <button type=\"button\" nz-button nzSize=\"small\" (click)=\"loadPresetTemplateStructure('CONTRACT')\">\n M\u1EABu H\u1EE3p \u0111\u1ED3ng\n </button>\n <button type=\"button\" nz-button nzSize=\"small\" (click)=\"loadPresetTemplateStructure('TRAINING')\">\n M\u1EABu \u0110\u00E0o t\u1EA1o / KHCN\n </button>\n </div>\n </div>\n\n <div class=\"template-editor-grid\">\n <div>\n <textarea\n nz-input\n rows=\"11\"\n [(ngModel)]=\"templateIndentedText\"\n style=\"font-family: monospace; font-size: 12.5px; line-height: 1.55\"\n placeholder=\"- 01. H\u1ED3 s\u01A1 ph\u00E1p l\u00FD - 01.1. T\u1EDD tr\u00ECnh - 01.2. Quy\u1EBFt \u0111\u1ECBnh - 02. H\u1EE3p \u0111\u1ED3ng & Nghi\u1EC7m thu\"\n ></textarea>\n </div>\n\n <div class=\"template-tree-preview\">\n <div\n nz-flex\n nzJustify=\"space-between\"\n nzAlign=\"center\"\n style=\"font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--app-text-muted, #64748b)\"\n >\n <span>Xem tr\u01B0\u1EDBc ({{ previewTemplateFlatNodes().length }} th\u01B0 m\u1EE5c) \u2014 Nh\u1EA5n \u0111\u1EC3 g\u00E1n quy\u1EC1n:</span>\n </div>\n\n <!-- D\u00F2ng ch\u1ECDn Quy\u1EC1n g\u1ED1c to\u00E0n b\u1ED9 m\u1EABu -->\n <div\n class=\"preview-tree-row selectable-preview-row\"\n [class.active-perm-target]=\"selectedTemplatePermTarget() === '__ROOT__'\"\n (click)=\"selectTemplatePermissionTarget('__ROOT__')\"\n >\n <nz-icon nzType=\"global\" style=\"color: #0284c7; margin-right: 6px\"></nz-icon>\n <strong style=\"flex: 1; font-size: 12px\">To\u00E0n b\u1ED9 c\u00E2y th\u01B0 m\u1EE5c m\u1EABu (Quy\u1EC1n g\u1ED1c)</strong>\n @if (templateRootPermissions().length > 0) {\n <nz-tag nzColor=\"blue\" style=\"margin: 0; font-size: 10.5px; line-height: 16px; padding: 0 5px\">\n \uD83D\uDEE1 {{ templateRootPermissions().length }}\n </nz-tag>\n }\n </div>\n\n @for (node of previewTemplateFlatNodes(); track node.RelativePath) {\n <div\n class=\"preview-tree-row selectable-preview-row\"\n [class.active-perm-target]=\"selectedTemplatePermTarget() === node.RelativePath\"\n [style.padding-left.px]=\"8 + node.Level * 16\"\n (click)=\"selectTemplatePermissionTarget(node.RelativePath)\"\n >\n <!-- nz-tooltip\n nzTooltipTitle=\"Nh\u1EA5n \u0111\u1EC3 c\u1EA5u h\u00ECnh ph\u00E2n quy\u1EC1n ri\u00EAng cho nh\u00E1nh th\u01B0 m\u1EE5c n\u00E0y\" -->\n <nz-icon nzType=\"folder-fill\" style=\"color: #f59e0b; margin-right: 6px\"></nz-icon>\n <span style=\"flex: 1; overflow: hidden; text-overflow: ellipsis\">{{ node.Name }}</span>\n @if (node.BreakInheritance) {\n <nz-tag\n nzColor=\"warning\"\n style=\"margin: 0 2px 0 0; font-size: 10px; line-height: 15px; padding: 0 4px\"\n nz-tooltip\n nzTooltipTitle=\"Ng\u1EAFt k\u1EBF th\u1EEBa quy\u1EC1n t\u1EEB th\u01B0 m\u1EE5c cha\"\n >\n \u0110\u1ED9c l\u1EADp\n </nz-tag>\n }\n @if (node.PermissionsCount > 0) {\n <nz-tag nzColor=\"cyan\" style=\"margin: 0; font-size: 10px; line-height: 15px; padding: 0 5px\">\n \uD83D\uDEE1 {{ node.PermissionsCount }}\n </nz-tag>\n }\n </div>\n }\n </div>\n </div>\n </div>\n\n <!-- ========================================================================= -->\n <!-- 2. C\u1EA4U H\u00CCNH PH\u00C2N QUY\u1EC0N M\u1EB6C \u0110\u1ECANH CHO M\u1EAAU C\u00C2Y TH\u01AF M\u1EE4C (ACL & RBAC) -->\n <!-- ========================================================================= -->\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <div>\n <div style=\"font-weight: 600; font-size: 13px\">\n <nz-icon nzType=\"safety-certificate\" style=\"color: #0284c7; margin-right: 4px\"></nz-icon>\n 2. Ph\u00E2n quy\u1EC1n c\u00E0i s\u1EB5n khi t\u1EA1o m\u1EDBi t\u1EEB M\u1EABu c\u00E2y th\u01B0 m\u1EE5c\n </div>\n <div class=\"quota-sub\">\n @if (selectedTemplatePermTarget() === \"__ROOT__\") {\n \u0110ang c\u1EA5u h\u00ECnh cho: <strong style=\"color: #0284c7\">\uD83C\uDF10 To\u00E0n b\u1ED9 c\u00E2y th\u01B0 m\u1EE5c m\u1EABu (Quy\u1EC1n g\u1ED1c)</strong> \u2014 T\u1EF1\n \u0111\u1ED9ng k\u1EBF th\u1EEBa xu\u1ED1ng m\u1ECDi th\u01B0 m\u1EE5c con.\n } @else {\n \u0110ang c\u1EA5u h\u00ECnh ri\u00EAng cho nh\u00E1nh:\n <strong style=\"color: #d97706\">\uD83D\uDCC2 {{ selectedTemplatePermTarget() }}</strong>\n <a style=\"margin-left: 8px; font-weight: 600\" (click)=\"selectTemplatePermissionTarget('__ROOT__')\">\n \u21A9 Quay v\u1EC1 Quy\u1EC1n g\u1ED1c to\u00E0n m\u1EABu\n </a>\n }\n </div>\n </div>\n\n @if (selectedTemplatePermTarget() !== \"__ROOT__\") {\n <div nz-flex nzAlign=\"center\" [nzGap]=\"6\">\n <span style=\"font-size: 12px\">Ng\u1EAFt k\u1EBF th\u1EEBa cha:</span>\n <nz-switch\n nzSize=\"small\"\n [ngModel]=\"activeTemplateTargetBreakInheritance()\"\n (ngModelChange)=\"onToggleTemplateNodeBreakInheritance($event)\"\n nzCheckedChildren=\"\u0110\u1ED9c l\u1EADp\"\n nzUnCheckedChildren=\"K\u1EBF th\u1EEBa\"\n nz-tooltip\n nzTooltipTitle=\"Khi b\u1EADt \u0110\u1ED9c l\u1EADp: Th\u01B0 m\u1EE5c con n\u00E0y s\u1EBD ng\u1EAFt k\u1EBF th\u1EEBa quy\u1EC1n t\u1EEB th\u01B0 m\u1EE5c cha v\u00E0 ch\u1EC9 \u00E1p d\u1EE5ng danh s\u00E1ch quy\u1EC1n ri\u00EAng b\u00EAn d\u01B0\u1EDBi\"\n ></nz-switch>\n </div>\n }\n </div>\n\n <!-- Thanh ch\u1ECDn \u0110\u1ED1i t\u01B0\u1EE3ng (User / \u0110\u01A1n v\u1ECB / Vai tr\u00F2) & M\u1EE9c quy\u1EC1n -->\n <div nz-flex nzWrap=\"wrap\" [nzGap]=\"6\" nzAlign=\"center\" style=\"margin-top: 6px\">\n <nz-select\n [(ngModel)]=\"templatePermGranteeType\"\n (ngModelChange)=\"onTemplatePermGranteeTypeChange()\"\n nzSize=\"small\"\n style=\"width: 140px\"\n >\n <nz-option [nzValue]=\"DriveGranteeType.Org\" nzLabel=\"\uD83C\uDFE2 \u0110\u01A1n v\u1ECB (Org)\"></nz-option>\n <nz-option [nzValue]=\"DriveGranteeType.Role\" nzLabel=\"\uD83D\uDEE1 Vai tr\u00F2 (Role)\"></nz-option>\n <nz-option [nzValue]=\"DriveGranteeType.User\" nzLabel=\"\uD83D\uDC64 C\u00E1 nh\u00E2n (User)\"></nz-option>\n </nz-select>\n\n <nz-select\n nzShowSearch\n nzServerSearch\n nzSize=\"small\"\n nzPlaceHolder=\"T\u00ECm ch\u1ECDn User / \u0110\u01A1n v\u1ECB / Vai tr\u00F2...\"\n [(ngModel)]=\"templatePermSelectedGrantee\"\n (nzOnSearch)=\"onSearchTemplateGrantee($event)\"\n style=\"flex: 1; min-width: 210px\"\n >\n @for (g of templateGranteeOptions(); track g.GranteeId) {\n <nz-option [nzValue]=\"g\" [nzLabel]=\"g.DisplayName + ' (' + g.Code + ')'\"></nz-option>\n }\n </nz-select>\n\n <nz-select\n [(ngModel)]=\"templatePermAccessLevel\"\n [nzDisabled]=\"templatePermIsDeny\"\n nzSize=\"small\"\n style=\"width: 155px\"\n >\n <nz-option [nzValue]=\"DriveAccessLevel.Viewer\" nzLabel=\"\uD83D\uDC41 Ch\u1EC9 xem (10)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Downloader\" nzLabel=\"\u2B07 Xem & T\u1EA3i (20)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Uploader\" nzLabel=\"\u2601 Xem & T\u1EA3i l\u00EAn (35)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Editor\" nzLabel=\"\u270E Ch\u1EC9nh s\u1EEDa (40)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Manager\" nzLabel=\"\uD83D\uDC51 Qu\u1EA3n tr\u1ECB (50)\"></nz-option>\n </nz-select>\n\n <label\n nz-checkbox\n [(ngModel)]=\"templatePermIsDeny\"\n nz-tooltip\n nzTooltipTitle=\"C\u1EA5m truy c\u1EADp (Explicit Deny) \u0111\u1ED1i v\u1EDBi \u0111\u1ED1i t\u01B0\u1EE3ng n\u00E0y tr\u00EAn nh\u00E1nh \u0111ang ch\u1ECDn\"\n style=\"font-size: 12px\"\n >\n C\u1EA5m (Deny)\n </label>\n\n <button\n type=\"button\"\n nz-button\n nzType=\"primary\"\n nzSize=\"small\"\n [disabled]=\"!templatePermSelectedGrantee\"\n (click)=\"addPermissionToTemplateTarget()\"\n >\n <nz-icon nzType=\"user-add\"></nz-icon> Th\u00EAm quy\u1EC1n\n </button>\n </div>\n\n <!-- Danh s\u00E1ch c\u00E1c quy\u1EC1n \u0111\u00E3 \u0111\u1EB7t cho m\u1EE5c \u0111ang ch\u1ECDn -->\n @if (activeTemplateTargetPermissions().length === 0) {\n <div class=\"quota-sub\" style=\"padding: 8px 4px 2px\">\n @if (selectedTemplatePermTarget() === \"__ROOT__\") {\n Ch\u01B0a \u0111\u1EB7t quy\u1EC1n m\u1EB7c \u0111\u1ECBnh cho to\u00E0n m\u1EABu. H\u00E3y ch\u1ECDn \u0110\u01A1n v\u1ECB / Vai tr\u00F2 / C\u00E1 nh\u00E2n \u1EDF tr\u00EAn r\u1ED3i b\u1EA5m\n <strong>+ Th\u00EAm quy\u1EC1n</strong> (ho\u1EB7c b\u1EA5m v\u00E0o t\u1EEBng th\u01B0 m\u1EE5c b\u00EAn khung Xem tr\u01B0\u1EDBc \u0111\u1EC3 \u0111\u1EB7t quy\u1EC1n ri\u00EAng cho\n nh\u00E1nh con).\n } @else {\n Nh\u00E1nh <strong>\"{{ selectedTemplatePermTarget() }}\"</strong> ch\u01B0a c\u00F3 quy\u1EC1n ri\u00EAng (m\u1EB7c \u0111\u1ECBnh k\u1EBF th\u1EEBa t\u1EEB th\u01B0\n m\u1EE5c cha).\n }\n </div>\n } @else {\n <nz-table\n #tplPermTable\n [nzData]=\"activeTemplateTargetPermissions()\"\n nzSize=\"small\"\n [nzBordered]=\"true\"\n [nzFrontPagination]=\"false\"\n [nzShowPagination]=\"false\"\n style=\"margin-top: 6px\"\n >\n <thead>\n <tr>\n <th>\u0110\u1ED1i t\u01B0\u1EE3ng nh\u1EADn quy\u1EC1n</th>\n <th nzWidth=\"185px\">M\u1EE9c quy\u1EC1n \u00E1p d\u1EE5ng</th>\n <th nzWidth=\"95px\" class=\"text-center\">T\u1EA3i xu\u1ED1ng</th>\n <th nzWidth=\"65px\" class=\"text-center\">X\u00F3a</th>\n </tr>\n </thead>\n <tbody>\n @for (p of tplPermTable.data; track p.GranteeType + \":\" + p.GranteeId) {\n <tr>\n <td>\n <nz-tag\n [nzColor]=\"\n p.GranteeType === DriveGranteeType.User\n ? 'blue'\n : p.GranteeType === DriveGranteeType.Org\n ? 'cyan'\n : 'purple'\n \"\n >\n {{\n p.GranteeType === DriveGranteeType.User\n ? \"User\"\n : p.GranteeType === DriveGranteeType.Org\n ? \"\u0110\u01A1n v\u1ECB\"\n : \"Role\"\n }}\n </nz-tag>\n <strong>{{ p.GranteeName || p.GranteeId }}</strong>\n </td>\n <td>\n <nz-select\n nzSize=\"small\"\n [ngModel]=\"p.IsDeny ? 'DENY' : p.AccessLevel\"\n (ngModelChange)=\"updateTemplatePermissionLevel(p, $event)\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"DriveAccessLevel.Viewer\" nzLabel=\"\uD83D\uDC41 Ch\u1EC9 xem (10)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Downloader\" nzLabel=\"\u2B07 Xem & T\u1EA3i (20)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Uploader\" nzLabel=\"\u2601 Xem & T\u1EA3i l\u00EAn (35)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Editor\" nzLabel=\"\u270E Ch\u1EC9nh s\u1EEDa (40)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Manager\" nzLabel=\"\uD83D\uDC51 Qu\u1EA3n tr\u1ECB (50)\"></nz-option>\n <nz-option nzValue=\"DENY\" nzLabel=\"\uD83D\uDEAB C\u1EA5m (Deny)\"></nz-option>\n </nz-select>\n </td>\n <td class=\"text-center\">\n <nz-tag [nzColor]=\"p.CanDownload && !p.IsDeny ? 'green' : 'default'\">\n {{ p.CanDownload && !p.IsDeny ? \"Cho ph\u00E9p\" : \"Ch\u1EB7n\" }}\n </nz-tag>\n </td>\n <td class=\"text-center\">\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"G\u1EE1 quy\u1EC1n n\u00E0y kh\u1ECFi m\u1EABu\"\n (click)=\"removePermissionFromTemplateTarget(p)\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n }\n </div>\n </div>\n </ng-container>\n\n <ng-template #templateDrawerFooterTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div>\n @if (templateDrawerMode === \"edit\" && editingTemplate) {\n <button nz-button nzDanger nzType=\"default\" (click)=\"onDeleteTemplate(editingTemplate)\">\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a m\u1EABu n\u00E0y\n </button>\n }\n </div>\n <div nz-flex [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"templateDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitTemplateDrawer()\">\n <nz-icon nzType=\"save\"></nz-icon>\n {{ templateDrawerMode === \"create\" ? \"L\u01B0u m\u1EABu c\u00E2y th\u01B0 m\u1EE5c\" : \"C\u1EADp nh\u1EADt m\u1EABu\" }}\n </button>\n </div>\n </div>\n </ng-template>\n </nz-drawer>\n}\n", styles: ["@charset \"UTF-8\";.drive-shell{display:grid;grid-template-columns:245px 1fr;min-height:calc(100vh - 85px);background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px;overflow:hidden}.drive-sidebar{padding:14px;background:var(--app-sidebar-bg, #f8fafc);border-right:1px solid var(--app-border, #e2e8f0);display:flex;flex-direction:column;gap:14px}.drive-nav{display:flex;flex-direction:column;gap:4px}.drive-nav a{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:6px;color:var(--app-text, #334155);cursor:pointer;transition:background .15s}.drive-nav a.space-has-active-child{color:var(--primary-color, #1890ff);font-weight:600;background:color-mix(in srgb,var(--primary-color, #1890ff) 7%,transparent)}.drive-nav a:hover,.drive-nav a.active{background:color-mix(in srgb,var(--primary-color, #1890ff) 16%,transparent);color:var(--primary-color, #1890ff);font-weight:600}.org-nav-group{display:flex;flex-direction:column;gap:2px}.custom-space-link{font-size:13px}.custom-space-title{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.custom-space-badge{margin:0!important;font-size:10px;line-height:16px;padding:0 4px}.nav-inline-btn{border:none;background:transparent;color:inherit;cursor:pointer;padding:2px 4px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;opacity:.7}.nav-inline-btn:hover{opacity:1;background:color-mix(in srgb,var(--primary-color, #1890ff) 18%,transparent)}.storage-mode-box{padding:10px 12px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px}.upload-queue-box{padding:10px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px;max-height:180px;overflow-y:auto}.upload-task-row{margin-bottom:6px}.upload-task-name{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.quota-box{margin-top:auto;padding:12px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px}.quota-title{font-size:13px;font-weight:600;margin-bottom:6px}.quota-sub{font-size:12px;color:var(--app-text-muted, #64748b);margin-top:4px}.drive-shell.sidebar-wide{grid-template-columns:335px 1fr}.sidebar-tree-header-bar{display:flex;justify-content:space-between;align-items:center;padding:6px 10px;border-radius:6px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0)}.sidebar-tree-header-title{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600;color:var(--app-text, #334155)}.sidebar-tree-header-actions{display:inline-flex;align-items:center;gap:3px}.sidebar-tree-tool-btn{border:none;background:transparent;color:var(--app-text-muted, #64748b);width:22px;height:22px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;font-size:12px;transition:background .15s,color .15s}.sidebar-tree-tool-btn:hover,.sidebar-tree-tool-btn.active{background:color-mix(in srgb,var(--primary-color, #1890ff) 14%,transparent);color:var(--primary-color, #1890ff)}.sidebar-tree-filter-box{margin-top:-6px}.nav-item-with-tree{display:flex;flex-direction:column}.nav-caret-btn{border:none;background:transparent;color:inherit;width:18px;height:18px;padding:0;margin-left:-4px;margin-right:-2px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;font-size:11px;opacity:.75;flex-shrink:0;transition:transform .15s,background .15s,opacity .15s}.nav-caret-btn:hover{opacity:1;background:color-mix(in srgb,var(--primary-color, #1890ff) 18%,transparent)}.sidebar-tree-container{display:flex;flex-direction:column;gap:1px;margin:2px 0 6px 14px;padding-left:6px;border-left:1.5px dashed var(--app-border, #cbd5e1);max-height:320px;overflow-y:auto;overflow-x:hidden}.drive-shell.sidebar-wide .sidebar-tree-container{max-height:420px}.sidebar-tree-node{display:flex;align-items:center;gap:5px;padding:5px 8px;border-radius:5px;font-size:12.5px;color:var(--app-text, #334155);cursor:pointer;-webkit-user-select:none;user-select:none;transition:background .12s,color .12s;min-width:0}.sidebar-tree-node:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 10%,transparent)}.sidebar-tree-node.active-breadcrumb-ancestor{font-weight:600;color:var(--primary-color, #1890ff)}.sidebar-tree-node.active-tree-node,.sidebar-tree-node.context-active-tree-node{background:color-mix(in srgb,var(--primary-color, #1890ff) 16%,transparent);color:var(--primary-color, #1890ff);font-weight:600;box-shadow:inset 2.5px 0 0 var(--primary-color, #1890ff)}.sidebar-tree-node.tree-drop-active{background:color-mix(in srgb,var(--primary-color, #1890ff) 22%,transparent)!important;outline:1.5px dashed var(--primary-color, #1890ff);color:var(--primary-color, #1890ff);font-weight:600}.tree-node-caret{width:16px;height:16px;border:none;background:transparent;color:var(--app-text-muted, #64748b);padding:0;border-radius:3px;display:inline-flex;align-items:center;justify-content:center;font-size:10px;cursor:pointer;flex-shrink:0}.tree-node-caret:hover{color:var(--primary-color, #1890ff);background:color-mix(in srgb,var(--primary-color, #1890ff) 16%,transparent)}.tree-node-caret-spacer{width:16px;height:16px;display:inline-block;flex-shrink:0}.tree-node-folder-icon{font-size:15px;flex-shrink:0}.tree-node-label{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.35}.tree-node-quick-btn{border:none;background:transparent;color:var(--app-text-muted, #64748b);width:20px;height:20px;padding:0;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;opacity:0;cursor:pointer;flex-shrink:0;font-size:11px;transition:opacity .12s,background .12s,color .12s}.sidebar-tree-node:hover .tree-node-quick-btn{opacity:.85}.tree-node-quick-btn:hover{opacity:1!important;color:var(--primary-color, #1890ff);background:color-mix(in srgb,var(--primary-color, #1890ff) 18%,transparent)}.sidebar-tree-empty{padding:4px 8px 4px 20px;font-size:11.5px;color:var(--app-text-muted, #94a3b8);font-style:italic}.drive-main{position:relative;padding:16px;display:flex;flex-direction:column;gap:12px;transition:background .15s,border-color .15s}.drive-main.external-drag-active{background:color-mix(in srgb,var(--primary-color, #1890ff) 6%,var(--app-container-bg, #ffffff));outline:2px dashed var(--primary-color, #1890ff);outline-offset:-6px}.external-drop-banner{pointer-events:none;display:flex;align-items:center;gap:14px;padding:12px 18px;border-radius:8px;background:color-mix(in srgb,var(--primary-color, #1890ff) 14%,var(--app-container-bg, #ffffff));border:1px dashed var(--primary-color, #1890ff);color:var(--app-text, #1e293b)}.drop-banner-icon{font-size:28px;color:var(--primary-color, #1890ff)}.drop-banner-title{font-size:14px;font-weight:500}.drop-banner-sub{font-size:12px;color:var(--app-text-muted, #64748b);margin-top:2px}.drive-toolbar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;padding-bottom:10px;border-bottom:1px solid var(--app-border, #f1f5f9)}.bulk-action-bar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;padding:8px 14px;border-radius:8px;background:color-mix(in srgb,var(--primary-color, #1890ff) 9%,var(--app-container-bg, #ffffff));border:1px solid color-mix(in srgb,var(--primary-color, #1890ff) 32%,var(--app-border, #cbd5e1));box-shadow:0 2px 8px #1890ff14}.bulk-action-summary{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:13px;color:var(--app-text, #1e293b)}.bulk-action-meta{font-size:12px;color:var(--app-text-muted, #64748b)}.bulk-action-buttons{display:flex;align-items:center;flex-wrap:wrap;gap:6px}.checkbox-col-th,.checkbox-col-td{-webkit-user-select:none;user-select:none;cursor:pointer}.trash-info-banner{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;padding:9px 14px;border-radius:8px;background:#ef44440f;border:1px solid rgba(239,68,68,.24);font-size:13px;color:var(--app-text, #334155)}.physical-path-bar{display:flex;align-items:center;gap:6px;margin-top:4px;font-size:12px;color:var(--app-text-muted, #64748b)}.toolbar-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.drive-row{cursor:pointer;transition:background .15s,outline .15s}.drive-row.row-checked>td,.drive-row.row-active>td,.drive-row.active>td{background:color-mix(in srgb,var(--primary-color, #1890ff) 11%,var(--app-container-bg, #ffffff))!important}.drive-row.row-checked>td:first-child,.drive-row.row-active>td:first-child,.drive-row.active>td:first-child{box-shadow:inset 3.5px 0 0 var(--primary-color, #1890ff)!important}.drive-row:not(.row-active):not(.row-checked):not(:hover):not(.drop-target-active)>td{background:transparent!important;box-shadow:none!important}.drive-row.dragging-row{opacity:.45}.drive-row.drop-target-active>td{background:color-mix(in srgb,var(--primary-color, #1890ff) 18%,transparent)!important;border-top:1px dashed var(--primary-color, #1890ff);border-bottom:1px dashed var(--primary-color, #1890ff)}.bc-drop-active,.drive-nav a.nav-drop-active{background:color-mix(in srgb,var(--primary-color, #1890ff) 22%,transparent)!important;outline:1.5px dashed var(--primary-color, #1890ff);color:var(--primary-color, #1890ff);font-weight:600}.node-name-cell{display:flex;align-items:center;gap:8px}.node-icon-wrap{position:relative;display:inline-flex;align-items:center;justify-content:center}.node-icon{font-size:18px}.shortcut-badge{position:absolute;right:-5px;bottom:-3px;width:13px;height:13px;border-radius:50%;background:#7c3aed;color:#fff;font-size:9px;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 0 0 1.5px var(--app-container-bg, #ffffff)}.node-title{font-weight:500}.action-btn-group{display:inline-flex;align-items:center;justify-content:center;gap:4px}.action-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;background:transparent;border-radius:6px;cursor:pointer;font-size:15px;transition:background .15s,transform .1s}.action-icon-btn:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 12%,transparent);transform:translateY(-1px)}.action-icon-btn.color-warn:hover{background:#ef44441f}.sortable-th{cursor:pointer;-webkit-user-select:none;user-select:none;transition:background .15s,color .15s}.sortable-th:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 8%,var(--app-sidebar-bg, #f8fafc))!important;color:var(--primary-color, #1890ff)}.th-sort-wrap{display:inline-flex;align-items:center;gap:6px;width:100%}.th-sort-wrap.justify-center{justify-content:center}.th-sort-wrap.justify-end{justify-content:flex-end}.sort-icon{font-size:13px;opacity:.35;transition:opacity .15s,color .15s}.sort-icon.active{opacity:1;color:var(--primary-color, #1890ff)}.sortable-th:hover .sort-icon{opacity:.85}.drawer-field-label{display:block;font-size:13px;font-weight:600;margin-bottom:6px;color:var(--app-text, #334155)}.drawer-meta-card{padding:12px 14px;background:var(--app-sidebar-bg, #f8fafc);border:1px solid var(--app-border, #e2e8f0);border-radius:8px;display:flex;flex-direction:column;gap:8px}.drawer-meta-header{display:flex;align-items:center;gap:10px}.drawer-meta-row{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px}.meta-label{color:var(--app-text-muted, #64748b)}.template-sidebar-box{padding:10px 12px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px}.template-chip-list{display:flex;flex-direction:column;gap:6px;max-height:175px;overflow-y:auto}.template-drag-item{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:6px 8px;border-radius:6px;border:1px dashed var(--app-border, #cbd5e1);background:var(--app-sidebar-bg, #f8fafc);cursor:grab;transition:all .15s}.template-drag-item:hover{border-color:var(--primary-color, #1890ff);background:color-mix(in srgb,var(--primary-color, #1890ff) 10%,transparent)}.template-item-title{font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.template-item-sub{font-size:10.5px;color:var(--app-text-muted, #64748b)}.template-editor-grid{display:grid;grid-template-columns:1.15fr 1fr;gap:10px}.template-tree-preview{border:1px solid var(--app-border, #e2e8f0);border-radius:6px;padding:10px;background:var(--app-sidebar-bg, #f8fafc);max-height:450px;overflow-y:auto}.preview-tree-row{display:flex;align-items:center;font-size:12.5px;padding:2.5px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.selectable-preview-row{cursor:pointer;padding:4px 6px;border-radius:5px;transition:background .12s,border-color .12s;border:1px solid transparent}.selectable-preview-row:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 10%,transparent)}.selectable-preview-row.active-perm-target{background:color-mix(in srgb,var(--primary-color, #1890ff) 16%,transparent);border-color:var(--primary-color, #1890ff);font-weight:600}.drive-preview-body-fill{--drive-preview-fill-height: calc(100vh - 103px) ;display:flex;flex-direction:column;flex:1 1 auto;width:100%;height:100%;min-height:var(--drive-preview-fill-height);overflow:hidden}.drive-preview-body-fill.no-drawer-footer{--drive-preview-fill-height: calc(100vh - 55px) }.drive-preview-body-fill ::ng-deep extend-view-file-content{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;width:100%!important;height:100%!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important}.drive-preview-body-fill ::ng-deep extend-view-file-content>*:not(style):not(script),.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer>div,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .html,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .ink-switch-box,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .zoom,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer #outerContainer,.drive-preview-body-fill ::ng-deep extend-view-file-content pdf-viewer,.drive-preview-body-fill ::ng-deep extend-view-file-content iframe,.drive-preview-body-fill ::ng-deep extend-view-file-content embed,.drive-preview-body-fill ::ng-deep extend-view-file-content object{display:block!important;flex:1 1 auto!important;width:100%!important;height:var(--drive-preview-fill-height)!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important}.drive-preview-body-fill ::ng-deep extend-view-file-content pre{flex:1 1 auto!important;width:100%!important;height:var(--drive-preview-fill-height)!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important;margin:0!important;padding:16px!important;overflow:auto!important;box-sizing:border-box!important}::ng-deep .nowrap-tooltip{max-width:none!important}::ng-deep .nowrap-tooltip .ant-tooltip-inner{white-space:nowrap!important;max-width:none!important;width:max-content!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: NzGridModule }, { kind: "ngmodule", type: NzFlexModule }, { kind: "directive", type: i3$4.NzFlexDirective, selector: "[nz-flex],nz-flex", inputs: ["nzVertical", "nzJustify", "nzAlign", "nzGap", "nzWrap", "nzFlex"], exportAs: ["nzFlex"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i6.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "directive", type: i6.NzTableCellDirective, selector: "th:not(.nz-disable-th):not([mat-cell]), td:not(.nz-disable-td):not([mat-cell])" }, { kind: "directive", type: i6.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i6.NzTdAddOnComponent, selector: "td[nzChecked], td[nzDisabled], td[nzIndeterminate], td[nzIndentSize], td[nzExpand], td[nzShowExpand], td[nzShowCheckbox]", inputs: ["nzChecked", "nzDisabled", "nzIndeterminate", "nzLabel", "nzIndentSize", "nzShowExpand", "nzShowCheckbox", "nzExpand", "nzExpandIcon"], outputs: ["nzCheckedChange", "nzExpandChange"] }, { kind: "component", type: i6.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i6.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i6.NzTrDirective, selector: "tr:not([mat-row]):not([mat-header-row]):not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "ngmodule", type: NzPaginationModule }, { kind: "component", type: i7.NzPaginationComponent, selector: "nz-pagination", inputs: ["nzShowTotal", "nzItemRender", "nzSize", "nzPageSizeOptions", "nzShowSizeChanger", "nzShowQuickJumper", "nzSimple", "nzDisabled", "nzResponsive", "nzHideOnSinglePage", "nzTotal", "nzPageIndex", "nzPageSize"], outputs: ["nzPageSizeChange", "nzPageIndexChange"], exportAs: ["nzPagination"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i2$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i3$3.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i4$1.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i1$2.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i12.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: i12.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "directive", type: i12.NzInputGroupWhitSuffixOrPrefixDirective, selector: "nz-input-group[nzSuffix], nz-input-group[nzPrefix]" }, { kind: "ngmodule", type: NzBreadCrumbModule }, { kind: "component", type: i10.NzBreadCrumbComponent, selector: "nz-breadcrumb", inputs: ["nzAutoGenerate", "nzSeparator", "nzRouteLabel", "nzRouteLabelFn", "nzRouteFn"], exportAs: ["nzBreadcrumb"] }, { kind: "component", type: i10.NzBreadCrumbItemComponent, selector: "nz-breadcrumb-item", inputs: ["nzOverlay"], exportAs: ["nzBreadcrumbItem"] }, { kind: "ngmodule", type: NzDropDownModule }, { kind: "directive", type: i4$2.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "component", type: i4$2.NzMenuItemComponent, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i4$2.NzMenuDividerDirective, selector: "[nz-menu-divider]", exportAs: ["nzMenuDivider"] }, { kind: "component", type: i4$2.NzMenuGroupComponent, selector: "[nz-menu-group]", inputs: ["nzTitle"], exportAs: ["nzMenuGroup"] }, { kind: "component", type: i5$3.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "ngmodule", type: NzModalModule }, { kind: "ngmodule", type: NzDrawerModule }, { kind: "component", type: i14.NzDrawerComponent, selector: "nz-drawer", inputs: ["nzContent", "nzCloseIcon", "nzClosable", "nzMaskClosable", "nzMask", "nzCloseOnNavigation", "nzNoAnimation", "nzKeyboard", "nzTitle", "nzExtra", "nzFooter", "nzPlacement", "nzSize", "nzMaskStyle", "nzBodyStyle", "nzWrapClassName", "nzWidth", "nzHeight", "nzZIndex", "nzOffsetX", "nzOffsetY", "nzVisible"], outputs: ["nzOnViewInit", "nzOnClose", "nzVisibleChange"], exportAs: ["nzDrawer"] }, { kind: "directive", type: i14.NzDrawerContentDirective, selector: "[nzDrawerContent]", exportAs: ["nzDrawerContent"] }, { kind: "ngmodule", type: NzProgressModule }, { kind: "component", type: i18$1.NzProgressComponent, selector: "nz-progress", inputs: ["nzShowInfo", "nzWidth", "nzStrokeColor", "nzSize", "nzFormat", "nzSuccessPercent", "nzPercent", "nzStrokeWidth", "nzGapDegree", "nzStatus", "nzType", "nzGapPosition", "nzStrokeLinecap", "nzSteps"], exportAs: ["nzProgress"] }, { kind: "ngmodule", type: NzTagModule }, { kind: "component", type: i11.NzTagComponent, selector: "nz-tag", inputs: ["nzMode", "nzColor", "nzChecked", "nzBordered"], outputs: ["nzOnClose", "nzCheckedChange"], exportAs: ["nzTag"] }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "directive", type: i8.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "ngmodule", type: NzEmptyModule }, { kind: "ngmodule", type: NzDividerModule }, { kind: "component", type: i21.NzDividerComponent, selector: "nz-divider", inputs: ["nzText", "nzType", "nzOrientation", "nzVariant", "nzDashed", "nzPlain"], exportAs: ["nzDivider"] }, { kind: "ngmodule", type: NzSwitchModule }, { kind: "component", type: i13$2.NzSwitchComponent, selector: "nz-switch", inputs: ["nzLoading", "nzDisabled", "nzControl", "nzCheckedChildren", "nzUnCheckedChildren", "nzSize", "nzId"], exportAs: ["nzSwitch"] }, { kind: "ngmodule", type: NzSelectModule }, { kind: "component", type: i13$1.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i13$1.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }, { kind: "ngmodule", type: NzCheckboxModule }, { kind: "component", type: i3$2.NzCheckboxComponent, selector: "[nz-checkbox]", inputs: ["nzValue", "nzAutoFocus", "nzDisabled", "nzIndeterminate", "nzChecked", "nzId", "nzName"], outputs: ["nzCheckedChange"], exportAs: ["nzCheckbox"] }, { kind: "pipe", type: FormatBytesPipe, name: "formatBytes" }, { kind: "directive", type: AutoFocusDirective, selector: "[appAutoFocus]", inputs: ["appAutoFocus"] }, { kind: "component", type: ExtendViewFileContentComponent, selector: "extend-view-file-content", inputs: ["previewType", "previewContent"] }, { kind: "component", type: DriveShareModalComponent, selector: "lib-drive-share-modal", inputs: ["nodeId", "hideInheritanceToggle"] }, { kind: "component", type: DriveVersionModalComponent, selector: "lib-drive-version-modal", inputs: ["nodeId", "nodeName", "canEdit", "canDownload"], outputs: ["closed"] }, { kind: "component", type: DriveShareViewerComponent, selector: "lib-drive-share-viewer", inputs: ["token"], outputs: ["backToDrive"] }, { kind: "component", type: IconCopy, selector: "icon-copy", inputs: ["textToCopy", "tooltip", "size"] }, { kind: "component", type: DrivePermissionMatrixComponent, selector: "lib-drive-permission-matrix", inputs: ["viewMode", "scope", "customSpaceId", "rootFolderId", "rootNodeId", "initialTabIndex", "preselectedNodeIds"], outputs: ["saved", "closed"] }] });
|
|
36471
36741
|
}
|
|
36472
36742
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: DriveExplorerComponent, decorators: [{
|
|
36473
36743
|
type: Component,
|
|
@@ -36502,7 +36772,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
36502
36772
|
DriveShareViewerComponent,
|
|
36503
36773
|
IconCopy,
|
|
36504
36774
|
DrivePermissionMatrixComponent,
|
|
36505
|
-
], providers: [NzImageService], template: "@if (activeShareToken(); as sToken) {\n <lib-drive-share-viewer [token]=\"sToken\" (backToDrive)=\"closeEmbeddedShareViewer()\"></lib-drive-share-viewer>\n} @else {\n <div class=\"drive-shell\" [class.sidebar-wide]=\"sidebarWideMode() && showSidebarTree()\">\n <!-- SIDEBAR \u0110I\u1EC0U H\u01AF\u1EDANG & QUOTA -->\n <aside class=\"drive-sidebar\">\n <div nz-flex nzVertical nzGap=\"small\">\n <button\n nz-button\n nzType=\"primary\"\n nzBlock\n [disabled]=\"!drive.canUploadCurrentFolder()\"\n (click)=\"fileInput.click()\"\n >\n <nz-icon nzType=\"cloud-upload\"></nz-icon> T\u1EA3i t\u1EADp tin l\u00EAn\n </button>\n <input #fileInput type=\"file\" multiple hidden (change)=\"onFilesSelected($event)\" />\n <button\n nz-button\n nzType=\"default\"\n nzBlock\n [disabled]=\"!drive.canUploadCurrentFolder()\"\n (click)=\"openFolderDrawer('create')\"\n >\n <nz-icon nzType=\"folder-add\"></nz-icon> T\u1EA1o th\u01B0 m\u1EE5c m\u1EDBi\n </button>\n </div>\n <!-- THANH T\u00D9Y CH\u1ECCN HI\u1EC2N TH\u1ECA C\u00C2Y TH\u01AF M\u1EE4C B\u00CAN TR\u00C1I (SIDEBAR FOLDER TREE OPTIONS) -->\n <div class=\"sidebar-tree-header-bar\">\n <span class=\"sidebar-tree-header-title\">\n <nz-icon nzType=\"partition\" style=\"color: var(--primary-color, #1890ff)\"></nz-icon>\n <span>C\u00E2y th\u01B0 m\u1EE5c</span>\n </span>\n <div class=\"sidebar-tree-header-actions\">\n @if (showSidebarTree()) {\n <button\n type=\"button\"\n class=\"sidebar-tree-tool-btn\"\n nz-tooltip\n nzTooltipTitle=\"M\u1EDF r\u1ED9ng nhanh c\u00E1c nh\u00E1nh th\u01B0 m\u1EE5c\"\n (click)=\"expandAllSidebarTreeNodes()\"\n >\n <nz-icon nzType=\"node-expand\"></nz-icon>\n </button>\n <button\n type=\"button\"\n class=\"sidebar-tree-tool-btn\"\n nz-tooltip\n nzTooltipTitle=\"Thu g\u1ECDn c\u00E1c nh\u00E1nh th\u01B0 m\u1EE5c\"\n (click)=\"collapseAllSidebarTreeNodes()\"\n >\n <nz-icon nzType=\"node-collapse\"></nz-icon>\n </button>\n <button\n type=\"button\"\n class=\"sidebar-tree-tool-btn\"\n nz-tooltip\n nzTooltipTitle=\"L\u00E0m m\u1EDBi c\u00E2y th\u01B0 m\u1EE5c\"\n (click)=\"refreshAllExpandedSidebarTrees()\"\n >\n <nz-icon nzType=\"reload\"></nz-icon>\n </button>\n <button\n type=\"button\"\n class=\"sidebar-tree-tool-btn\"\n [class.active]=\"sidebarWideMode()\"\n nz-tooltip\n [nzTooltipTitle]=\"\n sidebarWideMode() ? 'Thu g\u1ECDn \u0111\u1ED9 r\u1ED9ng c\u1ED9t tr\u00E1i' : 'M\u1EDF r\u1ED9ng \u0111\u1ED9 r\u1ED9ng c\u1ED9t tr\u00E1i \u0111\u1EC3 xem c\u00E2y th\u01B0 m\u1EE5c r\u00F5 h\u01A1n'\n \"\n (click)=\"onToggleSidebarWideMode()\"\n >\n <nz-icon nzType=\"column-width\"></nz-icon>\n </button>\n }\n <nz-switch\n nzSize=\"small\"\n [ngModel]=\"showSidebarTree()\"\n (ngModelChange)=\"onToggleSidebarTree($event)\"\n nz-tooltip\n nzTooltipTitle=\"B\u1EADt / T\u1EAFt hi\u1EC3n th\u1ECB c\u00E2y th\u01B0 m\u1EE5c tr\u1EF1c ti\u1EBFp b\u00EAn tr\u00E1i\"\n ></nz-switch>\n </div>\n </div>\n\n @if (showSidebarTree()) {\n <div class=\"sidebar-tree-filter-box\">\n <nz-input-group [nzPrefix]=\"sidebarFilterPrefixTpl\" [nzSuffix]=\"sidebarFilterClearTpl\" nzSize=\"small\">\n <input\n nz-input\n type=\"text\"\n placeholder=\"L\u1ECDc nhanh th\u01B0 m\u1EE5c tr\u00EAn c\u00E2y...\"\n [ngModel]=\"sidebarTreeFilter()\"\n (ngModelChange)=\"onSidebarTreeFilterChange($event)\"\n />\n </nz-input-group>\n <ng-template #sidebarFilterPrefixTpl>\n <nz-icon nzType=\"filter\" style=\"color: var(--app-text-muted, #94a3b8); font-size: 12px\"></nz-icon>\n </ng-template>\n <ng-template #sidebarFilterClearTpl>\n @if (sidebarTreeFilter()) {\n <nz-icon\n nzType=\"close-circle\"\n nzTheme=\"fill\"\n class=\"cursor-pointer\"\n style=\"color: var(--app-text-muted, #94a3b8); font-size: 12px\"\n (click)=\"onSidebarTreeFilterChange('')\"\n ></nz-icon>\n }\n </ng-template>\n </div>\n }\n\n <nav class=\"drive-nav\">\n <!-- 1. DRIVE C\u00C1 NH\u00C2N + C\u00C2Y TH\u01AF M\u1EE4C CON -->\n <div class=\"nav-item-with-tree\">\n <a\n [class.active]=\"drive.currentViewMode() === 'MY_DRIVE' && (!drive.currentFolderId() || !showSidebarTree())\"\n [class.space-has-active-child]=\"\n drive.currentViewMode() === 'MY_DRIVE' && !!drive.currentFolderId() && showSidebarTree()\n \"\n [class.nav-drop-active]=\"dragOverNavSpace() === 'MY_DRIVE'\"\n (click)=\"switchView('MY_DRIVE')\"\n (dragover)=\"onNavSpaceDragOver($event, 'MY_DRIVE')\"\n (dragleave)=\"onNavSpaceDragLeave('MY_DRIVE')\"\n (drop)=\"onNavSpaceDrop($event, 'MY_DRIVE')\"\n >\n @if (showSidebarTree()) {\n <button\n type=\"button\"\n class=\"nav-caret-btn\"\n (click)=\"toggleSidebarSpaceTree($event, 'MY_DRIVE')\"\n [title]=\"\n isSidebarSpaceExpanded('MY_DRIVE') ? 'Thu g\u1ECDn c\u00E2y Drive c\u00E1 nh\u00E2n' : 'M\u1EDF c\u00E2y th\u01B0 m\u1EE5c Drive c\u00E1 nh\u00E2n'\n \"\n >\n <nz-icon\n [nzType]=\"\n isSidebarSpaceLoading('MY_DRIVE')\n ? 'loading'\n : isSidebarSpaceExpanded('MY_DRIVE')\n ? 'caret-down'\n : 'caret-right'\n \"\n ></nz-icon>\n </button>\n }\n <nz-icon nzType=\"hdd\"></nz-icon>\n <span style=\"flex: 1\">Drive c\u00E1 nh\u00E2n</span>\n </a>\n <ng-container *ngTemplateOutlet=\"sidebarSpaceTreeTpl; context: { spaceKey: 'MY_DRIVE' }\"></ng-container>\n </div>\n\n <!-- 2. T\u00C0I LI\u1EC6U \u0110\u01A0N V\u1ECA & C\u00C1C M\u1EE4C T\u00D9Y CH\u1EC8NH (CUSTOM SPACES) + C\u00C2Y TH\u01AF M\u1EE4C CON -->\n <div class=\"org-nav-group\">\n <div class=\"nav-item-with-tree\">\n <a\n [class.active]=\"\n drive.currentViewMode() === 'ORG_DRIVE' && (!drive.currentFolderId() || !showSidebarTree())\n \"\n [class.space-has-active-child]=\"\n drive.currentViewMode() === 'ORG_DRIVE' && !!drive.currentFolderId() && showSidebarTree()\n \"\n [class.nav-drop-active]=\"dragOverNavSpace() === 'ORG_DRIVE'\"\n (click)=\"switchView('ORG_DRIVE')\"\n (dragover)=\"onNavSpaceDragOver($event, 'ORG_DRIVE')\"\n (dragleave)=\"onNavSpaceDragLeave('ORG_DRIVE')\"\n (drop)=\"onNavSpaceDrop($event, 'ORG_DRIVE')\"\n >\n @if (showSidebarTree()) {\n <button\n type=\"button\"\n class=\"nav-caret-btn\"\n (click)=\"toggleSidebarSpaceTree($event, 'ORG_DRIVE')\"\n [title]=\"\n isSidebarSpaceExpanded('ORG_DRIVE')\n ? 'Thu g\u1ECDn c\u00E2y T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB'\n : 'M\u1EDF c\u00E2y th\u01B0 m\u1EE5c T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB'\n \"\n >\n <nz-icon\n [nzType]=\"\n isSidebarSpaceLoading('ORG_DRIVE')\n ? 'loading'\n : isSidebarSpaceExpanded('ORG_DRIVE')\n ? 'caret-down'\n : 'caret-right'\n \"\n ></nz-icon>\n </button>\n }\n <nz-icon nzType=\"apartment\"></nz-icon>\n <span style=\"flex: 1\">T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB</span>\n @if (drive.isCurrentUserAdmin()) {\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n nz-tooltip\n nzTooltipTitle=\"Th\u00EAm m\u1EE5c t\u00F9y ch\u1EC9nh b\u00EAn d\u01B0\u1EDBi T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"\n (click)=\"$event.stopPropagation(); openCustomSpaceDrawer('create')\"\n >\n <nz-icon nzType=\"plus\"></nz-icon>\n </button>\n }\n </a>\n <ng-container *ngTemplateOutlet=\"sidebarSpaceTreeTpl; context: { spaceKey: 'ORG_DRIVE' }\"></ng-container>\n </div>\n\n <!-- DANH S\u00C1CH C\u00C1C M\u1EE4C CUSTOM B\u00CAN D\u01AF\u1EDAI \"T\u00C0I LI\u1EC6U \u0110\u01A0N V\u1ECA\" (VD: \"T\u00E0i li\u1EC7u d\u1EF1 \u00E1n\") -->\n @for (sp of drive.customSpaces(); track sp.Id) {\n <div class=\"nav-item-with-tree\">\n <a\n class=\"custom-space-link\"\n [class.active]=\"\n drive.currentViewMode() === 'CUSTOM_SPACE' &&\n drive.currentCustomSpaceId() === sp.Id &&\n (!drive.currentFolderId() || drive.currentFolderId() === sp.Id || !showSidebarTree())\n \"\n [class.space-has-active-child]=\"\n drive.currentViewMode() === 'CUSTOM_SPACE' &&\n drive.currentCustomSpaceId() === sp.Id &&\n !!drive.currentFolderId() &&\n drive.currentFolderId() !== sp.Id &&\n showSidebarTree()\n \"\n [class.nav-drop-active]=\"dragOverCustomSpaceId() === sp.Id\"\n (click)=\"switchCustomSpace(sp)\"\n (dragover)=\"onCustomSpaceDragOver($event, sp)\"\n (dragleave)=\"onCustomSpaceDragLeave(sp)\"\n (drop)=\"onCustomSpaceDrop($event, sp)\"\n >\n @if (showSidebarTree()) {\n <button\n type=\"button\"\n class=\"nav-caret-btn\"\n (click)=\"toggleSidebarSpaceTree($event, 'CUSTOM:' + sp.Id)\"\n [title]=\"\n isSidebarSpaceExpanded('CUSTOM:' + sp.Id) ? 'Thu g\u1ECDn c\u00E2y ' + sp.Name : 'M\u1EDF c\u00E2y th\u01B0 m\u1EE5c ' + sp.Name\n \"\n >\n <nz-icon\n [nzType]=\"\n isSidebarSpaceLoading('CUSTOM:' + sp.Id)\n ? 'loading'\n : isSidebarSpaceExpanded('CUSTOM:' + sp.Id)\n ? 'caret-down'\n : 'caret-right'\n \"\n ></nz-icon>\n </button>\n }\n <nz-icon [nzType]=\"sp.Icon || 'project'\"></nz-icon>\n <span class=\"custom-space-title\" [title]=\"sp.Name\">{{ sp.Name }}</span>\n @if (sp.IsVisibleToAllUsers) {\n <nz-tag nzColor=\"cyan\" class=\"custom-space-badge\">All</nz-tag>\n }\n @if (sp.CanManage || drive.isCurrentUserAdmin()) {\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n (click)=\"$event.stopPropagation(); openCustomSpaceDrawer('edit', sp)\"\n >\n <nz-icon nzType=\"setting\"></nz-icon>\n </button>\n }\n </a>\n <ng-container\n *ngTemplateOutlet=\"sidebarSpaceTreeTpl; context: { spaceKey: 'CUSTOM:' + sp.Id }\"\n ></ng-container>\n </div>\n }\n </div>\n\n <!-- 3. \u0110\u01AF\u1EE2C CHIA S\u1EBA V\u1EDAI T\u00D4I + C\u00C2Y TH\u01AF M\u1EE4C CON -->\n <div class=\"nav-item-with-tree\">\n <a\n [class.active]=\"\n drive.currentViewMode() === 'SHARED_WITH_ME' && (!drive.currentFolderId() || !showSidebarTree())\n \"\n [class.space-has-active-child]=\"\n drive.currentViewMode() === 'SHARED_WITH_ME' && !!drive.currentFolderId() && showSidebarTree()\n \"\n (click)=\"switchView('SHARED_WITH_ME')\"\n >\n @if (showSidebarTree()) {\n <button\n type=\"button\"\n class=\"nav-caret-btn\"\n (click)=\"toggleSidebarSpaceTree($event, 'SHARED_WITH_ME')\"\n [title]=\"\n isSidebarSpaceExpanded('SHARED_WITH_ME')\n ? 'Thu g\u1ECDn c\u00E2y \u0110\u01B0\u1EE3c chia s\u1EBB v\u1EDBi t\u00F4i'\n : 'M\u1EDF c\u00E2y th\u01B0 m\u1EE5c \u0110\u01B0\u1EE3c chia s\u1EBB v\u1EDBi t\u00F4i'\n \"\n >\n <nz-icon\n [nzType]=\"\n isSidebarSpaceLoading('SHARED_WITH_ME')\n ? 'loading'\n : isSidebarSpaceExpanded('SHARED_WITH_ME')\n ? 'caret-down'\n : 'caret-right'\n \"\n ></nz-icon>\n </button>\n }\n <nz-icon nzType=\"share-alt\"></nz-icon>\n <span style=\"flex: 1\">\u0110\u01B0\u1EE3c chia s\u1EBB v\u1EDBi t\u00F4i</span>\n </a>\n <ng-container *ngTemplateOutlet=\"sidebarSpaceTreeTpl; context: { spaceKey: 'SHARED_WITH_ME' }\"></ng-container>\n </div>\n <a [class.active]=\"drive.currentViewMode() === 'RECENT'\" (click)=\"switchView('RECENT')\">\n <nz-icon nzType=\"clock-circle\"></nz-icon> G\u1EA7n \u0111\u00E2y\n </a>\n <a [class.active]=\"drive.currentViewMode() === 'STARRED'\" (click)=\"switchView('STARRED')\">\n <nz-icon nzType=\"star\"></nz-icon> C\u00F3 g\u1EAFn d\u1EA5u sao\n </a>\n <a [class.active]=\"drive.currentViewMode() === 'TRASH'\" (click)=\"switchView('TRASH')\">\n <nz-icon nzType=\"delete\"></nz-icon>\n <span style=\"flex: 1\">Th\u00F9ng r\u00E1c</span>\n @if (drive.currentViewMode() === \"TRASH\" && drive.items().length > 0) {\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n style=\"color: #ef4444\"\n nz-tooltip\n nzTooltipTitle=\"D\u1ECDn s\u1EA1ch th\u00F9ng r\u00E1c (X\u00F3a v\u0129nh vi\u1EC5n t\u1EA5t c\u1EA3)\"\n (click)=\"$event.stopPropagation(); onEmptyTrash()\"\n >\n <nz-icon nzType=\"clear\"></nz-icon>\n </button>\n }\n </a>\n </nav>\n\n <!-- TEMPLATE D\u00D9NG CHUNG HI\u1EC2N TH\u1ECA C\u00C2Y TH\u01AF M\u1EE4C \u0110A C\u1EA4P B\u00CAN TR\u00C1I CHO T\u1EEANG KH\u00D4NG GIAN -->\n <ng-template #sidebarSpaceTreeTpl let-spaceKey=\"spaceKey\">\n @if (isSidebarSpaceExpanded(spaceKey)) {\n @if (getSidebarVisibleTreeNodes(spaceKey); as treeNodes) {\n @if (treeNodes.length > 0) {\n <div class=\"sidebar-tree-container\">\n @for (vm of treeNodes; track vm.folderId) {\n <div\n class=\"sidebar-tree-node\"\n [class.active-tree-node]=\"vm.isActive\"\n [class.context-active-tree-node]=\"isRowActive(vm.node) || selectedRowId() === vm.folderId\"\n [class.active-breadcrumb-ancestor]=\"vm.isInActiveBreadcrumb && !vm.isActive\"\n [class.tree-drop-active]=\"dragOverSidebarFolderId() === vm.folderId\"\n [style.padding-left.px]=\"6 + vm.level * 14\"\n [attr.draggable]=\"vm.node.EffectiveAccess >= DriveAccessLevel.Editor\"\n (dragstart)=\"onSidebarTreeNodeDragStart($event, vm)\"\n (dragend)=\"onRowDragEnd()\"\n (dragover)=\"onSidebarTreeNodeDragOver($event, vm)\"\n (dragleave)=\"onSidebarTreeNodeDragLeave($event, vm)\"\n (drop)=\"onSidebarTreeNodeDrop($event, vm)\"\n (click)=\"onSidebarTreeNodeClick(vm)\"\n (contextmenu)=\"onContextMenu($event, menu, vm.node)\"\n >\n @if (!vm.hasKnownNoChildren) {\n <button\n type=\"button\"\n class=\"tree-node-caret\"\n (click)=\"toggleSidebarFolderNode($event, vm)\"\n [title]=\"vm.isExpanded ? 'Thu g\u1ECDn nh\u00E1nh' : 'M\u1EDF r\u1ED9ng th\u01B0 m\u1EE5c con'\"\n >\n <nz-icon\n [nzType]=\"vm.isLoading ? 'loading' : vm.isExpanded ? 'caret-down' : 'caret-right'\"\n ></nz-icon>\n </button>\n } @else {\n <span class=\"tree-node-caret-spacer\"></span>\n }\n\n <nz-icon\n class=\"tree-node-folder-icon\"\n [nzType]=\"vm.isExpanded || vm.isActive ? 'folder-open' : 'folder-fill'\"\n [style.color]=\"vm.isActive ? 'var(--primary-color, #1890ff)' : '#f59e0b'\"\n ></nz-icon>\n\n <span class=\"tree-node-label\" [title]=\"vm.node.Name\">\n {{ vm.node.Name }}\n </span>\n\n @if (vm.node.EffectiveAccess >= DriveAccessLevel.Uploader) {\n <button\n type=\"button\"\n class=\"tree-node-quick-btn\"\n title=\"T\u1EA1o th\u01B0 m\u1EE5c con trong '{{ vm.node.Name }}'\"\n (click)=\"openCreateSubfolderFromSidebar($event, vm)\"\n >\n <nz-icon nzType=\"plus\"></nz-icon>\n </button>\n }\n </div>\n }\n </div>\n } @else if (isSidebarSpaceLoading(spaceKey)) {\n <div class=\"sidebar-tree-empty\">\n <nz-icon nzType=\"loading\" style=\"margin-right: 4px\"></nz-icon> \u0110ang t\u1EA3i c\u00E2y th\u01B0 m\u1EE5c...\n </div>\n } @else if (sidebarTreeFilter().trim()) {\n <!-- <div class=\"sidebar-tree-empty\">Kh\u00F4ng kh\u1EDBp th\u01B0 m\u1EE5c n\u00E0o</div> -->\n } @else {\n <!-- <div class=\"sidebar-tree-empty\">Ch\u01B0a c\u00F3 th\u01B0 m\u1EE5c con</div> -->\n }\n }\n }\n </ng-template>\n <!-- KHUNG M\u1EAAU C\u00C2Y TH\u01AF M\u1EE4C (H\u1ED6 TR\u1EE2 K\u00C9O TH\u1EA2 V\u00C0O TH\u01AF M\u1EE4C \u0110\u00CDCH HO\u1EB6C B\u1EA4M T\u1EA0O NHANH) -->\n @if (drive.isCurrentUserAdmin()) {\n <div class=\"template-sidebar-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"margin-bottom: 6px\">\n <span style=\"font-size: 12px; font-weight: 600\">\n <nz-icon nzType=\"apartment\" style=\"color: #d97706; margin-right: 4px\"></nz-icon>\n M\u1EABu c\u00E2y th\u01B0 m\u1EE5c ({{ drive.folderTemplates().length }})\n </span>\n <button\n type=\"button\"\n nz-button\n nzType=\"link\"\n nzSize=\"small\"\n style=\"padding: 0 4px; font-size: 12px\"\n (click)=\"openTemplateDrawer('create')\"\n >\n <!-- nz-tooltip\n nzTooltipTitle=\"\u0110\u1ECBnh ngh\u0129a m\u1EABu c\u00E2y th\u01B0 m\u1EE5c m\u1EDBi\" -->\n <nz-icon nzType=\"plus\"></nz-icon> T\u1EA1o m\u1EABu\n </button>\n </div>\n\n @if (drive.folderTemplates().length === 0) {\n <div class=\"quota-sub\" style=\"font-size: 11px\">\n Ch\u01B0a c\u00F3 m\u1EABu n\u00E0o. B\u1EA5m <strong>+ T\u1EA1o m\u1EABu</strong> \u0111\u1EC3 \u0111\u1ECBnh ngh\u0129a c\u00E2y th\u01B0 m\u1EE5c chu\u1EA9n.\n </div>\n } @else {\n <div class=\"template-chip-list\">\n @for (tpl of drive.folderTemplates(); track tpl.Id) {\n <div\n class=\"template-drag-item\"\n draggable=\"true\"\n (dragstart)=\"onTemplateDragStart($event, tpl)\"\n (dragend)=\"onTemplateDragEnd()\"\n >\n <!-- nz-tooltip\n [nzTooltipTitle]=\"\n 'K\u00E9o th\u1EA3 m\u1EABu [' +\n tpl.Name +\n '] (' +\n tpl.TotalFolderCount +\n ' th\u01B0 m\u1EE5c) v\u00E0o m\u1ED9t Th\u01B0 m\u1EE5c \u0111\u00EDch tr\u00EAn b\u1EA3ng, ho\u1EB7c b\u1EA5m \u0111\u1EC3 t\u1EA1o t\u1EA1i \u0111\u00E2y'\n \" -->\n <div\n nz-flex\n nzAlign=\"center\"\n [nzGap]=\"6\"\n style=\"flex: 1; min-width: 0\"\n (click)=\"openFolderDrawer('create', undefined, tpl)\"\n >\n <nz-icon nzType=\"folder-add\" style=\"color: #d97706; font-size: 15px\"></nz-icon>\n <div style=\"flex: 1; min-width: 0\">\n <div class=\"template-item-title\">{{ tpl.Name }}</div>\n <div class=\"template-item-sub\">\n <code>{{ tpl.Code }}</code> \u2022 {{ tpl.TotalFolderCount }} m\u1EE5c\n @if (tpl.TotalPermissionCount > 0) {\n <span style=\"color: #0284c7; font-weight: 600\">\n \u2022 \uD83D\uDEE1 {{ tpl.TotalPermissionCount }} quy\u1EC1n</span\n >\n }\n </div>\n </div>\n </div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"2\">\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n [disabled]=\"!drive.canUploadCurrentFolder()\"\n (click)=\"$event.stopPropagation(); applyTemplateToTargetFolder(tpl, drive.currentFolderId())\"\n >\n <!-- nz-tooltip\n nzTooltipTitle=\"\u00C1p d\u1EE5ng ngay v\u00E0o th\u01B0 m\u1EE5c \u0111ang m\u1EDF\" -->\n <nz-icon nzType=\"thunderbolt\" style=\"color: var(--primary-color)\"></nz-icon>\n </button>\n @if (tpl.CanManage || drive.isCurrentUserAdmin()) {\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n (click)=\"$event.stopPropagation(); openTemplateDrawer('edit', tpl)\"\n >\n <!-- nz-tooltip\n nzTooltipTitle=\"S\u1EEDa / X\u00F3a m\u1EABu c\u00E2y th\u01B0 m\u1EE5c\" -->\n <nz-icon nzType=\"setting\"></nz-icon>\n </button>\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n <!-- H\u1ED8P C\u1EA4U H\u00CCNH CH\u1EBE \u0110\u1ED8 TH\u01AF M\u1EE4C V\u1EACT L\u00DD vs \u1EA2O H\u00D3A -->\n @if (drive.isCurrentUserAdmin() && false) {\n <div class=\"storage-mode-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <span style=\"font-size: 12px; font-weight: 600\">Th\u01B0 m\u1EE5c v\u1EADt l\u00FD (Disk)</span>\n <nz-switch\n nzSize=\"small\"\n [ngModel]=\"drive.usePhysicalFolders()\"\n (ngModelChange)=\"onTogglePhysicalMode($event)\"\n ></nz-switch>\n\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Khi b\u1EADt: T\u1EA1o c\u00E2y th\u01B0 m\u1EE5c & t\u00EAn file th\u1EADt 1-1 tr\u00EAn \u1ED5 c\u1EE9ng m\u00E1y ch\u1EE7\"\n -->\n </div>\n <div class=\"quota-sub\">\n Ch\u1EBF \u0111\u1ED9: <strong>{{ drive.usePhysicalFolders() ? \"V\u1EADt l\u00FD 1:1 (Physical)\" : \"\u1EA2o h\u00F3a (Virtual)\" }}</strong>\n </div>\n @if (drive.usePhysicalFolders()) {\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"margin-top: 8px\">\n <span style=\"font-size: 12px\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Khi b\u1EADt: T\u1EA5t c\u1EA3 User c\u00F9ng d\u00F9ng chung 1 RootPath duy nh\u1EA5t \u0111\u1EC3 l\u01B0u tr\u1EEF t\u00E0i li\u1EC7u d\u1EF1 \u00E1n\"\n -->\n D\u00F9ng chung RootPath\n </span>\n <nz-switch\n nzSize=\"small\"\n [ngModel]=\"drive.useSharedPhysicalRoot()\"\n (ngModelChange)=\"onToggleSharedRootMode($event)\"\n ></nz-switch>\n </div>\n <div class=\"quota-sub\">\n Ph\u1EA1m vi \u0111\u0129a:\n <strong>{{ drive.useSharedPhysicalRoot() ? \"Chung to\u00E0n d\u1EF1 \u00E1n\" : \"T\u00E1ch theo t\u1EEBng User\" }}</strong>\n </div>\n <div nz-flex nzVertical [nzGap]=\"6\" style=\"margin-top: 8px\">\n <button nz-button nzType=\"dashed\" nzSize=\"small\" nzBlock (click)=\"onSyncPhysicalDisk()\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Qu\u00E9t c\u00E1c file/th\u01B0 m\u1EE5c copy tr\u1EF1c ti\u1EBFp tr\u00EAn \u1ED5 \u0111\u0129a Server \u0111\u1EC3 n\u1EA1p v\u00E0o Drive\"\n -->\n <nz-icon nzType=\"sync\"></nz-icon> \u0110\u1ED3ng b\u1ED9 t\u1EEB \u1ED5 \u0111\u0129a\n </button>\n <button nz-button nzType=\"default\" nzSize=\"small\" nzBlock (click)=\"openRelocateDrawer(null)\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"\u0110\u1ED5i \u0111\u01B0\u1EDDng d\u1EABn RootPath ho\u1EB7c \u00E1nh x\u1EA1 sang \u1ED5 c\u1EE9ng l\u01B0u tr\u1EEF kh\u00E1c\"\n -->\n <nz-icon nzType=\"folder-open\"></nz-icon> \u0110\u1ED5i RootPath / \u1ED4 \u0111\u0129a\n </button>\n </div>\n }\n </div>\n }\n <!-- H\u1ED8P TI\u1EBEN TR\u00CCNH UPLOAD (H\u1ED6 TR\u1EE2 T\u1EA2I TI\u1EBEP KHI L\u1ED6I / T\u1EA0M D\u1EEANG / H\u1EE6Y) -->\n @if (drive.userUploadQueue().length > 0) {\n <div class=\"upload-queue-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"margin-bottom: 6px\">\n <strong>Ti\u1EBFn tr\u00ECnh t\u1EA3i l\u00EAn ({{ drive.userUploadQueue().length }})</strong>\n <a (click)=\"drive.clearCompletedUploads()\" style=\"font-size: 12px\">\u1EA8n \u0111\u00E3 xong</a>\n </div>\n <input #resumeFileInput type=\"file\" hidden (change)=\"onResumeFileSelected($event)\" />\n @for (task of drive.userUploadQueue(); track task.id) {\n <div class=\"upload-task-row\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" [nzGap]=\"4\">\n <div class=\"upload-task-name\" [title]=\"task.fileName\">{{ task.fileName }}</div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"2\">\n @if (task.status === \"uploading\" && (task.fileSize || 0) >= 20971520) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n (click)=\"drive.pauseUploadTask(task.id)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"T\u1EA1m d\u1EEBng t\u1EA3i l\u00EAn\"\n -->\n <nz-icon nzType=\"pause-circle\"></nz-icon>\n </button>\n }\n @if (task.status === \"error\" || task.status === \"paused\") {\n <button\n type=\"button\"\n nz-button\n nzType=\"link\"\n nzSize=\"small\"\n style=\"padding: 0 4px; font-size: 12px; font-weight: 600\"\n (click)=\"onResumeUploadClick(task, resumeFileInput)\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"task.errorMessage || 'T\u1EA3i l\u00EAn ti\u1EBFp t\u1EEB ph\u1EA7n tr\u0103m \u0111\u00E3 l\u01B0u (Resume Upload)'\"\n -->\n <nz-icon nzType=\"reload\"></nz-icon> T\u1EA3i ti\u1EBFp\n </button>\n }\n @if (task.status !== \"uploading\") {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n style=\"padding: 0 4px\"\n (click)=\"drive.removeUploadTask(task.id)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"X\u00F3a kh\u1ECFi danh s\u00E1ch & h\u1EE7y phi\u00EAn t\u1EA1m\"\n -->\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n }\n </div>\n </div>\n <nz-progress\n [nzPercent]=\"task.progress\"\n nzSize=\"small\"\n [nzStatus]=\"\n task.status === 'error'\n ? 'exception'\n : task.status === 'success'\n ? 'success'\n : task.status === 'paused'\n ? 'normal'\n : 'active'\n \"\n ></nz-progress>\n @if (task.status === \"error\") {\n <div style=\"font-size: 11px; color: #ef4444; margin-top: 2px\">\n {{ task.errorMessage || \"B\u1ECB ng\u1EAFt k\u1EBFt n\u1ED1i.\" }} \u2014 B\u1EA5m <strong>T\u1EA3i ti\u1EBFp</strong> \u0111\u1EC3 n\u1ED1i l\u1EA1i t\u1EEB\n {{ task.progress }}%.\n </div>\n }\n @if (task.status === \"paused\") {\n <div style=\"font-size: 11px; color: #f59e0b; margin-top: 2px\">\n \u0110\u00E3 t\u1EA1m d\u1EEBng \u1EDF {{ task.progress }}% \u2014 B\u1EA5m <strong>T\u1EA3i ti\u1EBFp</strong> \u0111\u1EC3 ti\u1EBFp t\u1EE5c.\n </div>\n }\n </div>\n }\n </div>\n }\n <!-- H\u1ED8P TI\u1EBEN TR\u00CCNH DOWNLOAD (H\u1ED6 TR\u1EE2 THEO D\u00D5I % & H\u1EE6Y T\u1EA2I T\u1EE8C TH\u1EDCI \u0110\u1ED0I V\u1EDAI FILE N\u1EB6NG) -->\n @if (drive.userDownloadQueue().length > 0) {\n <div class=\"upload-queue-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"margin-bottom: 6px\">\n <strong>Ti\u1EBFn tr\u00ECnh t\u1EA3i xu\u1ED1ng ({{ drive.userDownloadQueue().length }})</strong>\n <a (click)=\"drive.clearCompletedDownloads()\" style=\"font-size: 12px\">\u1EA8n \u0111\u00E3 xong</a>\n </div>\n @for (dlTask of drive.userDownloadQueue(); track dlTask.id) {\n <div class=\"upload-task-row\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" [nzGap]=\"4\">\n <div class=\"upload-task-name\" [title]=\"dlTask.fileName\">{{ dlTask.fileName }}</div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"2\">\n @if (dlTask.status === \"downloading\") {\n <button\n type=\"button\"\n nz-button\n nzType=\"link\"\n nzDanger\n nzSize=\"small\"\n style=\"padding: 0 4px; font-size: 12px; font-weight: 600\"\n (click)=\"drive.cancelDownloadTask(dlTask.id)\"\n >\n <nz-icon nzType=\"stop\"></nz-icon> H\u1EE7y t\u1EA3i\n </button>\n } @else {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n style=\"padding: 0 4px\"\n (click)=\"drive.removeDownloadTask(dlTask.id)\"\n >\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n }\n </div>\n </div>\n <nz-progress\n [nzPercent]=\"dlTask.progress\"\n nzSize=\"small\"\n [nzStatus]=\"\n dlTask.status === 'error' || dlTask.status === 'cancelled'\n ? 'exception'\n : dlTask.status === 'success'\n ? 'success'\n : 'active'\n \"\n ></nz-progress>\n <div style=\"font-size: 11px; color: var(--app-text-muted, #64748b); margin-top: 2px\">\n @if (dlTask.status === \"downloading\") {\n \u0110ang t\u1EA3i: {{ dlTask.loadedBytes | formatBytes }}\n @if (dlTask.totalBytes) {\n / {{ dlTask.totalBytes | formatBytes }}\n }\n } @else if (dlTask.status === \"cancelled\") {\n <span style=\"color: #f59e0b\">\u0110\u00E3 h\u1EE7y t\u1EA3i xu\u1ED1ng gi\u1EEFa ch\u1EEBng.</span>\n } @else if (dlTask.status === \"error\") {\n <span style=\"color: #ef4444\">{{ dlTask.errorMessage || \"L\u1ED7i khi t\u1EA3i xu\u1ED1ng.\" }}</span>\n } @else {\n <span style=\"color: #10b981\">\u0110\u00E3 t\u1EA3i xu\u1ED1ng ho\u00E0n t\u1EA5t.</span>\n }\n </div>\n </div>\n }\n </div>\n }\n <div class=\"quota-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <div class=\"quota-title\" style=\"margin-bottom: 0\">\n <nz-icon nzType=\"cloud\"></nz-icon> Dung l\u01B0\u1EE3ng ({{ drive.quotaPercent() }}%)\n </div>\n @if (drive.isCurrentUserAdmin()) {\n <nz-tag nzColor=\"gold\" style=\"margin-right: 0; font-size: 11px\">Admin</nz-tag>\n }\n </div>\n <nz-progress [nzPercent]=\"drive.quotaPercent()\" nzSize=\"small\" [nzShowInfo]=\"false\"></nz-progress>\n <div class=\"quota-sub\">{{ drive.usedBytes() | formatBytes }} / {{ drive.quotaLimitBytes() | formatBytes }}</div>\n @if (drive.isCurrentUserAdmin()) {\n <button\n nz-button\n nzType=\"dashed\"\n nzSize=\"small\"\n nzBlock\n style=\"margin-top: 8px\"\n (click)=\"openPermissionMatrixDrawer(drive.currentFolderId())\"\n >\n <nz-icon nzType=\"table\"></nz-icon>\n Ma tr\u1EADn ph\u00E2n quy\u1EC1n\n </button>\n <button\n nz-button\n nzType=\"dashed\"\n nzSize=\"small\"\n nzBlock\n style=\"margin-top: 8px\"\n (click)=\"openQuotaAdminDrawer()\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"\u0110\u1EB7t Quota m\u1EB7c \u0111\u1ECBnh to\u00E0n h\u1EC7 th\u1ED1ng v\u00E0 thi\u1EBFt l\u1EADp Quota ri\u00EAng cho t\u1EEBng ng\u01B0\u1EDDi d\u00F9ng (Ch\u1EC9 Admin)\"\n -->\n <nz-icon nzType=\"setting\"></nz-icon> Qu\u1EA3n l\u00FD Quota (Admin)\n </button>\n }\n </div>\n </aside>\n <!-- KHU V\u1EF0C N\u1ED8I DUNG CH\u00CDNH (H\u1ED6 TR\u1EE2 K\u00C9O TH\u1EA2 FILE & FOLDER T\u1EEA FILE EXPLORER) -->\n <main\n class=\"drive-main\"\n [class.external-drag-active]=\"isExternalFileDragging()\"\n (dragenter)=\"onMainDragEnter($event)\"\n (dragover)=\"onMainDragOver($event)\"\n (dragleave)=\"onMainDragLeave($event)\"\n (drop)=\"onMainDrop($event)\"\n >\n @if (isExternalFileDragging()) {\n <div class=\"external-drop-banner\">\n <nz-icon nzType=\"cloud-upload\" class=\"drop-banner-icon\"></nz-icon>\n <div>\n <div class=\"drop-banner-title\">\n @if (dragOverFolderName(); as targetName) {\n Th\u1EA3 t\u1EADp tin / th\u01B0 m\u1EE5c t\u1EEB m\u00E1y t\u00EDnh \u0111\u1EC3 t\u1EA3i th\u1EB3ng v\u00E0o th\u01B0 m\u1EE5c: <strong>\"{{ targetName }}\"</strong>\n } @else {\n Th\u1EA3 t\u1EADp tin ho\u1EB7c th\u01B0 m\u1EE5c t\u1EEB File Explorer v\u00E0o \u0111\u00E2y \u0111\u1EC3 t\u1EA3i l\u00EAn th\u01B0 m\u1EE5c hi\u1EC7n t\u1EA1i\n }\n </div>\n <div class=\"drop-banner-sub\">\n H\u1ED7 tr\u1EE3 k\u00E9o th\u1EA3 nhi\u1EC1u file c\u00F9ng l\u00FAc ho\u1EB7c k\u00E9o nguy\u00EAn c\u1EA3 c\u00E2y th\u01B0 m\u1EE5c t\u1EEB m\u00E1y t\u00EDnh (T\u1EF1 \u0111\u1ED9ng Chunk Upload n\u1EBFu\n file ≥ 20MB)\n </div>\n </div>\n </div>\n }\n <!-- TOOLBAR + PAGINATION -->\n <header class=\"drive-toolbar\">\n <div>\n <nz-breadcrumb>\n <nz-breadcrumb-item\n (click)=\"navigateToFolder(null)\"\n (dragover)=\"onBreadcrumbDragOver($event, '__ROOT__')\"\n (dragleave)=\"onBreadcrumbDragLeave('__ROOT__')\"\n (drop)=\"onBreadcrumbDrop($event, null)\"\n [class.bc-drop-active]=\"dragOverBreadcrumbId() === '__ROOT__'\"\n class=\"cursor-pointer\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"K\u00E9o th\u1EA3 m\u1EE5c v\u00E0o \u0111\u00E2y \u0111\u1EC3 chuy\u1EC3n v\u1EC1 th\u01B0 m\u1EE5c g\u1ED1c\"\n -->\n <nz-icon nzType=\"home\"></nz-icon>\n {{ getRootTitle() }}\n </nz-breadcrumb-item>\n @for (bc of drive.breadcrumbs(); track bc.Id) {\n @if (drive.currentViewMode() !== \"CUSTOM_SPACE\" || bc.Id !== drive.currentCustomSpaceId()) {\n <nz-breadcrumb-item\n (click)=\"navigateToFolder(bc.Id)\"\n (dragover)=\"onBreadcrumbDragOver($event, bc.Id)\"\n (dragleave)=\"onBreadcrumbDragLeave(bc.Id)\"\n (drop)=\"onBreadcrumbDrop($event, bc.Id)\"\n [class.bc-drop-active]=\"dragOverBreadcrumbId() === bc.Id\"\n class=\"cursor-pointer\"\n >\n {{ bc.Name }}\n </nz-breadcrumb-item>\n }\n }\n </nz-breadcrumb>\n <!-- @if (drive.isCurrentUserAdmin() && drive.usePhysicalFolders() && drive.currentPhysicalPath(); as physPath) {\n <div class=\"physical-path-bar\">\n <nz-icon nzType=\"folder-open\"></nz-icon>\n <span>\n \u0110\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD: <code>{{ physPath }}</code>\n </span>\n <icon-copy [textToCopy]=\"physPath\" tooltip=\"Sao ch\u00E9p \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD tr\u00EAn Server\"></icon-copy>\n </div>\n } -->\n </div>\n <div class=\"toolbar-actions\">\n <nz-input-group [nzSuffix]=\"suffixIconSearch\" style=\"width: 250px\">\n <input\n type=\"text\"\n nz-input\n placeholder=\"T\u00ECm ki\u1EBFm t\u00E0i li\u1EC7u, th\u01B0 m\u1EE5c...\"\n [ngModel]=\"drive.keyword()\"\n (ngModelChange)=\"drive.keyword.set($event)\"\n (keyup.enter)=\"onSearch()\"\n />\n </nz-input-group>\n <ng-template #suffixIconSearch>\n <nz-icon nzType=\"search\" class=\"cursor-pointer\" (click)=\"onSearch()\"></nz-icon>\n </ng-template>\n <label\n nz-checkbox\n [ngModel]=\"drive.includeSubfolders()\"\n (ngModelChange)=\"onToggleIncludeSubfolders($event)\"\n style=\"user-select: none; white-space: nowrap; font-size: 13px\"\n nz-tooltip\n nzTooltipTitle=\"T\u00ECm c\u1EA3 th\u01B0 m\u1EE5c con\"\n >\n </label>\n <!-- T\u00D9Y CH\u1ECCN CH\u1EBE \u0110\u1ED8 XEM: C\u00C2Y TH\u01AF M\u1EE4C B\u00CAN TR\u00C1I + B\u1EA2NG PH\u1EB2NG vs TREE TABLE -->\n <div class=\"view-mode-switch\" nz-flex nzAlign=\"center\" [nzGap]=\"4\">\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"showSidebarTree() ? 'primary' : 'default'\"\n (click)=\"onToggleSidebarTree(!showSidebarTree())\"\n nz-tooltip\n [nzTooltipTitle]=\"\n showSidebarTree()\n ? '\u0110ang b\u1EADt C\u00E2y th\u01B0 m\u1EE5c b\u00EAn tr\u00E1i (Nh\u1EA5n \u0111\u1EC3 \u1EA9n)'\n : 'Hi\u1EC3n th\u1ECB C\u00E2y th\u01B0 m\u1EE5c tr\u1EF1c ti\u1EBFp \u1EDF c\u1ED9t b\u00EAn tr\u00E1i'\n \"\n >\n <nz-icon nzType=\"partition\"></nz-icon>\n </button>\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"!drive.isTreeTableView() ? 'primary' : 'default'\"\n (click)=\"onToggleTreeTableView(false)\"\n nz-tooltip\n nzTooltipTitle=\"Flat Table\"\n >\n <nz-icon nzType=\"unordered-list\"></nz-icon>\n <!-- B\u1EA3ng ph\u1EB3ng -->\n </button>\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"drive.isTreeTableView() ? 'primary' : 'default'\"\n (click)=\"onToggleTreeTableView(true)\"\n nz-tooltip\n nzTooltipTitle=\"Tree Table\"\n >\n <nz-icon nzType=\"apartment\"></nz-icon>\n <!-- Tree Table -->\n </button>\n @if (drive.isTreeTableView()) {\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"dashed\"\n (click)=\"expandAllTreeFolders()\"\n nz-tooltip\n nzTooltipTitle=\"M\u1EDF r\u1ED9ng\"\n >\n <nz-icon nzType=\"node-expand\"></nz-icon>\n </button>\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"dashed\"\n (click)=\"collapseAllTreeFolders()\"\n nz-tooltip\n nzTooltipTitle=\"Thu g\u1ECDn\"\n >\n <nz-icon nzType=\"node-collapse\"></nz-icon>\n </button>\n }\n </div>\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n nz-tooltip\n [nzTooltipTitle]=\"drive.sortDesc() ? 'A \u2192 Z' : 'Z \u2192 A'\"\n (click)=\"toggleSortDirection()\"\n >\n <nz-icon [nzType]=\"drive.sortDesc() ? 'sort-descending' : 'sort-ascending'\"></nz-icon>\n </button>\n @if (drive.currentViewMode() === \"TRASH\") {\n <button\n type=\"button\"\n nz-button\n nzDanger\n nzType=\"primary\"\n nzSize=\"small\"\n [disabled]=\"drive.items().length === 0 || emptyingTrash()\"\n [nzLoading]=\"emptyingTrash()\"\n nz-tooltip\n nzTooltipTitle=\"X\u00F3a v\u0129nh vi\u1EC5n to\u00E0n b\u1ED9 c\u00E1c m\u1EE5c trong th\u00F9ng r\u00E1c v\u00E0 gi\u1EA3i ph\u00F3ng dung l\u01B0\u1EE3ng Quota\"\n (click)=\"onEmptyTrash()\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n D\u1ECDn s\u1EA1ch th\u00F9ng r\u00E1c\n @if (drive.totalCount() > 0) {\n <span>({{ drive.totalCount() }})</span>\n }\n </button>\n }\n <button\n nz-button\n nzType=\"default\"\n nzSize=\"small\"\n (click)=\"refreshExplorer()\"\n nz-tooltip\n nzTooltipTitle=\"L\u00E0m m\u1EDBi\"\n >\n <nz-icon nzType=\"reload\"></nz-icon>\n </button>\n <nz-pagination\n [nzSize]=\"'small'\"\n [nzPageIndex]=\"drive.pageIndex()\"\n [nzPageSize]=\"drive.pageSize()\"\n [nzTotal]=\"drive.totalCount()\"\n [nzShowSizeChanger]=\"true\"\n [nzPageSizeOptions]=\"AppGlobals.pageSizeOptions\"\n (nzPageIndexChange)=\"drive.loadNodes($event, drive.pageSize())\"\n (nzPageSizeChange)=\"drive.loadNodes(1, $event)\"\n >\n </nz-pagination>\n </div>\n </header>\n @if (drive.currentViewMode() === \"TRASH\" && drive.items().length > 0) {\n <div class=\"trash-info-banner\">\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-icon nzType=\"info-circle\" style=\"color: #ef4444; font-size: 16px\"></nz-icon>\n <span>\n C\u00E1c m\u1EE5c trong th\u00F9ng r\u00E1c v\u1EABn t\u00EDnh v\u00E0o dung l\u01B0\u1EE3ng h\u1EA1n ng\u1EA1ch (Quota) cho \u0111\u1EBFn khi b\u1ECB x\u00F3a v\u0129nh vi\u1EC5n.\n </span>\n </div>\n <button\n type=\"button\"\n nz-button\n nzDanger\n nzType=\"link\"\n nzSize=\"small\"\n style=\"font-weight: 600; padding: 0\"\n [nzLoading]=\"emptyingTrash()\"\n (click)=\"onEmptyTrash()\"\n >\n <nz-icon nzType=\"clear\"></nz-icon> D\u1ECDn s\u1EA1ch th\u00F9ng r\u00E1c ngay\n </button>\n </div>\n }\n <!-- THANH THAO T\u00C1C H\u00C0NG LO\u1EA0T KHI T\u00CDCH CH\u1ECCN NHI\u1EC0U FILE / FOLDER (BULK ACTION BAR) -->\n @if (checkedCount() > 0) {\n <div class=\"bulk-action-bar\">\n <div class=\"bulk-action-summary\">\n <label\n nz-checkbox\n [ngModel]=\"isAllCurrentPageChecked()\"\n [nzIndeterminate]=\"isCurrentPageIndeterminate()\"\n (ngModelChange)=\"onToggleCheckAllCurrentPage($event)\"\n ></label>\n <nz-tag nzColor=\"processing\" style=\"margin: 0; font-weight: 600\"> \u0110\u00E3 ch\u1ECDn {{ checkedCount() }} m\u1EE5c </nz-tag>\n <span class=\"bulk-action-meta\">\n (\n @if (checkedFolderCount() > 0) {\n <span>{{ checkedFolderCount() }} th\u01B0 m\u1EE5c</span>\n }\n @if (checkedFolderCount() > 0 && checkedFileCount() > 0) {\n <span>, </span>\n }\n @if (checkedFileCount() > 0) {\n <span>{{ checkedFileCount() }} t\u1EADp tin \u2022 {{ checkedTotalBytes() | formatBytes }}</span>\n }\n )\n </span>\n @if (!isAllCurrentPageChecked() && displayedTableItems().length > 0) {\n <a style=\"font-size: 12px; font-weight: 500\" (click)=\"onToggleCheckAllCurrentPage(true)\">\n Ch\u1ECDn t\u1EA5t c\u1EA3 trang ({{ displayedTableItems().length }})\n </a>\n }\n <a style=\"font-size: 12px; color: #ef4444\" (click)=\"clearCheckedSelection()\"> B\u1ECF ch\u1ECDn </a>\n </div>\n\n <div class=\"bulk-action-buttons\">\n @if (drive.currentViewMode() !== \"TRASH\") {\n @if (canBulkEditChecked()) {\n <button\n type=\"button\"\n nz-button\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Di chuy\u1EC3n to\u00E0n b\u1ED9 c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn sang th\u01B0 m\u1EE5c ho\u1EB7c kh\u00F4ng gian kh\u00E1c\"\n (click)=\"openBulkMoveDrawer()\"\n >\n <nz-icon nzType=\"drag\"></nz-icon> Di chuy\u1EC3n ({{ checkedCount() }})\n </button>\n }\n <button\n type=\"button\"\n nz-button\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Sao ch\u00E9p \u0111\u1EC7 quy c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn t\u1EDBi th\u01B0 m\u1EE5c kh\u00E1c\"\n (click)=\"openBulkCopyDrawer()\"\n >\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p ({{ checkedCount() }})\n </button>\n @if (canBulkManageChecked()) {\n <button\n type=\"button\"\n nz-button\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"G\u00E1n ho\u1EB7c thu h\u1ED3i quy\u1EC1n h\u00E0ng lo\u1EA1t cho c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn\"\n (click)=\"openBulkPermissionMatrixDrawer()\"\n >\n <nz-icon nzType=\"usergroup-add\"></nz-icon> Ph\u00E2n quy\u1EC1n ({{ checkedCount() }})\n </button>\n }\n @if (canBulkDownloadChecked()) {\n <button\n type=\"button\"\n nz-button\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"T\u1EA3i xu\u1ED1ng c\u00E1c t\u1EADp tin \u0111\u00E3 ch\u1ECDn\"\n (click)=\"onBulkDownloadChecked()\"\n >\n <nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng\n </button>\n }\n <button\n type=\"button\"\n nz-button\n nzSize=\"small\"\n [nzLoading]=\"bulkActionLoading()\"\n nz-tooltip\n [nzTooltipTitle]=\"\n allCheckedAreStarred() ? 'B\u1ECF d\u1EA5u sao c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn' : 'G\u1EAFn d\u1EA5u sao cho c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn'\n \"\n (click)=\"onBulkToggleStar()\"\n >\n <nz-icon nzType=\"star\" [nzTheme]=\"allCheckedAreStarred() ? 'fill' : 'outline'\"></nz-icon>\n {{ allCheckedAreStarred() ? \"B\u1ECF sao\" : \"G\u1EAFn sao\" }}\n </button>\n @if (canBulkEditChecked()) {\n <button\n type=\"button\"\n nz-button\n nzDanger\n nzType=\"primary\"\n nzSize=\"small\"\n [nzLoading]=\"bulkActionLoading()\"\n nz-tooltip\n nzTooltipTitle=\"Chuy\u1EC3n to\u00E0n b\u1ED9 c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn v\u00E0o th\u00F9ng r\u00E1c\"\n (click)=\"onBulkSoftDelete()\"\n >\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a v\u00E0o th\u00F9ng r\u00E1c ({{ checkedCount() }})\n </button>\n }\n } @else {\n @if (canBulkEditChecked()) {\n <button\n type=\"button\"\n nz-button\n nzType=\"primary\"\n nzSize=\"small\"\n [nzLoading]=\"bulkActionLoading()\"\n (click)=\"onBulkRestoreFromTrash()\"\n >\n <nz-icon nzType=\"rollback\"></nz-icon> Kh\u00F4i ph\u1EE5c ({{ checkedCount() }})\n </button>\n }\n @if (canBulkManageChecked()) {\n <button\n type=\"button\"\n nz-button\n nzDanger\n nzType=\"primary\"\n nzSize=\"small\"\n [nzLoading]=\"bulkActionLoading()\"\n (click)=\"onBulkPermanentDelete()\"\n >\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a v\u0129nh vi\u1EC5n ({{ checkedCount() }})\n </button>\n }\n }\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"B\u1ECF ch\u1ECDn t\u1EA5t c\u1EA3\"\n (click)=\"clearCheckedSelection()\"\n >\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </div>\n }\n <!-- DANH S\u00C1CH T\u1EACP TIN / TH\u01AF M\u1EE4C (H\u1ED6 TR\u1EE2 C\u1EA2 FLAT TABLE V\u00C0 TREE TABLE) -->\n <nz-table\n #explorerTable\n [nzData]=\"displayedTableItems()\"\n [nzLoading]=\"drive.loading()\"\n [nzBordered]=\"true\"\n [nzFrontPagination]=\"false\"\n [nzShowPagination]=\"false\"\n nzSize=\"small\"\n >\n <thead>\n <tr>\n <th nzWidth=\"40px\" class=\"text-center checkbox-col-th\" (click)=\"$event.stopPropagation()\">\n <label\n nz-checkbox\n [ngModel]=\"isAllCurrentPageChecked()\"\n [nzIndeterminate]=\"isCurrentPageIndeterminate()\"\n [nzDisabled]=\"displayedTableItems().length === 0\"\n (ngModelChange)=\"onToggleCheckAllCurrentPage($event)\"\n nz-tooltip\n nzTooltipTitle=\"Ch\u1ECDn / B\u1ECF ch\u1ECDn t\u1EA5t c\u1EA3 c\u00E1c d\u00F2ng tr\u00EAn trang n\u00E0y\"\n ></label>\n </th>\n <th nzWidth=\"45px\" class=\"text-center\">#</th>\n <th class=\"sortable-th\" (click)=\"onSortColumn('Name')\">\n <div class=\"th-sort-wrap\">\n <span>T\u00EAn t\u00E0i li\u1EC7u / Th\u01B0 m\u1EE5c</span>\n <span class=\"sort-icon\" [class.active]=\"drive.sortBy() === 'Name'\">\n <nz-icon\n [nzType]=\"\n drive.sortBy() === 'Name' ? (drive.sortDesc() ? 'sort-descending' : 'sort-ascending') : 'swap'\n \"\n ></nz-icon>\n </span>\n </div>\n </th>\n <!-- <th nzWidth=\"150px\" class=\"sortable-th\" (click)=\"onSortColumn('OwnerName')\">\n <div class=\"th-sort-wrap\">\n <span>Ch\u1EE7 s\u1EDF h\u1EEFu</span>\n @if (drive.sortBy() === \"OwnerName\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th> -->\n <th nzWidth=\"130px\" class=\"text-center sortable-th\" (click)=\"onSortColumn('AccessLevel')\">\n <div class=\"th-sort-wrap justify-center\">\n <span>Quy\u1EC1n truy c\u1EADp</span>\n @if (drive.sortBy() === \"AccessLevel\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"110px\" class=\"text-right sortable-th\" (click)=\"onSortColumn('SizeBytes')\">\n <div class=\"th-sort-wrap justify-end\">\n <span>K\u00EDch th\u01B0\u1EDBc</span>\n @if (drive.sortBy() === \"SizeBytes\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"100px\" class=\"text-center sortable-th\" (click)=\"onSortColumn('CreatedUser')\">\n <div class=\"th-sort-wrap justify-center\">\n <span>Ng\u01B0\u1EDDi t\u1EA1o</span>\n @if (drive.sortBy() === \"CreatedUser\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"145px\" class=\"text-center sortable-th\" (click)=\"onSortColumn('UpdatedDate')\">\n <div class=\"th-sort-wrap justify-center\">\n <span>C\u1EADp nh\u1EADt cu\u1ED1i</span>\n @if (drive.sortBy() === \"UpdatedDate\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <!-- <th nzWidth=\"210px\" class=\"text-center\">Thao t\u00E1c</th> -->\n </tr>\n </thead>\n <tbody>\n @for (item of explorerTable.data; track item.Id; let i = $index) {\n <tr\n [attr.data-node-id]=\"item.Id\"\n [attr.draggable]=\"drive.currentViewMode() !== 'TRASH' && item.EffectiveAccess >= DriveAccessLevel.Editor\"\n (dragstart)=\"onRowDragStart($event, item)\"\n (dragend)=\"onRowDragEnd()\"\n (dragover)=\"onRowDragOver($event, item)\"\n (dragleave)=\"onRowDragLeave($event, item)\"\n (drop)=\"onRowDrop($event, item)\"\n (click)=\"onRowSelect(item, $event, i)\"\n (dblclick)=\"onRowDoubleClick(item, $event)\"\n (contextmenu)=\"onContextMenu($event, menu, item)\"\n class=\"drive-row\"\n [class.row-checked]=\"isItemChecked(item.Id)\"\n [class.active]=\"isRowActive(item)\"\n [class.row-active]=\"isRowActive(item)\"\n [class.ant-table-row-selected]=\"isRowActive(item)\"\n [class.dragging-row]=\"draggedNode()?.Id === item.Id\"\n [class.drop-target-active]=\"dragOverFolderId() === item.Id\"\n >\n <td class=\"text-center checkbox-col-td\" (click)=\"onCheckboxCellClick($event, item, i)\">\n <label\n nz-checkbox\n [ngModel]=\"isItemChecked(item.Id)\"\n (ngModelChange)=\"onToggleItemCheck(item, $event, i)\"\n (click)=\"$event.stopPropagation()\"\n ></label>\n </td>\n <td class=\"text-center\">{{ i + 1 + (drive.pageIndex() - 1) * drive.pageSize() }}</td>\n <td\n [nzIndentSize]=\"drive.isTreeTableView() ? (item.treeLevel || 0) * 22 : 0\"\n [nzShowExpand]=\"drive.isTreeTableView() && isFolderLike(item) && !item.IsBrokenShortcut\"\n [nzExpand]=\"!!item.treeExpanded\"\n (nzExpandChange)=\"toggleExpandTreeFolder(item, $event)\"\n >\n <div class=\"node-name-cell\">\n <span class=\"node-icon-wrap\">\n <nz-icon\n [nzType]=\"isFolderLike(item) ? 'folder-fill' : getFileIcon(item)\"\n [style.color]=\"isFolderLike(item) ? '#f59e0b' : 'var(--primary-color)'\"\n class=\"node-icon\"\n ></nz-icon>\n @if (item.NodeType === DriveNodeType.Shortcut) {\n <span class=\"shortcut-badge\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'L\u1ED1i t\u1EAFt tr\u1ECF t\u1EDBi: ' + (item.ShortcutTargetName || item.Name)\"\n -->\n <nz-icon nzType=\"select\"></nz-icon>\n </span>\n }\n </span>\n <span\n class=\"node-title link-detail\"\n (click)=\"\n drive.isTreeTableView()\n ? toggleExpandTreeFolder(item, !item.treeExpanded)\n : onRowSingleClick(item, $event)\n \"\n >{{ item.Name }}</span\n >\n @if (drive.keyword().trim() && item.ParentFolderName && item.ParentId !== drive.currentFolderId()) {\n <nz-tag\n nzColor=\"default\"\n style=\"margin-left: 6px; cursor: pointer\"\n (click)=\"$event.stopPropagation(); navigateToFolder(item.ParentId || null)\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'\u0110ang n\u1EB1m trong th\u01B0 m\u1EE5c: ' + item.ParentFolderName + ' (Nh\u1EA5n \u0111\u1EC3 m\u1EDF th\u01B0 m\u1EE5c)'\"\n -->\n <nz-icon nzType=\"folder\"></nz-icon> {{ item.ParentFolderName }}\n </nz-tag>\n }\n @if (item.NodeType === DriveNodeType.Shortcut) {\n @if (item.IsBrokenShortcut) {\n <nz-tag nzColor=\"error\" style=\"margin-left: 6px\">M\u1EE5c g\u1ED1c \u0111\u00E3 x\u00F3a</nz-tag>\n } @else {\n <nz-tag nzColor=\"purple\" style=\"margin-left: 6px\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'\u0110\u00EDch: ' + (item.ShortcutTargetName || item.Name)\"\n -->\n <nz-icon nzType=\"link\"></nz-icon> L\u1ED1i t\u1EAFt\n </nz-tag>\n }\n }\n @if (item.IsStarred) {\n <nz-icon nzType=\"star\" nzTheme=\"fill\" style=\"color: #eab308; margin-left: 4px\"></nz-icon>\n }\n @if (item.IsShared) {\n <nz-tag nzColor=\"processing\" style=\"margin-left: 6px\">\u0110\u00E3 chia s\u1EBB</nz-tag>\n }\n @if (!item.InheritPermissions) {\n <nz-tag nzColor=\"warning\" nz-tooltip nzTooltipTitle=\"\u0110\u00E3 ng\u1EAFt k\u1EBF th\u1EEBa quy\u1EC1n t\u1EEB th\u01B0 m\u1EE5c cha\">\n \u0110\u1ED9c l\u1EADp\n </nz-tag>\n }\n </div>\n </td>\n <!-- <td>{{ item.OwnerName || item.OwnerId }}</td> -->\n <td class=\"text-center\">\n <nz-tag\n [nzColor]=\"\n item.EffectiveAccess >= DriveAccessLevel.Editor\n ? 'green'\n : item.EffectiveAccess >= DriveAccessLevel.Uploader\n ? 'cyan'\n : 'default'\n \"\n >\n {{\n item.EffectiveAccess >= DriveAccessLevel.Manager\n ? \"Qu\u1EA3n tr\u1ECB\"\n : item.EffectiveAccess >= DriveAccessLevel.Editor\n ? \"Ch\u1EC9nh s\u1EEDa\"\n : item.EffectiveAccess >= DriveAccessLevel.Uploader\n ? \"Xem & T\u1EA3i l\u00EAn\"\n : item.CanDownload && item.EffectiveAccess >= DriveAccessLevel.Downloader\n ? \"Xem & T\u1EA3i\"\n : \"Ch\u1EC9 xem\"\n }}\n </nz-tag>\n </td>\n <td class=\"text-right\">\n {{ isFolderLike(item) ? \"\u2014\" : (item.SizeBytes | formatBytes) }}\n </td>\n <td>\n {{ item.CreatedUser }}\n </td>\n <td class=\"text-center\">\n <span\n nz-tooltip\n [nzTooltipTitle]=\"tooltipTemplate\"\n nzTooltipOverlayClassName=\"nowrap-tooltip\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n {{ item.UpdatedDate | date: \"dd/MM/yyyy HH:mm\" }}\n </span>\n\n <ng-template #tooltipTemplate> Ng\u01B0\u1EDDi c\u1EADp nh\u1EADt: {{ item.UpdatedUser }} </ng-template>\n </td>\n <!-- <td class=\"text-center\">\n <div class=\"action-btn-group\">\n @if (drive.currentViewMode() !== \"TRASH\") {\n @if (item.CanShare || item.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openShareDrawer(item)\"\n nz-tooltip\n nzTooltipTitle=\"Chia s\u1EBB & Ph\u00E2n quy\u1EC1n\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n @if (item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openMoveDrawer(item)\"\n nz-tooltip\n nzTooltipTitle=\"Chuy\u1EC3n th\u01B0 m\u1EE5c\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"drag\"></nz-icon>\n </button>\n }\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openCopyDrawer(item)\"\n nz-tooltip\n nzTooltipTitle=\"Sao ch\u00E9p\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"copy\"></nz-icon>\n </button>\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openShortcutDrawer(item)\"\n nz-tooltip\n nzTooltipTitle=\"T\u1EA1o l\u1ED1i t\u1EAFt\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"link\"></nz-icon>\n </button>\n @if (\n item.NodeType === DriveNodeType.Folder &&\n drive.usePhysicalFolders() &&\n item.EffectiveAccess >= DriveAccessLevel.Manager\n ) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openRelocateDrawer(item)\"\n nz-tooltip\n nzTooltipTitle=\"\u0110\u1ED5i \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD / \u00C1nh x\u1EA1 \u1ED5 c\u1EE9ng l\u01B0u tr\u1EEF\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"hdd\"></nz-icon>\n </button>\n }\n @if (\n isFileLike(item) &&\n !item.IsBrokenShortcut &&\n item.CanDownload &&\n item.EffectiveAccess >= DriveAccessLevel.Downloader\n ) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); onDownloadItem(item)\"\n nz-tooltip\n nzTooltipTitle=\"T\u1EA3i xu\u1ED1ng\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"download\"></nz-icon>\n </button>\n }\n @if (\n isFileLike(item) && !item.IsBrokenShortcut && item.EffectiveAccess >= DriveAccessLevel.Editor\n ) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openVersionDrawer(item)\"\n nz-tooltip\n nzTooltipTitle=\"L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"history\"></nz-icon>\n </button>\n }\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openFolderDrawer('rename', item)\"\n nz-tooltip\n [nzTooltipTitle]=\"\n item.EffectiveAccess >= DriveAccessLevel.Editor\n ? '\u0110\u1ED5i t\u00EAn & Chi ti\u1EBFt'\n : 'Xem chi ti\u1EBFt & Nh\u1EADt k\u00FD'\n \"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon\n [nzType]=\"item.EffectiveAccess >= DriveAccessLevel.Editor ? 'edit' : 'info-circle'\"\n ></nz-icon>\n </button>\n @if (item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-warn\"\n (click)=\"$event.stopPropagation(); onSoftDelete(item)\"\n nz-tooltip\n nzTooltipTitle=\"Chuy\u1EC3n v\u00E0o th\u00F9ng r\u00E1c\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n } @else {\n @if (item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); onRestore(item)\"\n nz-tooltip\n nzTooltipTitle=\"Kh\u00F4i ph\u1EE5c\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"rollback\"></nz-icon>\n </button>\n }\n @if (item.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-warn\"\n (click)=\"$event.stopPropagation(); onPermanentDelete(item)\"\n nz-tooltip\n nzTooltipTitle=\"X\u00F3a v\u0129nh vi\u1EC5n\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n }\n </div>\n </td> -->\n </tr>\n }\n </tbody>\n </nz-table>\n <!-- CONTEXT MENU CHU\u1ED8T PH\u1EA2I (H\u1ED6 TR\u1EE2 C\u1EA2 THAO T\u00C1C \u0110\u01A0N L\u1EBA & THAO T\u00C1C H\u00C0NG LO\u1EA0T KHI T\u00CDCH CH\u1ECCN NHI\u1EC0U M\u1EE4C) -->\n <nz-dropdown-menu #menu=\"nzDropdownMenu\">\n @if (selectedContextItem(); as ctx) {\n <ul nz-menu>\n @if (checkedCount() > 1 && isItemChecked(ctx.Id)) {\n <li nz-menu-group [nzTitle]=\"'\u26A1 Thao t\u00E1c h\u00E0ng lo\u1EA1t (' + checkedCount() + ' m\u1EE5c \u0111\u00E3 ch\u1ECDn)'\">\n <ul>\n @if (drive.currentViewMode() === \"TRASH\") {\n @if (canBulkEditChecked()) {\n <li nz-menu-item (click)=\"onBulkRestoreFromTrash()\">\n <nz-icon nzType=\"rollback\"></nz-icon> Kh\u00F4i ph\u1EE5c {{ checkedCount() }} m\u1EE5c \u0111\u00E3 ch\u1ECDn\n </li>\n }\n @if (canBulkManageChecked()) {\n <li nz-menu-item nzDanger (click)=\"onBulkPermanentDelete()\">\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a v\u0129nh vi\u1EC5n {{ checkedCount() }} m\u1EE5c \u0111\u00E3 ch\u1ECDn\n </li>\n }\n } @else {\n @if (canBulkEditChecked()) {\n <li nz-menu-item (click)=\"openBulkMoveDrawer()\">\n <nz-icon nzType=\"drag\"></nz-icon> Di chuy\u1EC3n {{ checkedCount() }} m\u1EE5c \u0111\u00E3 ch\u1ECDn...\n </li>\n }\n <li nz-menu-item (click)=\"openBulkCopyDrawer()\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p {{ checkedCount() }} m\u1EE5c \u0111\u00E3 ch\u1ECDn...\n </li>\n @if (canBulkManageChecked()) {\n <li nz-menu-item (click)=\"openBulkPermissionMatrixDrawer()\">\n <nz-icon nzType=\"usergroup-add\"></nz-icon> Ph\u00E2n quy\u1EC1n h\u00E0ng lo\u1EA1t ({{ checkedCount() }} m\u1EE5c)...\n </li>\n }\n @if (canBulkDownloadChecked()) {\n <li nz-menu-item (click)=\"onBulkDownloadChecked()\">\n <nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng c\u00E1c t\u1EADp tin \u0111\u00E3 ch\u1ECDn\n </li>\n }\n <li nz-menu-item (click)=\"onBulkToggleStar()\">\n <nz-icon nzType=\"star\"></nz-icon>\n {{\n allCheckedAreStarred()\n ? \"B\u1ECF d\u1EA5u sao (\" + checkedCount() + \" m\u1EE5c)\"\n : \"G\u1EAFn d\u1EA5u sao (\" + checkedCount() + \" m\u1EE5c)\"\n }}\n </li>\n @if (canBulkEditChecked()) {\n <li nz-menu-item nzDanger (click)=\"onBulkSoftDelete()\">\n <nz-icon nzType=\"delete\"></nz-icon> Chuy\u1EC3n {{ checkedCount() }} m\u1EE5c v\u00E0o th\u00F9ng r\u00E1c\n </li>\n }\n }\n <li nz-menu-item (click)=\"clearCheckedSelection()\">\n <nz-icon nzType=\"close-circle\"></nz-icon> B\u1ECF ch\u1ECDn t\u1EA5t c\u1EA3 ({{ checkedCount() }} m\u1EE5c)\n </li>\n </ul>\n </li>\n <li nz-menu-divider></li>\n }\n @if (drive.currentViewMode() === \"TRASH\") {\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-item (click)=\"onRestore(ctx)\"><nz-icon nzType=\"rollback\"></nz-icon> Kh\u00F4i ph\u1EE5c m\u1EE5c n\u00E0y</li>\n }\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Manager) {\n <li nz-menu-item nzDanger (click)=\"onPermanentDelete(ctx)\">\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a v\u0129nh vi\u1EC5n m\u1EE5c n\u00E0y\n </li>\n }\n <li nz-menu-divider></li>\n <li nz-menu-item nzDanger (click)=\"onEmptyTrash()\">\n <nz-icon nzType=\"clear\"></nz-icon> D\u1ECDn s\u1EA1ch to\u00E0n b\u1ED9 th\u00F9ng r\u00E1c...\n </li>\n } @else {\n @if (ctx.NodeType === DriveNodeType.File) {\n <li nz-menu-item (click)=\"previewFile(ctx)\">\n <nz-icon nzType=\"eye\"></nz-icon> Xem tr\u1EF1c ti\u1EBFp (Drawer Preview)\n </li>\n @if (ctx.CanDownload && ctx.EffectiveAccess >= DriveAccessLevel.Downloader) {\n <li nz-menu-item (click)=\"onDownloadItem(ctx)\"><nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng</li>\n }\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-item (click)=\"openVersionDrawer(ctx)\">\n <nz-icon nzType=\"history\"></nz-icon> L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n...\n </li>\n }\n <li nz-menu-divider></li>\n }\n @if (ctx.CanShare || ctx.EffectiveAccess >= DriveAccessLevel.Manager) {\n <li nz-menu-item (click)=\"openShareDrawer(ctx)\">\n <nz-icon nzType=\"usergroup-add\"></nz-icon> Ph\u00E2n quy\u1EC1n & Chia s\u1EBB...\n </li>\n }\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-item (click)=\"openMoveDrawer(ctx)\">\n <nz-icon nzType=\"drag\"></nz-icon> Di chuy\u1EC3n sang th\u01B0 m\u1EE5c kh\u00E1c...\n </li>\n }\n <li nz-menu-item (click)=\"openCopyDrawer(ctx)\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p t\u1EDBi (Copy to)...\n </li>\n <li nz-menu-item (click)=\"openShortcutDrawer(ctx)\">\n <nz-icon nzType=\"link\"></nz-icon> T\u1EA1o l\u1ED1i t\u1EAFt (Shortcut)...\n </li>\n @if (\n ctx.NodeType === DriveNodeType.Folder &&\n drive.usePhysicalFolders() &&\n ctx.EffectiveAccess >= DriveAccessLevel.Manager\n ) {\n <li nz-menu-item (click)=\"openRelocateDrawer(ctx)\">\n <nz-icon nzType=\"hdd\"></nz-icon> \u0110\u1ED5i \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD / Chuy\u1EC3n \u1ED5 \u0111\u0129a...\n </li>\n }\n <li nz-menu-item (click)=\"openFolderDrawer('rename', ctx)\">\n <nz-icon [nzType]=\"ctx.EffectiveAccess >= DriveAccessLevel.Editor ? 'edit' : 'info-circle'\"></nz-icon>\n {{\n ctx.EffectiveAccess >= DriveAccessLevel.Editor ? \"\u0110\u1ED5i t\u00EAn & Chi ti\u1EBFt...\" : \"Xem chi ti\u1EBFt & Nh\u1EADt k\u00FD...\"\n }}\n </li>\n <li nz-menu-item (click)=\"drive.toggleStar(ctx.Id)\">\n <nz-icon nzType=\"star\"></nz-icon> {{ ctx.IsStarred ? \"B\u1ECF d\u1EA5u sao\" : \"Th\u00EAm d\u1EA5u sao\" }}\n </li>\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-divider></li>\n <li nz-menu-item nzDanger (click)=\"onSoftDelete(ctx)\">\n <nz-icon nzType=\"delete\"></nz-icon> Chuy\u1EC3n v\u00E0o th\u00F9ng r\u00E1c\n </li>\n }\n @if (ctx.NodeType === DriveNodeType.Folder) {\n <li nz-menu-item (click)=\"openTemplateDrawer('create', undefined, ctx)\">\n <nz-icon nzType=\"apartment\"></nz-icon> L\u01B0u c\u1EA5u tr\u00FAc th\u01B0 m\u1EE5c l\u00E0m M\u1EABu...\n </li>\n }\n }\n </ul>\n }\n </nz-dropdown-menu>\n </main>\n </div>\n <!-- ========================================================================= -->\n <!-- DRAWER 1: CHIA S\u1EBA & PH\u00C2N QUY\u1EC0N (ACL / RBAC / SHARE LINKS) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"shareDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"920\"\n [nzClosable]=\"false\"\n [nzTitle]=\"shareDrawerTitleTpl\"\n [nzFooter]=\"shareDrawerFooterTpl\"\n (nzOnClose)=\"shareDrawerVisible = false\"\n >\n <ng-template #shareDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n @if (activeActionNode(); as node) {\n <nz-icon\n [nzType]=\"node.NodeType === DriveNodeType.Folder ? 'folder-fill' : getFileIcon(node)\"\n [style.color]=\"node.NodeType === DriveNodeType.Folder ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 18px\"\n ></nz-icon>\n <strong>Chia s\u1EBB & Ph\u00E2n quy\u1EC1n: {{ node.Name }}</strong>\n <nz-tag nzColor=\"blue\">{{ node.NodeType === DriveNodeType.Folder ? \"Th\u01B0 m\u1EE5c\" : \"T\u1EADp tin\" }}</nz-tag>\n }\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"shareDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (activeActionNode(); as node) {\n <lib-drive-share-modal [nodeId]=\"node.Id\"></lib-drive-share-modal>\n }\n </ng-container>\n <ng-template #shareDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"shareDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 2: L\u1ECACH S\u1EEC PHI\u00CAN B\u1EA2N T\u1EACP TIN (FILE VERSIONS) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"versionDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"760\"\n [nzClosable]=\"false\"\n [nzTitle]=\"versionDrawerTitleTpl\"\n [nzFooter]=\"versionDrawerFooterTpl\"\n (nzOnClose)=\"versionDrawerVisible = false\"\n >\n <ng-template #versionDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"history\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n: {{ activeActionNode()?.Name }}</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"versionDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (activeActionNode(); as node) {\n <lib-drive-version-modal\n [nodeId]=\"node.Id\"\n [nodeName]=\"node.Name\"\n [canEdit]=\"node.EffectiveAccess >= DriveAccessLevel.Editor\"\n [canDownload]=\"node.CanDownload && node.EffectiveAccess >= DriveAccessLevel.Downloader\"\n (closed)=\"versionDrawerVisible = false\"\n ></lib-drive-version-modal>\n }\n </ng-container>\n <ng-template #versionDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"versionDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 3: T\u1EA0O TH\u01AF M\u1EE4C M\u1EDAI / \u0110\u1ED4I T\u00CAN & CHI TI\u1EBET THU\u1ED8C T\u00CDNH + ACTIVITY LOG -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"folderDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"480\"\n [nzClosable]=\"false\"\n [nzTitle]=\"folderDrawerTitleTpl\"\n [nzFooter]=\"folderDrawerFooterTpl\"\n (nzOnClose)=\"folderDrawerVisible = false\"\n >\n <ng-template #folderDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon\n [nzType]=\"folderDrawerMode === 'create' ? 'folder-add' : canRenameTargetNode() ? 'edit' : 'info-circle'\"\n style=\"font-size: 18px; color: var(--primary-color)\"\n ></nz-icon>\n <strong>\n {{\n folderDrawerMode === \"create\"\n ? \"T\u1EA1o th\u01B0 m\u1EE5c m\u1EDBi\"\n : canRenameTargetNode()\n ? \"\u0110\u1ED5i t\u00EAn & Chi ti\u1EBFt m\u1EE5c\"\n : \"Chi ti\u1EBFt & Nh\u1EADt k\u00FD ho\u1EA1t \u0111\u1ED9ng\"\n }}\n </strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"folderDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n @if (folderDrawerMode === \"create\" && folderDrawerParentOverride; as parentOverride) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">T\u1EA1o b\u00EAn trong th\u01B0 m\u1EE5c cha:</span>\n <nz-tag nzColor=\"gold\"> <nz-icon nzType=\"folder-open\"></nz-icon> {{ parentOverride.Name }} </nz-tag>\n </div>\n </div>\n }\n <div>\n <label class=\"drawer-field-label\">\n {{ folderDrawerMode === \"create\" ? \"T\u00EAn th\u01B0 m\u1EE5c m\u1EDBi\" : \"T\u00EAn hi\u1EC3n th\u1ECB\" }}\n </label>\n <input\n nz-input\n [(ngModel)]=\"folderDrawerInputName\"\n [disabled]=\"folderDrawerMode === 'rename' && !canRenameTargetNode()\"\n [appAutoFocus]=\"folderDrawerVisible && (folderDrawerMode === 'create' || canRenameTargetNode())\"\n placeholder=\"Nh\u1EADp t\u00EAn th\u01B0 m\u1EE5c / t\u00E0i li\u1EC7u...\"\n (keyup.enter)=\"submitFolderDrawer()\"\n />\n </div>\n @if (folderDrawerMode === \"create\" && drive.usePhysicalFolders() && drive.currentPhysicalPath(); as phys) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Ch\u1EBF \u0111\u1ED9 l\u01B0u tr\u1EEF:</span>\n <nz-tag nzColor=\"green\">Th\u01B0 m\u1EE5c v\u1EADt l\u00FD (Disk)</nz-tag>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Th\u01B0 m\u1EE5c cha tr\u00EAn \u0111\u0129a:</span>\n <code class=\"break-word\">{{ phys }}</code>\n </div>\n </div>\n }\n @if (folderDrawerMode === \"rename\" && folderDrawerTargetNode; as target) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"target.NodeType === DriveNodeType.Folder ? 'folder-fill' : getFileIcon(target)\"\n [style.color]=\"target.NodeType === DriveNodeType.Folder ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ target.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n {{\n target.NodeType === DriveNodeType.Folder\n ? \"Th\u01B0 m\u1EE5c\"\n : \"T\u1EADp tin (\" + (target.Extension || target.MimeType || \"File\") + \")\"\n }}\n </div>\n </div>\n </div>\n <nz-divider style=\"margin: 10px 0\"></nz-divider>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Ch\u1EE7 s\u1EDF h\u1EEFu:</span>\n <strong>{{ target.OwnerName || target.OwnerId }}</strong>\n </div>\n @if (target.NodeType === DriveNodeType.File) {\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">K\u00EDch th\u01B0\u1EDBc:</span>\n <span>{{ target.SizeBytes | formatBytes }}</span>\n </div>\n }\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Quy\u1EC1n c\u1EE7a b\u1EA1n:</span>\n <nz-tag\n [nzColor]=\"\n target.EffectiveAccess >= DriveAccessLevel.Editor\n ? 'green'\n : target.EffectiveAccess >= DriveAccessLevel.Uploader\n ? 'cyan'\n : 'default'\n \"\n >\n {{\n target.EffectiveAccess >= DriveAccessLevel.Manager\n ? \"Qu\u1EA3n tr\u1ECB (Manager)\"\n : target.EffectiveAccess >= DriveAccessLevel.Editor\n ? \"Ch\u1EC9nh s\u1EEDa (Editor)\"\n : target.EffectiveAccess >= DriveAccessLevel.Uploader\n ? \"Xem & T\u1EA3i l\u00EAn (Uploader)\"\n : target.CanDownload && target.EffectiveAccess >= DriveAccessLevel.Downloader\n ? \"Xem & T\u1EA3i xu\u1ED1ng\"\n : \"Ch\u1EC9 xem (Viewer)\"\n }}\n </nz-tag>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">K\u1EBF th\u1EEBa quy\u1EC1n:</span>\n <nz-tag [nzColor]=\"target.InheritPermissions ? 'blue' : 'warning'\">\n {{ target.InheritPermissions ? \"\u0110ang k\u1EBF th\u1EEBa\" : \"\u0110\u1ED9c l\u1EADp\" }}\n </nz-tag>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">C\u1EADp nh\u1EADt cu\u1ED1i:</span>\n <span>{{ target.UpdatedDate | date: \"dd/MM/yyyy HH:mm\" }}</span>\n </div>\n @if (target.PhysicalRelativePath) {\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">\u0110\u01B0\u1EDDng d\u1EABn \u0111\u0129a:</span>\n <code class=\"break-word\">{{ target.PhysicalRelativePath }}</code>\n </div>\n }\n @if (drive.isCurrentUserAdmin() && drive.usePhysicalFolders() && drive.currentPhysicalPath(); as physPath) {\n <div class=\"physical-path-bar\">\n <span style=\"word-break: break-all\">\n \u0110\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD: <code style=\"padding-top: 0px\">{{ physPath }}</code>\n </span>\n <icon-copy [textToCopy]=\"physPath\" tooltip=\"Sao ch\u00E9p \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD tr\u00EAn Server\"></icon-copy>\n </div>\n }\n </div>\n <div>\n <label class=\"drawer-field-label\">Thao t\u00E1c nhanh</label>\n <div nz-flex nzWrap=\"wrap\" [nzGap]=\"8\">\n @if (target.CanShare || target.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openShareDrawer(target)\">\n <nz-icon nzType=\"share-alt\"></nz-icon> Chia s\u1EBB & Ph\u00E2n quy\u1EC1n\n </button>\n }\n @if (target.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openMoveDrawer(target)\">\n <nz-icon nzType=\"drag\"></nz-icon> Di chuy\u1EC3n\n </button>\n }\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openCopyDrawer(target)\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p t\u1EDBi\n </button>\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openShortcutDrawer(target)\">\n <nz-icon nzType=\"link\"></nz-icon> T\u1EA1o l\u1ED1i t\u1EAFt\n </button>\n @if (\n target.NodeType === DriveNodeType.Folder &&\n drive.usePhysicalFolders() &&\n target.EffectiveAccess >= DriveAccessLevel.Manager\n ) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openRelocateDrawer(target)\">\n <nz-icon nzType=\"hdd\"></nz-icon> \u0110\u1ED5i \u1ED5 \u0111\u0129a v\u1EADt l\u00FD\n </button>\n }\n @if (target.NodeType === DriveNodeType.File) {\n @if (target.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openVersionDrawer(target)\">\n <nz-icon nzType=\"history\"></nz-icon> L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n\n </button>\n }\n @if (target.CanDownload && target.EffectiveAccess >= DriveAccessLevel.Downloader) {\n <button nz-button nzSize=\"small\" (click)=\"onDownloadItem(target)\">\n <nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng\n </button>\n }\n }\n <button nz-button nzSize=\"small\" (click)=\"drive.toggleStar(target.Id)\">\n <nz-icon nzType=\"star\" [nzTheme]=\"target.IsStarred ? 'fill' : 'outline'\"></nz-icon>\n {{ target.IsStarred ? \"B\u1ECF sao\" : \"G\u1EAFn sao\" }}\n </button>\n </div>\n </div>\n <!-- NH\u1EACT K\u00DD HO\u1EA0T \u0110\u1ED8NG (ACTIVITY LOG) -->\n <div>\n <label class=\"drawer-field-label\">\n <nz-icon nzType=\"OrderedList\"></nz-icon> Nh\u1EADt k\u00FD ho\u1EA1t \u0111\u1ED9ng g\u1EA7n \u0111\u00E2y ({{ nodeActivities().length }})\n </label>\n <div class=\"drawer-meta-card\" style=\"max-height: 240px; overflow-y: auto\">\n @if (nodeActivities().length === 0) {\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">Ch\u01B0a c\u00F3 nh\u1EADt k\u00FD ho\u1EA1t \u0111\u1ED9ng.</div>\n } @else {\n @for (act of nodeActivities(); track act.Id) {\n <div style=\"padding: 6px 0; border-bottom: 1px dashed var(--app-border, #e2e8f0); font-size: 12px\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <nz-tag nzColor=\"blue\">{{ formatActivityAction(act.ActionType) }}</nz-tag>\n <span style=\"color: var(--app-text-muted, #64748b)\">{{\n act.CreatedDate | date: \"dd/MM/yyyy HH:mm:ss\"\n }}</span>\n </div>\n <div style=\"margin-top: 4px\">\n Th\u1EF1c hi\u1EC7n b\u1EDFi: <strong>{{ act.ActorUserName || act.ActorUserId || \"H\u1EC7 th\u1ED1ng\" }}</strong>\n </div>\n @if (act.DetailJson) {\n <div style=\"margin-top: 2px; color: var(--app-text-muted, #64748b); word-break: break-all\">\n <code>{{ formatActivityDetail(act) }}</code>\n </div>\n }\n </div>\n }\n }\n </div>\n </div>\n }\n @if (folderDrawerMode === \"create\") {\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <label class=\"drawer-field-label\" style=\"margin-bottom: 0\">\n <nz-icon nzType=\"apartment\" style=\"color: #d97706; margin-right: 4px\"></nz-icon>\n T\u1EA1o nhanh t\u1EEB M\u1EABu c\u00E2y th\u01B0 m\u1EE5c (T\u00F9y ch\u1ECDn)\n </label>\n <a style=\"font-size: 12px\" (click)=\"folderDrawerVisible = false; openTemplateDrawer('create')\">\n + \u0110\u1ECBnh ngh\u0129a m\u1EABu m\u1EDBi\n </a>\n </div>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Kh\u00F4ng d\u00F9ng m\u1EABu (Ch\u1EC9 t\u1EA1o 1 th\u01B0 m\u1EE5c \u0111\u01A1n) --\"\n [(ngModel)]=\"folderDrawerSelectedTemplateId\"\n (ngModelChange)=\"onFolderDrawerTemplateSelect($event)\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Ch\u1EC9 t\u1EA1o 1 th\u01B0 m\u1EE5c \u0111\u01A1n\"></nz-option>\n @for (tpl of drive.folderTemplates(); track tpl.Id) {\n <nz-option\n [nzValue]=\"tpl.Id\"\n [nzLabel]=\"'\uD83D\uDDC2 ' + tpl.Name + ' [' + tpl.Code + '] (' + tpl.TotalFolderCount + ' th\u01B0 m\u1EE5c)'\"\n ></nz-option>\n }\n </nz-select>\n\n @if (folderDrawerSelectedTemplateId) {\n <label nz-checkbox [(ngModel)]=\"folderDrawerUseWrapperFolder\" style=\"font-size: 12px; margin-top: 4px\">\n \u0110\u1EB7t to\u00E0n b\u1ED9 c\u00E2y th\u01B0 m\u1EE5c m\u1EABu b\u00EAn trong th\u01B0 m\u1EE5c g\u1ED1c\n <strong>\"{{ folderDrawerInputName || \"...\" }}\"</strong>\n </label>\n <div class=\"quota-sub\" style=\"margin-top: 2px\">\n N\u1EBFu b\u1ECF t\u00EDch, c\u00E1c nh\u00E1nh th\u01B0 m\u1EE5c con c\u1EE7a m\u1EABu s\u1EBD \u0111\u01B0\u1EE3c t\u1EA1o tr\u1EF1c ti\u1EBFp ngay trong th\u01B0 m\u1EE5c \u0111ang m\u1EDF.\n </div>\n }\n </div>\n }\n </div>\n </ng-container>\n <ng-template #folderDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"folderDrawerVisible = false\">\u0110\u00F3ng</button>\n @if (folderDrawerMode === \"create\" || canRenameTargetNode()) {\n <button nz-button nzType=\"primary\" (click)=\"submitFolderDrawer()\">\n <nz-icon nzType=\"check\"></nz-icon>\n {{ folderDrawerMode === \"create\" ? \"T\u1EA1o th\u01B0 m\u1EE5c\" : \"L\u01B0u t\u00EAn m\u1EDBi\" }}\n </button>\n }\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 4: XEM TR\u1EF0C TUY\u1EBEN T\u00C0I LI\u1EC6U (PREVIEW DRAWER) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"previewDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"'75vw'\"\n [nzClosable]=\"false\"\n [nzBodyStyle]=\"{ padding: '0', height: '100%', display: 'flex', flexDirection: 'column', overflow: 'hidden' }\"\n [nzTitle]=\"previewDrawerTitleTpl\"\n [nzFooter]=\"previewDrawerFooterTpl\"\n (nzOnClose)=\"previewDrawerVisible = false\"\n >\n <ng-template #previewDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"eye\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>{{ previewFileName }}</strong>\n </div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n @if (activeActionNode(); as node) {\n @if (node.CanDownload && node.EffectiveAccess >= DriveAccessLevel.Downloader) {\n <button nz-button nzSize=\"small\" nzType=\"primary\" (click)=\"onDownloadItem(node)\">\n <nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng\n </button>\n }\n @if (node.CanShare || node.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button nz-button nzSize=\"small\" (click)=\"previewDrawerVisible = false; openShareDrawer(node)\">\n <nz-icon nzType=\"share-alt\"></nz-icon> Chia s\u1EBB\n </button>\n }\n @if (node.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button nz-button nzSize=\"small\" (click)=\"previewDrawerVisible = false; openVersionDrawer(node)\">\n <nz-icon nzType=\"history\"></nz-icon> Phi\u00EAn b\u1EA3n\n </button>\n }\n }\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"previewDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div class=\"drive-preview-body-fill\">\n <extend-view-file-content\n [previewType]=\"previewType\"\n [previewContent]=\"previewContent\"\n ></extend-view-file-content>\n </div>\n </ng-container>\n <ng-template #previewDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button type=\"button\" nz-button (click)=\"previewDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 5: T\u1EA0O L\u1ED0I T\u1EAET (CREATE SHORTCUT DRAWER CHO FILE & FOLDER) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"shortcutDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"460\"\n [nzClosable]=\"false\"\n [nzTitle]=\"shortcutDrawerTitleTpl\"\n [nzFooter]=\"shortcutDrawerFooterTpl\"\n (nzOnClose)=\"shortcutDrawerVisible = false\"\n >\n <ng-template #shortcutDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"link\" style=\"font-size: 18px; color: #7c3aed\"></nz-icon>\n <strong>T\u1EA1o l\u1ED1i t\u1EAFt (Shortcut)</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"shortcutDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (shortcutSourceNode(); as src) {\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"isFolderLike(src) ? 'folder-fill' : getFileIcon(src)\"\n [style.color]=\"isFolderLike(src) ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ src.ShortcutTargetName || src.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n M\u1EE5c g\u1ED1c: {{ isFolderLike(src) ? \"Th\u01B0 m\u1EE5c\" : \"T\u1EADp tin\" }} \u2022 Ch\u1EE7 s\u1EDF h\u1EEFu:\n {{ src.OwnerName || src.OwnerId }}\n </div>\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">T\u00EAn l\u1ED1i t\u1EAFt</label>\n <input\n nz-input\n [(ngModel)]=\"shortcutInputName\"\n [appAutoFocus]=\"shortcutDrawerVisible\"\n placeholder=\"Nh\u1EADp t\u00EAn hi\u1EC3n th\u1ECB c\u1EE7a l\u1ED1i t\u1EAFt...\"\n (keyup.enter)=\"submitShortcutDrawer()\"\n />\n </div>\n <div>\n <label class=\"drawer-field-label\">Kh\u00F4ng gian l\u01B0u l\u1ED1i t\u1EAFt</label>\n <nz-select\n [(ngModel)]=\"shortcutSpaceKey\"\n (ngModelChange)=\"onShortcutSpaceKeyChange($event)\"\n style=\"width: 100%\"\n >\n <nz-option nzValue=\"MY_DRIVE\" nzLabel=\"Drive c\u00E1 nh\u00E2n (My Drive)\"></nz-option>\n <nz-option nzValue=\"ORG_DRIVE\" nzLabel=\"Kho T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (Org Drive)\"></nz-option>\n @for (sp of drive.customSpaces(); track sp.Id) {\n <nz-option [nzValue]=\"'CUSTOM:' + sp.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + sp.Name\"></nz-option>\n }\n </nz-select>\n </div>\n <div>\n <label class=\"drawer-field-label\">Th\u01B0 m\u1EE5c \u0111\u00EDch ch\u1EE9a l\u1ED1i t\u1EAFt</label>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Th\u01B0 m\u1EE5c g\u1ED1c (Root) --\"\n [(ngModel)]=\"shortcutDestFolderId\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Th\u01B0 m\u1EE5c g\u1ED1c (Root)\"></nz-option>\n @for (f of availableFolders(); track f.Id) {\n <nz-option [nzValue]=\"f.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + f.Name\"></nz-option>\n }\n </nz-select>\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n L\u1ED1i t\u1EAFt tr\u1ECF tr\u1EF1c ti\u1EBFp t\u1EDBi m\u1EE5c g\u1ED1c m\u00E0 kh\u00F4ng t\u1ED1n th\u00EAm dung l\u01B0\u1EE3ng l\u01B0u tr\u1EEF (0 B).\n </div>\n </div>\n </div>\n }\n </ng-container>\n <ng-template #shortcutDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"shortcutDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitShortcutDrawer()\">\n <nz-icon nzType=\"link\"></nz-icon> T\u1EA1o l\u1ED1i t\u1EAFt\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 6: DI CHUY\u1EC2N FILE / FOLDER SANG TH\u01AF M\u1EE4C HO\u1EB6C KH\u00D4NG GIAN KH\u00C1C -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"moveDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"460\"\n [nzClosable]=\"false\"\n [nzTitle]=\"moveDrawerTitleTpl\"\n [nzFooter]=\"moveDrawerFooterTpl\"\n (nzOnClose)=\"moveDrawerVisible = false\"\n >\n <ng-template #moveDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"drag\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>Di chuy\u1EC3n sang th\u01B0 m\u1EE5c / kh\u00F4ng gian kh\u00E1c</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"moveDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (moveSourceNode(); as src) {\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"isFolderLike(src) ? 'folder-fill' : getFileIcon(src)\"\n [style.color]=\"isFolderLike(src) ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n @if (moveSourceNodes().length > 1) {\n <div style=\"font-weight: 600\">\u0110ang ch\u1ECDn di chuy\u1EC3n {{ moveSourceNodes().length }} m\u1EE5c c\u00F9ng l\u00FAc</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n Bao g\u1ED3m: {{ moveSourceNodes()[0].Name }} v\u00E0 {{ moveSourceNodes().length - 1 }} m\u1EE5c kh\u00E1c\n </div>\n } @else {\n <div style=\"font-weight: 600\">{{ src.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n Lo\u1EA1i:\n {{\n src.NodeType === DriveNodeType.Folder\n ? \"Th\u01B0 m\u1EE5c\"\n : src.NodeType === DriveNodeType.Shortcut\n ? \"L\u1ED1i t\u1EAFt\"\n : \"T\u1EADp tin\"\n }}\n \u2022 Kh\u00F4ng gian hi\u1EC7n t\u1EA1i: {{ src.IsOrgNode ? \"T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\" : \"Drive c\u00E1 nh\u00E2n\" }}\n </div>\n }\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">Kh\u00F4ng gian \u0111\u00EDch</label>\n <nz-select\n [(ngModel)]=\"moveTargetSpaceKey\"\n (ngModelChange)=\"onMoveSpaceKeyChange($event)\"\n style=\"width: 100%\"\n >\n <nz-option nzValue=\"MY_DRIVE\" nzLabel=\"Drive c\u00E1 nh\u00E2n (My Drive)\"></nz-option>\n <nz-option nzValue=\"ORG_DRIVE\" nzLabel=\"Kho T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (Org Drive)\"></nz-option>\n @for (sp of drive.customSpaces(); track sp.Id) {\n <nz-option [nzValue]=\"'CUSTOM:' + sp.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + sp.Name\"></nz-option>\n }\n </nz-select>\n </div>\n <div>\n <label class=\"drawer-field-label\">Ch\u1ECDn th\u01B0 m\u1EE5c \u0111\u00EDch</label>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Th\u01B0 m\u1EE5c g\u1ED1c (Root) --\"\n [(ngModel)]=\"moveTargetFolderId\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Th\u01B0 m\u1EE5c g\u1ED1c (Root)\"></nz-option>\n @for (f of moveTargetFolders(); track f.Id) {\n <nz-option [nzValue]=\"f.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + f.Name\"></nz-option>\n }\n </nz-select>\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n B\u1EA1n c\u00F3 th\u1EC3 k\u00E9o th\u1EA3 tr\u1EF1c ti\u1EBFp d\u00F2ng t\u00E0i li\u1EC7u/th\u01B0 m\u1EE5c v\u00E0o m\u1EE5c <strong>\"Drive c\u00E1 nh\u00E2n\"</strong> ho\u1EB7c\n <strong>\"T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"</strong> \u1EDF thanh menu b\u00EAn tr\u00E1i \u0111\u1EC3 chuy\u1EC3n nhanh qua l\u1EA1i gi\u1EEFa 2 kh\u00F4ng gian.\n </div>\n </div>\n </div>\n }\n </ng-container>\n <ng-template #moveDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"moveDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitMoveDrawer()\">\n <nz-icon nzType=\"check\"></nz-icon> Di chuy\u1EC3n t\u1EDBi \u0111\u00E2y\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 9: SAO CH\u00C9P T\u1EDAI (COPY TO DRAWER CHO FILE / FOLDER / SHORTCUT) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"copyDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"460\"\n [nzClosable]=\"false\"\n [nzTitle]=\"copyDrawerTitleTpl\"\n [nzFooter]=\"copyDrawerFooterTpl\"\n (nzOnClose)=\"copyDrawerVisible = false\"\n >\n <ng-template #copyDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"copy\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>Sao ch\u00E9p t\u1EDBi (Copy To)</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"copyDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (copySourceNode(); as src) {\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"isFolderLike(src) ? 'folder-fill' : getFileIcon(src)\"\n [style.color]=\"isFolderLike(src) ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n @if (copySourceNodes().length > 1) {\n <div style=\"font-weight: 600\">\u0110ang ch\u1ECDn sao ch\u00E9p {{ copySourceNodes().length }} m\u1EE5c c\u00F9ng l\u00FAc</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n Bao g\u1ED3m: {{ copySourceNodes()[0].Name }} v\u00E0 {{ copySourceNodes().length - 1 }} m\u1EE5c kh\u00E1c\n </div>\n } @else {\n <div style=\"font-weight: 600\">{{ src.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n M\u1EE5c ngu\u1ED3n:\n {{\n src.NodeType === DriveNodeType.Folder\n ? \"Th\u01B0 m\u1EE5c (Sao ch\u00E9p \u0111\u1EC7 quy to\u00E0n b\u1ED9 nh\u00E1nh con)\"\n : src.NodeType === DriveNodeType.Shortcut\n ? \"L\u1ED1i t\u1EAFt\"\n : \"T\u1EADp tin\"\n }}\n </div>\n }\n </div>\n </div>\n </div>\n @if (copySourceNodes().length <= 1) {\n <div>\n <label class=\"drawer-field-label\">T\u00EAn b\u1EA3n sao (\u0110\u1EC3 tr\u1ED1ng \u0111\u1EC3 h\u1EC7 th\u1ED1ng t\u1EF1 \u0111\u1EB7t t\u00EAn)</label>\n <input\n nz-input\n [(ngModel)]=\"copyCustomName\"\n [appAutoFocus]=\"copyDrawerVisible\"\n placeholder=\"Nh\u1EADp t\u00EAn m\u1EDBi cho b\u1EA3n sao...\"\n (keyup.enter)=\"submitCopyDrawer()\"\n />\n </div>\n }\n <div>\n <label class=\"drawer-field-label\">Kh\u00F4ng gian \u0111\u00EDch</label>\n <nz-select\n [(ngModel)]=\"copyTargetSpaceKey\"\n (ngModelChange)=\"onCopySpaceKeyChange($event)\"\n style=\"width: 100%\"\n >\n <nz-option nzValue=\"MY_DRIVE\" nzLabel=\"Drive c\u00E1 nh\u00E2n (My Drive)\"></nz-option>\n <nz-option nzValue=\"ORG_DRIVE\" nzLabel=\"Kho T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (Org Drive)\"></nz-option>\n @for (sp of drive.customSpaces(); track sp.Id) {\n <nz-option [nzValue]=\"'CUSTOM:' + sp.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + sp.Name\"></nz-option>\n }\n </nz-select>\n </div>\n <div>\n <label class=\"drawer-field-label\">Ch\u1ECDn th\u01B0 m\u1EE5c \u0111\u00EDch ch\u1EE9a b\u1EA3n sao</label>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Th\u01B0 m\u1EE5c g\u1ED1c (Root) --\"\n [(ngModel)]=\"copyTargetFolderId\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Th\u01B0 m\u1EE5c g\u1ED1c (Root)\"></nz-option>\n @for (f of copyTargetFolders(); track f.Id) {\n <nz-option [nzValue]=\"f.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + f.Name\"></nz-option>\n }\n </nz-select>\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n B\u1EA3n sao ho\u00E0n to\u00E0n \u0111\u1ED9c l\u1EADp v\u1EDBi m\u1EE5c g\u1ED1c v\u00E0 \u0111\u01B0\u1EE3c t\u00EDnh v\u00E0o h\u1EA1n ng\u1EA1ch c\u1EE7a ng\u01B0\u1EDDi t\u1EA1o b\u1EA3n sao.\n </div>\n </div>\n </div>\n }\n </ng-container>\n <ng-template #copyDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"copyDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitCopyDrawer()\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p t\u1EDBi \u0111\u00E2y\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 7: \u0110\u1ED4I \u0110\u01AF\u1EDCNG D\u1EAAN V\u1EACT L\u00DD / \u00C1NH X\u1EA0 \u1ED4 C\u1EE8NG M\u1EDAI KHI K\u1EBET TH\u00DAC D\u1EF0 \u00C1N -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"relocateDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"500\"\n [nzClosable]=\"false\"\n [nzTitle]=\"relocateDrawerTitleTpl\"\n [nzFooter]=\"relocateDrawerFooterTpl\"\n (nzOnClose)=\"relocateDrawerVisible = false\"\n >\n <ng-template #relocateDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"hdd\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>\n {{ relocateTargetFolder() ? \"\u00C1nh x\u1EA1 / Chuy\u1EC3n \u1ED5 \u0111\u0129a th\u01B0 m\u1EE5c\" : \"C\u1EA5u h\u00ECnh RootPath l\u01B0u tr\u1EEF chung\" }}\n </strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"relocateDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n @if (relocateTargetFolder(); as folder) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon nzType=\"folder-fill\" style=\"font-size: 22px; color: #f59e0b\"></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ folder.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n \u0110\u01B0\u1EDDng d\u1EABn hi\u1EC7n t\u1EA1i:\n <code>{{ folder.PhysicalRelativePath || drive.currentPhysicalPath() || \"M\u1EB7c \u0111\u1ECBnh\" }}</code>\n </div>\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">\u0110\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD m\u1EDBi c\u1EE7a th\u01B0 m\u1EE5c (H\u1ED7 tr\u1EE3 \u1ED5 c\u1EE9ng kh\u00E1c / NAS)</label>\n <input\n nz-input\n [(ngModel)]=\"relocateNewPath\"\n [appAutoFocus]=\"relocateDrawerVisible\"\n placeholder=\"VD: E:Archive_2026DuAn_A ho\u1EB7c \\\\NAS01StorageDuAn_A\"\n (keyup.enter)=\"submitRelocateDrawer()\"\n />\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n Khi d\u1EF1 \u00E1n k\u1EBFt th\u00FAc v\u00E0 h\u1EA1 t\u1EA7ng chuy\u1EC3n th\u01B0 m\u1EE5c sang \u1ED5 c\u1EE9ng kh\u00E1c, \u0111\u1EB7t \u0111\u01B0\u1EDDng d\u1EABn m\u1EDBi t\u1EA1i \u0111\u00E2y \u0111\u1EC3 to\u00E0n b\u1ED9 th\u01B0\n m\u1EE5c con v\u00E0 file b\u00EAn trong t\u1EF1 \u0111\u1ED9ng map sang \u1ED5 c\u1EE9ng m\u1EDBi.\n </div>\n </div>\n <div class=\"drawer-meta-card\">\n <label nz-checkbox [(ngModel)]=\"relocateMoveFilesOnDisk\">\n <strong>T\u1EF1 \u0111\u1ED9ng di chuy\u1EC3n d\u1EEF li\u1EC7u v\u1EADt l\u00FD t\u1EEB \u0111\u01B0\u1EDDng d\u1EABn c\u0169 sang \u1ED5 \u0111\u0129a m\u1EDBi</strong>\n </label>\n <div class=\"quota-sub\" style=\"margin-left: 24px\">\n N\u1EBFu b\u1ED9 ph\u1EADn H\u1EA1 t\u1EA7ng \u0111\u00E3 copy/move s\u1EB5n th\u01B0 m\u1EE5c sang \u1ED5 c\u1EE9ng m\u1EDBi r\u1ED3i, h\u00E3y <strong>b\u1ECF ch\u1ECDn</strong> m\u1EE5c n\u00E0y \u0111\u1EC3\n h\u1EC7 th\u1ED1ng ch\u1EC9 c\u1EADp nh\u1EADt l\u1EA1i \u00E1nh x\u1EA1 \u0111\u01B0\u1EDDng d\u1EABn trong Database.\n </div>\n <label nz-checkbox [(ngModel)]=\"relocateSyncNewFiles\" style=\"margin-top: 6px\">\n <strong>\u0110\u1ED3ng b\u1ED9 b\u1ED5 sung c\u00E1c file/folder c\u00F3 s\u1EB5n t\u1EA1i \u0111\u01B0\u1EDDng d\u1EABn m\u1EDBi v\u00E0o Drive</strong>\n </label>\n </div>\n } @else {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">RootPath hi\u1EC7n t\u1EA1i:</span>\n <code class=\"break-word\">{{ drive.storageRootPath() || drive.currentPhysicalPath() }}</code>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Ch\u1EBF \u0111\u1ED9 th\u01B0 m\u1EE5c g\u1ED1c:</span>\n <nz-tag [nzColor]=\"drive.useSharedPhysicalRoot() ? 'green' : 'blue'\">\n {{\n drive.useSharedPhysicalRoot() ? \"D\u00F9ng chung 1 RootPath cho t\u1EA5t c\u1EA3 User\" : \"T\u00E1ch theo t\u1EEBng Username\"\n }}\n </nz-tag>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">\u0110\u01B0\u1EDDng d\u1EABn RootPath chung m\u1EDBi tr\u00EAn Server</label>\n <input\n nz-input\n [(ngModel)]=\"relocateNewPath\"\n [appAutoFocus]=\"relocateDrawerVisible\"\n placeholder=\"VD: D:ProjectStorageDriveRoot ho\u1EB7c E:ArchiveDrive\"\n (keyup.enter)=\"submitRelocateDrawer()\"\n />\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n T\u1EA5t c\u1EA3 c\u00E1c th\u01B0 m\u1EE5c ch\u01B0a ghim \u1ED5 \u0111\u0129a ri\u00EAng s\u1EBD t\u1EF1 \u0111\u1ED9ng \u0111\u1ECDc/ghi theo RootPath m\u1EDBi n\u00E0y.\n </div>\n </div>\n }\n </div>\n </ng-container>\n <ng-template #relocateDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"relocateDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitRelocateDrawer()\">\n <nz-icon nzType=\"save\"></nz-icon> L\u01B0u \u00E1nh x\u1EA1 v\u1EADt l\u00FD\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 8: QU\u1EA2N L\u00DD H\u1EA0N NG\u1EA0CH DUNG L\u01AF\u1EE2NG (DEFAULT QUOTA & PER-USER QUOTA) -->\n <!-- CH\u1EC8 D\u00C0NH RI\u00CANG CHO QU\u1EA2N TR\u1ECA VI\u00CAN (ADMIN) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"quotaAdminDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"980\"\n [nzClosable]=\"false\"\n [nzTitle]=\"quotaAdminDrawerTitleTpl\"\n [nzFooter]=\"quotaAdminDrawerFooterTpl\"\n (nzOnClose)=\"quotaAdminDrawerVisible = false\"\n >\n <ng-template #quotaAdminDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"pie-chart\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>Qu\u1EA3n l\u00FD H\u1EA1n ng\u1EA1ch Dung l\u01B0\u1EE3ng (Quota Management)</strong>\n <nz-tag nzColor=\"gold\">Ch\u1EC9 Admin</nz-tag>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"quotaAdminDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n <!-- PH\u1EA6N 1: C\u1EA4U H\u00CCNH QUOTA M\u1EB6C \u0110\u1ECANH TO\u00C0N H\u1EC6 TH\u1ED0NG -->\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <div>\n <div style=\"font-size: 14px; font-weight: 600\">\n <nz-icon nzType=\"cloud-server\" style=\"color: var(--primary-color); margin-right: 6px\"></nz-icon>\n 1. C\u1EA5u h\u00ECnh Quota m\u1EB7c \u0111\u1ECBnh (Default Quota)\n </div>\n <div class=\"quota-sub\">\n \u00C1p d\u1EE5ng t\u1EF1 \u0111\u1ED9ng cho ng\u01B0\u1EDDi d\u00F9ng m\u1EDBi ho\u1EB7c ng\u01B0\u1EDDi d\u00F9ng ch\u01B0a \u0111\u01B0\u1EE3c g\u00E1n h\u1EA1n ng\u1EA1ch ri\u00EAng.\n </div>\n </div>\n @if (quotaOverview(); as ov) {\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-tag nzColor=\"blue\">\n M\u1EB7c \u0111\u1ECBnh hi\u1EC7n t\u1EA1i: <strong>{{ ov.DefaultUserQuotaBytes | formatBytes }}</strong>\n </nz-tag>\n <nz-tag nzColor=\"purple\">\n T\u1ED5ng \u0111\u00E3 d\u00F9ng to\u00E0n h\u1EC7 th\u1ED1ng: <strong>{{ ov.TotalSystemUsedBytes | formatBytes }}</strong>\n </nz-tag>\n </div>\n }\n </div>\n <nz-divider style=\"margin: 8px 0\"></nz-divider>\n <div nz-flex nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <span style=\"font-size: 13px; font-weight: 500\">M\u1EE9c Quota m\u1EB7c \u0111\u1ECBnh:</span>\n <input\n nz-input\n type=\"number\"\n min=\"1\"\n [(ngModel)]=\"defaultQuotaInputValue\"\n style=\"width: 120px\"\n placeholder=\"Nh\u1EADp dung l\u01B0\u1EE3ng\"\n />\n <nz-select [(ngModel)]=\"defaultQuotaInputUnit\" style=\"width: 90px\">\n <nz-option nzValue=\"MB\" nzLabel=\"MB\"></nz-option>\n <nz-option nzValue=\"GB\" nzLabel=\"GB\"></nz-option>\n <nz-option nzValue=\"TB\" nzLabel=\"TB\"></nz-option>\n </nz-select>\n <!-- C\u00E1c n\u00FAt ch\u1ECDn nhanh (Quick Presets) -->\n <div nz-flex nzAlign=\"center\" [nzGap]=\"4\">\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(1, 'GB')\">1 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(5, 'GB')\">5 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(10, 'GB')\">10 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(20, 'GB')\">20 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(50, 'GB')\">50 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(100, 'GB')\">100 GB</button>\n </div>\n <button nz-button nzType=\"primary\" (click)=\"onSaveDefaultQuota()\">\n <nz-icon nzType=\"save\"></nz-icon> L\u01B0u Quota m\u1EB7c \u0111\u1ECBnh\n </button>\n </div>\n <div style=\"margin-top: 4px\">\n <label nz-checkbox [(ngModel)]=\"applyDefaultToExistingUsers\">\n \u0110\u1ED3ng th\u1EDDi c\u1EADp nh\u1EADt m\u1EE9c Quota m\u1EB7c \u0111\u1ECBnh m\u1EDBi n\u00E0y cho t\u1EA5t c\u1EA3 c\u00E1c ng\u01B0\u1EDDi d\u00F9ng hi\u1EC7n c\u00F3\n </label>\n </div>\n </div>\n <!-- PH\u1EA6N 2: \u0110\u1EB6T QUOTA RI\u00CANG CHO T\u1EEANG NG\u01AF\u1EDCI D\u00D9NG -->\n <div>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\" style=\"margin-bottom: 10px\">\n <div>\n <div style=\"font-size: 14px; font-weight: 600\">\n <nz-icon nzType=\"team\" style=\"color: var(--primary-color); margin-right: 6px\"></nz-icon>\n 2. Thi\u1EBFt l\u1EADp Quota cho t\u1EEBng ng\u01B0\u1EDDi d\u00F9ng ({{ quotaUsers().length }})\n </div>\n <div class=\"quota-sub\">\n T\u00F9y ch\u1EC9nh h\u1EA1n ng\u1EA1ch dung l\u01B0\u1EE3ng ri\u00EAng cho t\u1EEBng c\u00E1 nh\u00E2n ho\u1EB7c \u0111\u1EB7t l\u1EA1i v\u1EC1 m\u1EE9c m\u1EB7c \u0111\u1ECBnh.\n </div>\n </div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-input-group [nzSuffix]=\"quotaUserSearchSuffix\" style=\"width: 260px\">\n <input\n nz-input\n type=\"text\"\n placeholder=\"T\u00ECm theo t\u00E0i kho\u1EA3n, h\u1ECD t\u00EAn, email...\"\n [(ngModel)]=\"quotaUserSearchKeyword\"\n (keyup.enter)=\"reloadQuotaOverview()\"\n />\n </nz-input-group>\n <ng-template #quotaUserSearchSuffix>\n <nz-icon nzType=\"search\" class=\"cursor-pointer\" (click)=\"reloadQuotaOverview()\"></nz-icon>\n </ng-template>\n <button nz-button nzType=\"default\" (click)=\"reloadQuotaOverview()\" nz-tooltip nzTooltipTitle=\"T\u1EA3i l\u1EA1i\">\n <nz-icon nzType=\"reload\"></nz-icon>\n </button>\n </div>\n </div>\n <nz-table\n #userQuotaTable\n [nzData]=\"quotaUsers()\"\n [nzLoading]=\"quotaLoading()\"\n nzSize=\"small\"\n [nzBordered]=\"true\"\n [nzPageSize]=\"10\"\n [nzShowPagination]=\"true\"\n >\n <thead>\n <tr>\n <th nzWidth=\"45px\" class=\"text-center\">#</th>\n <th>Ng\u01B0\u1EDDi d\u00F9ng</th>\n <th nzWidth=\"220px\">\u0110\u00E3 d\u00F9ng / H\u1EA1n ng\u1EA1ch</th>\n <th nzWidth=\"105px\" class=\"text-center\">Lo\u1EA1i Quota</th>\n <th nzWidth=\"210px\">\u0110\u1EB7t h\u1EA1n ng\u1EA1ch m\u1EDBi</th>\n <th nzWidth=\"145px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (u of userQuotaTable.data; track u.UserId; let idx = $index) {\n <tr>\n <td class=\"text-center\">{{ idx + 1 }}</td>\n <td>\n <div style=\"font-weight: 600\">{{ u.FullName || u.UserName }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n <code>{{ u.UserName }}</code>\n @if (u.OrgName) {\n <span> \u2022 {{ u.OrgName }}</span>\n }\n @if (u.Email) {\n <span> \u2022 {{ u.Email }}</span>\n }\n </div>\n </td>\n <td>\n <div nz-flex nzJustify=\"space-between\" style=\"font-size: 12px; margin-bottom: 2px\">\n <span\n >{{ u.UsedBytes | formatBytes }} / <strong>{{ u.QuotaLimitBytes | formatBytes }}</strong></span\n >\n <span>{{ getUserQuotaPercent(u) }}%</span>\n </div>\n <nz-progress\n [nzPercent]=\"getUserQuotaPercent(u)\"\n nzSize=\"small\"\n [nzShowInfo]=\"false\"\n [nzStatus]=\"getUserQuotaPercent(u) >= 95 ? 'exception' : 'normal'\"\n ></nz-progress>\n </td>\n <td class=\"text-center\">\n @if (u.IsCustomQuota) {\n <nz-tag nzColor=\"orange\">T\u00F9y ch\u1EC9nh</nz-tag>\n } @else {\n <nz-tag nzColor=\"default\">M\u1EB7c \u0111\u1ECBnh</nz-tag>\n }\n </td>\n <td>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"6\">\n <input nz-input type=\"number\" min=\"1\" [(ngModel)]=\"u.editQuotaValue\" style=\"width: 90px\" />\n <nz-select [(ngModel)]=\"u.editQuotaUnit\" style=\"width: 80px\">\n <nz-option nzValue=\"MB\" nzLabel=\"MB\"></nz-option>\n <nz-option nzValue=\"GB\" nzLabel=\"GB\"></nz-option>\n <nz-option nzValue=\"TB\" nzLabel=\"TB\"></nz-option>\n </nz-select>\n </div>\n </td>\n <td class=\"text-center\">\n <div nz-flex nzJustify=\"center\" [nzGap]=\"6\">\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"onSaveUserQuota(u)\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"L\u01B0u h\u1EA1n ng\u1EA1ch ri\u00EAng cho ng\u01B0\u1EDDi d\u00F9ng n\u00E0y\"\n -->\n <nz-icon nzType=\"check\"></nz-icon> L\u01B0u\n </button>\n <button\n nz-button\n nzType=\"default\"\n nzSize=\"small\"\n [disabled]=\"!u.IsCustomQuota\"\n nz-tooltip\n nzTooltipTitle=\"\u0110\u1EB7t l\u1EA1i v\u1EC1 m\u1EE9c Quota m\u1EB7c \u0111\u1ECBnh c\u1EE7a h\u1EC7 th\u1ED1ng\"\n (click)=\"onResetUserQuota(u)\"\n >\n <nz-icon nzType=\"undo\"></nz-icon>\n </button>\n </div>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n </div>\n </div>\n </ng-container>\n <ng-template #quotaAdminDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"quotaAdminDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 10: TH\u00CAM / C\u1EA4U H\u00CCNH M\u1EE4C CUSTOM B\u00CAN D\u01AF\u1EDAI \"T\u00C0I LI\u1EC6U \u0110\u01A0N V\u1ECA\" -->\n <!-- (V\u00ED d\u1EE5: \"T\u00E0i li\u1EC7u d\u1EF1 \u00E1n\" - Admin c\u00F3 th\u1EC3 b\u1EADt hi\u1EC3n th\u1ECB cho t\u1EA5t c\u1EA3 User) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"customSpaceDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"480\"\n [nzClosable]=\"false\"\n [nzTitle]=\"customSpaceDrawerTitleTpl\"\n [nzFooter]=\"customSpaceDrawerFooterTpl\"\n (nzOnClose)=\"customSpaceDrawerVisible = false\"\n >\n <ng-template #customSpaceDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n (click)=\"toggleDrawerPlacement()\"\n >\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon\n [nzType]=\"customSpaceIcon || 'project'\"\n style=\"font-size: 18px; color: var(--primary-color)\"\n ></nz-icon>\n <strong>{{\n customSpaceDrawerMode === \"create\" ? \"Th\u00EAm m\u1EE5c t\u00F9y ch\u1EC9nh d\u01B0\u1EDBi T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\" : \"C\u1EA5u h\u00ECnh m\u1EE5c t\u00F9y ch\u1EC9nh\"\n }}</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"customSpaceDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div>\n <label class=\"drawer-field-label\">T\u00EAn m\u1EE5c hi\u1EC3n th\u1ECB tr\u00EAn thanh menu tr\u00E1i</label>\n <input\n nz-input\n [(ngModel)]=\"customSpaceName\"\n [appAutoFocus]=\"customSpaceDrawerVisible\"\n placeholder=\"V\u00ED d\u1EE5: T\u00E0i li\u1EC7u d\u1EF1 \u00E1n, H\u1ED3 s\u01A1 th\u1EA7u, Quy tr\u00ECnh ISO...\"\n (keyup.enter)=\"submitCustomSpaceDrawer()\"\n />\n <div class=\"quota-sub\" style=\"margin-top: 4px\">\n M\u1EE5c n\u00E0y s\u1EBD xu\u1EA5t hi\u1EC7n ngay b\u00EAn d\u01B0\u1EDBi m\u1EE5c <strong>\"T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"</strong> tr\u00EAn thanh \u0111i\u1EC1u h\u01B0\u1EDBng b\u00EAn tr\u00E1i.\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">Bi\u1EC3u t\u01B0\u1EE3ng (Icon)</label>\n <nz-select [(ngModel)]=\"customSpaceIcon\" style=\"width: 100%\">\n <nz-option nzValue=\"project\" nzLabel=\"\uD83D\uDCCA D\u1EF1 \u00E1n (project)\"></nz-option>\n <nz-option nzValue=\"folder-open\" nzLabel=\"\uD83D\uDCC2 Th\u01B0 m\u1EE5c m\u1EDF (folder-open)\"></nz-option>\n <nz-option nzValue=\"book\" nzLabel=\"\uD83D\uDCD8 T\u00E0i li\u1EC7u / C\u1EA9m nang (book)\"></nz-option>\n <nz-option nzValue=\"safety-certificate\" nzLabel=\"\uD83D\uDEE1 Quy chu\u1EA9n / ISO (safety-certificate)\"></nz-option>\n <nz-option nzValue=\"solution\" nzLabel=\"\uD83D\uDCCB H\u1ED3 s\u01A1 nghi\u1EC7p v\u1EE5 (solution)\"></nz-option>\n <nz-option nzValue=\"database\" nzLabel=\"\uD83D\uDDC4 Kho d\u1EEF li\u1EC7u (database)\"></nz-option>\n </nz-select>\n </div>\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <div>\n <div style=\"font-weight: 600; font-size: 13px\">Hi\u1EC3n th\u1ECB cho t\u1EA5t c\u1EA3 ng\u01B0\u1EDDi d\u00F9ng (All Users)</div>\n <div class=\"quota-sub\">\n @if (drive.isCurrentUserAdmin()) {\n Khi b\u1EADt: T\u1EA5t c\u1EA3 t\u00E0i kho\u1EA3n trong h\u1EC7 th\u1ED1ng \u0111\u1EC1u nh\u00ECn th\u1EA5y v\u00E0 truy c\u1EADp \u0111\u01B0\u1EE3c m\u1EE5c n\u00E0y b\u00EAn d\u01B0\u1EDBi \"T\u00E0i li\u1EC7u \u0110\u01A1n\n v\u1ECB\".\n } @else {\n Ch\u1EC9 Qu\u1EA3n tr\u1ECB vi\u00EAn (Admin) m\u1EDBi c\u00F3 quy\u1EC1n b\u1EADt hi\u1EC3n th\u1ECB chung cho to\u00E0n b\u1ED9 ng\u01B0\u1EDDi d\u00F9ng.\n }\n </div>\n </div>\n <nz-switch\n [(ngModel)]=\"customSpaceVisibleToAll\"\n [nzDisabled]=\"!drive.isCurrentUserAdmin()\"\n nzCheckedChildren=\"All Users\"\n nzUnCheckedChildren=\"C\u00E1 nh\u00E2n\"\n ></nz-switch>\n </div>\n @if (customSpaceVisibleToAll) {\n <nz-divider style=\"margin: 8px 0\"></nz-divider>\n <div>\n <label class=\"drawer-field-label\">M\u1EE9c quy\u1EC1n m\u1EB7c \u0111\u1ECBnh cho to\u00E0n b\u1ED9 ng\u01B0\u1EDDi d\u00F9ng</label>\n <nz-select\n [(ngModel)]=\"customSpaceDefaultAccessLevel\"\n [nzDisabled]=\"!drive.isCurrentUserAdmin()\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"DriveAccessLevel.None\" nzLabel=\"None\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Viewer\" nzLabel=\"Ch\u1EC9 xem (Viewer)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Downloader\" nzLabel=\"Xem & T\u1EA3i xu\u1ED1ng\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Uploader\" nzLabel=\"Xem & T\u1EA3i l\u00EAn (Kh\u00F4ng \u0111\u01B0\u1EE3c x\u00F3a)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Editor\" nzLabel=\"Ch\u1EC9nh s\u1EEDa (Editor)\"></nz-option>\n </nz-select>\n </div>\n }\n </div>\n </div>\n </ng-container>\n <ng-template #customSpaceDrawerFooterTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div>\n @if (customSpaceDrawerMode === \"edit\" && editingCustomSpace) {\n <button nz-button nzDanger nzType=\"default\" (click)=\"onDeleteCustomSpace(editingCustomSpace)\">\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a m\u1EE5c n\u00E0y\n </button>\n }\n </div>\n <div nz-flex [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"customSpaceDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitCustomSpaceDrawer()\">\n <nz-icon nzType=\"check\"></nz-icon>\n {{ customSpaceDrawerMode === \"create\" ? \"T\u1EA1o m\u1EE5c m\u1EDBi\" : \"L\u01B0u thay \u0111\u1ED5i\" }}\n </button>\n </div>\n </div>\n </ng-template>\n </nz-drawer>\n\n <nz-drawer\n [nzVisible]=\"matrixDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"'92vw'\"\n nzTitle=\"Ma tr\u1EADn Ph\u00E2n quy\u1EC1n T\u00E0i li\u1EC7u & Th\u01B0 m\u1EE5c\"\n (nzOnClose)=\"matrixDrawerVisible = false\"\n >\n <!-- (ACL / RBAC Matrix) -->\n <ng-container *nzDrawerContent>\n <lib-drive-permission-matrix\n [rootFolderId]=\"matrixRootNodeId\"\n [initialTabIndex]=\"matrixInitialTabIndex\"\n [preselectedNodeIds]=\"matrixPreselectedNodeIds()\"\n [viewMode]=\"\n drive.currentViewMode() === 'ORG_DRIVE'\n ? 'ORG_DRIVE'\n : drive.currentViewMode() === 'CUSTOM_SPACE'\n ? 'CUSTOM_SPACE'\n : 'MY_DRIVE'\n \"\n [customSpaceId]=\"drive.currentCustomSpaceId()\"\n (saved)=\"drive.loadNodes()\"\n (closed)=\"matrixDrawerVisible = false\"\n >\n </lib-drive-permission-matrix>\n </ng-container>\n </nz-drawer>\n\n <!-- ========================================================================= -->\n <!-- DRAWER 11: \u0110\u1ECANH NGH\u0128A & C\u1EA4U H\u00CCNH C\u00C2Y TH\u01AF M\u1EE4C M\u1EAAU K\u00C8M PH\u00C2N QUY\u1EC0N T\u1EF0 \u0110\u1ED8NG -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"templateDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"760\"\n [nzClosable]=\"false\"\n [nzTitle]=\"templateDrawerTitleTpl\"\n [nzFooter]=\"templateDrawerFooterTpl\"\n (nzOnClose)=\"templateDrawerVisible = false\"\n >\n <ng-template #templateDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n (click)=\"toggleDrawerPlacement()\"\n >\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"apartment\" style=\"font-size: 18px; color: #d97706\"></nz-icon>\n <strong>\n {{ templateDrawerMode === \"create\" ? \"\u0110\u1ECBnh ngh\u0129a M\u1EABu C\u00E2y Th\u01B0 M\u1EE5c M\u1EDBi\" : \"C\u1EADp nh\u1EADt M\u1EABu C\u00E2y Th\u01B0 M\u1EE5c\" }}\n </strong>\n @if (totalConfiguredTemplatePermissions() > 0) {\n <nz-tag nzColor=\"cyan\">\uD83D\uDEE1 {{ totalConfiguredTemplatePermissions() }} quy\u1EC1n c\u00E0i s\u1EB5n</nz-tag>\n }\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"templateDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"14\">\n <div nz-flex [nzGap]=\"12\" nzWrap=\"wrap\">\n <div style=\"flex: 1.4; min-width: 220px\">\n <label class=\"drawer-field-label\">T\u00EAn m\u1EABu c\u00E2y th\u01B0 m\u1EE5c *</label>\n <input\n nz-input\n [(ngModel)]=\"templateInputName\"\n [appAutoFocus]=\"templateDrawerVisible\"\n placeholder=\"VD: H\u1ED3 s\u01A1 D\u1EF1 \u00E1n \u0110\u1EA5u th\u1EA7u, H\u1ED3 s\u01A1 H\u1EE3p \u0111\u1ED3ng...\"\n />\n </div>\n <div style=\"flex: 1; min-width: 170px\">\n <label class=\"drawer-field-label\">M\u00E3 m\u1EABu (D\u00F9ng g\u1ECDi API t\u1EEB Module kh\u00E1c)</label>\n <input nz-input [(ngModel)]=\"templateInputCode\" placeholder=\"VD: MAU_DU_AN, MAU_HOP_DONG...\" />\n </div>\n </div>\n\n <div>\n <label class=\"drawer-field-label\">M\u00F4 t\u1EA3 ng\u1EAFn</label>\n <input\n nz-input\n [(ngModel)]=\"templateInputDesc\"\n placeholder=\"M\u00F4 t\u1EA3 m\u1EE5c \u0111\u00EDch s\u1EED d\u1EE5ng ho\u1EB7c ph\u00E2n h\u1EC7 \u00E1p d\u1EE5ng...\"\n />\n </div>\n\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" [nzGap]=\"12\">\n <div style=\"flex: 1\">\n <div style=\"font-weight: 600; font-size: 13px\">T\u1EA1o th\u01B0 m\u1EE5c g\u1ED1c b\u1ECDc ngo\u00E0i khi k\u00E9o th\u1EA3</div>\n <div class=\"quota-sub\">\n Khi b\u1EADt: K\u00E9o th\u1EA3 m\u1EABu v\u00E0o th\u01B0 m\u1EE5c \u0111\u00EDch s\u1EBD t\u1EA1o 1 th\u01B0 m\u1EE5c mang t\u00EAn m\u1EABu r\u1ED3i ch\u1EE9a c\u00E2y con b\u00EAn trong.\n </div>\n </div>\n <nz-switch\n style=\"flex-shrink: 0\"\n [(ngModel)]=\"templateCreateWrapperRoot\"\n nzCheckedChildren=\"C\u00F3 b\u1ECDc g\u1ED1c\"\n nzUnCheckedChildren=\"Bung tr\u1EF1c ti\u1EBFp\"\n ></nz-switch>\n </div>\n\n <nz-divider style=\"margin: 6px 0\"></nz-divider>\n\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" [nzGap]=\"12\">\n <div style=\"flex: 1\">\n <div style=\"font-weight: 600; font-size: 13px\">Chia s\u1EBB m\u1EABu n\u00E0y cho to\u00E0n b\u1ED9 ng\u01B0\u1EDDi d\u00F9ng & ph\u00E2n h\u1EC7</div>\n <div class=\"quota-sub\">Cho ph\u00E9p m\u1ECDi ng\u01B0\u1EDDi d\u00F9ng v\u00E0 c\u00E1c Module nghi\u1EC7p v\u1EE5 kh\u00E1c s\u1EED d\u1EE5ng chung m\u1EABu n\u00E0y.</div>\n </div>\n <nz-switch\n style=\"flex-shrink: 0\"\n [(ngModel)]=\"templateVisibleToAll\"\n [nzDisabled]=\"!drive.isCurrentUserAdmin()\"\n nzCheckedChildren=\"To\u00E0n h\u1EC7 th\u1ED1ng\"\n nzUnCheckedChildren=\"C\u00E1 nh\u00E2n\"\n ></nz-switch>\n </div>\n </div>\n\n <!-- SO\u1EA0N TH\u1EA2O C\u1EA4U TR\u00DAC C\u00C2Y \u0110A C\u1EA4P & XEM TR\u01AF\u1EDAC TR\u1EF0C QUAN (NH\u1EA4N V\u00C0O D\u00D2NG \u0110\u1EC2 G\u00C1N QUY\u1EC0N RI\u00CANG) -->\n <div>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"6\" style=\"margin-bottom: 6px\">\n <label class=\"drawer-field-label\" style=\"margin-bottom: 0\">\n 1. C\u1EA5u tr\u00FAc C\u00E2y th\u01B0 m\u1EE5c (M\u1ED7i d\u00F2ng 1 th\u01B0 m\u1EE5c, th\u1EE5t l\u1EC1 2 kho\u1EA3ng tr\u1EAFng \u0111\u1EC3 t\u1EA1o c\u1EA5p con)\n </label>\n <div nz-flex [nzGap]=\"4\">\n <button type=\"button\" nz-button nzSize=\"small\" (click)=\"loadPresetTemplateStructure('PROJECT')\">\n M\u1EABu D\u1EF1 \u00E1n\n </button>\n <button type=\"button\" nz-button nzSize=\"small\" (click)=\"loadPresetTemplateStructure('CONTRACT')\">\n M\u1EABu H\u1EE3p \u0111\u1ED3ng\n </button>\n <button type=\"button\" nz-button nzSize=\"small\" (click)=\"loadPresetTemplateStructure('TRAINING')\">\n M\u1EABu \u0110\u00E0o t\u1EA1o / KHCN\n </button>\n </div>\n </div>\n\n <div class=\"template-editor-grid\">\n <div>\n <textarea\n nz-input\n rows=\"11\"\n [(ngModel)]=\"templateIndentedText\"\n style=\"font-family: monospace; font-size: 12.5px; line-height: 1.55\"\n placeholder=\"- 01. H\u1ED3 s\u01A1 ph\u00E1p l\u00FD - 01.1. T\u1EDD tr\u00ECnh - 01.2. Quy\u1EBFt \u0111\u1ECBnh - 02. H\u1EE3p \u0111\u1ED3ng & Nghi\u1EC7m thu\"\n ></textarea>\n </div>\n\n <div class=\"template-tree-preview\">\n <div\n nz-flex\n nzJustify=\"space-between\"\n nzAlign=\"center\"\n style=\"font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--app-text-muted, #64748b)\"\n >\n <span>Xem tr\u01B0\u1EDBc ({{ previewTemplateFlatNodes().length }} th\u01B0 m\u1EE5c) \u2014 Nh\u1EA5n \u0111\u1EC3 g\u00E1n quy\u1EC1n:</span>\n </div>\n\n <!-- D\u00F2ng ch\u1ECDn Quy\u1EC1n g\u1ED1c to\u00E0n b\u1ED9 m\u1EABu -->\n <div\n class=\"preview-tree-row selectable-preview-row\"\n [class.active-perm-target]=\"selectedTemplatePermTarget() === '__ROOT__'\"\n (click)=\"selectTemplatePermissionTarget('__ROOT__')\"\n >\n <nz-icon nzType=\"global\" style=\"color: #0284c7; margin-right: 6px\"></nz-icon>\n <strong style=\"flex: 1; font-size: 12px\">To\u00E0n b\u1ED9 c\u00E2y th\u01B0 m\u1EE5c m\u1EABu (Quy\u1EC1n g\u1ED1c)</strong>\n @if (templateRootPermissions().length > 0) {\n <nz-tag nzColor=\"blue\" style=\"margin: 0; font-size: 10.5px; line-height: 16px; padding: 0 5px\">\n \uD83D\uDEE1 {{ templateRootPermissions().length }}\n </nz-tag>\n }\n </div>\n\n @for (node of previewTemplateFlatNodes(); track node.RelativePath) {\n <div\n class=\"preview-tree-row selectable-preview-row\"\n [class.active-perm-target]=\"selectedTemplatePermTarget() === node.RelativePath\"\n [style.padding-left.px]=\"8 + node.Level * 16\"\n (click)=\"selectTemplatePermissionTarget(node.RelativePath)\"\n >\n <!-- nz-tooltip\n nzTooltipTitle=\"Nh\u1EA5n \u0111\u1EC3 c\u1EA5u h\u00ECnh ph\u00E2n quy\u1EC1n ri\u00EAng cho nh\u00E1nh th\u01B0 m\u1EE5c n\u00E0y\" -->\n <nz-icon nzType=\"folder-fill\" style=\"color: #f59e0b; margin-right: 6px\"></nz-icon>\n <span style=\"flex: 1; overflow: hidden; text-overflow: ellipsis\">{{ node.Name }}</span>\n @if (node.BreakInheritance) {\n <nz-tag\n nzColor=\"warning\"\n style=\"margin: 0 2px 0 0; font-size: 10px; line-height: 15px; padding: 0 4px\"\n nz-tooltip\n nzTooltipTitle=\"Ng\u1EAFt k\u1EBF th\u1EEBa quy\u1EC1n t\u1EEB th\u01B0 m\u1EE5c cha\"\n >\n \u0110\u1ED9c l\u1EADp\n </nz-tag>\n }\n @if (node.PermissionsCount > 0) {\n <nz-tag nzColor=\"cyan\" style=\"margin: 0; font-size: 10px; line-height: 15px; padding: 0 5px\">\n \uD83D\uDEE1 {{ node.PermissionsCount }}\n </nz-tag>\n }\n </div>\n }\n </div>\n </div>\n </div>\n\n <!-- ========================================================================= -->\n <!-- 2. C\u1EA4U H\u00CCNH PH\u00C2N QUY\u1EC0N M\u1EB6C \u0110\u1ECANH CHO M\u1EAAU C\u00C2Y TH\u01AF M\u1EE4C (ACL & RBAC) -->\n <!-- ========================================================================= -->\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <div>\n <div style=\"font-weight: 600; font-size: 13px\">\n <nz-icon nzType=\"safety-certificate\" style=\"color: #0284c7; margin-right: 4px\"></nz-icon>\n 2. Ph\u00E2n quy\u1EC1n c\u00E0i s\u1EB5n khi t\u1EA1o m\u1EDBi t\u1EEB M\u1EABu c\u00E2y th\u01B0 m\u1EE5c\n </div>\n <div class=\"quota-sub\">\n @if (selectedTemplatePermTarget() === \"__ROOT__\") {\n \u0110ang c\u1EA5u h\u00ECnh cho: <strong style=\"color: #0284c7\">\uD83C\uDF10 To\u00E0n b\u1ED9 c\u00E2y th\u01B0 m\u1EE5c m\u1EABu (Quy\u1EC1n g\u1ED1c)</strong> \u2014 T\u1EF1\n \u0111\u1ED9ng k\u1EBF th\u1EEBa xu\u1ED1ng m\u1ECDi th\u01B0 m\u1EE5c con.\n } @else {\n \u0110ang c\u1EA5u h\u00ECnh ri\u00EAng cho nh\u00E1nh:\n <strong style=\"color: #d97706\">\uD83D\uDCC2 {{ selectedTemplatePermTarget() }}</strong>\n <a style=\"margin-left: 8px; font-weight: 600\" (click)=\"selectTemplatePermissionTarget('__ROOT__')\">\n \u21A9 Quay v\u1EC1 Quy\u1EC1n g\u1ED1c to\u00E0n m\u1EABu\n </a>\n }\n </div>\n </div>\n\n @if (selectedTemplatePermTarget() !== \"__ROOT__\") {\n <div nz-flex nzAlign=\"center\" [nzGap]=\"6\">\n <span style=\"font-size: 12px\">Ng\u1EAFt k\u1EBF th\u1EEBa cha:</span>\n <nz-switch\n nzSize=\"small\"\n [ngModel]=\"activeTemplateTargetBreakInheritance()\"\n (ngModelChange)=\"onToggleTemplateNodeBreakInheritance($event)\"\n nzCheckedChildren=\"\u0110\u1ED9c l\u1EADp\"\n nzUnCheckedChildren=\"K\u1EBF th\u1EEBa\"\n nz-tooltip\n nzTooltipTitle=\"Khi b\u1EADt \u0110\u1ED9c l\u1EADp: Th\u01B0 m\u1EE5c con n\u00E0y s\u1EBD ng\u1EAFt k\u1EBF th\u1EEBa quy\u1EC1n t\u1EEB th\u01B0 m\u1EE5c cha v\u00E0 ch\u1EC9 \u00E1p d\u1EE5ng danh s\u00E1ch quy\u1EC1n ri\u00EAng b\u00EAn d\u01B0\u1EDBi\"\n ></nz-switch>\n </div>\n }\n </div>\n\n <!-- Thanh ch\u1ECDn \u0110\u1ED1i t\u01B0\u1EE3ng (User / \u0110\u01A1n v\u1ECB / Vai tr\u00F2) & M\u1EE9c quy\u1EC1n -->\n <div nz-flex nzWrap=\"wrap\" [nzGap]=\"6\" nzAlign=\"center\" style=\"margin-top: 6px\">\n <nz-select\n [(ngModel)]=\"templatePermGranteeType\"\n (ngModelChange)=\"onTemplatePermGranteeTypeChange()\"\n nzSize=\"small\"\n style=\"width: 140px\"\n >\n <nz-option [nzValue]=\"DriveGranteeType.Org\" nzLabel=\"\uD83C\uDFE2 \u0110\u01A1n v\u1ECB (Org)\"></nz-option>\n <nz-option [nzValue]=\"DriveGranteeType.Role\" nzLabel=\"\uD83D\uDEE1 Vai tr\u00F2 (Role)\"></nz-option>\n <nz-option [nzValue]=\"DriveGranteeType.User\" nzLabel=\"\uD83D\uDC64 C\u00E1 nh\u00E2n (User)\"></nz-option>\n </nz-select>\n\n <nz-select\n nzShowSearch\n nzServerSearch\n nzSize=\"small\"\n nzPlaceHolder=\"T\u00ECm ch\u1ECDn User / \u0110\u01A1n v\u1ECB / Vai tr\u00F2...\"\n [(ngModel)]=\"templatePermSelectedGrantee\"\n (nzOnSearch)=\"onSearchTemplateGrantee($event)\"\n style=\"flex: 1; min-width: 210px\"\n >\n @for (g of templateGranteeOptions(); track g.GranteeId) {\n <nz-option [nzValue]=\"g\" [nzLabel]=\"g.DisplayName + ' (' + g.Code + ')'\"></nz-option>\n }\n </nz-select>\n\n <nz-select\n [(ngModel)]=\"templatePermAccessLevel\"\n [nzDisabled]=\"templatePermIsDeny\"\n nzSize=\"small\"\n style=\"width: 155px\"\n >\n <nz-option [nzValue]=\"DriveAccessLevel.Viewer\" nzLabel=\"\uD83D\uDC41 Ch\u1EC9 xem (10)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Downloader\" nzLabel=\"\u2B07 Xem & T\u1EA3i (20)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Uploader\" nzLabel=\"\u2601 Xem & T\u1EA3i l\u00EAn (35)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Editor\" nzLabel=\"\u270E Ch\u1EC9nh s\u1EEDa (40)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Manager\" nzLabel=\"\uD83D\uDC51 Qu\u1EA3n tr\u1ECB (50)\"></nz-option>\n </nz-select>\n\n <label\n nz-checkbox\n [(ngModel)]=\"templatePermIsDeny\"\n nz-tooltip\n nzTooltipTitle=\"C\u1EA5m truy c\u1EADp (Explicit Deny) \u0111\u1ED1i v\u1EDBi \u0111\u1ED1i t\u01B0\u1EE3ng n\u00E0y tr\u00EAn nh\u00E1nh \u0111ang ch\u1ECDn\"\n style=\"font-size: 12px\"\n >\n C\u1EA5m (Deny)\n </label>\n\n <button\n type=\"button\"\n nz-button\n nzType=\"primary\"\n nzSize=\"small\"\n [disabled]=\"!templatePermSelectedGrantee\"\n (click)=\"addPermissionToTemplateTarget()\"\n >\n <nz-icon nzType=\"user-add\"></nz-icon> Th\u00EAm quy\u1EC1n\n </button>\n </div>\n\n <!-- Danh s\u00E1ch c\u00E1c quy\u1EC1n \u0111\u00E3 \u0111\u1EB7t cho m\u1EE5c \u0111ang ch\u1ECDn -->\n @if (activeTemplateTargetPermissions().length === 0) {\n <div class=\"quota-sub\" style=\"padding: 8px 4px 2px\">\n @if (selectedTemplatePermTarget() === \"__ROOT__\") {\n Ch\u01B0a \u0111\u1EB7t quy\u1EC1n m\u1EB7c \u0111\u1ECBnh cho to\u00E0n m\u1EABu. H\u00E3y ch\u1ECDn \u0110\u01A1n v\u1ECB / Vai tr\u00F2 / C\u00E1 nh\u00E2n \u1EDF tr\u00EAn r\u1ED3i b\u1EA5m\n <strong>+ Th\u00EAm quy\u1EC1n</strong> (ho\u1EB7c b\u1EA5m v\u00E0o t\u1EEBng th\u01B0 m\u1EE5c b\u00EAn khung Xem tr\u01B0\u1EDBc \u0111\u1EC3 \u0111\u1EB7t quy\u1EC1n ri\u00EAng cho\n nh\u00E1nh con).\n } @else {\n Nh\u00E1nh <strong>\"{{ selectedTemplatePermTarget() }}\"</strong> ch\u01B0a c\u00F3 quy\u1EC1n ri\u00EAng (m\u1EB7c \u0111\u1ECBnh k\u1EBF th\u1EEBa t\u1EEB th\u01B0\n m\u1EE5c cha).\n }\n </div>\n } @else {\n <nz-table\n #tplPermTable\n [nzData]=\"activeTemplateTargetPermissions()\"\n nzSize=\"small\"\n [nzBordered]=\"true\"\n [nzFrontPagination]=\"false\"\n [nzShowPagination]=\"false\"\n style=\"margin-top: 6px\"\n >\n <thead>\n <tr>\n <th>\u0110\u1ED1i t\u01B0\u1EE3ng nh\u1EADn quy\u1EC1n</th>\n <th nzWidth=\"185px\">M\u1EE9c quy\u1EC1n \u00E1p d\u1EE5ng</th>\n <th nzWidth=\"95px\" class=\"text-center\">T\u1EA3i xu\u1ED1ng</th>\n <th nzWidth=\"65px\" class=\"text-center\">X\u00F3a</th>\n </tr>\n </thead>\n <tbody>\n @for (p of tplPermTable.data; track p.GranteeType + \":\" + p.GranteeId) {\n <tr>\n <td>\n <nz-tag\n [nzColor]=\"\n p.GranteeType === DriveGranteeType.User\n ? 'blue'\n : p.GranteeType === DriveGranteeType.Org\n ? 'cyan'\n : 'purple'\n \"\n >\n {{\n p.GranteeType === DriveGranteeType.User\n ? \"User\"\n : p.GranteeType === DriveGranteeType.Org\n ? \"\u0110\u01A1n v\u1ECB\"\n : \"Role\"\n }}\n </nz-tag>\n <strong>{{ p.GranteeName || p.GranteeId }}</strong>\n </td>\n <td>\n <nz-select\n nzSize=\"small\"\n [ngModel]=\"p.IsDeny ? 'DENY' : p.AccessLevel\"\n (ngModelChange)=\"updateTemplatePermissionLevel(p, $event)\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"DriveAccessLevel.Viewer\" nzLabel=\"\uD83D\uDC41 Ch\u1EC9 xem (10)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Downloader\" nzLabel=\"\u2B07 Xem & T\u1EA3i (20)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Uploader\" nzLabel=\"\u2601 Xem & T\u1EA3i l\u00EAn (35)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Editor\" nzLabel=\"\u270E Ch\u1EC9nh s\u1EEDa (40)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Manager\" nzLabel=\"\uD83D\uDC51 Qu\u1EA3n tr\u1ECB (50)\"></nz-option>\n <nz-option nzValue=\"DENY\" nzLabel=\"\uD83D\uDEAB C\u1EA5m (Deny)\"></nz-option>\n </nz-select>\n </td>\n <td class=\"text-center\">\n <nz-tag [nzColor]=\"p.CanDownload && !p.IsDeny ? 'green' : 'default'\">\n {{ p.CanDownload && !p.IsDeny ? \"Cho ph\u00E9p\" : \"Ch\u1EB7n\" }}\n </nz-tag>\n </td>\n <td class=\"text-center\">\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"G\u1EE1 quy\u1EC1n n\u00E0y kh\u1ECFi m\u1EABu\"\n (click)=\"removePermissionFromTemplateTarget(p)\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n }\n </div>\n </div>\n </ng-container>\n\n <ng-template #templateDrawerFooterTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div>\n @if (templateDrawerMode === \"edit\" && editingTemplate) {\n <button nz-button nzDanger nzType=\"default\" (click)=\"onDeleteTemplate(editingTemplate)\">\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a m\u1EABu n\u00E0y\n </button>\n }\n </div>\n <div nz-flex [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"templateDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitTemplateDrawer()\">\n <nz-icon nzType=\"save\"></nz-icon>\n {{ templateDrawerMode === \"create\" ? \"L\u01B0u m\u1EABu c\u00E2y th\u01B0 m\u1EE5c\" : \"C\u1EADp nh\u1EADt m\u1EABu\" }}\n </button>\n </div>\n </div>\n </ng-template>\n </nz-drawer>\n}\n", styles: ["@charset \"UTF-8\";.drive-shell{display:grid;grid-template-columns:245px 1fr;min-height:calc(100vh - 85px);background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px;overflow:hidden}.drive-sidebar{padding:14px;background:var(--app-sidebar-bg, #f8fafc);border-right:1px solid var(--app-border, #e2e8f0);display:flex;flex-direction:column;gap:14px}.drive-nav{display:flex;flex-direction:column;gap:4px}.drive-nav a{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:6px;color:var(--app-text, #334155);cursor:pointer;transition:background .15s}.drive-nav a.space-has-active-child{color:var(--primary-color, #1890ff);font-weight:600;background:color-mix(in srgb,var(--primary-color, #1890ff) 7%,transparent)}.drive-nav a:hover,.drive-nav a.active{background:color-mix(in srgb,var(--primary-color, #1890ff) 16%,transparent);color:var(--primary-color, #1890ff);font-weight:600}.org-nav-group{display:flex;flex-direction:column;gap:2px}.custom-space-link{font-size:13px}.custom-space-title{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.custom-space-badge{margin:0!important;font-size:10px;line-height:16px;padding:0 4px}.nav-inline-btn{border:none;background:transparent;color:inherit;cursor:pointer;padding:2px 4px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;opacity:.7}.nav-inline-btn:hover{opacity:1;background:color-mix(in srgb,var(--primary-color, #1890ff) 18%,transparent)}.storage-mode-box{padding:10px 12px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px}.upload-queue-box{padding:10px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px;max-height:180px;overflow-y:auto}.upload-task-row{margin-bottom:6px}.upload-task-name{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.quota-box{margin-top:auto;padding:12px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px}.quota-title{font-size:13px;font-weight:600;margin-bottom:6px}.quota-sub{font-size:12px;color:var(--app-text-muted, #64748b);margin-top:4px}.drive-shell.sidebar-wide{grid-template-columns:335px 1fr}.sidebar-tree-header-bar{display:flex;justify-content:space-between;align-items:center;padding:6px 10px;border-radius:6px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0)}.sidebar-tree-header-title{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600;color:var(--app-text, #334155)}.sidebar-tree-header-actions{display:inline-flex;align-items:center;gap:3px}.sidebar-tree-tool-btn{border:none;background:transparent;color:var(--app-text-muted, #64748b);width:22px;height:22px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;font-size:12px;transition:background .15s,color .15s}.sidebar-tree-tool-btn:hover,.sidebar-tree-tool-btn.active{background:color-mix(in srgb,var(--primary-color, #1890ff) 14%,transparent);color:var(--primary-color, #1890ff)}.sidebar-tree-filter-box{margin-top:-6px}.nav-item-with-tree{display:flex;flex-direction:column}.nav-caret-btn{border:none;background:transparent;color:inherit;width:18px;height:18px;padding:0;margin-left:-4px;margin-right:-2px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;font-size:11px;opacity:.75;flex-shrink:0;transition:transform .15s,background .15s,opacity .15s}.nav-caret-btn:hover{opacity:1;background:color-mix(in srgb,var(--primary-color, #1890ff) 18%,transparent)}.sidebar-tree-container{display:flex;flex-direction:column;gap:1px;margin:2px 0 6px 14px;padding-left:6px;border-left:1.5px dashed var(--app-border, #cbd5e1);max-height:320px;overflow-y:auto;overflow-x:hidden}.drive-shell.sidebar-wide .sidebar-tree-container{max-height:420px}.sidebar-tree-node{display:flex;align-items:center;gap:5px;padding:5px 8px;border-radius:5px;font-size:12.5px;color:var(--app-text, #334155);cursor:pointer;-webkit-user-select:none;user-select:none;transition:background .12s,color .12s;min-width:0}.sidebar-tree-node:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 10%,transparent)}.sidebar-tree-node.active-breadcrumb-ancestor{font-weight:600;color:var(--primary-color, #1890ff)}.sidebar-tree-node.active-tree-node,.sidebar-tree-node.context-active-tree-node{background:color-mix(in srgb,var(--primary-color, #1890ff) 16%,transparent);color:var(--primary-color, #1890ff);font-weight:600;box-shadow:inset 2.5px 0 0 var(--primary-color, #1890ff)}.sidebar-tree-node.tree-drop-active{background:color-mix(in srgb,var(--primary-color, #1890ff) 22%,transparent)!important;outline:1.5px dashed var(--primary-color, #1890ff);color:var(--primary-color, #1890ff);font-weight:600}.tree-node-caret{width:16px;height:16px;border:none;background:transparent;color:var(--app-text-muted, #64748b);padding:0;border-radius:3px;display:inline-flex;align-items:center;justify-content:center;font-size:10px;cursor:pointer;flex-shrink:0}.tree-node-caret:hover{color:var(--primary-color, #1890ff);background:color-mix(in srgb,var(--primary-color, #1890ff) 16%,transparent)}.tree-node-caret-spacer{width:16px;height:16px;display:inline-block;flex-shrink:0}.tree-node-folder-icon{font-size:15px;flex-shrink:0}.tree-node-label{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.35}.tree-node-quick-btn{border:none;background:transparent;color:var(--app-text-muted, #64748b);width:20px;height:20px;padding:0;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;opacity:0;cursor:pointer;flex-shrink:0;font-size:11px;transition:opacity .12s,background .12s,color .12s}.sidebar-tree-node:hover .tree-node-quick-btn{opacity:.85}.tree-node-quick-btn:hover{opacity:1!important;color:var(--primary-color, #1890ff);background:color-mix(in srgb,var(--primary-color, #1890ff) 18%,transparent)}.sidebar-tree-empty{padding:4px 8px 4px 20px;font-size:11.5px;color:var(--app-text-muted, #94a3b8);font-style:italic}.drive-main{position:relative;padding:16px;display:flex;flex-direction:column;gap:12px;transition:background .15s,border-color .15s}.drive-main.external-drag-active{background:color-mix(in srgb,var(--primary-color, #1890ff) 6%,var(--app-container-bg, #ffffff));outline:2px dashed var(--primary-color, #1890ff);outline-offset:-6px}.external-drop-banner{pointer-events:none;display:flex;align-items:center;gap:14px;padding:12px 18px;border-radius:8px;background:color-mix(in srgb,var(--primary-color, #1890ff) 14%,var(--app-container-bg, #ffffff));border:1px dashed var(--primary-color, #1890ff);color:var(--app-text, #1e293b)}.drop-banner-icon{font-size:28px;color:var(--primary-color, #1890ff)}.drop-banner-title{font-size:14px;font-weight:500}.drop-banner-sub{font-size:12px;color:var(--app-text-muted, #64748b);margin-top:2px}.drive-toolbar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;padding-bottom:10px;border-bottom:1px solid var(--app-border, #f1f5f9)}.bulk-action-bar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;padding:8px 14px;border-radius:8px;background:color-mix(in srgb,var(--primary-color, #1890ff) 9%,var(--app-container-bg, #ffffff));border:1px solid color-mix(in srgb,var(--primary-color, #1890ff) 32%,var(--app-border, #cbd5e1));box-shadow:0 2px 8px #1890ff14}.bulk-action-summary{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:13px;color:var(--app-text, #1e293b)}.bulk-action-meta{font-size:12px;color:var(--app-text-muted, #64748b)}.bulk-action-buttons{display:flex;align-items:center;flex-wrap:wrap;gap:6px}.checkbox-col-th,.checkbox-col-td{-webkit-user-select:none;user-select:none;cursor:pointer}.trash-info-banner{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;padding:9px 14px;border-radius:8px;background:#ef44440f;border:1px solid rgba(239,68,68,.24);font-size:13px;color:var(--app-text, #334155)}.physical-path-bar{display:flex;align-items:center;gap:6px;margin-top:4px;font-size:12px;color:var(--app-text-muted, #64748b)}.toolbar-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.drive-row{cursor:pointer;transition:background .15s,outline .15s}.drive-row.row-checked>td,.drive-row.row-active>td,.drive-row.active>td{background:color-mix(in srgb,var(--primary-color, #1890ff) 11%,var(--app-container-bg, #ffffff))!important}.drive-row.row-checked>td:first-child,.drive-row.row-active>td:first-child,.drive-row.active>td:first-child{box-shadow:inset 3.5px 0 0 var(--primary-color, #1890ff)!important}.drive-row:not(.row-active):not(.row-checked):not(:hover):not(.drop-target-active)>td{background:transparent!important;box-shadow:none!important}.drive-row.dragging-row{opacity:.45}.drive-row.drop-target-active>td{background:color-mix(in srgb,var(--primary-color, #1890ff) 18%,transparent)!important;border-top:1px dashed var(--primary-color, #1890ff);border-bottom:1px dashed var(--primary-color, #1890ff)}.bc-drop-active,.drive-nav a.nav-drop-active{background:color-mix(in srgb,var(--primary-color, #1890ff) 22%,transparent)!important;outline:1.5px dashed var(--primary-color, #1890ff);color:var(--primary-color, #1890ff);font-weight:600}.node-name-cell{display:flex;align-items:center;gap:8px}.node-icon-wrap{position:relative;display:inline-flex;align-items:center;justify-content:center}.node-icon{font-size:18px}.shortcut-badge{position:absolute;right:-5px;bottom:-3px;width:13px;height:13px;border-radius:50%;background:#7c3aed;color:#fff;font-size:9px;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 0 0 1.5px var(--app-container-bg, #ffffff)}.node-title{font-weight:500}.action-btn-group{display:inline-flex;align-items:center;justify-content:center;gap:4px}.action-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;background:transparent;border-radius:6px;cursor:pointer;font-size:15px;transition:background .15s,transform .1s}.action-icon-btn:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 12%,transparent);transform:translateY(-1px)}.action-icon-btn.color-warn:hover{background:#ef44441f}.sortable-th{cursor:pointer;-webkit-user-select:none;user-select:none;transition:background .15s,color .15s}.sortable-th:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 8%,var(--app-sidebar-bg, #f8fafc))!important;color:var(--primary-color, #1890ff)}.th-sort-wrap{display:inline-flex;align-items:center;gap:6px;width:100%}.th-sort-wrap.justify-center{justify-content:center}.th-sort-wrap.justify-end{justify-content:flex-end}.sort-icon{font-size:13px;opacity:.35;transition:opacity .15s,color .15s}.sort-icon.active{opacity:1;color:var(--primary-color, #1890ff)}.sortable-th:hover .sort-icon{opacity:.85}.drawer-field-label{display:block;font-size:13px;font-weight:600;margin-bottom:6px;color:var(--app-text, #334155)}.drawer-meta-card{padding:12px 14px;background:var(--app-sidebar-bg, #f8fafc);border:1px solid var(--app-border, #e2e8f0);border-radius:8px;display:flex;flex-direction:column;gap:8px}.drawer-meta-header{display:flex;align-items:center;gap:10px}.drawer-meta-row{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px}.meta-label{color:var(--app-text-muted, #64748b)}.template-sidebar-box{padding:10px 12px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px}.template-chip-list{display:flex;flex-direction:column;gap:6px;max-height:175px;overflow-y:auto}.template-drag-item{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:6px 8px;border-radius:6px;border:1px dashed var(--app-border, #cbd5e1);background:var(--app-sidebar-bg, #f8fafc);cursor:grab;transition:all .15s}.template-drag-item:hover{border-color:var(--primary-color, #1890ff);background:color-mix(in srgb,var(--primary-color, #1890ff) 10%,transparent)}.template-item-title{font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.template-item-sub{font-size:10.5px;color:var(--app-text-muted, #64748b)}.template-editor-grid{display:grid;grid-template-columns:1.15fr 1fr;gap:10px}.template-tree-preview{border:1px solid var(--app-border, #e2e8f0);border-radius:6px;padding:10px;background:var(--app-sidebar-bg, #f8fafc);max-height:450px;overflow-y:auto}.preview-tree-row{display:flex;align-items:center;font-size:12.5px;padding:2.5px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.selectable-preview-row{cursor:pointer;padding:4px 6px;border-radius:5px;transition:background .12s,border-color .12s;border:1px solid transparent}.selectable-preview-row:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 10%,transparent)}.selectable-preview-row.active-perm-target{background:color-mix(in srgb,var(--primary-color, #1890ff) 16%,transparent);border-color:var(--primary-color, #1890ff);font-weight:600}.drive-preview-body-fill{--drive-preview-fill-height: calc(100vh - 103px) ;display:flex;flex-direction:column;flex:1 1 auto;width:100%;height:100%;min-height:var(--drive-preview-fill-height);overflow:hidden}.drive-preview-body-fill.no-drawer-footer{--drive-preview-fill-height: calc(100vh - 55px) }.drive-preview-body-fill ::ng-deep extend-view-file-content{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;width:100%!important;height:100%!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important}.drive-preview-body-fill ::ng-deep extend-view-file-content>*:not(style):not(script),.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer>div,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .html,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .ink-switch-box,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .zoom,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer #outerContainer,.drive-preview-body-fill ::ng-deep extend-view-file-content pdf-viewer,.drive-preview-body-fill ::ng-deep extend-view-file-content iframe,.drive-preview-body-fill ::ng-deep extend-view-file-content embed,.drive-preview-body-fill ::ng-deep extend-view-file-content object{display:block!important;flex:1 1 auto!important;width:100%!important;height:var(--drive-preview-fill-height)!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important}.drive-preview-body-fill ::ng-deep extend-view-file-content pre{flex:1 1 auto!important;width:100%!important;height:var(--drive-preview-fill-height)!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important;margin:0!important;padding:16px!important;overflow:auto!important;box-sizing:border-box!important}::ng-deep .nowrap-tooltip{max-width:none!important}::ng-deep .nowrap-tooltip .ant-tooltip-inner{white-space:nowrap!important;max-width:none!important;width:max-content!important}\n"] }]
|
|
36775
|
+
], providers: [NzImageService], template: "@if (activeShareToken(); as sToken) {\n <lib-drive-share-viewer [token]=\"sToken\" (backToDrive)=\"closeEmbeddedShareViewer()\"></lib-drive-share-viewer>\n} @else {\n <div class=\"drive-shell\" [class.sidebar-wide]=\"sidebarWideMode() && showSidebarTree()\">\n <!-- SIDEBAR \u0110I\u1EC0U H\u01AF\u1EDANG & QUOTA -->\n <aside class=\"drive-sidebar\">\n <div nz-flex nzVertical nzGap=\"small\">\n <button\n nz-button\n nzType=\"primary\"\n nzBlock\n [disabled]=\"!drive.canUploadCurrentFolder()\"\n (click)=\"fileInput.click()\"\n >\n <nz-icon nzType=\"cloud-upload\"></nz-icon> T\u1EA3i t\u1EADp tin l\u00EAn\n </button>\n <input #fileInput type=\"file\" multiple hidden (change)=\"onFilesSelected($event)\" />\n <button\n nz-button\n nzType=\"default\"\n nzBlock\n [disabled]=\"!drive.canEditCurrentFolder()\"\n (click)=\"openFolderDrawer('create')\"\n >\n <nz-icon nzType=\"folder-add\"></nz-icon> T\u1EA1o th\u01B0 m\u1EE5c m\u1EDBi\n </button>\n </div>\n <!-- THANH T\u00D9Y CH\u1ECCN HI\u1EC2N TH\u1ECA C\u00C2Y TH\u01AF M\u1EE4C B\u00CAN TR\u00C1I (SIDEBAR FOLDER TREE OPTIONS) -->\n <div class=\"sidebar-tree-header-bar\">\n <span class=\"sidebar-tree-header-title\">\n <nz-icon nzType=\"partition\" style=\"color: var(--primary-color, #1890ff)\"></nz-icon>\n <span>C\u00E2y th\u01B0 m\u1EE5c</span>\n </span>\n <div class=\"sidebar-tree-header-actions\">\n @if (showSidebarTree()) {\n <button\n type=\"button\"\n class=\"sidebar-tree-tool-btn\"\n nz-tooltip\n nzTooltipTitle=\"M\u1EDF r\u1ED9ng nhanh c\u00E1c nh\u00E1nh th\u01B0 m\u1EE5c\"\n (click)=\"expandAllSidebarTreeNodes()\"\n >\n <nz-icon nzType=\"node-expand\"></nz-icon>\n </button>\n <button\n type=\"button\"\n class=\"sidebar-tree-tool-btn\"\n nz-tooltip\n nzTooltipTitle=\"Thu g\u1ECDn c\u00E1c nh\u00E1nh th\u01B0 m\u1EE5c\"\n (click)=\"collapseAllSidebarTreeNodes()\"\n >\n <nz-icon nzType=\"node-collapse\"></nz-icon>\n </button>\n <button\n type=\"button\"\n class=\"sidebar-tree-tool-btn\"\n nz-tooltip\n nzTooltipTitle=\"L\u00E0m m\u1EDBi c\u00E2y th\u01B0 m\u1EE5c\"\n (click)=\"refreshAllExpandedSidebarTrees()\"\n >\n <nz-icon nzType=\"reload\"></nz-icon>\n </button>\n <button\n type=\"button\"\n class=\"sidebar-tree-tool-btn\"\n [class.active]=\"sidebarWideMode()\"\n nz-tooltip\n [nzTooltipTitle]=\"\n sidebarWideMode() ? 'Thu g\u1ECDn \u0111\u1ED9 r\u1ED9ng c\u1ED9t tr\u00E1i' : 'M\u1EDF r\u1ED9ng \u0111\u1ED9 r\u1ED9ng c\u1ED9t tr\u00E1i \u0111\u1EC3 xem c\u00E2y th\u01B0 m\u1EE5c r\u00F5 h\u01A1n'\n \"\n (click)=\"onToggleSidebarWideMode()\"\n >\n <nz-icon nzType=\"column-width\"></nz-icon>\n </button>\n }\n <nz-switch\n nzSize=\"small\"\n [ngModel]=\"showSidebarTree()\"\n (ngModelChange)=\"onToggleSidebarTree($event)\"\n nz-tooltip\n nzTooltipTitle=\"B\u1EADt / T\u1EAFt hi\u1EC3n th\u1ECB c\u00E2y th\u01B0 m\u1EE5c tr\u1EF1c ti\u1EBFp b\u00EAn tr\u00E1i\"\n ></nz-switch>\n </div>\n </div>\n\n @if (showSidebarTree()) {\n <div class=\"sidebar-tree-filter-box\">\n <nz-input-group [nzPrefix]=\"sidebarFilterPrefixTpl\" [nzSuffix]=\"sidebarFilterClearTpl\" nzSize=\"small\">\n <input\n nz-input\n type=\"text\"\n placeholder=\"L\u1ECDc nhanh th\u01B0 m\u1EE5c tr\u00EAn c\u00E2y...\"\n [ngModel]=\"sidebarTreeFilter()\"\n (ngModelChange)=\"onSidebarTreeFilterChange($event)\"\n />\n </nz-input-group>\n <ng-template #sidebarFilterPrefixTpl>\n <nz-icon nzType=\"filter\" style=\"color: var(--app-text-muted, #94a3b8); font-size: 12px\"></nz-icon>\n </ng-template>\n <ng-template #sidebarFilterClearTpl>\n @if (sidebarTreeFilter()) {\n <nz-icon\n nzType=\"close-circle\"\n nzTheme=\"fill\"\n class=\"cursor-pointer\"\n style=\"color: var(--app-text-muted, #94a3b8); font-size: 12px\"\n (click)=\"onSidebarTreeFilterChange('')\"\n ></nz-icon>\n }\n </ng-template>\n </div>\n }\n\n <nav class=\"drive-nav\">\n <!-- 1. DRIVE C\u00C1 NH\u00C2N + C\u00C2Y TH\u01AF M\u1EE4C CON -->\n <div class=\"nav-item-with-tree\">\n <a\n [class.active]=\"drive.currentViewMode() === 'MY_DRIVE' && (!drive.currentFolderId() || !showSidebarTree())\"\n [class.space-has-active-child]=\"\n drive.currentViewMode() === 'MY_DRIVE' && !!drive.currentFolderId() && showSidebarTree()\n \"\n [class.nav-drop-active]=\"dragOverNavSpace() === 'MY_DRIVE'\"\n (click)=\"switchView('MY_DRIVE')\"\n (dragover)=\"onNavSpaceDragOver($event, 'MY_DRIVE')\"\n (dragleave)=\"onNavSpaceDragLeave('MY_DRIVE')\"\n (drop)=\"onNavSpaceDrop($event, 'MY_DRIVE')\"\n >\n @if (showSidebarTree()) {\n <button\n type=\"button\"\n class=\"nav-caret-btn\"\n (click)=\"toggleSidebarSpaceTree($event, 'MY_DRIVE')\"\n [title]=\"\n isSidebarSpaceExpanded('MY_DRIVE') ? 'Thu g\u1ECDn c\u00E2y Drive c\u00E1 nh\u00E2n' : 'M\u1EDF c\u00E2y th\u01B0 m\u1EE5c Drive c\u00E1 nh\u00E2n'\n \"\n >\n <nz-icon\n [nzType]=\"\n isSidebarSpaceLoading('MY_DRIVE')\n ? 'loading'\n : isSidebarSpaceExpanded('MY_DRIVE')\n ? 'caret-down'\n : 'caret-right'\n \"\n ></nz-icon>\n </button>\n }\n <nz-icon nzType=\"hdd\"></nz-icon>\n <span style=\"flex: 1\">Drive c\u00E1 nh\u00E2n</span>\n </a>\n <ng-container *ngTemplateOutlet=\"sidebarSpaceTreeTpl; context: { spaceKey: 'MY_DRIVE' }\"></ng-container>\n </div>\n\n <!-- 2. T\u00C0I LI\u1EC6U \u0110\u01A0N V\u1ECA & C\u00C1C M\u1EE4C T\u00D9Y CH\u1EC8NH (CUSTOM SPACES) + C\u00C2Y TH\u01AF M\u1EE4C CON -->\n <div class=\"org-nav-group\">\n <div class=\"nav-item-with-tree\">\n <a\n [class.active]=\"\n drive.currentViewMode() === 'ORG_DRIVE' && (!drive.currentFolderId() || !showSidebarTree())\n \"\n [class.space-has-active-child]=\"\n drive.currentViewMode() === 'ORG_DRIVE' && !!drive.currentFolderId() && showSidebarTree()\n \"\n [class.nav-drop-active]=\"dragOverNavSpace() === 'ORG_DRIVE'\"\n (click)=\"switchView('ORG_DRIVE')\"\n (dragover)=\"onNavSpaceDragOver($event, 'ORG_DRIVE')\"\n (dragleave)=\"onNavSpaceDragLeave('ORG_DRIVE')\"\n (drop)=\"onNavSpaceDrop($event, 'ORG_DRIVE')\"\n >\n @if (showSidebarTree()) {\n <button\n type=\"button\"\n class=\"nav-caret-btn\"\n (click)=\"toggleSidebarSpaceTree($event, 'ORG_DRIVE')\"\n [title]=\"\n isSidebarSpaceExpanded('ORG_DRIVE')\n ? 'Thu g\u1ECDn c\u00E2y T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB'\n : 'M\u1EDF c\u00E2y th\u01B0 m\u1EE5c T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB'\n \"\n >\n <nz-icon\n [nzType]=\"\n isSidebarSpaceLoading('ORG_DRIVE')\n ? 'loading'\n : isSidebarSpaceExpanded('ORG_DRIVE')\n ? 'caret-down'\n : 'caret-right'\n \"\n ></nz-icon>\n </button>\n }\n <nz-icon nzType=\"apartment\"></nz-icon>\n <span style=\"flex: 1\">T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB</span>\n @if (drive.isCurrentUserAdmin() || drive.orgDriveSpace()?.CanManage) {\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n nz-tooltip\n nzTooltipTitle=\"Ph\u00E2n quy\u1EC1n & C\u1EA5u h\u00ECnh T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"\n (click)=\"$event.stopPropagation(); openOrgDriveSpaceDrawer()\"\n >\n <nz-icon nzType=\"setting\"></nz-icon>\n </button>\n }\n @if (drive.isCurrentUserAdmin()) {\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n nz-tooltip\n nzTooltipTitle=\"Th\u00EAm m\u1EE5c t\u00F9y ch\u1EC9nh b\u00EAn d\u01B0\u1EDBi T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"\n (click)=\"$event.stopPropagation(); openCustomSpaceDrawer('create')\"\n >\n <nz-icon nzType=\"plus\"></nz-icon>\n </button>\n }\n </a>\n <ng-container *ngTemplateOutlet=\"sidebarSpaceTreeTpl; context: { spaceKey: 'ORG_DRIVE' }\"></ng-container>\n </div>\n\n <!-- DANH S\u00C1CH C\u00C1C M\u1EE4C CUSTOM B\u00CAN D\u01AF\u1EDAI \"T\u00C0I LI\u1EC6U \u0110\u01A0N V\u1ECA\" (VD: \"T\u00E0i li\u1EC7u d\u1EF1 \u00E1n\") -->\n @for (sp of drive.customSpaces(); track sp.Id) {\n <div class=\"nav-item-with-tree\">\n <a\n class=\"custom-space-link\"\n [class.active]=\"\n drive.currentViewMode() === 'CUSTOM_SPACE' &&\n drive.currentCustomSpaceId() === sp.Id &&\n (!drive.currentFolderId() || drive.currentFolderId() === sp.Id || !showSidebarTree())\n \"\n [class.space-has-active-child]=\"\n drive.currentViewMode() === 'CUSTOM_SPACE' &&\n drive.currentCustomSpaceId() === sp.Id &&\n !!drive.currentFolderId() &&\n drive.currentFolderId() !== sp.Id &&\n showSidebarTree()\n \"\n [class.nav-drop-active]=\"dragOverCustomSpaceId() === sp.Id\"\n (click)=\"switchCustomSpace(sp)\"\n (dragover)=\"onCustomSpaceDragOver($event, sp)\"\n (dragleave)=\"onCustomSpaceDragLeave(sp)\"\n (drop)=\"onCustomSpaceDrop($event, sp)\"\n >\n @if (showSidebarTree()) {\n <button\n type=\"button\"\n class=\"nav-caret-btn\"\n (click)=\"toggleSidebarSpaceTree($event, 'CUSTOM:' + sp.Id)\"\n [title]=\"\n isSidebarSpaceExpanded('CUSTOM:' + sp.Id) ? 'Thu g\u1ECDn c\u00E2y ' + sp.Name : 'M\u1EDF c\u00E2y th\u01B0 m\u1EE5c ' + sp.Name\n \"\n >\n <nz-icon\n [nzType]=\"\n isSidebarSpaceLoading('CUSTOM:' + sp.Id)\n ? 'loading'\n : isSidebarSpaceExpanded('CUSTOM:' + sp.Id)\n ? 'caret-down'\n : 'caret-right'\n \"\n ></nz-icon>\n </button>\n }\n <nz-icon [nzType]=\"sp.Icon || 'project'\"></nz-icon>\n <span class=\"custom-space-title\" [title]=\"sp.Name\">{{ sp.Name }}</span>\n @if (sp.IsVisibleToAllUsers) {\n <nz-tag nzColor=\"cyan\" class=\"custom-space-badge\">All</nz-tag>\n }\n @if (sp.CanManage || drive.isCurrentUserAdmin()) {\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n nz-tooltip\n [nzTooltipTitle]=\"'Ph\u00E2n quy\u1EC1n & C\u1EA5u h\u00ECnh ' + sp.Name\"\n (click)=\"$event.stopPropagation(); openCustomSpaceDrawer('edit', sp)\"\n >\n <nz-icon nzType=\"setting\"></nz-icon>\n </button>\n }\n </a>\n <ng-container\n *ngTemplateOutlet=\"sidebarSpaceTreeTpl; context: { spaceKey: 'CUSTOM:' + sp.Id }\"\n ></ng-container>\n </div>\n }\n </div>\n\n <!-- 3. \u0110\u01AF\u1EE2C CHIA S\u1EBA V\u1EDAI T\u00D4I + C\u00C2Y TH\u01AF M\u1EE4C CON -->\n <div class=\"nav-item-with-tree\">\n <a\n [class.active]=\"\n drive.currentViewMode() === 'SHARED_WITH_ME' && (!drive.currentFolderId() || !showSidebarTree())\n \"\n [class.space-has-active-child]=\"\n drive.currentViewMode() === 'SHARED_WITH_ME' && !!drive.currentFolderId() && showSidebarTree()\n \"\n (click)=\"switchView('SHARED_WITH_ME')\"\n >\n @if (showSidebarTree()) {\n <button\n type=\"button\"\n class=\"nav-caret-btn\"\n (click)=\"toggleSidebarSpaceTree($event, 'SHARED_WITH_ME')\"\n [title]=\"\n isSidebarSpaceExpanded('SHARED_WITH_ME')\n ? 'Thu g\u1ECDn c\u00E2y \u0110\u01B0\u1EE3c chia s\u1EBB v\u1EDBi t\u00F4i'\n : 'M\u1EDF c\u00E2y th\u01B0 m\u1EE5c \u0110\u01B0\u1EE3c chia s\u1EBB v\u1EDBi t\u00F4i'\n \"\n >\n <nz-icon\n [nzType]=\"\n isSidebarSpaceLoading('SHARED_WITH_ME')\n ? 'loading'\n : isSidebarSpaceExpanded('SHARED_WITH_ME')\n ? 'caret-down'\n : 'caret-right'\n \"\n ></nz-icon>\n </button>\n }\n <nz-icon nzType=\"share-alt\"></nz-icon>\n <span style=\"flex: 1\">\u0110\u01B0\u1EE3c chia s\u1EBB v\u1EDBi t\u00F4i</span>\n </a>\n <ng-container *ngTemplateOutlet=\"sidebarSpaceTreeTpl; context: { spaceKey: 'SHARED_WITH_ME' }\"></ng-container>\n </div>\n <a [class.active]=\"drive.currentViewMode() === 'RECENT'\" (click)=\"switchView('RECENT')\">\n <nz-icon nzType=\"clock-circle\"></nz-icon> G\u1EA7n \u0111\u00E2y\n </a>\n <a [class.active]=\"drive.currentViewMode() === 'STARRED'\" (click)=\"switchView('STARRED')\">\n <nz-icon nzType=\"star\"></nz-icon> C\u00F3 g\u1EAFn d\u1EA5u sao\n </a>\n <a [class.active]=\"drive.currentViewMode() === 'TRASH'\" (click)=\"switchView('TRASH')\">\n <nz-icon nzType=\"delete\"></nz-icon>\n <span style=\"flex: 1\">Th\u00F9ng r\u00E1c</span>\n @if (drive.currentViewMode() === \"TRASH\" && drive.items().length > 0 && drive.allowDeleteFromTrash()) {\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n style=\"color: #ef4444\"\n nz-tooltip\n nzTooltipTitle=\"D\u1ECDn s\u1EA1ch th\u00F9ng r\u00E1c (X\u00F3a v\u0129nh vi\u1EC5n t\u1EA5t c\u1EA3)\"\n (click)=\"$event.stopPropagation(); onEmptyTrash()\"\n >\n <nz-icon nzType=\"clear\"></nz-icon>\n </button>\n }\n </a>\n </nav>\n\n <!-- TEMPLATE D\u00D9NG CHUNG HI\u1EC2N TH\u1ECA C\u00C2Y TH\u01AF M\u1EE4C \u0110A C\u1EA4P B\u00CAN TR\u00C1I CHO T\u1EEANG KH\u00D4NG GIAN -->\n <ng-template #sidebarSpaceTreeTpl let-spaceKey=\"spaceKey\">\n @if (isSidebarSpaceExpanded(spaceKey)) {\n @if (getSidebarVisibleTreeNodes(spaceKey); as treeNodes) {\n @if (treeNodes.length > 0) {\n <div class=\"sidebar-tree-container\">\n @for (vm of treeNodes; track vm.folderId) {\n <div\n class=\"sidebar-tree-node\"\n [class.active-tree-node]=\"vm.isActive\"\n [class.context-active-tree-node]=\"isRowActive(vm.node) || selectedRowId() === vm.folderId\"\n [class.active-breadcrumb-ancestor]=\"vm.isInActiveBreadcrumb && !vm.isActive\"\n [class.tree-drop-active]=\"dragOverSidebarFolderId() === vm.folderId\"\n [style.padding-left.px]=\"6 + vm.level * 14\"\n [attr.draggable]=\"vm.node.EffectiveAccess >= DriveAccessLevel.Editor\"\n (dragstart)=\"onSidebarTreeNodeDragStart($event, vm)\"\n (dragend)=\"onRowDragEnd()\"\n (dragover)=\"onSidebarTreeNodeDragOver($event, vm)\"\n (dragleave)=\"onSidebarTreeNodeDragLeave($event, vm)\"\n (drop)=\"onSidebarTreeNodeDrop($event, vm)\"\n (click)=\"onSidebarTreeNodeClick(vm)\"\n (contextmenu)=\"onContextMenu($event, menu, vm.node)\"\n >\n @if (!vm.hasKnownNoChildren) {\n <button\n type=\"button\"\n class=\"tree-node-caret\"\n (click)=\"toggleSidebarFolderNode($event, vm)\"\n [title]=\"vm.isExpanded ? 'Thu g\u1ECDn nh\u00E1nh' : 'M\u1EDF r\u1ED9ng th\u01B0 m\u1EE5c con'\"\n >\n <nz-icon\n [nzType]=\"vm.isLoading ? 'loading' : vm.isExpanded ? 'caret-down' : 'caret-right'\"\n ></nz-icon>\n </button>\n } @else {\n <span class=\"tree-node-caret-spacer\"></span>\n }\n\n <nz-icon\n class=\"tree-node-folder-icon\"\n [nzType]=\"vm.isExpanded || vm.isActive ? 'folder-open' : 'folder-fill'\"\n [style.color]=\"vm.isActive ? 'var(--primary-color, #1890ff)' : '#f59e0b'\"\n ></nz-icon>\n\n <span class=\"tree-node-label\" [title]=\"vm.node.Name\">\n {{ vm.node.Name }}\n </span>\n\n @if (vm.node.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n class=\"tree-node-quick-btn\"\n title=\"T\u1EA1o th\u01B0 m\u1EE5c con trong '{{ vm.node.Name }}'\"\n (click)=\"openCreateSubfolderFromSidebar($event, vm)\"\n >\n <nz-icon nzType=\"plus\"></nz-icon>\n </button>\n }\n </div>\n }\n </div>\n } @else if (isSidebarSpaceLoading(spaceKey)) {\n <div class=\"sidebar-tree-empty\">\n <nz-icon nzType=\"loading\" style=\"margin-right: 4px\"></nz-icon> \u0110ang t\u1EA3i c\u00E2y th\u01B0 m\u1EE5c...\n </div>\n } @else if (sidebarTreeFilter().trim()) {\n <!-- <div class=\"sidebar-tree-empty\">Kh\u00F4ng kh\u1EDBp th\u01B0 m\u1EE5c n\u00E0o</div> -->\n } @else {\n <!-- <div class=\"sidebar-tree-empty\">Ch\u01B0a c\u00F3 th\u01B0 m\u1EE5c con</div> -->\n }\n }\n }\n </ng-template>\n <!-- KHUNG M\u1EAAU C\u00C2Y TH\u01AF M\u1EE4C (H\u1ED6 TR\u1EE2 K\u00C9O TH\u1EA2 V\u00C0O TH\u01AF M\u1EE4C \u0110\u00CDCH HO\u1EB6C B\u1EA4M T\u1EA0O NHANH) -->\n @if (drive.isCurrentUserAdmin()) {\n <div class=\"template-sidebar-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"margin-bottom: 6px\">\n <span style=\"font-size: 12px; font-weight: 600\">\n <nz-icon nzType=\"apartment\" style=\"color: #d97706; margin-right: 4px\"></nz-icon>\n M\u1EABu c\u00E2y th\u01B0 m\u1EE5c ({{ drive.folderTemplates().length }})\n </span>\n <button\n type=\"button\"\n nz-button\n nzType=\"link\"\n nzSize=\"small\"\n style=\"padding: 0 4px; font-size: 12px\"\n (click)=\"openTemplateDrawer('create')\"\n >\n <!-- nz-tooltip\n nzTooltipTitle=\"\u0110\u1ECBnh ngh\u0129a m\u1EABu c\u00E2y th\u01B0 m\u1EE5c m\u1EDBi\" -->\n <nz-icon nzType=\"plus\"></nz-icon> T\u1EA1o m\u1EABu\n </button>\n </div>\n\n @if (drive.folderTemplates().length === 0) {\n <div class=\"quota-sub\" style=\"font-size: 11px\">\n Ch\u01B0a c\u00F3 m\u1EABu n\u00E0o. B\u1EA5m <strong>+ T\u1EA1o m\u1EABu</strong> \u0111\u1EC3 \u0111\u1ECBnh ngh\u0129a c\u00E2y th\u01B0 m\u1EE5c chu\u1EA9n.\n </div>\n } @else {\n <div class=\"template-chip-list\">\n @for (tpl of drive.folderTemplates(); track tpl.Id) {\n <div\n class=\"template-drag-item\"\n draggable=\"true\"\n (dragstart)=\"onTemplateDragStart($event, tpl)\"\n (dragend)=\"onTemplateDragEnd()\"\n >\n <!-- nz-tooltip\n [nzTooltipTitle]=\"\n 'K\u00E9o th\u1EA3 m\u1EABu [' +\n tpl.Name +\n '] (' +\n tpl.TotalFolderCount +\n ' th\u01B0 m\u1EE5c) v\u00E0o m\u1ED9t Th\u01B0 m\u1EE5c \u0111\u00EDch tr\u00EAn b\u1EA3ng, ho\u1EB7c b\u1EA5m \u0111\u1EC3 t\u1EA1o t\u1EA1i \u0111\u00E2y'\n \" -->\n <div\n nz-flex\n nzAlign=\"center\"\n [nzGap]=\"6\"\n style=\"flex: 1; min-width: 0\"\n (click)=\"openFolderDrawer('create', undefined, tpl)\"\n >\n <nz-icon nzType=\"folder-add\" style=\"color: #d97706; font-size: 15px\"></nz-icon>\n <div style=\"flex: 1; min-width: 0\">\n <div class=\"template-item-title\">{{ tpl.Name }}</div>\n <div class=\"template-item-sub\">\n <code>{{ tpl.Code }}</code> \u2022 {{ tpl.TotalFolderCount }} m\u1EE5c\n @if (tpl.TotalPermissionCount > 0) {\n <span style=\"color: #0284c7; font-weight: 600\">\n \u2022 \uD83D\uDEE1 {{ tpl.TotalPermissionCount }} quy\u1EC1n</span\n >\n }\n </div>\n </div>\n </div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"2\">\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n [disabled]=\"!drive.canEditCurrentFolder()\"\n (click)=\"$event.stopPropagation(); applyTemplateToTargetFolder(tpl, drive.currentFolderId())\"\n >\n <!-- nz-tooltip\n nzTooltipTitle=\"\u00C1p d\u1EE5ng ngay v\u00E0o th\u01B0 m\u1EE5c \u0111ang m\u1EDF\" -->\n <nz-icon nzType=\"thunderbolt\" style=\"color: var(--primary-color)\"></nz-icon>\n </button>\n @if (tpl.CanManage || drive.isCurrentUserAdmin()) {\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n (click)=\"$event.stopPropagation(); openTemplateDrawer('edit', tpl)\"\n >\n <!-- nz-tooltip\n nzTooltipTitle=\"S\u1EEDa / X\u00F3a m\u1EABu c\u00E2y th\u01B0 m\u1EE5c\" -->\n <nz-icon nzType=\"setting\"></nz-icon>\n </button>\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n <!-- H\u1ED8P C\u1EA4U H\u00CCNH CH\u1EBE \u0110\u1ED8 TH\u01AF M\u1EE4C V\u1EACT L\u00DD vs \u1EA2O H\u00D3A -->\n @if (drive.isCurrentUserAdmin() && false) {\n <div class=\"storage-mode-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <span style=\"font-size: 12px; font-weight: 600\">Th\u01B0 m\u1EE5c v\u1EADt l\u00FD (Disk)</span>\n <nz-switch\n nzSize=\"small\"\n [ngModel]=\"drive.usePhysicalFolders()\"\n (ngModelChange)=\"onTogglePhysicalMode($event)\"\n ></nz-switch>\n\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Khi b\u1EADt: T\u1EA1o c\u00E2y th\u01B0 m\u1EE5c & t\u00EAn file th\u1EADt 1-1 tr\u00EAn \u1ED5 c\u1EE9ng m\u00E1y ch\u1EE7\"\n -->\n </div>\n <div class=\"quota-sub\">\n Ch\u1EBF \u0111\u1ED9: <strong>{{ drive.usePhysicalFolders() ? \"V\u1EADt l\u00FD 1:1 (Physical)\" : \"\u1EA2o h\u00F3a (Virtual)\" }}</strong>\n </div>\n @if (drive.usePhysicalFolders()) {\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"margin-top: 8px\">\n <span style=\"font-size: 12px\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Khi b\u1EADt: T\u1EA5t c\u1EA3 User c\u00F9ng d\u00F9ng chung 1 RootPath duy nh\u1EA5t \u0111\u1EC3 l\u01B0u tr\u1EEF t\u00E0i li\u1EC7u d\u1EF1 \u00E1n\"\n -->\n D\u00F9ng chung RootPath\n </span>\n <nz-switch\n nzSize=\"small\"\n [ngModel]=\"drive.useSharedPhysicalRoot()\"\n (ngModelChange)=\"onToggleSharedRootMode($event)\"\n ></nz-switch>\n </div>\n <div class=\"quota-sub\">\n Ph\u1EA1m vi \u0111\u0129a:\n <strong>{{ drive.useSharedPhysicalRoot() ? \"Chung to\u00E0n d\u1EF1 \u00E1n\" : \"T\u00E1ch theo t\u1EEBng User\" }}</strong>\n </div>\n <div nz-flex nzVertical [nzGap]=\"6\" style=\"margin-top: 8px\">\n <button nz-button nzType=\"dashed\" nzSize=\"small\" nzBlock (click)=\"onSyncPhysicalDisk()\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Qu\u00E9t c\u00E1c file/th\u01B0 m\u1EE5c copy tr\u1EF1c ti\u1EBFp tr\u00EAn \u1ED5 \u0111\u0129a Server \u0111\u1EC3 n\u1EA1p v\u00E0o Drive\"\n -->\n <nz-icon nzType=\"sync\"></nz-icon> \u0110\u1ED3ng b\u1ED9 t\u1EEB \u1ED5 \u0111\u0129a\n </button>\n <button nz-button nzType=\"default\" nzSize=\"small\" nzBlock (click)=\"openRelocateDrawer(null)\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"\u0110\u1ED5i \u0111\u01B0\u1EDDng d\u1EABn RootPath ho\u1EB7c \u00E1nh x\u1EA1 sang \u1ED5 c\u1EE9ng l\u01B0u tr\u1EEF kh\u00E1c\"\n -->\n <nz-icon nzType=\"folder-open\"></nz-icon> \u0110\u1ED5i RootPath / \u1ED4 \u0111\u0129a\n </button>\n </div>\n }\n </div>\n }\n <!-- H\u1ED8P TI\u1EBEN TR\u00CCNH UPLOAD (H\u1ED6 TR\u1EE2 T\u1EA2I TI\u1EBEP KHI L\u1ED6I / T\u1EA0M D\u1EEANG / H\u1EE6Y) -->\n @if (drive.userUploadQueue().length > 0) {\n <div class=\"upload-queue-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"margin-bottom: 6px\">\n <strong>Ti\u1EBFn tr\u00ECnh t\u1EA3i l\u00EAn ({{ drive.userUploadQueue().length }})</strong>\n <a (click)=\"drive.clearCompletedUploads()\" style=\"font-size: 12px\">\u1EA8n \u0111\u00E3 xong</a>\n </div>\n <input #resumeFileInput type=\"file\" hidden (change)=\"onResumeFileSelected($event)\" />\n @for (task of drive.userUploadQueue(); track task.id) {\n <div class=\"upload-task-row\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" [nzGap]=\"4\">\n <div class=\"upload-task-name\" [title]=\"task.fileName\">{{ task.fileName }}</div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"2\">\n @if (task.status === \"uploading\" && (task.fileSize || 0) >= 20971520) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n (click)=\"drive.pauseUploadTask(task.id)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"T\u1EA1m d\u1EEBng t\u1EA3i l\u00EAn\"\n -->\n <nz-icon nzType=\"pause-circle\"></nz-icon>\n </button>\n }\n @if (task.status === \"error\" || task.status === \"paused\") {\n <button\n type=\"button\"\n nz-button\n nzType=\"link\"\n nzSize=\"small\"\n style=\"padding: 0 4px; font-size: 12px; font-weight: 600\"\n (click)=\"onResumeUploadClick(task, resumeFileInput)\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"task.errorMessage || 'T\u1EA3i l\u00EAn ti\u1EBFp t\u1EEB ph\u1EA7n tr\u0103m \u0111\u00E3 l\u01B0u (Resume Upload)'\"\n -->\n <nz-icon nzType=\"reload\"></nz-icon> T\u1EA3i ti\u1EBFp\n </button>\n }\n @if (task.status !== \"uploading\") {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n style=\"padding: 0 4px\"\n (click)=\"drive.removeUploadTask(task.id)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"X\u00F3a kh\u1ECFi danh s\u00E1ch & h\u1EE7y phi\u00EAn t\u1EA1m\"\n -->\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n }\n </div>\n </div>\n <nz-progress\n [nzPercent]=\"task.progress\"\n nzSize=\"small\"\n [nzStatus]=\"\n task.status === 'error'\n ? 'exception'\n : task.status === 'success'\n ? 'success'\n : task.status === 'paused'\n ? 'normal'\n : 'active'\n \"\n ></nz-progress>\n @if (task.status === \"error\") {\n <div style=\"font-size: 11px; color: #ef4444; margin-top: 2px\">\n {{ task.errorMessage || \"B\u1ECB ng\u1EAFt k\u1EBFt n\u1ED1i.\" }} \u2014 B\u1EA5m <strong>T\u1EA3i ti\u1EBFp</strong> \u0111\u1EC3 n\u1ED1i l\u1EA1i t\u1EEB\n {{ task.progress }}%.\n </div>\n }\n @if (task.status === \"paused\") {\n <div style=\"font-size: 11px; color: #f59e0b; margin-top: 2px\">\n \u0110\u00E3 t\u1EA1m d\u1EEBng \u1EDF {{ task.progress }}% \u2014 B\u1EA5m <strong>T\u1EA3i ti\u1EBFp</strong> \u0111\u1EC3 ti\u1EBFp t\u1EE5c.\n </div>\n }\n </div>\n }\n </div>\n }\n <!-- H\u1ED8P TI\u1EBEN TR\u00CCNH DOWNLOAD (H\u1ED6 TR\u1EE2 THEO D\u00D5I % & H\u1EE6Y T\u1EA2I T\u1EE8C TH\u1EDCI \u0110\u1ED0I V\u1EDAI FILE N\u1EB6NG) -->\n @if (drive.userDownloadQueue().length > 0) {\n <div class=\"upload-queue-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"margin-bottom: 6px\">\n <strong>Ti\u1EBFn tr\u00ECnh t\u1EA3i xu\u1ED1ng ({{ drive.userDownloadQueue().length }})</strong>\n <a (click)=\"drive.clearCompletedDownloads()\" style=\"font-size: 12px\">\u1EA8n \u0111\u00E3 xong</a>\n </div>\n @for (dlTask of drive.userDownloadQueue(); track dlTask.id) {\n <div class=\"upload-task-row\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" [nzGap]=\"4\">\n <div class=\"upload-task-name\" [title]=\"dlTask.fileName\">{{ dlTask.fileName }}</div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"2\">\n @if (dlTask.status === \"downloading\") {\n <button\n type=\"button\"\n nz-button\n nzType=\"link\"\n nzDanger\n nzSize=\"small\"\n style=\"padding: 0 4px; font-size: 12px; font-weight: 600\"\n (click)=\"drive.cancelDownloadTask(dlTask.id)\"\n >\n <nz-icon nzType=\"stop\"></nz-icon> H\u1EE7y t\u1EA3i\n </button>\n } @else {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n style=\"padding: 0 4px\"\n (click)=\"drive.removeDownloadTask(dlTask.id)\"\n >\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n }\n </div>\n </div>\n <nz-progress\n [nzPercent]=\"dlTask.progress\"\n nzSize=\"small\"\n [nzStatus]=\"\n dlTask.status === 'error' || dlTask.status === 'cancelled'\n ? 'exception'\n : dlTask.status === 'success'\n ? 'success'\n : 'active'\n \"\n ></nz-progress>\n <div style=\"font-size: 11px; color: var(--app-text-muted, #64748b); margin-top: 2px\">\n @if (dlTask.status === \"downloading\") {\n \u0110ang t\u1EA3i: {{ dlTask.loadedBytes | formatBytes }}\n @if (dlTask.totalBytes) {\n / {{ dlTask.totalBytes | formatBytes }}\n }\n } @else if (dlTask.status === \"cancelled\") {\n <span style=\"color: #f59e0b\">\u0110\u00E3 h\u1EE7y t\u1EA3i xu\u1ED1ng gi\u1EEFa ch\u1EEBng.</span>\n } @else if (dlTask.status === \"error\") {\n <span style=\"color: #ef4444\">{{ dlTask.errorMessage || \"L\u1ED7i khi t\u1EA3i xu\u1ED1ng.\" }}</span>\n } @else {\n <span style=\"color: #10b981\">\u0110\u00E3 t\u1EA3i xu\u1ED1ng ho\u00E0n t\u1EA5t.</span>\n }\n </div>\n </div>\n }\n </div>\n }\n <div class=\"quota-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <div class=\"quota-title\" style=\"margin-bottom: 0\">\n <nz-icon nzType=\"cloud\"></nz-icon> Dung l\u01B0\u1EE3ng ({{ drive.quotaPercent() }}%)\n </div>\n @if (drive.isCurrentUserAdmin()) {\n <nz-tag nzColor=\"gold\" style=\"margin-right: 0; font-size: 11px\">Admin</nz-tag>\n }\n </div>\n <nz-progress [nzPercent]=\"drive.quotaPercent()\" nzSize=\"small\" [nzShowInfo]=\"false\"></nz-progress>\n <div class=\"quota-sub\">{{ drive.usedBytes() | formatBytes }} / {{ drive.quotaLimitBytes() | formatBytes }}</div>\n @if (drive.isCurrentUserAdmin()) {\n <button\n nz-button\n nzType=\"dashed\"\n nzSize=\"small\"\n nzBlock\n style=\"margin-top: 8px\"\n (click)=\"openPermissionMatrixDrawer(drive.currentFolderId())\"\n >\n <nz-icon nzType=\"table\"></nz-icon>\n Ma tr\u1EADn ph\u00E2n quy\u1EC1n\n </button>\n <button\n nz-button\n nzType=\"dashed\"\n nzSize=\"small\"\n nzBlock\n style=\"margin-top: 8px\"\n (click)=\"openQuotaAdminDrawer()\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"\u0110\u1EB7t Quota m\u1EB7c \u0111\u1ECBnh to\u00E0n h\u1EC7 th\u1ED1ng v\u00E0 thi\u1EBFt l\u1EADp Quota ri\u00EAng cho t\u1EEBng ng\u01B0\u1EDDi d\u00F9ng (Ch\u1EC9 Admin)\"\n -->\n <nz-icon nzType=\"setting\"></nz-icon> Qu\u1EA3n l\u00FD Quota (Admin)\n </button>\n }\n </div>\n </aside>\n <!-- KHU V\u1EF0C N\u1ED8I DUNG CH\u00CDNH (H\u1ED6 TR\u1EE2 K\u00C9O TH\u1EA2 FILE & FOLDER T\u1EEA FILE EXPLORER) -->\n <main\n class=\"drive-main\"\n [class.external-drag-active]=\"isExternalFileDragging()\"\n (dragenter)=\"onMainDragEnter($event)\"\n (dragover)=\"onMainDragOver($event)\"\n (dragleave)=\"onMainDragLeave($event)\"\n (drop)=\"onMainDrop($event)\"\n >\n @if (isExternalFileDragging()) {\n <div class=\"external-drop-banner\">\n <nz-icon nzType=\"cloud-upload\" class=\"drop-banner-icon\"></nz-icon>\n <div>\n <div class=\"drop-banner-title\">\n @if (dragOverFolderName(); as targetName) {\n Th\u1EA3 t\u1EADp tin / th\u01B0 m\u1EE5c t\u1EEB m\u00E1y t\u00EDnh \u0111\u1EC3 t\u1EA3i th\u1EB3ng v\u00E0o th\u01B0 m\u1EE5c: <strong>\"{{ targetName }}\"</strong>\n } @else {\n Th\u1EA3 t\u1EADp tin ho\u1EB7c th\u01B0 m\u1EE5c t\u1EEB File Explorer v\u00E0o \u0111\u00E2y \u0111\u1EC3 t\u1EA3i l\u00EAn th\u01B0 m\u1EE5c hi\u1EC7n t\u1EA1i\n }\n </div>\n <div class=\"drop-banner-sub\">\n H\u1ED7 tr\u1EE3 k\u00E9o th\u1EA3 nhi\u1EC1u file c\u00F9ng l\u00FAc ho\u1EB7c k\u00E9o nguy\u00EAn c\u1EA3 c\u00E2y th\u01B0 m\u1EE5c t\u1EEB m\u00E1y t\u00EDnh (T\u1EF1 \u0111\u1ED9ng Chunk Upload n\u1EBFu\n file ≥ 20MB)\n </div>\n </div>\n </div>\n }\n <!-- TOOLBAR + PAGINATION -->\n <header class=\"drive-toolbar\">\n <div>\n <nz-breadcrumb>\n <nz-breadcrumb-item\n (click)=\"navigateToFolder(null)\"\n (dragover)=\"onBreadcrumbDragOver($event, '__ROOT__')\"\n (dragleave)=\"onBreadcrumbDragLeave('__ROOT__')\"\n (drop)=\"onBreadcrumbDrop($event, null)\"\n [class.bc-drop-active]=\"dragOverBreadcrumbId() === '__ROOT__'\"\n class=\"cursor-pointer\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"K\u00E9o th\u1EA3 m\u1EE5c v\u00E0o \u0111\u00E2y \u0111\u1EC3 chuy\u1EC3n v\u1EC1 th\u01B0 m\u1EE5c g\u1ED1c\"\n -->\n <nz-icon nzType=\"home\"></nz-icon>\n {{ getRootTitle() }}\n </nz-breadcrumb-item>\n @for (bc of drive.breadcrumbs(); track bc.Id) {\n @if (drive.currentViewMode() !== \"CUSTOM_SPACE\" || bc.Id !== drive.currentCustomSpaceId()) {\n <nz-breadcrumb-item\n (click)=\"navigateToFolder(bc.Id)\"\n (dragover)=\"onBreadcrumbDragOver($event, bc.Id)\"\n (dragleave)=\"onBreadcrumbDragLeave(bc.Id)\"\n (drop)=\"onBreadcrumbDrop($event, bc.Id)\"\n [class.bc-drop-active]=\"dragOverBreadcrumbId() === bc.Id\"\n class=\"cursor-pointer\"\n >\n {{ bc.Name }}\n </nz-breadcrumb-item>\n }\n }\n </nz-breadcrumb>\n <!-- @if (drive.isCurrentUserAdmin() && drive.usePhysicalFolders() && drive.currentPhysicalPath(); as physPath) {\n <div class=\"physical-path-bar\">\n <nz-icon nzType=\"folder-open\"></nz-icon>\n <span>\n \u0110\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD: <code>{{ physPath }}</code>\n </span>\n <icon-copy [textToCopy]=\"physPath\" tooltip=\"Sao ch\u00E9p \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD tr\u00EAn Server\"></icon-copy>\n </div>\n } -->\n </div>\n <div class=\"toolbar-actions\">\n <nz-input-group [nzSuffix]=\"suffixIconSearch\" style=\"width: 250px\">\n <input\n type=\"text\"\n nz-input\n placeholder=\"T\u00ECm ki\u1EBFm t\u00E0i li\u1EC7u, th\u01B0 m\u1EE5c...\"\n [ngModel]=\"drive.keyword()\"\n (ngModelChange)=\"drive.keyword.set($event)\"\n (keyup.enter)=\"onSearch()\"\n />\n </nz-input-group>\n <ng-template #suffixIconSearch>\n <nz-icon nzType=\"search\" class=\"cursor-pointer\" (click)=\"onSearch()\"></nz-icon>\n </ng-template>\n <label\n nz-checkbox\n [ngModel]=\"drive.includeSubfolders()\"\n (ngModelChange)=\"onToggleIncludeSubfolders($event)\"\n style=\"user-select: none; white-space: nowrap; font-size: 13px\"\n nz-tooltip\n nzTooltipTitle=\"T\u00ECm c\u1EA3 th\u01B0 m\u1EE5c con\"\n >\n </label>\n <!-- T\u00D9Y CH\u1ECCN CH\u1EBE \u0110\u1ED8 XEM: C\u00C2Y TH\u01AF M\u1EE4C B\u00CAN TR\u00C1I + B\u1EA2NG PH\u1EB2NG vs TREE TABLE -->\n <div class=\"view-mode-switch\" nz-flex nzAlign=\"center\" [nzGap]=\"4\">\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"showSidebarTree() ? 'primary' : 'default'\"\n (click)=\"onToggleSidebarTree(!showSidebarTree())\"\n nz-tooltip\n [nzTooltipTitle]=\"\n showSidebarTree()\n ? '\u0110ang b\u1EADt C\u00E2y th\u01B0 m\u1EE5c b\u00EAn tr\u00E1i (Nh\u1EA5n \u0111\u1EC3 \u1EA9n)'\n : 'Hi\u1EC3n th\u1ECB C\u00E2y th\u01B0 m\u1EE5c tr\u1EF1c ti\u1EBFp \u1EDF c\u1ED9t b\u00EAn tr\u00E1i'\n \"\n >\n <nz-icon nzType=\"partition\"></nz-icon>\n </button>\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"!drive.isTreeTableView() ? 'primary' : 'default'\"\n (click)=\"onToggleTreeTableView(false)\"\n nz-tooltip\n nzTooltipTitle=\"Flat Table\"\n >\n <nz-icon nzType=\"unordered-list\"></nz-icon>\n <!-- B\u1EA3ng ph\u1EB3ng -->\n </button>\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"drive.isTreeTableView() ? 'primary' : 'default'\"\n (click)=\"onToggleTreeTableView(true)\"\n nz-tooltip\n nzTooltipTitle=\"Tree Table\"\n >\n <nz-icon nzType=\"apartment\"></nz-icon>\n <!-- Tree Table -->\n </button>\n @if (drive.isTreeTableView()) {\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"dashed\"\n (click)=\"expandAllTreeFolders()\"\n nz-tooltip\n nzTooltipTitle=\"M\u1EDF r\u1ED9ng\"\n >\n <nz-icon nzType=\"node-expand\"></nz-icon>\n </button>\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"dashed\"\n (click)=\"collapseAllTreeFolders()\"\n nz-tooltip\n nzTooltipTitle=\"Thu g\u1ECDn\"\n >\n <nz-icon nzType=\"node-collapse\"></nz-icon>\n </button>\n }\n </div>\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n nz-tooltip\n [nzTooltipTitle]=\"drive.sortDesc() ? 'A \u2192 Z' : 'Z \u2192 A'\"\n (click)=\"toggleSortDirection()\"\n >\n <nz-icon [nzType]=\"drive.sortDesc() ? 'sort-descending' : 'sort-ascending'\"></nz-icon>\n </button>\n @if (drive.currentViewMode() === \"TRASH\" && drive.allowDeleteFromTrash()) {\n <button\n type=\"button\"\n nz-button\n nzDanger\n nzType=\"primary\"\n nzSize=\"small\"\n [disabled]=\"drive.items().length === 0 || emptyingTrash()\"\n [nzLoading]=\"emptyingTrash()\"\n nz-tooltip\n nzTooltipTitle=\"X\u00F3a v\u0129nh vi\u1EC5n to\u00E0n b\u1ED9 c\u00E1c m\u1EE5c trong th\u00F9ng r\u00E1c v\u00E0 gi\u1EA3i ph\u00F3ng dung l\u01B0\u1EE3ng Quota\"\n (click)=\"onEmptyTrash()\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n D\u1ECDn s\u1EA1ch th\u00F9ng r\u00E1c\n @if (drive.totalCount() > 0) {\n <span>({{ drive.totalCount() }})</span>\n }\n </button>\n }\n <button\n nz-button\n nzType=\"default\"\n nzSize=\"small\"\n (click)=\"refreshExplorer()\"\n nz-tooltip\n nzTooltipTitle=\"L\u00E0m m\u1EDBi\"\n >\n <nz-icon nzType=\"reload\"></nz-icon>\n </button>\n <nz-pagination\n [nzSize]=\"'small'\"\n [nzPageIndex]=\"drive.pageIndex()\"\n [nzPageSize]=\"drive.pageSize()\"\n [nzTotal]=\"drive.totalCount()\"\n [nzShowSizeChanger]=\"true\"\n [nzPageSizeOptions]=\"AppGlobals.pageSizeOptions\"\n (nzPageIndexChange)=\"drive.loadNodes($event, drive.pageSize())\"\n (nzPageSizeChange)=\"drive.loadNodes(1, $event)\"\n >\n </nz-pagination>\n </div>\n </header>\n @if (drive.currentViewMode() === \"TRASH\" && drive.items().length > 0) {\n <div class=\"trash-info-banner\">\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-icon nzType=\"info-circle\" style=\"color: #ef4444; font-size: 16px\"></nz-icon>\n @if (drive.allowDeleteFromTrash()) {\n <span>\n C\u00E1c m\u1EE5c trong th\u00F9ng r\u00E1c v\u1EABn t\u00EDnh v\u00E0o dung l\u01B0\u1EE3ng h\u1EA1n ng\u1EA1ch (Quota) cho \u0111\u1EBFn khi b\u1ECB x\u00F3a v\u0129nh vi\u1EC5n.\n </span>\n } @else {\n <span>\n Ch\u1EBF \u0111\u1ED9 b\u1EA3o v\u1EC7 d\u1EEF li\u1EC7u \u0111ang b\u1EADt: H\u1EC7 th\u1ED1ng \u0111\u00E3 kh\u00F3a ch\u1EE9c n\u0103ng x\u00F3a v\u0129nh vi\u1EC5n t\u1EEB th\u00F9ng r\u00E1c (k\u1EC3 c\u1EA3 Qu\u1EA3n tr\u1ECB\n vi\u00EAn). B\u1EA1n ch\u1EC9 c\u00F3 th\u1EC3 kh\u00F4i ph\u1EE5c l\u1EA1i d\u1EEF li\u1EC7u.\n </span>\n }\n </div>\n @if (drive.allowDeleteFromTrash()) {\n <button\n type=\"button\"\n nz-button\n nzDanger\n nzType=\"link\"\n nzSize=\"small\"\n style=\"font-weight: 600; padding: 0\"\n [nzLoading]=\"emptyingTrash()\"\n (click)=\"onEmptyTrash()\"\n >\n <nz-icon nzType=\"clear\"></nz-icon> D\u1ECDn s\u1EA1ch th\u00F9ng r\u00E1c ngay\n </button>\n }\n </div>\n }\n <!-- THANH THAO T\u00C1C H\u00C0NG LO\u1EA0T KHI T\u00CDCH CH\u1ECCN NHI\u1EC0U FILE / FOLDER (BULK ACTION BAR) -->\n @if (checkedCount() > 0) {\n <div class=\"bulk-action-bar\">\n <div class=\"bulk-action-summary\">\n <label\n nz-checkbox\n [ngModel]=\"isAllCurrentPageChecked()\"\n [nzIndeterminate]=\"isCurrentPageIndeterminate()\"\n (ngModelChange)=\"onToggleCheckAllCurrentPage($event)\"\n ></label>\n <nz-tag nzColor=\"processing\" style=\"margin: 0; font-weight: 600\"> \u0110\u00E3 ch\u1ECDn {{ checkedCount() }} m\u1EE5c </nz-tag>\n <span class=\"bulk-action-meta\">\n (\n @if (checkedFolderCount() > 0) {\n <span>{{ checkedFolderCount() }} th\u01B0 m\u1EE5c</span>\n }\n @if (checkedFolderCount() > 0 && checkedFileCount() > 0) {\n <span>, </span>\n }\n @if (checkedFileCount() > 0) {\n <span>{{ checkedFileCount() }} t\u1EADp tin \u2022 {{ checkedTotalBytes() | formatBytes }}</span>\n }\n )\n </span>\n @if (!isAllCurrentPageChecked() && displayedTableItems().length > 0) {\n <a style=\"font-size: 12px; font-weight: 500\" (click)=\"onToggleCheckAllCurrentPage(true)\">\n Ch\u1ECDn t\u1EA5t c\u1EA3 trang ({{ displayedTableItems().length }})\n </a>\n }\n <a style=\"font-size: 12px; color: #ef4444\" (click)=\"clearCheckedSelection()\"> B\u1ECF ch\u1ECDn </a>\n </div>\n\n <div class=\"bulk-action-buttons\">\n @if (drive.currentViewMode() !== \"TRASH\") {\n @if (canBulkEditChecked()) {\n <button\n type=\"button\"\n nz-button\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Di chuy\u1EC3n to\u00E0n b\u1ED9 c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn sang th\u01B0 m\u1EE5c ho\u1EB7c kh\u00F4ng gian kh\u00E1c\"\n (click)=\"openBulkMoveDrawer()\"\n >\n <nz-icon nzType=\"drag\"></nz-icon> Di chuy\u1EC3n ({{ checkedCount() }})\n </button>\n }\n <button\n type=\"button\"\n nz-button\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Sao ch\u00E9p \u0111\u1EC7 quy c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn t\u1EDBi th\u01B0 m\u1EE5c kh\u00E1c\"\n (click)=\"openBulkCopyDrawer()\"\n >\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p ({{ checkedCount() }})\n </button>\n @if (canBulkManageChecked()) {\n <button\n type=\"button\"\n nz-button\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"G\u00E1n ho\u1EB7c thu h\u1ED3i quy\u1EC1n h\u00E0ng lo\u1EA1t cho c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn\"\n (click)=\"openBulkPermissionMatrixDrawer()\"\n >\n <nz-icon nzType=\"usergroup-add\"></nz-icon> Ph\u00E2n quy\u1EC1n ({{ checkedCount() }})\n </button>\n }\n @if (canBulkDownloadChecked()) {\n <button\n type=\"button\"\n nz-button\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"T\u1EA3i xu\u1ED1ng c\u00E1c t\u1EADp tin \u0111\u00E3 ch\u1ECDn\"\n (click)=\"onBulkDownloadChecked()\"\n >\n <nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng\n </button>\n }\n <button\n type=\"button\"\n nz-button\n nzSize=\"small\"\n [nzLoading]=\"bulkActionLoading()\"\n nz-tooltip\n [nzTooltipTitle]=\"\n allCheckedAreStarred() ? 'B\u1ECF d\u1EA5u sao c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn' : 'G\u1EAFn d\u1EA5u sao cho c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn'\n \"\n (click)=\"onBulkToggleStar()\"\n >\n <nz-icon nzType=\"star\" [nzTheme]=\"allCheckedAreStarred() ? 'fill' : 'outline'\"></nz-icon>\n {{ allCheckedAreStarred() ? \"B\u1ECF sao\" : \"G\u1EAFn sao\" }}\n </button>\n @if (canBulkEditChecked()) {\n <button\n type=\"button\"\n nz-button\n nzDanger\n nzType=\"primary\"\n nzSize=\"small\"\n [nzLoading]=\"bulkActionLoading()\"\n nz-tooltip\n nzTooltipTitle=\"Chuy\u1EC3n to\u00E0n b\u1ED9 c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn v\u00E0o th\u00F9ng r\u00E1c\"\n (click)=\"onBulkSoftDelete()\"\n >\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a v\u00E0o th\u00F9ng r\u00E1c ({{ checkedCount() }})\n </button>\n }\n } @else {\n @if (canBulkEditChecked()) {\n <button\n type=\"button\"\n nz-button\n nzType=\"primary\"\n nzSize=\"small\"\n [nzLoading]=\"bulkActionLoading()\"\n (click)=\"onBulkRestoreFromTrash()\"\n >\n <nz-icon nzType=\"rollback\"></nz-icon> Kh\u00F4i ph\u1EE5c ({{ checkedCount() }})\n </button>\n }\n @if (canBulkManageChecked() && drive.allowDeleteFromTrash()) {\n <button\n type=\"button\"\n nz-button\n nzDanger\n nzType=\"primary\"\n nzSize=\"small\"\n [nzLoading]=\"bulkActionLoading()\"\n (click)=\"onBulkPermanentDelete()\"\n >\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a v\u0129nh vi\u1EC5n ({{ checkedCount() }})\n </button>\n }\n }\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"B\u1ECF ch\u1ECDn t\u1EA5t c\u1EA3\"\n (click)=\"clearCheckedSelection()\"\n >\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </div>\n }\n <!-- DANH S\u00C1CH T\u1EACP TIN / TH\u01AF M\u1EE4C (H\u1ED6 TR\u1EE2 C\u1EA2 FLAT TABLE V\u00C0 TREE TABLE) -->\n <nz-table\n #explorerTable\n [nzData]=\"displayedTableItems()\"\n [nzLoading]=\"drive.loading()\"\n [nzBordered]=\"true\"\n [nzFrontPagination]=\"false\"\n [nzShowPagination]=\"false\"\n nzSize=\"small\"\n >\n <thead>\n <tr>\n <th nzWidth=\"40px\" class=\"text-center checkbox-col-th\" (click)=\"$event.stopPropagation()\">\n <label\n nz-checkbox\n [ngModel]=\"isAllCurrentPageChecked()\"\n [nzIndeterminate]=\"isCurrentPageIndeterminate()\"\n [nzDisabled]=\"displayedTableItems().length === 0\"\n (ngModelChange)=\"onToggleCheckAllCurrentPage($event)\"\n nz-tooltip\n nzTooltipTitle=\"Ch\u1ECDn / B\u1ECF ch\u1ECDn t\u1EA5t c\u1EA3 c\u00E1c d\u00F2ng tr\u00EAn trang n\u00E0y\"\n ></label>\n </th>\n <th nzWidth=\"45px\" class=\"text-center\">#</th>\n <th class=\"sortable-th\" (click)=\"onSortColumn('Name')\">\n <div class=\"th-sort-wrap\">\n <span>T\u00EAn t\u00E0i li\u1EC7u / Th\u01B0 m\u1EE5c</span>\n <span class=\"sort-icon\" [class.active]=\"drive.sortBy() === 'Name'\">\n <nz-icon\n [nzType]=\"\n drive.sortBy() === 'Name' ? (drive.sortDesc() ? 'sort-descending' : 'sort-ascending') : 'swap'\n \"\n ></nz-icon>\n </span>\n </div>\n </th>\n <!-- <th nzWidth=\"150px\" class=\"sortable-th\" (click)=\"onSortColumn('OwnerName')\">\n <div class=\"th-sort-wrap\">\n <span>Ch\u1EE7 s\u1EDF h\u1EEFu</span>\n @if (drive.sortBy() === \"OwnerName\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th> -->\n <th nzWidth=\"100px\" class=\"text-center sortable-th\" (click)=\"onSortColumn('AccessLevel')\">\n <div class=\"th-sort-wrap justify-center\">\n <span>Quy\u1EC1n truy c\u1EADp</span>\n @if (drive.sortBy() === \"AccessLevel\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"90px\" class=\"text-right sortable-th\" (click)=\"onSortColumn('SizeBytes')\">\n <div class=\"th-sort-wrap justify-end\">\n <span>K\u00EDch th\u01B0\u1EDBc</span>\n @if (drive.sortBy() === \"SizeBytes\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"100px\" class=\"text-center sortable-th\" (click)=\"onSortColumn('CreatedUser')\">\n <div class=\"th-sort-wrap justify-center\">\n <span>Ng\u01B0\u1EDDi t\u1EA1o</span>\n @if (drive.sortBy() === \"CreatedUser\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"145px\" class=\"text-center sortable-th\" (click)=\"onSortColumn('UpdatedDate')\">\n <div class=\"th-sort-wrap justify-center\">\n <span>C\u1EADp nh\u1EADt cu\u1ED1i</span>\n @if (drive.sortBy() === \"UpdatedDate\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <!-- <th nzWidth=\"210px\" class=\"text-center\">Thao t\u00E1c</th> -->\n </tr>\n </thead>\n <tbody>\n @for (item of explorerTable.data; track item.Id; let i = $index) {\n <tr\n [attr.data-node-id]=\"item.Id\"\n [attr.draggable]=\"drive.currentViewMode() !== 'TRASH' && item.EffectiveAccess >= DriveAccessLevel.Editor\"\n (dragstart)=\"onRowDragStart($event, item)\"\n (dragend)=\"onRowDragEnd()\"\n (dragover)=\"onRowDragOver($event, item)\"\n (dragleave)=\"onRowDragLeave($event, item)\"\n (drop)=\"onRowDrop($event, item)\"\n (click)=\"onRowSelect(item, $event, i)\"\n (dblclick)=\"onRowDoubleClick(item, $event)\"\n (contextmenu)=\"onContextMenu($event, menu, item)\"\n class=\"drive-row\"\n [class.row-checked]=\"isItemChecked(item.Id)\"\n [class.active]=\"isRowActive(item)\"\n [class.row-active]=\"isRowActive(item)\"\n [class.ant-table-row-selected]=\"isRowActive(item)\"\n [class.dragging-row]=\"draggedNode()?.Id === item.Id\"\n [class.drop-target-active]=\"dragOverFolderId() === item.Id\"\n >\n <td class=\"text-center checkbox-col-td\" (click)=\"onCheckboxCellClick($event, item, i)\">\n <label\n nz-checkbox\n [ngModel]=\"isItemChecked(item.Id)\"\n (ngModelChange)=\"onToggleItemCheck(item, $event, i)\"\n (click)=\"$event.stopPropagation()\"\n ></label>\n </td>\n <td class=\"text-center\">{{ i + 1 + (drive.pageIndex() - 1) * drive.pageSize() }}</td>\n <td\n [nzIndentSize]=\"drive.isTreeTableView() ? (item.treeLevel || 0) * 22 : 0\"\n [nzShowExpand]=\"drive.isTreeTableView() && isFolderLike(item) && !item.IsBrokenShortcut\"\n [nzExpand]=\"!!item.treeExpanded\"\n (nzExpandChange)=\"toggleExpandTreeFolder(item, $event)\"\n >\n <div class=\"node-name-cell\">\n <span class=\"node-icon-wrap\">\n <nz-icon\n [nzType]=\"isFolderLike(item) ? 'folder-fill' : getFileIcon(item)\"\n [style.color]=\"isFolderLike(item) ? '#f59e0b' : 'var(--primary-color)'\"\n class=\"node-icon\"\n ></nz-icon>\n @if (item.NodeType === DriveNodeType.Shortcut) {\n <span class=\"shortcut-badge\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'L\u1ED1i t\u1EAFt tr\u1ECF t\u1EDBi: ' + (item.ShortcutTargetName || item.Name)\"\n -->\n <nz-icon nzType=\"select\"></nz-icon>\n </span>\n }\n </span>\n <span\n class=\"node-title link-detail\"\n (click)=\"\n drive.isTreeTableView()\n ? toggleExpandTreeFolder(item, !item.treeExpanded)\n : onRowSingleClick(item, $event)\n \"\n >{{ item.Name }}</span\n >\n @if (drive.keyword().trim() && item.ParentFolderName && item.ParentId !== drive.currentFolderId()) {\n <nz-tag\n nzColor=\"default\"\n style=\"margin-left: 6px; cursor: pointer\"\n (click)=\"$event.stopPropagation(); navigateToFolder(item.ParentId || null)\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'\u0110ang n\u1EB1m trong th\u01B0 m\u1EE5c: ' + item.ParentFolderName + ' (Nh\u1EA5n \u0111\u1EC3 m\u1EDF th\u01B0 m\u1EE5c)'\"\n -->\n <nz-icon nzType=\"folder\"></nz-icon> {{ item.ParentFolderName }}\n </nz-tag>\n }\n @if (item.NodeType === DriveNodeType.Shortcut) {\n @if (item.IsBrokenShortcut) {\n <nz-tag nzColor=\"error\" style=\"margin-left: 6px\">M\u1EE5c g\u1ED1c \u0111\u00E3 x\u00F3a</nz-tag>\n } @else {\n <nz-tag nzColor=\"purple\" style=\"margin-left: 6px\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'\u0110\u00EDch: ' + (item.ShortcutTargetName || item.Name)\"\n -->\n <nz-icon nzType=\"link\"></nz-icon> L\u1ED1i t\u1EAFt\n </nz-tag>\n }\n }\n @if (item.IsStarred) {\n <nz-icon nzType=\"star\" nzTheme=\"fill\" style=\"color: #eab308; margin-left: 4px\"></nz-icon>\n }\n @if (item.IsShared) {\n <nz-tag nzColor=\"processing\" style=\"margin-left: 6px\" title=\"\u0110\u00E3 chia s\u1EBB\">\n <nz-icon nzType=\"share-alt\" nzTheme=\"outline\" />\n </nz-tag>\n }\n @if (!item.InheritPermissions) {\n <nz-tag nzColor=\"warning\" title=\"\u0110\u00E3 ng\u1EAFt k\u1EBF th\u1EEBa quy\u1EC1n t\u1EEB th\u01B0 m\u1EE5c cha\">\n <!-- \u0110\u1ED9c l\u1EADp -->\n <nz-icon nzType=\"line\" nzTheme=\"outline\" />\n <nz-icon nzType=\"link\" nzTheme=\"outline\" />\n </nz-tag>\n }\n </div>\n </td>\n <!-- <td>{{ item.OwnerName || item.OwnerId }}</td> -->\n <td class=\"text-center\">\n <nz-tag\n [nzColor]=\"\n item.EffectiveAccess >= DriveAccessLevel.Editor\n ? 'green'\n : item.EffectiveAccess >= DriveAccessLevel.Uploader\n ? 'cyan'\n : 'default'\n \"\n >\n <!-- {{\n item.EffectiveAccess >= DriveAccessLevel.Manager\n ? \"Qu\u1EA3n tr\u1ECB\"\n : item.EffectiveAccess >= DriveAccessLevel.Editor\n ? \"Ch\u1EC9nh s\u1EEDa\"\n : item.EffectiveAccess >= DriveAccessLevel.Uploader\n ? \"Xem & T\u1EA3i l\u00EAn\"\n : item.CanDownload && item.EffectiveAccess >= DriveAccessLevel.Downloader\n ? \"Xem & T\u1EA3i\"\n : \"Ch\u1EC9 xem\"\n }} -->\n @if (item.EffectiveAccess >= DriveAccessLevel.Manager) {\n <nz-icon nzType=\"crown\" nzTheme=\"outline\" title=\"Qu\u1EA3n tr\u1ECB\" />\n } @else if (item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <nz-icon nzType=\"edit\" nzTheme=\"outline\" title=\"Ch\u1EC9nh s\u1EEDa\" />\n } @else if (item.EffectiveAccess >= DriveAccessLevel.Uploader) {\n <nz-icon nzType=\"eye\" nzTheme=\"outline\" title=\"Xem\" /> \n <nz-icon nzType=\"upload\" nzTheme=\"outline\" title=\"T\u1EA3i l\u00EAn\" />\n } @else if (item.EffectiveAccess >= DriveAccessLevel.Downloader) {\n <nz-icon nzType=\"eye\" nzTheme=\"outline\" title=\"Xem\" /> \n <nz-icon nzType=\"download\" nzTheme=\"outline\" title=\"T\u1EA3i xu\u1ED1ng\" />\n } @else {\n <nz-icon nzType=\"eye\" nzTheme=\"outline\" title=\"Xem\" />\n }\n </nz-tag>\n </td>\n <td class=\"text-right\">\n {{ isFolderLike(item) ? \"\u2014\" : (item.SizeBytes | formatBytes) }}\n </td>\n <td>\n {{ item.CreatedUser || item.OwnerName || item.OwnerId }}\n </td>\n <td class=\"text-center\">\n <span\n nz-tooltip\n [nzTooltipTitle]=\"tooltipTemplate\"\n nzTooltipOverlayClassName=\"nowrap-tooltip\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n {{ item.UpdatedDate | date: \"dd/MM/yyyy HH:mm\" }}\n </span>\n\n <ng-template #tooltipTemplate> Ng\u01B0\u1EDDi c\u1EADp nh\u1EADt: {{ item.UpdatedUser }} </ng-template>\n </td>\n <!-- <td class=\"text-center\">\n <div class=\"action-btn-group\">\n @if (drive.currentViewMode() !== \"TRASH\") {\n @if (item.CanShare || item.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openShareDrawer(item)\"\n nz-tooltip\n nzTooltipTitle=\"Chia s\u1EBB & Ph\u00E2n quy\u1EC1n\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n @if (item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openMoveDrawer(item)\"\n nz-tooltip\n nzTooltipTitle=\"Chuy\u1EC3n th\u01B0 m\u1EE5c\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"drag\"></nz-icon>\n </button>\n }\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openCopyDrawer(item)\"\n nz-tooltip\n nzTooltipTitle=\"Sao ch\u00E9p\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"copy\"></nz-icon>\n </button>\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openShortcutDrawer(item)\"\n nz-tooltip\n nzTooltipTitle=\"T\u1EA1o l\u1ED1i t\u1EAFt\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"link\"></nz-icon>\n </button>\n @if (\n item.NodeType === DriveNodeType.Folder &&\n drive.usePhysicalFolders() &&\n item.EffectiveAccess >= DriveAccessLevel.Manager\n ) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openRelocateDrawer(item)\"\n nz-tooltip\n nzTooltipTitle=\"\u0110\u1ED5i \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD / \u00C1nh x\u1EA1 \u1ED5 c\u1EE9ng l\u01B0u tr\u1EEF\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"hdd\"></nz-icon>\n </button>\n }\n @if (\n isFileLike(item) &&\n !item.IsBrokenShortcut &&\n item.CanDownload &&\n item.EffectiveAccess >= DriveAccessLevel.Downloader\n ) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); onDownloadItem(item)\"\n nz-tooltip\n nzTooltipTitle=\"T\u1EA3i xu\u1ED1ng\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"download\"></nz-icon>\n </button>\n }\n @if (\n isFileLike(item) && !item.IsBrokenShortcut && item.EffectiveAccess >= DriveAccessLevel.Editor\n ) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openVersionDrawer(item)\"\n nz-tooltip\n nzTooltipTitle=\"L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"history\"></nz-icon>\n </button>\n }\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openFolderDrawer('rename', item)\"\n nz-tooltip\n [nzTooltipTitle]=\"\n item.EffectiveAccess >= DriveAccessLevel.Editor\n ? '\u0110\u1ED5i t\u00EAn & Chi ti\u1EBFt'\n : 'Xem chi ti\u1EBFt & Nh\u1EADt k\u00FD'\n \"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon\n [nzType]=\"item.EffectiveAccess >= DriveAccessLevel.Editor ? 'edit' : 'info-circle'\"\n ></nz-icon>\n </button>\n @if (item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-warn\"\n (click)=\"$event.stopPropagation(); onSoftDelete(item)\"\n nz-tooltip\n nzTooltipTitle=\"Chuy\u1EC3n v\u00E0o th\u00F9ng r\u00E1c\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n } @else {\n @if (item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); onRestore(item)\"\n nz-tooltip\n nzTooltipTitle=\"Kh\u00F4i ph\u1EE5c\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"rollback\"></nz-icon>\n </button>\n }\n @if (item.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-warn\"\n (click)=\"$event.stopPropagation(); onPermanentDelete(item)\"\n nz-tooltip\n nzTooltipTitle=\"X\u00F3a v\u0129nh vi\u1EC5n\"\n [nzTooltipMouseEnterDelay]=\"1\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n }\n </div>\n </td> -->\n </tr>\n }\n </tbody>\n </nz-table>\n <!-- CONTEXT MENU CHU\u1ED8T PH\u1EA2I (H\u1ED6 TR\u1EE2 C\u1EA2 THAO T\u00C1C \u0110\u01A0N L\u1EBA & THAO T\u00C1C H\u00C0NG LO\u1EA0T KHI T\u00CDCH CH\u1ECCN NHI\u1EC0U M\u1EE4C) -->\n <nz-dropdown-menu #menu=\"nzDropdownMenu\">\n @if (selectedContextItem(); as ctx) {\n <ul nz-menu>\n @if (checkedCount() > 1 && isItemChecked(ctx.Id)) {\n <li nz-menu-group [nzTitle]=\"'\u26A1 Thao t\u00E1c h\u00E0ng lo\u1EA1t (' + checkedCount() + ' m\u1EE5c \u0111\u00E3 ch\u1ECDn)'\">\n <ul>\n @if (drive.currentViewMode() === \"TRASH\") {\n @if (canBulkEditChecked()) {\n <li nz-menu-item (click)=\"onBulkRestoreFromTrash()\">\n <nz-icon nzType=\"rollback\"></nz-icon> Kh\u00F4i ph\u1EE5c {{ checkedCount() }} m\u1EE5c \u0111\u00E3 ch\u1ECDn\n </li>\n }\n @if (canBulkManageChecked() && drive.allowDeleteFromTrash()) {\n <li nz-menu-item nzDanger (click)=\"onBulkPermanentDelete()\">\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a v\u0129nh vi\u1EC5n {{ checkedCount() }} m\u1EE5c \u0111\u00E3 ch\u1ECDn\n </li>\n }\n } @else {\n @if (canBulkEditChecked()) {\n <li nz-menu-item (click)=\"openBulkMoveDrawer()\">\n <nz-icon nzType=\"drag\"></nz-icon> Di chuy\u1EC3n {{ checkedCount() }} m\u1EE5c \u0111\u00E3 ch\u1ECDn...\n </li>\n }\n <li nz-menu-item (click)=\"openBulkCopyDrawer()\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p {{ checkedCount() }} m\u1EE5c \u0111\u00E3 ch\u1ECDn...\n </li>\n @if (canBulkManageChecked()) {\n <li nz-menu-item (click)=\"openBulkPermissionMatrixDrawer()\">\n <nz-icon nzType=\"usergroup-add\"></nz-icon> Ph\u00E2n quy\u1EC1n h\u00E0ng lo\u1EA1t ({{ checkedCount() }} m\u1EE5c)...\n </li>\n }\n @if (canBulkDownloadChecked()) {\n <li nz-menu-item (click)=\"onBulkDownloadChecked()\">\n <nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng c\u00E1c t\u1EADp tin \u0111\u00E3 ch\u1ECDn\n </li>\n }\n <li nz-menu-item (click)=\"onBulkToggleStar()\">\n <nz-icon nzType=\"star\"></nz-icon>\n {{\n allCheckedAreStarred()\n ? \"B\u1ECF d\u1EA5u sao (\" + checkedCount() + \" m\u1EE5c)\"\n : \"G\u1EAFn d\u1EA5u sao (\" + checkedCount() + \" m\u1EE5c)\"\n }}\n </li>\n @if (canBulkEditChecked()) {\n <li nz-menu-item nzDanger (click)=\"onBulkSoftDelete()\">\n <nz-icon nzType=\"delete\"></nz-icon> Chuy\u1EC3n {{ checkedCount() }} m\u1EE5c v\u00E0o th\u00F9ng r\u00E1c\n </li>\n }\n }\n <li nz-menu-item (click)=\"clearCheckedSelection()\">\n <nz-icon nzType=\"close-circle\"></nz-icon> B\u1ECF ch\u1ECDn t\u1EA5t c\u1EA3 ({{ checkedCount() }} m\u1EE5c)\n </li>\n </ul>\n </li>\n <li nz-menu-divider></li>\n }\n @if (drive.currentViewMode() === \"TRASH\") {\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-item (click)=\"onRestore(ctx)\"><nz-icon nzType=\"rollback\"></nz-icon> Kh\u00F4i ph\u1EE5c m\u1EE5c n\u00E0y</li>\n }\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Manager && drive.allowDeleteFromTrash()) {\n <li nz-menu-item nzDanger (click)=\"onPermanentDelete(ctx)\">\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a v\u0129nh vi\u1EC5n m\u1EE5c n\u00E0y\n </li>\n }\n @if (drive.allowDeleteFromTrash()) {\n <li nz-menu-divider></li>\n <li nz-menu-item nzDanger (click)=\"onEmptyTrash()\">\n <nz-icon nzType=\"clear\"></nz-icon> D\u1ECDn s\u1EA1ch to\u00E0n b\u1ED9 th\u00F9ng r\u00E1c...\n </li>\n }\n } @else {\n @if (ctx.NodeType === DriveNodeType.File) {\n <li nz-menu-item (click)=\"previewFile(ctx)\">\n <nz-icon nzType=\"eye\"></nz-icon> Xem tr\u1EF1c ti\u1EBFp (Drawer Preview)\n </li>\n @if (ctx.CanDownload && ctx.EffectiveAccess >= DriveAccessLevel.Downloader) {\n <li nz-menu-item (click)=\"onDownloadItem(ctx)\"><nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng</li>\n }\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-item (click)=\"openVersionDrawer(ctx)\">\n <nz-icon nzType=\"history\"></nz-icon> L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n...\n </li>\n }\n <li nz-menu-divider></li>\n }\n @if (ctx.CanShare || ctx.EffectiveAccess >= DriveAccessLevel.Manager) {\n <li nz-menu-item (click)=\"openShareDrawer(ctx)\">\n <nz-icon nzType=\"usergroup-add\"></nz-icon> Ph\u00E2n quy\u1EC1n & Chia s\u1EBB...\n </li>\n }\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-item (click)=\"openMoveDrawer(ctx)\">\n <nz-icon nzType=\"drag\"></nz-icon> Di chuy\u1EC3n sang th\u01B0 m\u1EE5c kh\u00E1c...\n </li>\n }\n <li nz-menu-item (click)=\"openCopyDrawer(ctx)\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p t\u1EDBi (Copy to)...\n </li>\n <li nz-menu-item (click)=\"openShortcutDrawer(ctx)\">\n <nz-icon nzType=\"link\"></nz-icon> T\u1EA1o l\u1ED1i t\u1EAFt (Shortcut)...\n </li>\n @if (\n ctx.NodeType === DriveNodeType.Folder &&\n drive.usePhysicalFolders() &&\n ctx.EffectiveAccess >= DriveAccessLevel.Manager\n ) {\n <li nz-menu-item (click)=\"openRelocateDrawer(ctx)\">\n <nz-icon nzType=\"hdd\"></nz-icon> \u0110\u1ED5i \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD / Chuy\u1EC3n \u1ED5 \u0111\u0129a...\n </li>\n }\n <li nz-menu-item (click)=\"openFolderDrawer('rename', ctx)\">\n <nz-icon [nzType]=\"ctx.EffectiveAccess >= DriveAccessLevel.Editor ? 'edit' : 'info-circle'\"></nz-icon>\n {{\n ctx.EffectiveAccess >= DriveAccessLevel.Editor ? \"\u0110\u1ED5i t\u00EAn & Chi ti\u1EBFt...\" : \"Xem chi ti\u1EBFt & Nh\u1EADt k\u00FD...\"\n }}\n </li>\n <li nz-menu-item (click)=\"drive.toggleStar(ctx.Id)\">\n <nz-icon nzType=\"star\"></nz-icon> {{ ctx.IsStarred ? \"B\u1ECF d\u1EA5u sao\" : \"Th\u00EAm d\u1EA5u sao\" }}\n </li>\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-divider></li>\n <li nz-menu-item nzDanger (click)=\"onSoftDelete(ctx)\">\n <nz-icon nzType=\"delete\"></nz-icon> Chuy\u1EC3n v\u00E0o th\u00F9ng r\u00E1c\n </li>\n }\n @if (ctx.NodeType === DriveNodeType.Folder) {\n <li nz-menu-item (click)=\"openTemplateDrawer('create', undefined, ctx)\">\n <nz-icon nzType=\"apartment\"></nz-icon> L\u01B0u c\u1EA5u tr\u00FAc th\u01B0 m\u1EE5c l\u00E0m M\u1EABu...\n </li>\n }\n }\n </ul>\n }\n </nz-dropdown-menu>\n </main>\n </div>\n <!-- ========================================================================= -->\n <!-- DRAWER 1: CHIA S\u1EBA & PH\u00C2N QUY\u1EC0N (ACL / RBAC / SHARE LINKS) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"shareDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"920\"\n [nzClosable]=\"false\"\n [nzTitle]=\"shareDrawerTitleTpl\"\n [nzFooter]=\"shareDrawerFooterTpl\"\n (nzOnClose)=\"shareDrawerVisible = false\"\n >\n <ng-template #shareDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n @if (activeActionNode(); as node) {\n <nz-icon\n [nzType]=\"node.NodeType === DriveNodeType.Folder ? 'folder-fill' : getFileIcon(node)\"\n [style.color]=\"node.NodeType === DriveNodeType.Folder ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 18px\"\n ></nz-icon>\n <strong>Chia s\u1EBB & Ph\u00E2n quy\u1EC1n: {{ node.Name }}</strong>\n <nz-tag nzColor=\"blue\">{{ node.NodeType === DriveNodeType.Folder ? \"Th\u01B0 m\u1EE5c\" : \"T\u1EADp tin\" }}</nz-tag>\n }\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"shareDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (activeActionNode(); as node) {\n <lib-drive-share-modal\n [nodeId]=\"node.Id\"\n [hideInheritanceToggle]=\"shareDrawerHideInheritance\"\n ></lib-drive-share-modal>\n }\n </ng-container>\n <ng-template #shareDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"shareDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 2: L\u1ECACH S\u1EEC PHI\u00CAN B\u1EA2N T\u1EACP TIN (FILE VERSIONS) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"versionDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"760\"\n [nzClosable]=\"false\"\n [nzTitle]=\"versionDrawerTitleTpl\"\n [nzFooter]=\"versionDrawerFooterTpl\"\n (nzOnClose)=\"versionDrawerVisible = false\"\n >\n <ng-template #versionDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"history\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n: {{ activeActionNode()?.Name }}</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"versionDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (activeActionNode(); as node) {\n <lib-drive-version-modal\n [nodeId]=\"node.Id\"\n [nodeName]=\"node.Name\"\n [canEdit]=\"node.EffectiveAccess >= DriveAccessLevel.Editor\"\n [canDownload]=\"node.CanDownload && node.EffectiveAccess >= DriveAccessLevel.Downloader\"\n (closed)=\"versionDrawerVisible = false\"\n ></lib-drive-version-modal>\n }\n </ng-container>\n <ng-template #versionDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"versionDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 3: T\u1EA0O TH\u01AF M\u1EE4C M\u1EDAI / \u0110\u1ED4I T\u00CAN & CHI TI\u1EBET THU\u1ED8C T\u00CDNH + ACTIVITY LOG -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"folderDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"480\"\n [nzClosable]=\"false\"\n [nzTitle]=\"folderDrawerTitleTpl\"\n [nzFooter]=\"folderDrawerFooterTpl\"\n (nzOnClose)=\"folderDrawerVisible = false\"\n >\n <ng-template #folderDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon\n [nzType]=\"folderDrawerMode === 'create' ? 'folder-add' : canRenameTargetNode() ? 'edit' : 'info-circle'\"\n style=\"font-size: 18px; color: var(--primary-color)\"\n ></nz-icon>\n <strong>\n {{\n folderDrawerMode === \"create\"\n ? \"T\u1EA1o th\u01B0 m\u1EE5c m\u1EDBi\"\n : canRenameTargetNode()\n ? \"\u0110\u1ED5i t\u00EAn & Chi ti\u1EBFt m\u1EE5c\"\n : \"Chi ti\u1EBFt & Nh\u1EADt k\u00FD ho\u1EA1t \u0111\u1ED9ng\"\n }}\n </strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"folderDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n @if (folderDrawerMode === \"create\" && folderDrawerParentOverride; as parentOverride) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">T\u1EA1o b\u00EAn trong th\u01B0 m\u1EE5c cha:</span>\n <nz-tag nzColor=\"gold\"> <nz-icon nzType=\"folder-open\"></nz-icon> {{ parentOverride.Name }} </nz-tag>\n </div>\n </div>\n }\n <div>\n <label class=\"drawer-field-label\">\n {{ folderDrawerMode === \"create\" ? \"T\u00EAn th\u01B0 m\u1EE5c m\u1EDBi\" : \"T\u00EAn hi\u1EC3n th\u1ECB\" }}\n </label>\n <input\n nz-input\n [(ngModel)]=\"folderDrawerInputName\"\n [disabled]=\"folderDrawerMode === 'rename' && !canRenameTargetNode()\"\n [appAutoFocus]=\"folderDrawerVisible && (folderDrawerMode === 'create' || canRenameTargetNode())\"\n placeholder=\"Nh\u1EADp t\u00EAn th\u01B0 m\u1EE5c / t\u00E0i li\u1EC7u...\"\n (keyup.enter)=\"submitFolderDrawer()\"\n />\n </div>\n @if (folderDrawerMode === \"create\" && drive.usePhysicalFolders() && drive.currentPhysicalPath(); as phys) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Ch\u1EBF \u0111\u1ED9 l\u01B0u tr\u1EEF:</span>\n <nz-tag nzColor=\"green\">Th\u01B0 m\u1EE5c v\u1EADt l\u00FD (Disk)</nz-tag>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Th\u01B0 m\u1EE5c cha tr\u00EAn \u0111\u0129a:</span>\n <code class=\"break-word\">{{ phys }}</code>\n </div>\n </div>\n }\n @if (folderDrawerMode === \"rename\" && folderDrawerTargetNode; as target) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"target.NodeType === DriveNodeType.Folder ? 'folder-fill' : getFileIcon(target)\"\n [style.color]=\"target.NodeType === DriveNodeType.Folder ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ target.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n {{\n target.NodeType === DriveNodeType.Folder\n ? \"Th\u01B0 m\u1EE5c\"\n : \"T\u1EADp tin (\" + (target.Extension || target.MimeType || \"File\") + \")\"\n }}\n </div>\n </div>\n </div>\n <nz-divider style=\"margin: 10px 0\"></nz-divider>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Ch\u1EE7 s\u1EDF h\u1EEFu:</span>\n <strong>{{ target.OwnerName || target.OwnerId }}</strong>\n </div>\n @if (target.NodeType === DriveNodeType.File) {\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">K\u00EDch th\u01B0\u1EDBc:</span>\n <span>{{ target.SizeBytes | formatBytes }}</span>\n </div>\n }\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Quy\u1EC1n c\u1EE7a b\u1EA1n:</span>\n <nz-tag\n [nzColor]=\"\n target.EffectiveAccess >= DriveAccessLevel.Editor\n ? 'green'\n : target.EffectiveAccess >= DriveAccessLevel.Uploader\n ? 'cyan'\n : 'default'\n \"\n >\n {{\n target.EffectiveAccess >= DriveAccessLevel.Manager\n ? \"Qu\u1EA3n tr\u1ECB (Manager)\"\n : target.EffectiveAccess >= DriveAccessLevel.Editor\n ? \"Ch\u1EC9nh s\u1EEDa (Editor)\"\n : target.EffectiveAccess >= DriveAccessLevel.Uploader\n ? \"Xem & T\u1EA3i l\u00EAn (Uploader)\"\n : target.CanDownload && target.EffectiveAccess >= DriveAccessLevel.Downloader\n ? \"Xem & T\u1EA3i xu\u1ED1ng\"\n : \"Ch\u1EC9 xem (Viewer)\"\n }}\n </nz-tag>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">K\u1EBF th\u1EEBa quy\u1EC1n:</span>\n <nz-tag [nzColor]=\"target.InheritPermissions ? 'blue' : 'warning'\">\n {{ target.InheritPermissions ? \"\u0110ang k\u1EBF th\u1EEBa\" : \"\u0110\u1ED9c l\u1EADp\" }}\n </nz-tag>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">C\u1EADp nh\u1EADt cu\u1ED1i:</span>\n <span>{{ target.UpdatedDate | date: \"dd/MM/yyyy HH:mm\" }}</span>\n </div>\n @if (target.PhysicalRelativePath) {\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">\u0110\u01B0\u1EDDng d\u1EABn \u0111\u0129a:</span>\n <code class=\"break-word\">{{ target.PhysicalRelativePath }}</code>\n </div>\n }\n @if (drive.isCurrentUserAdmin() && drive.usePhysicalFolders() && drive.currentPhysicalPath(); as physPath) {\n <div class=\"physical-path-bar\">\n <span style=\"word-break: break-all\">\n \u0110\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD: <code style=\"padding-top: 0px\">{{ physPath }}</code>\n </span>\n <icon-copy [textToCopy]=\"physPath\" tooltip=\"Sao ch\u00E9p \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD tr\u00EAn Server\"></icon-copy>\n </div>\n }\n </div>\n <div>\n <label class=\"drawer-field-label\">Thao t\u00E1c nhanh</label>\n <div nz-flex nzWrap=\"wrap\" [nzGap]=\"8\">\n @if (target.CanShare || target.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openShareDrawer(target)\">\n <nz-icon nzType=\"share-alt\"></nz-icon> Chia s\u1EBB & Ph\u00E2n quy\u1EC1n\n </button>\n }\n @if (target.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openMoveDrawer(target)\">\n <nz-icon nzType=\"drag\"></nz-icon> Di chuy\u1EC3n\n </button>\n }\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openCopyDrawer(target)\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p t\u1EDBi\n </button>\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openShortcutDrawer(target)\">\n <nz-icon nzType=\"link\"></nz-icon> T\u1EA1o l\u1ED1i t\u1EAFt\n </button>\n @if (\n target.NodeType === DriveNodeType.Folder &&\n drive.usePhysicalFolders() &&\n target.EffectiveAccess >= DriveAccessLevel.Manager\n ) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openRelocateDrawer(target)\">\n <nz-icon nzType=\"hdd\"></nz-icon> \u0110\u1ED5i \u1ED5 \u0111\u0129a v\u1EADt l\u00FD\n </button>\n }\n @if (target.NodeType === DriveNodeType.File) {\n @if (target.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openVersionDrawer(target)\">\n <nz-icon nzType=\"history\"></nz-icon> L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n\n </button>\n }\n @if (target.CanDownload && target.EffectiveAccess >= DriveAccessLevel.Downloader) {\n <button nz-button nzSize=\"small\" (click)=\"onDownloadItem(target)\">\n <nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng\n </button>\n }\n }\n <button nz-button nzSize=\"small\" (click)=\"drive.toggleStar(target.Id)\">\n <nz-icon nzType=\"star\" [nzTheme]=\"target.IsStarred ? 'fill' : 'outline'\"></nz-icon>\n {{ target.IsStarred ? \"B\u1ECF sao\" : \"G\u1EAFn sao\" }}\n </button>\n </div>\n </div>\n <!-- NH\u1EACT K\u00DD HO\u1EA0T \u0110\u1ED8NG (ACTIVITY LOG) -->\n <div>\n <label class=\"drawer-field-label\">\n <nz-icon nzType=\"OrderedList\"></nz-icon> Nh\u1EADt k\u00FD ho\u1EA1t \u0111\u1ED9ng g\u1EA7n \u0111\u00E2y ({{ nodeActivities().length }})\n </label>\n <div class=\"drawer-meta-card\" style=\"max-height: 240px; overflow-y: auto\">\n @if (nodeActivities().length === 0) {\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">Ch\u01B0a c\u00F3 nh\u1EADt k\u00FD ho\u1EA1t \u0111\u1ED9ng.</div>\n } @else {\n @for (act of nodeActivities(); track act.Id) {\n <div style=\"padding: 6px 0; border-bottom: 1px dashed var(--app-border, #e2e8f0); font-size: 12px\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <nz-tag nzColor=\"blue\">{{ formatActivityAction(act.ActionType) }}</nz-tag>\n <span style=\"color: var(--app-text-muted, #64748b)\">{{\n act.CreatedDate | date: \"dd/MM/yyyy HH:mm:ss\"\n }}</span>\n </div>\n <div style=\"margin-top: 4px\">\n Th\u1EF1c hi\u1EC7n b\u1EDFi: <strong>{{ act.ActorUserName || act.ActorUserId || \"H\u1EC7 th\u1ED1ng\" }}</strong>\n </div>\n @if (act.DetailJson) {\n <div style=\"margin-top: 2px; color: var(--app-text-muted, #64748b); word-break: break-all\">\n <code>{{ formatActivityDetail(act) }}</code>\n </div>\n }\n </div>\n }\n }\n </div>\n </div>\n }\n @if (folderDrawerMode === \"create\") {\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <label class=\"drawer-field-label\" style=\"margin-bottom: 0\">\n <nz-icon nzType=\"apartment\" style=\"color: #d97706; margin-right: 4px\"></nz-icon>\n T\u1EA1o nhanh t\u1EEB M\u1EABu c\u00E2y th\u01B0 m\u1EE5c (T\u00F9y ch\u1ECDn)\n </label>\n <a style=\"font-size: 12px\" (click)=\"folderDrawerVisible = false; openTemplateDrawer('create')\">\n + \u0110\u1ECBnh ngh\u0129a m\u1EABu m\u1EDBi\n </a>\n </div>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Kh\u00F4ng d\u00F9ng m\u1EABu (Ch\u1EC9 t\u1EA1o 1 th\u01B0 m\u1EE5c \u0111\u01A1n) --\"\n [(ngModel)]=\"folderDrawerSelectedTemplateId\"\n (ngModelChange)=\"onFolderDrawerTemplateSelect($event)\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Ch\u1EC9 t\u1EA1o 1 th\u01B0 m\u1EE5c \u0111\u01A1n\"></nz-option>\n @for (tpl of drive.folderTemplates(); track tpl.Id) {\n <nz-option\n [nzValue]=\"tpl.Id\"\n [nzLabel]=\"'\uD83D\uDDC2 ' + tpl.Name + ' [' + tpl.Code + '] (' + tpl.TotalFolderCount + ' th\u01B0 m\u1EE5c)'\"\n ></nz-option>\n }\n </nz-select>\n\n @if (folderDrawerSelectedTemplateId) {\n <label nz-checkbox [(ngModel)]=\"folderDrawerUseWrapperFolder\" style=\"font-size: 12px; margin-top: 4px\">\n \u0110\u1EB7t to\u00E0n b\u1ED9 c\u00E2y th\u01B0 m\u1EE5c m\u1EABu b\u00EAn trong th\u01B0 m\u1EE5c g\u1ED1c\n <strong>\"{{ folderDrawerInputName || \"...\" }}\"</strong>\n </label>\n <div class=\"quota-sub\" style=\"margin-top: 2px\">\n N\u1EBFu b\u1ECF t\u00EDch, c\u00E1c nh\u00E1nh th\u01B0 m\u1EE5c con c\u1EE7a m\u1EABu s\u1EBD \u0111\u01B0\u1EE3c t\u1EA1o tr\u1EF1c ti\u1EBFp ngay trong th\u01B0 m\u1EE5c \u0111ang m\u1EDF.\n </div>\n }\n </div>\n }\n </div>\n </ng-container>\n <ng-template #folderDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"folderDrawerVisible = false\">\u0110\u00F3ng</button>\n @if (folderDrawerMode === \"create\" || canRenameTargetNode()) {\n <button nz-button nzType=\"primary\" (click)=\"submitFolderDrawer()\">\n <nz-icon nzType=\"check\"></nz-icon>\n {{ folderDrawerMode === \"create\" ? \"T\u1EA1o th\u01B0 m\u1EE5c\" : \"L\u01B0u t\u00EAn m\u1EDBi\" }}\n </button>\n }\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 4: XEM TR\u1EF0C TUY\u1EBEN T\u00C0I LI\u1EC6U (PREVIEW DRAWER) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"previewDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"'75vw'\"\n [nzClosable]=\"false\"\n [nzBodyStyle]=\"{ padding: '0', height: '100%', display: 'flex', flexDirection: 'column', overflow: 'hidden' }\"\n [nzTitle]=\"previewDrawerTitleTpl\"\n [nzFooter]=\"previewDrawerFooterTpl\"\n (nzOnClose)=\"previewDrawerVisible = false\"\n >\n <ng-template #previewDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"eye\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>{{ previewFileName }}</strong>\n </div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n @if (activeActionNode(); as node) {\n @if (node.CanDownload && node.EffectiveAccess >= DriveAccessLevel.Downloader) {\n <button nz-button nzSize=\"small\" nzType=\"primary\" (click)=\"onDownloadItem(node)\">\n <nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng\n </button>\n }\n @if (node.CanShare || node.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button nz-button nzSize=\"small\" (click)=\"previewDrawerVisible = false; openShareDrawer(node)\">\n <nz-icon nzType=\"share-alt\"></nz-icon> Chia s\u1EBB\n </button>\n }\n @if (node.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button nz-button nzSize=\"small\" (click)=\"previewDrawerVisible = false; openVersionDrawer(node)\">\n <nz-icon nzType=\"history\"></nz-icon> Phi\u00EAn b\u1EA3n\n </button>\n }\n }\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"previewDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div class=\"drive-preview-body-fill\">\n <extend-view-file-content\n [previewType]=\"previewType\"\n [previewContent]=\"previewContent\"\n ></extend-view-file-content>\n </div>\n </ng-container>\n <ng-template #previewDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button type=\"button\" nz-button (click)=\"previewDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 5: T\u1EA0O L\u1ED0I T\u1EAET (CREATE SHORTCUT DRAWER CHO FILE & FOLDER) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"shortcutDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"460\"\n [nzClosable]=\"false\"\n [nzTitle]=\"shortcutDrawerTitleTpl\"\n [nzFooter]=\"shortcutDrawerFooterTpl\"\n (nzOnClose)=\"shortcutDrawerVisible = false\"\n >\n <ng-template #shortcutDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"link\" style=\"font-size: 18px; color: #7c3aed\"></nz-icon>\n <strong>T\u1EA1o l\u1ED1i t\u1EAFt (Shortcut)</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"shortcutDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (shortcutSourceNode(); as src) {\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"isFolderLike(src) ? 'folder-fill' : getFileIcon(src)\"\n [style.color]=\"isFolderLike(src) ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ src.ShortcutTargetName || src.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n M\u1EE5c g\u1ED1c: {{ isFolderLike(src) ? \"Th\u01B0 m\u1EE5c\" : \"T\u1EADp tin\" }} \u2022 Ch\u1EE7 s\u1EDF h\u1EEFu:\n {{ src.OwnerName || src.OwnerId }}\n </div>\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">T\u00EAn l\u1ED1i t\u1EAFt</label>\n <input\n nz-input\n [(ngModel)]=\"shortcutInputName\"\n [appAutoFocus]=\"shortcutDrawerVisible\"\n placeholder=\"Nh\u1EADp t\u00EAn hi\u1EC3n th\u1ECB c\u1EE7a l\u1ED1i t\u1EAFt...\"\n (keyup.enter)=\"submitShortcutDrawer()\"\n />\n </div>\n <div>\n <label class=\"drawer-field-label\">Kh\u00F4ng gian l\u01B0u l\u1ED1i t\u1EAFt</label>\n <nz-select\n [(ngModel)]=\"shortcutSpaceKey\"\n (ngModelChange)=\"onShortcutSpaceKeyChange($event)\"\n style=\"width: 100%\"\n >\n <nz-option nzValue=\"MY_DRIVE\" nzLabel=\"Drive c\u00E1 nh\u00E2n (My Drive)\"></nz-option>\n <nz-option nzValue=\"ORG_DRIVE\" nzLabel=\"Kho T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (Org Drive)\"></nz-option>\n @for (sp of drive.customSpaces(); track sp.Id) {\n <nz-option [nzValue]=\"'CUSTOM:' + sp.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + sp.Name\"></nz-option>\n }\n </nz-select>\n </div>\n <div>\n <label class=\"drawer-field-label\">Th\u01B0 m\u1EE5c \u0111\u00EDch ch\u1EE9a l\u1ED1i t\u1EAFt</label>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Th\u01B0 m\u1EE5c g\u1ED1c (Root) --\"\n [(ngModel)]=\"shortcutDestFolderId\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Th\u01B0 m\u1EE5c g\u1ED1c (Root)\"></nz-option>\n @for (f of availableFolders(); track f.Id) {\n <nz-option [nzValue]=\"f.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + f.Name\"></nz-option>\n }\n </nz-select>\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n L\u1ED1i t\u1EAFt tr\u1ECF tr\u1EF1c ti\u1EBFp t\u1EDBi m\u1EE5c g\u1ED1c m\u00E0 kh\u00F4ng t\u1ED1n th\u00EAm dung l\u01B0\u1EE3ng l\u01B0u tr\u1EEF (0 B).\n </div>\n </div>\n </div>\n }\n </ng-container>\n <ng-template #shortcutDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"shortcutDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitShortcutDrawer()\">\n <nz-icon nzType=\"link\"></nz-icon> T\u1EA1o l\u1ED1i t\u1EAFt\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 6: DI CHUY\u1EC2N FILE / FOLDER SANG TH\u01AF M\u1EE4C HO\u1EB6C KH\u00D4NG GIAN KH\u00C1C -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"moveDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"460\"\n [nzClosable]=\"false\"\n [nzTitle]=\"moveDrawerTitleTpl\"\n [nzFooter]=\"moveDrawerFooterTpl\"\n (nzOnClose)=\"moveDrawerVisible = false\"\n >\n <ng-template #moveDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"drag\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>Di chuy\u1EC3n sang th\u01B0 m\u1EE5c / kh\u00F4ng gian kh\u00E1c</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"moveDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (moveSourceNode(); as src) {\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"isFolderLike(src) ? 'folder-fill' : getFileIcon(src)\"\n [style.color]=\"isFolderLike(src) ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n @if (moveSourceNodes().length > 1) {\n <div style=\"font-weight: 600\">\u0110ang ch\u1ECDn di chuy\u1EC3n {{ moveSourceNodes().length }} m\u1EE5c c\u00F9ng l\u00FAc</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n Bao g\u1ED3m: {{ moveSourceNodes()[0].Name }} v\u00E0 {{ moveSourceNodes().length - 1 }} m\u1EE5c kh\u00E1c\n </div>\n } @else {\n <div style=\"font-weight: 600\">{{ src.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n Lo\u1EA1i:\n {{\n src.NodeType === DriveNodeType.Folder\n ? \"Th\u01B0 m\u1EE5c\"\n : src.NodeType === DriveNodeType.Shortcut\n ? \"L\u1ED1i t\u1EAFt\"\n : \"T\u1EADp tin\"\n }}\n \u2022 Kh\u00F4ng gian hi\u1EC7n t\u1EA1i: {{ src.IsOrgNode ? \"T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\" : \"Drive c\u00E1 nh\u00E2n\" }}\n </div>\n }\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">Kh\u00F4ng gian \u0111\u00EDch</label>\n <nz-select\n [(ngModel)]=\"moveTargetSpaceKey\"\n (ngModelChange)=\"onMoveSpaceKeyChange($event)\"\n style=\"width: 100%\"\n >\n <nz-option nzValue=\"MY_DRIVE\" nzLabel=\"Drive c\u00E1 nh\u00E2n (My Drive)\"></nz-option>\n <nz-option nzValue=\"ORG_DRIVE\" nzLabel=\"Kho T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (Org Drive)\"></nz-option>\n @for (sp of drive.customSpaces(); track sp.Id) {\n <nz-option [nzValue]=\"'CUSTOM:' + sp.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + sp.Name\"></nz-option>\n }\n </nz-select>\n </div>\n <div>\n <label class=\"drawer-field-label\">Ch\u1ECDn th\u01B0 m\u1EE5c \u0111\u00EDch</label>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Th\u01B0 m\u1EE5c g\u1ED1c (Root) --\"\n [(ngModel)]=\"moveTargetFolderId\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Th\u01B0 m\u1EE5c g\u1ED1c (Root)\"></nz-option>\n @for (f of moveTargetFolders(); track f.Id) {\n <nz-option [nzValue]=\"f.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + f.Name\"></nz-option>\n }\n </nz-select>\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n M\u1EB9o: B\u1EA1n c\u00F3 th\u1EC3 k\u00E9o th\u1EA3 tr\u1EF1c ti\u1EBFp d\u00F2ng t\u00E0i li\u1EC7u/th\u01B0 m\u1EE5c v\u00E0o m\u1EE5c <strong>\"Drive c\u00E1 nh\u00E2n\"</strong> ho\u1EB7c\n <strong>\"T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"</strong> \u1EDF thanh menu b\u00EAn tr\u00E1i \u0111\u1EC3 chuy\u1EC3n nhanh qua l\u1EA1i gi\u1EEFa 2 kh\u00F4ng gian.\n </div>\n </div>\n </div>\n }\n </ng-container>\n <ng-template #moveDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"moveDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitMoveDrawer()\">\n <nz-icon nzType=\"check\"></nz-icon> Di chuy\u1EC3n t\u1EDBi \u0111\u00E2y\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 9: SAO CH\u00C9P T\u1EDAI (COPY TO DRAWER CHO FILE / FOLDER / SHORTCUT) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"copyDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"460\"\n [nzClosable]=\"false\"\n [nzTitle]=\"copyDrawerTitleTpl\"\n [nzFooter]=\"copyDrawerFooterTpl\"\n (nzOnClose)=\"copyDrawerVisible = false\"\n >\n <ng-template #copyDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"copy\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>Sao ch\u00E9p t\u1EDBi (Copy To)</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"copyDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (copySourceNode(); as src) {\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"isFolderLike(src) ? 'folder-fill' : getFileIcon(src)\"\n [style.color]=\"isFolderLike(src) ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n @if (copySourceNodes().length > 1) {\n <div style=\"font-weight: 600\">\u0110ang ch\u1ECDn sao ch\u00E9p {{ copySourceNodes().length }} m\u1EE5c c\u00F9ng l\u00FAc</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n Bao g\u1ED3m: {{ copySourceNodes()[0].Name }} v\u00E0 {{ copySourceNodes().length - 1 }} m\u1EE5c kh\u00E1c\n </div>\n } @else {\n <div style=\"font-weight: 600\">{{ src.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n M\u1EE5c ngu\u1ED3n:\n {{\n src.NodeType === DriveNodeType.Folder\n ? \"Th\u01B0 m\u1EE5c (Sao ch\u00E9p \u0111\u1EC7 quy to\u00E0n b\u1ED9 nh\u00E1nh con)\"\n : src.NodeType === DriveNodeType.Shortcut\n ? \"L\u1ED1i t\u1EAFt\"\n : \"T\u1EADp tin\"\n }}\n </div>\n }\n </div>\n </div>\n </div>\n @if (copySourceNodes().length <= 1) {\n <div>\n <label class=\"drawer-field-label\">T\u00EAn b\u1EA3n sao (\u0110\u1EC3 tr\u1ED1ng \u0111\u1EC3 h\u1EC7 th\u1ED1ng t\u1EF1 \u0111\u1EB7t t\u00EAn)</label>\n <input\n nz-input\n [(ngModel)]=\"copyCustomName\"\n [appAutoFocus]=\"copyDrawerVisible\"\n placeholder=\"Nh\u1EADp t\u00EAn m\u1EDBi cho b\u1EA3n sao...\"\n (keyup.enter)=\"submitCopyDrawer()\"\n />\n </div>\n }\n <div>\n <label class=\"drawer-field-label\">Kh\u00F4ng gian \u0111\u00EDch</label>\n <nz-select\n [(ngModel)]=\"copyTargetSpaceKey\"\n (ngModelChange)=\"onCopySpaceKeyChange($event)\"\n style=\"width: 100%\"\n >\n <nz-option nzValue=\"MY_DRIVE\" nzLabel=\"Drive c\u00E1 nh\u00E2n (My Drive)\"></nz-option>\n <nz-option nzValue=\"ORG_DRIVE\" nzLabel=\"Kho T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (Org Drive)\"></nz-option>\n @for (sp of drive.customSpaces(); track sp.Id) {\n <nz-option [nzValue]=\"'CUSTOM:' + sp.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + sp.Name\"></nz-option>\n }\n </nz-select>\n </div>\n <div>\n <label class=\"drawer-field-label\">Ch\u1ECDn th\u01B0 m\u1EE5c \u0111\u00EDch ch\u1EE9a b\u1EA3n sao</label>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Th\u01B0 m\u1EE5c g\u1ED1c (Root) --\"\n [(ngModel)]=\"copyTargetFolderId\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Th\u01B0 m\u1EE5c g\u1ED1c (Root)\"></nz-option>\n @for (f of copyTargetFolders(); track f.Id) {\n <nz-option [nzValue]=\"f.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + f.Name\"></nz-option>\n }\n </nz-select>\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n B\u1EA3n sao ho\u00E0n to\u00E0n \u0111\u1ED9c l\u1EADp v\u1EDBi m\u1EE5c g\u1ED1c v\u00E0 \u0111\u01B0\u1EE3c t\u00EDnh v\u00E0o h\u1EA1n ng\u1EA1ch c\u1EE7a ng\u01B0\u1EDDi t\u1EA1o b\u1EA3n sao.\n </div>\n </div>\n </div>\n }\n </ng-container>\n <ng-template #copyDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"copyDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitCopyDrawer()\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p t\u1EDBi \u0111\u00E2y\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 7: \u0110\u1ED4I \u0110\u01AF\u1EDCNG D\u1EAAN V\u1EACT L\u00DD / \u00C1NH X\u1EA0 \u1ED4 C\u1EE8NG M\u1EDAI KHI K\u1EBET TH\u00DAC D\u1EF0 \u00C1N -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"relocateDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"500\"\n [nzClosable]=\"false\"\n [nzTitle]=\"relocateDrawerTitleTpl\"\n [nzFooter]=\"relocateDrawerFooterTpl\"\n (nzOnClose)=\"relocateDrawerVisible = false\"\n >\n <ng-template #relocateDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"hdd\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>\n {{ relocateTargetFolder() ? \"\u00C1nh x\u1EA1 / Chuy\u1EC3n \u1ED5 \u0111\u0129a th\u01B0 m\u1EE5c\" : \"C\u1EA5u h\u00ECnh RootPath l\u01B0u tr\u1EEF chung\" }}\n </strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"relocateDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n @if (relocateTargetFolder(); as folder) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon nzType=\"folder-fill\" style=\"font-size: 22px; color: #f59e0b\"></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ folder.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n \u0110\u01B0\u1EDDng d\u1EABn hi\u1EC7n t\u1EA1i:\n <code>{{ folder.PhysicalRelativePath || drive.currentPhysicalPath() || \"M\u1EB7c \u0111\u1ECBnh\" }}</code>\n </div>\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">\u0110\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD m\u1EDBi c\u1EE7a th\u01B0 m\u1EE5c (H\u1ED7 tr\u1EE3 \u1ED5 c\u1EE9ng kh\u00E1c / NAS)</label>\n <input\n nz-input\n [(ngModel)]=\"relocateNewPath\"\n [appAutoFocus]=\"relocateDrawerVisible\"\n placeholder=\"VD: E:Archive_2026DuAn_A ho\u1EB7c \\\\NAS01StorageDuAn_A\"\n (keyup.enter)=\"submitRelocateDrawer()\"\n />\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n Khi d\u1EF1 \u00E1n k\u1EBFt th\u00FAc v\u00E0 h\u1EA1 t\u1EA7ng chuy\u1EC3n th\u01B0 m\u1EE5c sang \u1ED5 c\u1EE9ng kh\u00E1c, \u0111\u1EB7t \u0111\u01B0\u1EDDng d\u1EABn m\u1EDBi t\u1EA1i \u0111\u00E2y \u0111\u1EC3 to\u00E0n b\u1ED9 th\u01B0\n m\u1EE5c con v\u00E0 file b\u00EAn trong t\u1EF1 \u0111\u1ED9ng map sang \u1ED5 c\u1EE9ng m\u1EDBi.\n </div>\n </div>\n <div class=\"drawer-meta-card\">\n <label nz-checkbox [(ngModel)]=\"relocateMoveFilesOnDisk\">\n <strong>T\u1EF1 \u0111\u1ED9ng di chuy\u1EC3n d\u1EEF li\u1EC7u v\u1EADt l\u00FD t\u1EEB \u0111\u01B0\u1EDDng d\u1EABn c\u0169 sang \u1ED5 \u0111\u0129a m\u1EDBi</strong>\n </label>\n <div class=\"quota-sub\" style=\"margin-left: 24px\">\n N\u1EBFu b\u1ED9 ph\u1EADn H\u1EA1 t\u1EA7ng \u0111\u00E3 copy/move s\u1EB5n th\u01B0 m\u1EE5c sang \u1ED5 c\u1EE9ng m\u1EDBi r\u1ED3i, h\u00E3y <strong>b\u1ECF ch\u1ECDn</strong> m\u1EE5c n\u00E0y \u0111\u1EC3\n h\u1EC7 th\u1ED1ng ch\u1EC9 c\u1EADp nh\u1EADt l\u1EA1i \u00E1nh x\u1EA1 \u0111\u01B0\u1EDDng d\u1EABn trong Database.\n </div>\n <label nz-checkbox [(ngModel)]=\"relocateSyncNewFiles\" style=\"margin-top: 6px\">\n <strong>\u0110\u1ED3ng b\u1ED9 b\u1ED5 sung c\u00E1c file/folder c\u00F3 s\u1EB5n t\u1EA1i \u0111\u01B0\u1EDDng d\u1EABn m\u1EDBi v\u00E0o Drive</strong>\n </label>\n </div>\n } @else {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">RootPath hi\u1EC7n t\u1EA1i:</span>\n <code class=\"break-word\">{{ drive.storageRootPath() || drive.currentPhysicalPath() }}</code>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Ch\u1EBF \u0111\u1ED9 th\u01B0 m\u1EE5c g\u1ED1c:</span>\n <nz-tag [nzColor]=\"drive.useSharedPhysicalRoot() ? 'green' : 'blue'\">\n {{\n drive.useSharedPhysicalRoot() ? \"D\u00F9ng chung 1 RootPath cho t\u1EA5t c\u1EA3 User\" : \"T\u00E1ch theo t\u1EEBng Username\"\n }}\n </nz-tag>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">\u0110\u01B0\u1EDDng d\u1EABn RootPath chung m\u1EDBi tr\u00EAn Server</label>\n <input\n nz-input\n [(ngModel)]=\"relocateNewPath\"\n [appAutoFocus]=\"relocateDrawerVisible\"\n placeholder=\"VD: D:ProjectStorageDriveRoot ho\u1EB7c E:ArchiveDrive\"\n (keyup.enter)=\"submitRelocateDrawer()\"\n />\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n T\u1EA5t c\u1EA3 c\u00E1c th\u01B0 m\u1EE5c ch\u01B0a ghim \u1ED5 \u0111\u0129a ri\u00EAng s\u1EBD t\u1EF1 \u0111\u1ED9ng \u0111\u1ECDc/ghi theo RootPath m\u1EDBi n\u00E0y.\n </div>\n </div>\n }\n </div>\n </ng-container>\n <ng-template #relocateDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"relocateDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitRelocateDrawer()\">\n <nz-icon nzType=\"save\"></nz-icon> L\u01B0u \u00E1nh x\u1EA1 v\u1EADt l\u00FD\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 8: QU\u1EA2N L\u00DD H\u1EA0N NG\u1EA0CH DUNG L\u01AF\u1EE2NG (DEFAULT QUOTA & PER-USER QUOTA) -->\n <!-- CH\u1EC8 D\u00C0NH RI\u00CANG CHO QU\u1EA2N TR\u1ECA VI\u00CAN (ADMIN) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"quotaAdminDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"980\"\n [nzClosable]=\"false\"\n [nzTitle]=\"quotaAdminDrawerTitleTpl\"\n [nzFooter]=\"quotaAdminDrawerFooterTpl\"\n (nzOnClose)=\"quotaAdminDrawerVisible = false\"\n >\n <ng-template #quotaAdminDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"pie-chart\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>Qu\u1EA3n l\u00FD H\u1EA1n ng\u1EA1ch Dung l\u01B0\u1EE3ng (Quota Management)</strong>\n <nz-tag nzColor=\"gold\">Ch\u1EC9 Admin</nz-tag>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"quotaAdminDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n <!-- PH\u1EA6N 1: C\u1EA4U H\u00CCNH QUOTA M\u1EB6C \u0110\u1ECANH TO\u00C0N H\u1EC6 TH\u1ED0NG -->\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <div>\n <div style=\"font-size: 14px; font-weight: 600\">\n <nz-icon nzType=\"cloud-server\" style=\"color: var(--primary-color); margin-right: 6px\"></nz-icon>\n 1. C\u1EA5u h\u00ECnh Quota m\u1EB7c \u0111\u1ECBnh (Default Quota)\n </div>\n <div class=\"quota-sub\">\n \u00C1p d\u1EE5ng t\u1EF1 \u0111\u1ED9ng cho ng\u01B0\u1EDDi d\u00F9ng m\u1EDBi ho\u1EB7c ng\u01B0\u1EDDi d\u00F9ng ch\u01B0a \u0111\u01B0\u1EE3c g\u00E1n h\u1EA1n ng\u1EA1ch ri\u00EAng.\n </div>\n </div>\n @if (quotaOverview(); as ov) {\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-tag nzColor=\"blue\">\n M\u1EB7c \u0111\u1ECBnh hi\u1EC7n t\u1EA1i: <strong>{{ ov.DefaultUserQuotaBytes | formatBytes }}</strong>\n </nz-tag>\n <nz-tag nzColor=\"purple\">\n T\u1ED5ng \u0111\u00E3 d\u00F9ng to\u00E0n h\u1EC7 th\u1ED1ng: <strong>{{ ov.TotalSystemUsedBytes | formatBytes }}</strong>\n </nz-tag>\n </div>\n }\n </div>\n <nz-divider style=\"margin: 8px 0\"></nz-divider>\n <div nz-flex nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <span style=\"font-size: 13px; font-weight: 500\">M\u1EE9c Quota m\u1EB7c \u0111\u1ECBnh:</span>\n <input\n nz-input\n type=\"number\"\n min=\"1\"\n [(ngModel)]=\"defaultQuotaInputValue\"\n style=\"width: 120px\"\n placeholder=\"Nh\u1EADp dung l\u01B0\u1EE3ng\"\n />\n <nz-select [(ngModel)]=\"defaultQuotaInputUnit\" style=\"width: 90px\">\n <nz-option nzValue=\"MB\" nzLabel=\"MB\"></nz-option>\n <nz-option nzValue=\"GB\" nzLabel=\"GB\"></nz-option>\n <nz-option nzValue=\"TB\" nzLabel=\"TB\"></nz-option>\n </nz-select>\n <!-- C\u00E1c n\u00FAt ch\u1ECDn nhanh (Quick Presets) -->\n <div nz-flex nzAlign=\"center\" [nzGap]=\"4\">\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(1, 'GB')\">1 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(5, 'GB')\">5 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(10, 'GB')\">10 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(20, 'GB')\">20 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(50, 'GB')\">50 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(100, 'GB')\">100 GB</button>\n </div>\n <button nz-button nzType=\"primary\" (click)=\"onSaveDefaultQuota()\">\n <nz-icon nzType=\"save\"></nz-icon> L\u01B0u Quota m\u1EB7c \u0111\u1ECBnh\n </button>\n </div>\n <div style=\"margin-top: 4px\">\n <label nz-checkbox [(ngModel)]=\"applyDefaultToExistingUsers\">\n \u0110\u1ED3ng th\u1EDDi c\u1EADp nh\u1EADt m\u1EE9c Quota m\u1EB7c \u0111\u1ECBnh m\u1EDBi n\u00E0y cho t\u1EA5t c\u1EA3 c\u00E1c ng\u01B0\u1EDDi d\u00F9ng hi\u1EC7n c\u00F3\n </label>\n </div>\n </div>\n <!-- PH\u1EA6N 2: \u0110\u1EB6T QUOTA RI\u00CANG CHO T\u1EEANG NG\u01AF\u1EDCI D\u00D9NG -->\n <div>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\" style=\"margin-bottom: 10px\">\n <div>\n <div style=\"font-size: 14px; font-weight: 600\">\n <nz-icon nzType=\"team\" style=\"color: var(--primary-color); margin-right: 6px\"></nz-icon>\n 2. Thi\u1EBFt l\u1EADp Quota cho t\u1EEBng ng\u01B0\u1EDDi d\u00F9ng ({{ quotaUsers().length }})\n </div>\n <div class=\"quota-sub\">\n T\u00F9y ch\u1EC9nh h\u1EA1n ng\u1EA1ch dung l\u01B0\u1EE3ng ri\u00EAng cho t\u1EEBng c\u00E1 nh\u00E2n ho\u1EB7c \u0111\u1EB7t l\u1EA1i v\u1EC1 m\u1EE9c m\u1EB7c \u0111\u1ECBnh.\n </div>\n </div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-input-group [nzSuffix]=\"quotaUserSearchSuffix\" style=\"width: 260px\">\n <input\n nz-input\n type=\"text\"\n placeholder=\"T\u00ECm theo t\u00E0i kho\u1EA3n, h\u1ECD t\u00EAn, email...\"\n [(ngModel)]=\"quotaUserSearchKeyword\"\n (keyup.enter)=\"reloadQuotaOverview()\"\n />\n </nz-input-group>\n <ng-template #quotaUserSearchSuffix>\n <nz-icon nzType=\"search\" class=\"cursor-pointer\" (click)=\"reloadQuotaOverview()\"></nz-icon>\n </ng-template>\n <button nz-button nzType=\"default\" (click)=\"reloadQuotaOverview()\" nz-tooltip nzTooltipTitle=\"T\u1EA3i l\u1EA1i\">\n <nz-icon nzType=\"reload\"></nz-icon>\n </button>\n </div>\n </div>\n <nz-table\n #userQuotaTable\n [nzData]=\"quotaUsers()\"\n [nzLoading]=\"quotaLoading()\"\n nzSize=\"small\"\n [nzBordered]=\"true\"\n [nzPageSize]=\"10\"\n [nzShowPagination]=\"true\"\n >\n <thead>\n <tr>\n <th nzWidth=\"45px\" class=\"text-center\">#</th>\n <th>Ng\u01B0\u1EDDi d\u00F9ng</th>\n <th nzWidth=\"220px\">\u0110\u00E3 d\u00F9ng / H\u1EA1n ng\u1EA1ch</th>\n <th nzWidth=\"105px\" class=\"text-center\">Lo\u1EA1i Quota</th>\n <th nzWidth=\"210px\">\u0110\u1EB7t h\u1EA1n ng\u1EA1ch m\u1EDBi</th>\n <th nzWidth=\"145px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (u of userQuotaTable.data; track u.UserId; let idx = $index) {\n <tr>\n <td class=\"text-center\">{{ idx + 1 }}</td>\n <td>\n <div style=\"font-weight: 600\">{{ u.FullName || u.UserName }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n <code>{{ u.UserName }}</code>\n @if (u.OrgName) {\n <span> \u2022 {{ u.OrgName }}</span>\n }\n @if (u.Email) {\n <span> \u2022 {{ u.Email }}</span>\n }\n </div>\n </td>\n <td>\n <div nz-flex nzJustify=\"space-between\" style=\"font-size: 12px; margin-bottom: 2px\">\n <span\n >{{ u.UsedBytes | formatBytes }} / <strong>{{ u.QuotaLimitBytes | formatBytes }}</strong></span\n >\n <span>{{ getUserQuotaPercent(u) }}%</span>\n </div>\n <nz-progress\n [nzPercent]=\"getUserQuotaPercent(u)\"\n nzSize=\"small\"\n [nzShowInfo]=\"false\"\n [nzStatus]=\"getUserQuotaPercent(u) >= 95 ? 'exception' : 'normal'\"\n ></nz-progress>\n </td>\n <td class=\"text-center\">\n @if (u.IsCustomQuota) {\n <nz-tag nzColor=\"orange\">T\u00F9y ch\u1EC9nh</nz-tag>\n } @else {\n <nz-tag nzColor=\"default\">M\u1EB7c \u0111\u1ECBnh</nz-tag>\n }\n </td>\n <td>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"6\">\n <input nz-input type=\"number\" min=\"1\" [(ngModel)]=\"u.editQuotaValue\" style=\"width: 90px\" />\n <nz-select [(ngModel)]=\"u.editQuotaUnit\" style=\"width: 80px\">\n <nz-option nzValue=\"MB\" nzLabel=\"MB\"></nz-option>\n <nz-option nzValue=\"GB\" nzLabel=\"GB\"></nz-option>\n <nz-option nzValue=\"TB\" nzLabel=\"TB\"></nz-option>\n </nz-select>\n </div>\n </td>\n <td class=\"text-center\">\n <div nz-flex nzJustify=\"center\" [nzGap]=\"6\">\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"onSaveUserQuota(u)\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"L\u01B0u h\u1EA1n ng\u1EA1ch ri\u00EAng cho ng\u01B0\u1EDDi d\u00F9ng n\u00E0y\"\n -->\n <nz-icon nzType=\"check\"></nz-icon> L\u01B0u\n </button>\n <button\n nz-button\n nzType=\"default\"\n nzSize=\"small\"\n [disabled]=\"!u.IsCustomQuota\"\n nz-tooltip\n nzTooltipTitle=\"\u0110\u1EB7t l\u1EA1i v\u1EC1 m\u1EE9c Quota m\u1EB7c \u0111\u1ECBnh c\u1EE7a h\u1EC7 th\u1ED1ng\"\n (click)=\"onResetUserQuota(u)\"\n >\n <nz-icon nzType=\"undo\"></nz-icon>\n </button>\n </div>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n </div>\n </div>\n </ng-container>\n <ng-template #quotaAdminDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"quotaAdminDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 10: C\u1EA4U H\u00CCNH & PH\u00C2N QUY\u1EC0N C\u1EE4 TH\u1EC2 CHO \"T\u00C0I LI\u1EC6U \u0110\u01A0N V\u1ECA\" -->\n <!-- V\u00C0 \"T\u00C0I LI\u1EC6U D\u1EF0 \u00C1N\" (CUSTOM SPACES) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"customSpaceDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"customSpaceDrawerMode === 'create' ? 520 : 900\"\n [nzClosable]=\"false\"\n [nzTitle]=\"customSpaceDrawerTitleTpl\"\n [nzFooter]=\"customSpaceDrawerFooterTpl\"\n (nzOnClose)=\"customSpaceDrawerVisible = false\"\n >\n <ng-template #customSpaceDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n (click)=\"toggleDrawerPlacement()\"\n >\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon\n [nzType]=\"customSpaceDrawerMode === 'org_root' ? 'apartment' : customSpaceIcon || 'project'\"\n style=\"font-size: 18px; color: var(--primary-color)\"\n ></nz-icon>\n <strong>\n {{\n customSpaceDrawerMode === \"org_root\"\n ? \"C\u1EA5u h\u00ECnh & Ph\u00E2n quy\u1EC1n c\u1EE5 th\u1EC3: T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"\n : customSpaceDrawerMode === \"create\"\n ? \"Th\u00EAm m\u1EE5c t\u00F9y ch\u1EC9nh d\u01B0\u1EDBi T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"\n : \"C\u1EA5u h\u00ECnh & Ph\u00E2n quy\u1EC1n c\u1EE5 th\u1EC3: \" + (editingCustomSpace?.Name || customSpaceName)\n }}\n </strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"customSpaceDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n @if (customSpaceDrawerMode !== \"org_root\") {\n <div nz-flex [nzGap]=\"12\" nzWrap=\"wrap\">\n <div style=\"flex: 1.5; min-width: 240px\">\n <label class=\"drawer-field-label\">T\u00EAn m\u1EE5c hi\u1EC3n th\u1ECB tr\u00EAn thanh menu tr\u00E1i</label>\n <input\n nz-input\n [(ngModel)]=\"customSpaceName\"\n [appAutoFocus]=\"customSpaceDrawerVisible && customSpaceDrawerMode === 'create'\"\n placeholder=\"V\u00ED d\u1EE5: T\u00E0i li\u1EC7u d\u1EF1 \u00E1n, H\u1ED3 s\u01A1 th\u1EA7u, Quy tr\u00ECnh ISO...\"\n (keyup.enter)=\"submitCustomSpaceDrawer()\"\n />\n </div>\n <div style=\"flex: 1; min-width: 200px\">\n <label class=\"drawer-field-label\">Bi\u1EC3u t\u01B0\u1EE3ng (Icon)</label>\n <nz-select [(ngModel)]=\"customSpaceIcon\" style=\"width: 100%\">\n <nz-option nzValue=\"project\" nzLabel=\"\uD83D\uDCCA D\u1EF1 \u00E1n (project)\"></nz-option>\n <nz-option nzValue=\"folder-open\" nzLabel=\"\uD83D\uDCC2 Th\u01B0 m\u1EE5c m\u1EDF (folder-open)\"></nz-option>\n <nz-option nzValue=\"book\" nzLabel=\"\uD83D\uDCD8 T\u00E0i li\u1EC7u / C\u1EA9m nang (book)\"></nz-option>\n <nz-option nzValue=\"safety-certificate\" nzLabel=\"\uD83D\uDEE1 Quy chu\u1EA9n / ISO (safety-certificate)\"></nz-option>\n <nz-option nzValue=\"solution\" nzLabel=\"\uD83D\uDCCB H\u1ED3 s\u01A1 nghi\u1EC7p v\u1EE5 (solution)\"></nz-option>\n <nz-option nzValue=\"database\" nzLabel=\"\uD83D\uDDC4 Kho d\u1EEF li\u1EC7u (database)\"></nz-option>\n </nz-select>\n </div>\n </div>\n }\n\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" [nzGap]=\"12\" nzWrap=\"wrap\">\n <div style=\"flex: 1; min-width: 240px\">\n <div style=\"font-weight: 600; font-size: 13px\">\n {{\n customSpaceDrawerMode === \"org_root\"\n ? \"1. Ph\u1EA1m vi truy c\u1EADp m\u1EB7c \u0111\u1ECBnh t\u1EA1i g\u1ED1c 'T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB'\"\n : \"1. Hi\u1EC3n th\u1ECB cho t\u1EA5t c\u1EA3 ng\u01B0\u1EDDi d\u00F9ng (All Users) & Quy\u1EC1n m\u1EB7c \u0111\u1ECBnh\"\n }}\n </div>\n <div class=\"quota-sub\">\n @if (customSpaceDrawerMode === \"org_root\") {\n M\u1EB7c \u0111\u1ECBnh ng\u01B0\u1EDDi d\u00F9ng th\u01B0\u1EDDng ch\u1EC9 \u0111\u01B0\u1EE3c <strong>Xem & T\u1EA3i xu\u1ED1ng</strong> t\u1EA1i g\u1ED1c \"T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\" (kh\u00F4ng\n \u0111\u01B0\u1EE3c t\u1EF1 \u00FD t\u1EA1o th\u01B0 m\u1EE5c ho\u1EB7c \u0111\u1EA9y t\u1EADp tin l\u00EAn g\u1ED1c tr\u1EEB khi \u0111\u01B0\u1EE3c c\u1EA5p quy\u1EC1n c\u1EE5 th\u1EC3 \u1EDF b\u1EA3ng b\u00EAn d\u01B0\u1EDBi).\n } @else if (drive.isCurrentUserAdmin()) {\n Khi b\u1EADt All Users: M\u1ECDi t\u00E0i kho\u1EA3n \u0111\u1EC1u th\u1EA5y m\u1EE5c n\u00E0y v\u1EDBi m\u1EE9c quy\u1EC1n m\u1EB7c \u0111\u1ECBnh b\u00EAn d\u01B0\u1EDBi; c\u00E1c \u0111\u1ED1i t\u01B0\u1EE3ng \u0111\u01B0\u1EE3c\n c\u1EA5p quy\u1EC1n ri\u00EAng \u1EDF b\u1EA3ng Ph\u00E2n quy\u1EC1n c\u1EE5 th\u1EC3 s\u1EBD \u01B0u ti\u00EAn \u00E1p d\u1EE5ng theo quy\u1EC1n ri\u00EAng.\n } @else {\n Ch\u1EC9 Qu\u1EA3n tr\u1ECB vi\u00EAn (Admin) m\u1EDBi c\u00F3 quy\u1EC1n thay \u0111\u1ED5i ph\u1EA1m vi hi\u1EC3n th\u1ECB chung to\u00E0n h\u1EC7 th\u1ED1ng.\n }\n </div>\n </div>\n <nz-switch\n [(ngModel)]=\"customSpaceVisibleToAll\"\n (ngModelChange)=\"onCustomSpaceVisibleToAllChange($event)\"\n nzCheckedChildren=\"All Users\"\n nzUnCheckedChildren=\"Theo quy\u1EC1n ri\u00EAng\"\n ></nz-switch>\n </div>\n <nz-divider style=\"margin: 10px 0\"></nz-divider>\n <div nz-flex nzAlign=\"center\" nzJustify=\"space-between\" nzWrap=\"wrap\" [nzGap]=\"10\">\n <div style=\"flex: 1; min-width: 240px\">\n <label class=\"drawer-field-label\" style=\"margin-bottom: 4px\">\n M\u1EE9c quy\u1EC1n m\u1EB7c \u0111\u1ECBnh cho ng\u01B0\u1EDDi d\u00F9ng chung (ch\u01B0a c\u00F3 trong b\u1EA3ng ph\u00E2n quy\u1EC1n ri\u00EAng)\n </label>\n <nz-select\n [(ngModel)]=\"customSpaceDefaultAccessLevel\"\n (ngModelChange)=\"onCustomSpaceDefaultAccessChange($event)\"\n style=\"width: 100%\"\n >\n <nz-option\n [nzValue]=\"DriveAccessLevel.None\"\n nzLabel=\"\uD83D\uDEAB Kh\u00F4ng c\u1EA5p quy\u1EC1n m\u1EB7c \u0111\u1ECBnh (Ch\u1EC9 nh\u1EEFng ng\u01B0\u1EDDi \u0111\u01B0\u1EE3c ph\u00E2n quy\u1EC1n c\u1EE5 th\u1EC3 b\u00EAn d\u01B0\u1EDBi)\"\n ></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Viewer\" nzLabel=\"\uD83D\uDC41 Ch\u1EC9 xem (Viewer)\"></nz-option>\n <nz-option\n [nzValue]=\"DriveAccessLevel.Downloader\"\n nzLabel=\"\u2B07 Xem & T\u1EA3i xu\u1ED1ng (Ch\u1EB7n t\u1EF1 \u00FD t\u1EA1o folder & \u0111\u1EA9y file l\u00EAn g\u1ED1c)\"\n ></nz-option>\n <nz-option\n [nzValue]=\"DriveAccessLevel.Uploader\"\n nzLabel=\"\u2601 Xem & T\u1EA3i l\u00EAn (Ch\u1EC9 \u0111\u01B0\u1EE3c \u0111\u1EA9y file l\u00EAn, KH\u00D4NG \u0111\u01B0\u1EE3c t\u1EA1o folder & kh\u00F4ng \u0111\u01B0\u1EE3c x\u00F3a)\"\n ></nz-option>\n <nz-option\n [nzValue]=\"DriveAccessLevel.Editor\"\n nzLabel=\"\u270E Ch\u1EC9nh s\u1EEDa (Editor - \u0110\u01B0\u1EE3c t\u1EA1o folder & \u0111\u1EA9y file)\"\n ></nz-option>\n </nz-select>\n </div>\n <button\n type=\"button\"\n nz-button\n nzType=\"primary\"\n style=\"margin-top: 20px\"\n (click)=\"submitCustomSpaceDrawer()\"\n >\n <nz-icon nzType=\"save\"></nz-icon>\n {{ customSpaceDrawerMode === \"create\" ? \"T\u1EA1o m\u1EE5c & Ti\u1EBFp t\u1EE5c ph\u00E2n quy\u1EC1n\" : \"L\u01B0u c\u1EA5u h\u00ECnh chung\" }}\n </button>\n </div>\n </div>\n\n <!-- B\u1EA2NG PH\u00C2N QUY\u1EC0N C\u1EE4 TH\u1EC2 (ACL & RBAC: USER / \u0110\u01A0N V\u1ECA / VAI TR\u00D2) CHO \"T\u00C0I LI\u1EC6U \u0110\u01A0N V\u1ECA\" & \"T\u00C0I LI\u1EC6U D\u1EF0 \u00C1N\" -->\n @if (customSpaceDrawerMode !== \"create\" && editingCustomSpace?.Id; as spaceNodeId) {\n <div class=\"drawer-meta-card\">\n <div style=\"font-weight: 600; font-size: 13px; margin-bottom: 4px\">\n <nz-icon nzType=\"safety-certificate\" style=\"color: var(--primary-color); margin-right: 6px\"></nz-icon>\n 2. Ph\u00E2n quy\u1EC1n c\u1EE5 th\u1EC3 theo C\u00E1 nh\u00E2n (User) / \u0110\u01A1n v\u1ECB (App_Org) / Vai tr\u00F2 (App_Role)\n </div>\n <div class=\"quota-sub\" style=\"margin-bottom: 12px\">\n C\u1EA5p quy\u1EC1n ri\u00EAng (v\u00ED d\u1EE5: <strong>Ch\u1EC9nh s\u1EEDa</strong> \u0111\u1EC3 \u0111\u01B0\u1EE3c t\u1EA1o th\u01B0 m\u1EE5c & t\u1EA3i file,\n <strong>Xem & T\u1EA3i l\u00EAn</strong> \u0111\u1EC3 ch\u1EC9 t\u1EA3i file, ho\u1EB7c <strong>C\u1EA5m - Deny</strong>) cho t\u1EEBng ng\u01B0\u1EDDi d\u00F9ng,\n ph\u00F2ng ban ho\u1EB7c vai tr\u00F2 tr\u00EAn\n <strong>{{ customSpaceDrawerMode === \"org_root\" ? \"T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\" : editingCustomSpace?.Name }}</strong\n >.\n </div>\n <lib-drive-share-modal [nodeId]=\"spaceNodeId\" [hideInheritanceToggle]=\"true\"></lib-drive-share-modal>\n </div>\n }\n </div>\n </ng-container>\n <ng-template #customSpaceDrawerFooterTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div>\n @if (customSpaceDrawerMode === \"edit\" && editingCustomSpace) {\n <button nz-button nzDanger nzType=\"default\" (click)=\"onDeleteCustomSpace(editingCustomSpace)\">\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a m\u1EE5c n\u00E0y\n </button>\n }\n </div>\n <div nz-flex [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"customSpaceDrawerVisible = false\">\u0110\u00F3ng</button>\n <button nz-button nzType=\"primary\" (click)=\"submitCustomSpaceDrawer()\">\n <nz-icon nzType=\"check\"></nz-icon>\n {{ customSpaceDrawerMode === \"create\" ? \"T\u1EA1o m\u1EE5c m\u1EDBi\" : \"L\u01B0u c\u1EA5u h\u00ECnh chung\" }}\n </button>\n </div>\n </div>\n </ng-template>\n </nz-drawer>\n\n <nz-drawer\n [nzVisible]=\"matrixDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"'92vw'\"\n nzTitle=\"Ma tr\u1EADn Ph\u00E2n quy\u1EC1n T\u00E0i li\u1EC7u & Th\u01B0 m\u1EE5c\"\n (nzOnClose)=\"matrixDrawerVisible = false\"\n >\n <!-- (ACL / RBAC Matrix) -->\n <ng-container *nzDrawerContent>\n <lib-drive-permission-matrix\n [rootFolderId]=\"matrixRootNodeId\"\n [initialTabIndex]=\"matrixInitialTabIndex\"\n [preselectedNodeIds]=\"matrixPreselectedNodeIds()\"\n [viewMode]=\"\n drive.currentViewMode() === 'ORG_DRIVE'\n ? 'ORG_DRIVE'\n : drive.currentViewMode() === 'CUSTOM_SPACE'\n ? 'CUSTOM_SPACE'\n : 'MY_DRIVE'\n \"\n [customSpaceId]=\"drive.currentCustomSpaceId()\"\n (saved)=\"drive.loadNodes()\"\n (closed)=\"matrixDrawerVisible = false\"\n >\n </lib-drive-permission-matrix>\n </ng-container>\n </nz-drawer>\n\n <!-- ========================================================================= -->\n <!-- DRAWER 11: \u0110\u1ECANH NGH\u0128A & C\u1EA4U H\u00CCNH C\u00C2Y TH\u01AF M\u1EE4C M\u1EAAU K\u00C8M PH\u00C2N QUY\u1EC0N T\u1EF0 \u0110\u1ED8NG -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"templateDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"760\"\n [nzClosable]=\"false\"\n [nzTitle]=\"templateDrawerTitleTpl\"\n [nzFooter]=\"templateDrawerFooterTpl\"\n (nzOnClose)=\"templateDrawerVisible = false\"\n >\n <ng-template #templateDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n (click)=\"toggleDrawerPlacement()\"\n >\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"apartment\" style=\"font-size: 18px; color: #d97706\"></nz-icon>\n <strong>\n {{ templateDrawerMode === \"create\" ? \"\u0110\u1ECBnh ngh\u0129a M\u1EABu C\u00E2y Th\u01B0 M\u1EE5c M\u1EDBi\" : \"C\u1EADp nh\u1EADt M\u1EABu C\u00E2y Th\u01B0 M\u1EE5c\" }}\n </strong>\n @if (totalConfiguredTemplatePermissions() > 0) {\n <nz-tag nzColor=\"cyan\">\uD83D\uDEE1 {{ totalConfiguredTemplatePermissions() }} quy\u1EC1n c\u00E0i s\u1EB5n</nz-tag>\n }\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"templateDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"14\">\n <div nz-flex [nzGap]=\"12\" nzWrap=\"wrap\">\n <div style=\"flex: 1.4; min-width: 220px\">\n <label class=\"drawer-field-label\">T\u00EAn m\u1EABu c\u00E2y th\u01B0 m\u1EE5c *</label>\n <input\n nz-input\n [(ngModel)]=\"templateInputName\"\n [appAutoFocus]=\"templateDrawerVisible\"\n placeholder=\"VD: H\u1ED3 s\u01A1 D\u1EF1 \u00E1n \u0110\u1EA5u th\u1EA7u, H\u1ED3 s\u01A1 H\u1EE3p \u0111\u1ED3ng...\"\n />\n </div>\n <div style=\"flex: 1; min-width: 170px\">\n <label class=\"drawer-field-label\">M\u00E3 m\u1EABu (D\u00F9ng g\u1ECDi API t\u1EEB Module kh\u00E1c)</label>\n <input nz-input [(ngModel)]=\"templateInputCode\" placeholder=\"VD: MAU_DU_AN, MAU_HOP_DONG...\" />\n </div>\n </div>\n\n <div>\n <label class=\"drawer-field-label\">M\u00F4 t\u1EA3 ng\u1EAFn</label>\n <input\n nz-input\n [(ngModel)]=\"templateInputDesc\"\n placeholder=\"M\u00F4 t\u1EA3 m\u1EE5c \u0111\u00EDch s\u1EED d\u1EE5ng ho\u1EB7c ph\u00E2n h\u1EC7 \u00E1p d\u1EE5ng...\"\n />\n </div>\n\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" [nzGap]=\"12\">\n <div style=\"flex: 1\">\n <div style=\"font-weight: 600; font-size: 13px\">T\u1EA1o th\u01B0 m\u1EE5c g\u1ED1c b\u1ECDc ngo\u00E0i khi k\u00E9o th\u1EA3</div>\n <div class=\"quota-sub\">\n Khi b\u1EADt: K\u00E9o th\u1EA3 m\u1EABu v\u00E0o th\u01B0 m\u1EE5c \u0111\u00EDch s\u1EBD t\u1EA1o 1 th\u01B0 m\u1EE5c mang t\u00EAn m\u1EABu r\u1ED3i ch\u1EE9a c\u00E2y con b\u00EAn trong.\n </div>\n </div>\n <nz-switch\n style=\"flex-shrink: 0\"\n [(ngModel)]=\"templateCreateWrapperRoot\"\n nzCheckedChildren=\"C\u00F3 b\u1ECDc g\u1ED1c\"\n nzUnCheckedChildren=\"Bung tr\u1EF1c ti\u1EBFp\"\n ></nz-switch>\n </div>\n\n <nz-divider style=\"margin: 6px 0\"></nz-divider>\n\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" [nzGap]=\"12\">\n <div style=\"flex: 1\">\n <div style=\"font-weight: 600; font-size: 13px\">Chia s\u1EBB m\u1EABu n\u00E0y cho to\u00E0n b\u1ED9 ng\u01B0\u1EDDi d\u00F9ng & ph\u00E2n h\u1EC7</div>\n <div class=\"quota-sub\">Cho ph\u00E9p m\u1ECDi ng\u01B0\u1EDDi d\u00F9ng v\u00E0 c\u00E1c Module nghi\u1EC7p v\u1EE5 kh\u00E1c s\u1EED d\u1EE5ng chung m\u1EABu n\u00E0y.</div>\n </div>\n <nz-switch\n style=\"flex-shrink: 0\"\n [(ngModel)]=\"templateVisibleToAll\"\n [nzDisabled]=\"!drive.isCurrentUserAdmin()\"\n nzCheckedChildren=\"To\u00E0n h\u1EC7 th\u1ED1ng\"\n nzUnCheckedChildren=\"C\u00E1 nh\u00E2n\"\n ></nz-switch>\n </div>\n </div>\n\n <!-- SO\u1EA0N TH\u1EA2O C\u1EA4U TR\u00DAC C\u00C2Y \u0110A C\u1EA4P & XEM TR\u01AF\u1EDAC TR\u1EF0C QUAN (NH\u1EA4N V\u00C0O D\u00D2NG \u0110\u1EC2 G\u00C1N QUY\u1EC0N RI\u00CANG) -->\n <div>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"6\" style=\"margin-bottom: 6px\">\n <label class=\"drawer-field-label\" style=\"margin-bottom: 0\">\n 1. C\u1EA5u tr\u00FAc C\u00E2y th\u01B0 m\u1EE5c (M\u1ED7i d\u00F2ng 1 th\u01B0 m\u1EE5c, th\u1EE5t l\u1EC1 2 kho\u1EA3ng tr\u1EAFng \u0111\u1EC3 t\u1EA1o c\u1EA5p con)\n </label>\n <div nz-flex [nzGap]=\"4\">\n <button type=\"button\" nz-button nzSize=\"small\" (click)=\"loadPresetTemplateStructure('PROJECT')\">\n M\u1EABu D\u1EF1 \u00E1n\n </button>\n <button type=\"button\" nz-button nzSize=\"small\" (click)=\"loadPresetTemplateStructure('CONTRACT')\">\n M\u1EABu H\u1EE3p \u0111\u1ED3ng\n </button>\n <button type=\"button\" nz-button nzSize=\"small\" (click)=\"loadPresetTemplateStructure('TRAINING')\">\n M\u1EABu \u0110\u00E0o t\u1EA1o / KHCN\n </button>\n </div>\n </div>\n\n <div class=\"template-editor-grid\">\n <div>\n <textarea\n nz-input\n rows=\"11\"\n [(ngModel)]=\"templateIndentedText\"\n style=\"font-family: monospace; font-size: 12.5px; line-height: 1.55\"\n placeholder=\"- 01. H\u1ED3 s\u01A1 ph\u00E1p l\u00FD - 01.1. T\u1EDD tr\u00ECnh - 01.2. Quy\u1EBFt \u0111\u1ECBnh - 02. H\u1EE3p \u0111\u1ED3ng & Nghi\u1EC7m thu\"\n ></textarea>\n </div>\n\n <div class=\"template-tree-preview\">\n <div\n nz-flex\n nzJustify=\"space-between\"\n nzAlign=\"center\"\n style=\"font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--app-text-muted, #64748b)\"\n >\n <span>Xem tr\u01B0\u1EDBc ({{ previewTemplateFlatNodes().length }} th\u01B0 m\u1EE5c) \u2014 Nh\u1EA5n \u0111\u1EC3 g\u00E1n quy\u1EC1n:</span>\n </div>\n\n <!-- D\u00F2ng ch\u1ECDn Quy\u1EC1n g\u1ED1c to\u00E0n b\u1ED9 m\u1EABu -->\n <div\n class=\"preview-tree-row selectable-preview-row\"\n [class.active-perm-target]=\"selectedTemplatePermTarget() === '__ROOT__'\"\n (click)=\"selectTemplatePermissionTarget('__ROOT__')\"\n >\n <nz-icon nzType=\"global\" style=\"color: #0284c7; margin-right: 6px\"></nz-icon>\n <strong style=\"flex: 1; font-size: 12px\">To\u00E0n b\u1ED9 c\u00E2y th\u01B0 m\u1EE5c m\u1EABu (Quy\u1EC1n g\u1ED1c)</strong>\n @if (templateRootPermissions().length > 0) {\n <nz-tag nzColor=\"blue\" style=\"margin: 0; font-size: 10.5px; line-height: 16px; padding: 0 5px\">\n \uD83D\uDEE1 {{ templateRootPermissions().length }}\n </nz-tag>\n }\n </div>\n\n @for (node of previewTemplateFlatNodes(); track node.RelativePath) {\n <div\n class=\"preview-tree-row selectable-preview-row\"\n [class.active-perm-target]=\"selectedTemplatePermTarget() === node.RelativePath\"\n [style.padding-left.px]=\"8 + node.Level * 16\"\n (click)=\"selectTemplatePermissionTarget(node.RelativePath)\"\n >\n <!-- nz-tooltip\n nzTooltipTitle=\"Nh\u1EA5n \u0111\u1EC3 c\u1EA5u h\u00ECnh ph\u00E2n quy\u1EC1n ri\u00EAng cho nh\u00E1nh th\u01B0 m\u1EE5c n\u00E0y\" -->\n <nz-icon nzType=\"folder-fill\" style=\"color: #f59e0b; margin-right: 6px\"></nz-icon>\n <span style=\"flex: 1; overflow: hidden; text-overflow: ellipsis\">{{ node.Name }}</span>\n @if (node.BreakInheritance) {\n <nz-tag\n nzColor=\"warning\"\n style=\"margin: 0 2px 0 0; font-size: 10px; line-height: 15px; padding: 0 4px\"\n nz-tooltip\n nzTooltipTitle=\"Ng\u1EAFt k\u1EBF th\u1EEBa quy\u1EC1n t\u1EEB th\u01B0 m\u1EE5c cha\"\n >\n \u0110\u1ED9c l\u1EADp\n </nz-tag>\n }\n @if (node.PermissionsCount > 0) {\n <nz-tag nzColor=\"cyan\" style=\"margin: 0; font-size: 10px; line-height: 15px; padding: 0 5px\">\n \uD83D\uDEE1 {{ node.PermissionsCount }}\n </nz-tag>\n }\n </div>\n }\n </div>\n </div>\n </div>\n\n <!-- ========================================================================= -->\n <!-- 2. C\u1EA4U H\u00CCNH PH\u00C2N QUY\u1EC0N M\u1EB6C \u0110\u1ECANH CHO M\u1EAAU C\u00C2Y TH\u01AF M\u1EE4C (ACL & RBAC) -->\n <!-- ========================================================================= -->\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <div>\n <div style=\"font-weight: 600; font-size: 13px\">\n <nz-icon nzType=\"safety-certificate\" style=\"color: #0284c7; margin-right: 4px\"></nz-icon>\n 2. Ph\u00E2n quy\u1EC1n c\u00E0i s\u1EB5n khi t\u1EA1o m\u1EDBi t\u1EEB M\u1EABu c\u00E2y th\u01B0 m\u1EE5c\n </div>\n <div class=\"quota-sub\">\n @if (selectedTemplatePermTarget() === \"__ROOT__\") {\n \u0110ang c\u1EA5u h\u00ECnh cho: <strong style=\"color: #0284c7\">\uD83C\uDF10 To\u00E0n b\u1ED9 c\u00E2y th\u01B0 m\u1EE5c m\u1EABu (Quy\u1EC1n g\u1ED1c)</strong> \u2014 T\u1EF1\n \u0111\u1ED9ng k\u1EBF th\u1EEBa xu\u1ED1ng m\u1ECDi th\u01B0 m\u1EE5c con.\n } @else {\n \u0110ang c\u1EA5u h\u00ECnh ri\u00EAng cho nh\u00E1nh:\n <strong style=\"color: #d97706\">\uD83D\uDCC2 {{ selectedTemplatePermTarget() }}</strong>\n <a style=\"margin-left: 8px; font-weight: 600\" (click)=\"selectTemplatePermissionTarget('__ROOT__')\">\n \u21A9 Quay v\u1EC1 Quy\u1EC1n g\u1ED1c to\u00E0n m\u1EABu\n </a>\n }\n </div>\n </div>\n\n @if (selectedTemplatePermTarget() !== \"__ROOT__\") {\n <div nz-flex nzAlign=\"center\" [nzGap]=\"6\">\n <span style=\"font-size: 12px\">Ng\u1EAFt k\u1EBF th\u1EEBa cha:</span>\n <nz-switch\n nzSize=\"small\"\n [ngModel]=\"activeTemplateTargetBreakInheritance()\"\n (ngModelChange)=\"onToggleTemplateNodeBreakInheritance($event)\"\n nzCheckedChildren=\"\u0110\u1ED9c l\u1EADp\"\n nzUnCheckedChildren=\"K\u1EBF th\u1EEBa\"\n nz-tooltip\n nzTooltipTitle=\"Khi b\u1EADt \u0110\u1ED9c l\u1EADp: Th\u01B0 m\u1EE5c con n\u00E0y s\u1EBD ng\u1EAFt k\u1EBF th\u1EEBa quy\u1EC1n t\u1EEB th\u01B0 m\u1EE5c cha v\u00E0 ch\u1EC9 \u00E1p d\u1EE5ng danh s\u00E1ch quy\u1EC1n ri\u00EAng b\u00EAn d\u01B0\u1EDBi\"\n ></nz-switch>\n </div>\n }\n </div>\n\n <!-- Thanh ch\u1ECDn \u0110\u1ED1i t\u01B0\u1EE3ng (User / \u0110\u01A1n v\u1ECB / Vai tr\u00F2) & M\u1EE9c quy\u1EC1n -->\n <div nz-flex nzWrap=\"wrap\" [nzGap]=\"6\" nzAlign=\"center\" style=\"margin-top: 6px\">\n <nz-select\n [(ngModel)]=\"templatePermGranteeType\"\n (ngModelChange)=\"onTemplatePermGranteeTypeChange()\"\n nzSize=\"small\"\n style=\"width: 140px\"\n >\n <nz-option [nzValue]=\"DriveGranteeType.Org\" nzLabel=\"\uD83C\uDFE2 \u0110\u01A1n v\u1ECB (Org)\"></nz-option>\n <nz-option [nzValue]=\"DriveGranteeType.Role\" nzLabel=\"\uD83D\uDEE1 Vai tr\u00F2 (Role)\"></nz-option>\n <nz-option [nzValue]=\"DriveGranteeType.User\" nzLabel=\"\uD83D\uDC64 C\u00E1 nh\u00E2n (User)\"></nz-option>\n </nz-select>\n\n <nz-select\n nzShowSearch\n nzServerSearch\n nzSize=\"small\"\n nzPlaceHolder=\"T\u00ECm ch\u1ECDn User / \u0110\u01A1n v\u1ECB / Vai tr\u00F2...\"\n [(ngModel)]=\"templatePermSelectedGrantee\"\n (nzOnSearch)=\"onSearchTemplateGrantee($event)\"\n style=\"flex: 1; min-width: 210px\"\n >\n @for (g of templateGranteeOptions(); track g.GranteeId) {\n <nz-option [nzValue]=\"g\" [nzLabel]=\"g.DisplayName + ' (' + g.Code + ')'\"></nz-option>\n }\n </nz-select>\n\n <nz-select\n [(ngModel)]=\"templatePermAccessLevel\"\n [nzDisabled]=\"templatePermIsDeny\"\n nzSize=\"small\"\n style=\"width: 155px\"\n >\n <nz-option [nzValue]=\"DriveAccessLevel.Viewer\" nzLabel=\"\uD83D\uDC41 Ch\u1EC9 xem (10)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Downloader\" nzLabel=\"\u2B07 Xem & T\u1EA3i (20)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Uploader\" nzLabel=\"\u2601 Xem & T\u1EA3i l\u00EAn (35)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Editor\" nzLabel=\"\u270E Ch\u1EC9nh s\u1EEDa (40)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Manager\" nzLabel=\"\uD83D\uDC51 Qu\u1EA3n tr\u1ECB (50)\"></nz-option>\n </nz-select>\n\n <label\n nz-checkbox\n [(ngModel)]=\"templatePermIsDeny\"\n nz-tooltip\n nzTooltipTitle=\"C\u1EA5m truy c\u1EADp (Explicit Deny) \u0111\u1ED1i v\u1EDBi \u0111\u1ED1i t\u01B0\u1EE3ng n\u00E0y tr\u00EAn nh\u00E1nh \u0111ang ch\u1ECDn\"\n style=\"font-size: 12px\"\n >\n C\u1EA5m (Deny)\n </label>\n\n <button\n type=\"button\"\n nz-button\n nzType=\"primary\"\n nzSize=\"small\"\n [disabled]=\"!templatePermSelectedGrantee\"\n (click)=\"addPermissionToTemplateTarget()\"\n >\n <nz-icon nzType=\"user-add\"></nz-icon> Th\u00EAm quy\u1EC1n\n </button>\n </div>\n\n <!-- Danh s\u00E1ch c\u00E1c quy\u1EC1n \u0111\u00E3 \u0111\u1EB7t cho m\u1EE5c \u0111ang ch\u1ECDn -->\n @if (activeTemplateTargetPermissions().length === 0) {\n <div class=\"quota-sub\" style=\"padding: 8px 4px 2px\">\n @if (selectedTemplatePermTarget() === \"__ROOT__\") {\n Ch\u01B0a \u0111\u1EB7t quy\u1EC1n m\u1EB7c \u0111\u1ECBnh cho to\u00E0n m\u1EABu. H\u00E3y ch\u1ECDn \u0110\u01A1n v\u1ECB / Vai tr\u00F2 / C\u00E1 nh\u00E2n \u1EDF tr\u00EAn r\u1ED3i b\u1EA5m\n <strong>+ Th\u00EAm quy\u1EC1n</strong> (ho\u1EB7c b\u1EA5m v\u00E0o t\u1EEBng th\u01B0 m\u1EE5c b\u00EAn khung Xem tr\u01B0\u1EDBc \u0111\u1EC3 \u0111\u1EB7t quy\u1EC1n ri\u00EAng cho\n nh\u00E1nh con).\n } @else {\n Nh\u00E1nh <strong>\"{{ selectedTemplatePermTarget() }}\"</strong> ch\u01B0a c\u00F3 quy\u1EC1n ri\u00EAng (m\u1EB7c \u0111\u1ECBnh k\u1EBF th\u1EEBa t\u1EEB th\u01B0\n m\u1EE5c cha).\n }\n </div>\n } @else {\n <nz-table\n #tplPermTable\n [nzData]=\"activeTemplateTargetPermissions()\"\n nzSize=\"small\"\n [nzBordered]=\"true\"\n [nzFrontPagination]=\"false\"\n [nzShowPagination]=\"false\"\n style=\"margin-top: 6px\"\n >\n <thead>\n <tr>\n <th>\u0110\u1ED1i t\u01B0\u1EE3ng nh\u1EADn quy\u1EC1n</th>\n <th nzWidth=\"185px\">M\u1EE9c quy\u1EC1n \u00E1p d\u1EE5ng</th>\n <th nzWidth=\"95px\" class=\"text-center\">T\u1EA3i xu\u1ED1ng</th>\n <th nzWidth=\"65px\" class=\"text-center\">X\u00F3a</th>\n </tr>\n </thead>\n <tbody>\n @for (p of tplPermTable.data; track p.GranteeType + \":\" + p.GranteeId) {\n <tr>\n <td>\n <nz-tag\n [nzColor]=\"\n p.GranteeType === DriveGranteeType.User\n ? 'blue'\n : p.GranteeType === DriveGranteeType.Org\n ? 'cyan'\n : 'purple'\n \"\n >\n {{\n p.GranteeType === DriveGranteeType.User\n ? \"User\"\n : p.GranteeType === DriveGranteeType.Org\n ? \"\u0110\u01A1n v\u1ECB\"\n : \"Role\"\n }}\n </nz-tag>\n <strong>{{ p.GranteeName || p.GranteeId }}</strong>\n </td>\n <td>\n <nz-select\n nzSize=\"small\"\n [ngModel]=\"p.IsDeny ? 'DENY' : p.AccessLevel\"\n (ngModelChange)=\"updateTemplatePermissionLevel(p, $event)\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"DriveAccessLevel.Viewer\" nzLabel=\"\uD83D\uDC41 Ch\u1EC9 xem (10)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Downloader\" nzLabel=\"\u2B07 Xem & T\u1EA3i (20)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Uploader\" nzLabel=\"\u2601 Xem & T\u1EA3i l\u00EAn (35)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Editor\" nzLabel=\"\u270E Ch\u1EC9nh s\u1EEDa (40)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Manager\" nzLabel=\"\uD83D\uDC51 Qu\u1EA3n tr\u1ECB (50)\"></nz-option>\n <nz-option nzValue=\"DENY\" nzLabel=\"\uD83D\uDEAB C\u1EA5m (Deny)\"></nz-option>\n </nz-select>\n </td>\n <td class=\"text-center\">\n <nz-tag [nzColor]=\"p.CanDownload && !p.IsDeny ? 'green' : 'default'\">\n {{ p.CanDownload && !p.IsDeny ? \"Cho ph\u00E9p\" : \"Ch\u1EB7n\" }}\n </nz-tag>\n </td>\n <td class=\"text-center\">\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"G\u1EE1 quy\u1EC1n n\u00E0y kh\u1ECFi m\u1EABu\"\n (click)=\"removePermissionFromTemplateTarget(p)\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n }\n </div>\n </div>\n </ng-container>\n\n <ng-template #templateDrawerFooterTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div>\n @if (templateDrawerMode === \"edit\" && editingTemplate) {\n <button nz-button nzDanger nzType=\"default\" (click)=\"onDeleteTemplate(editingTemplate)\">\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a m\u1EABu n\u00E0y\n </button>\n }\n </div>\n <div nz-flex [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"templateDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitTemplateDrawer()\">\n <nz-icon nzType=\"save\"></nz-icon>\n {{ templateDrawerMode === \"create\" ? \"L\u01B0u m\u1EABu c\u00E2y th\u01B0 m\u1EE5c\" : \"C\u1EADp nh\u1EADt m\u1EABu\" }}\n </button>\n </div>\n </div>\n </ng-template>\n </nz-drawer>\n}\n", styles: ["@charset \"UTF-8\";.drive-shell{display:grid;grid-template-columns:245px 1fr;min-height:calc(100vh - 85px);background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px;overflow:hidden}.drive-sidebar{padding:14px;background:var(--app-sidebar-bg, #f8fafc);border-right:1px solid var(--app-border, #e2e8f0);display:flex;flex-direction:column;gap:14px}.drive-nav{display:flex;flex-direction:column;gap:4px}.drive-nav a{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:6px;color:var(--app-text, #334155);cursor:pointer;transition:background .15s}.drive-nav a.space-has-active-child{color:var(--primary-color, #1890ff);font-weight:600;background:color-mix(in srgb,var(--primary-color, #1890ff) 7%,transparent)}.drive-nav a:hover,.drive-nav a.active{background:color-mix(in srgb,var(--primary-color, #1890ff) 16%,transparent);color:var(--primary-color, #1890ff);font-weight:600}.org-nav-group{display:flex;flex-direction:column;gap:2px}.custom-space-link{font-size:13px}.custom-space-title{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.custom-space-badge{margin:0!important;font-size:10px;line-height:16px;padding:0 4px}.nav-inline-btn{border:none;background:transparent;color:inherit;cursor:pointer;padding:2px 4px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;opacity:.7}.nav-inline-btn:hover{opacity:1;background:color-mix(in srgb,var(--primary-color, #1890ff) 18%,transparent)}.storage-mode-box{padding:10px 12px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px}.upload-queue-box{padding:10px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px;max-height:180px;overflow-y:auto}.upload-task-row{margin-bottom:6px}.upload-task-name{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.quota-box{margin-top:auto;padding:12px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px}.quota-title{font-size:13px;font-weight:600;margin-bottom:6px}.quota-sub{font-size:12px;color:var(--app-text-muted, #64748b);margin-top:4px}.drive-shell.sidebar-wide{grid-template-columns:335px 1fr}.sidebar-tree-header-bar{display:flex;justify-content:space-between;align-items:center;padding:6px 10px;border-radius:6px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0)}.sidebar-tree-header-title{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600;color:var(--app-text, #334155)}.sidebar-tree-header-actions{display:inline-flex;align-items:center;gap:3px}.sidebar-tree-tool-btn{border:none;background:transparent;color:var(--app-text-muted, #64748b);width:22px;height:22px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;font-size:12px;transition:background .15s,color .15s}.sidebar-tree-tool-btn:hover,.sidebar-tree-tool-btn.active{background:color-mix(in srgb,var(--primary-color, #1890ff) 14%,transparent);color:var(--primary-color, #1890ff)}.sidebar-tree-filter-box{margin-top:-6px}.nav-item-with-tree{display:flex;flex-direction:column}.nav-caret-btn{border:none;background:transparent;color:inherit;width:18px;height:18px;padding:0;margin-left:-4px;margin-right:-2px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;font-size:11px;opacity:.75;flex-shrink:0;transition:transform .15s,background .15s,opacity .15s}.nav-caret-btn:hover{opacity:1;background:color-mix(in srgb,var(--primary-color, #1890ff) 18%,transparent)}.sidebar-tree-container{display:flex;flex-direction:column;gap:1px;margin:2px 0 6px 14px;padding-left:6px;border-left:1.5px dashed var(--app-border, #cbd5e1);max-height:320px;overflow-y:auto;overflow-x:hidden}.drive-shell.sidebar-wide .sidebar-tree-container{max-height:420px}.sidebar-tree-node{display:flex;align-items:center;gap:5px;padding:5px 8px;border-radius:5px;font-size:12.5px;color:var(--app-text, #334155);cursor:pointer;-webkit-user-select:none;user-select:none;transition:background .12s,color .12s;min-width:0}.sidebar-tree-node:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 10%,transparent)}.sidebar-tree-node.active-breadcrumb-ancestor{font-weight:600;color:var(--primary-color, #1890ff)}.sidebar-tree-node.active-tree-node,.sidebar-tree-node.context-active-tree-node{background:color-mix(in srgb,var(--primary-color, #1890ff) 16%,transparent);color:var(--primary-color, #1890ff);font-weight:600;box-shadow:inset 2.5px 0 0 var(--primary-color, #1890ff)}.sidebar-tree-node.tree-drop-active{background:color-mix(in srgb,var(--primary-color, #1890ff) 22%,transparent)!important;outline:1.5px dashed var(--primary-color, #1890ff);color:var(--primary-color, #1890ff);font-weight:600}.tree-node-caret{width:16px;height:16px;border:none;background:transparent;color:var(--app-text-muted, #64748b);padding:0;border-radius:3px;display:inline-flex;align-items:center;justify-content:center;font-size:10px;cursor:pointer;flex-shrink:0}.tree-node-caret:hover{color:var(--primary-color, #1890ff);background:color-mix(in srgb,var(--primary-color, #1890ff) 16%,transparent)}.tree-node-caret-spacer{width:16px;height:16px;display:inline-block;flex-shrink:0}.tree-node-folder-icon{font-size:15px;flex-shrink:0}.tree-node-label{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.35}.tree-node-quick-btn{border:none;background:transparent;color:var(--app-text-muted, #64748b);width:20px;height:20px;padding:0;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;opacity:0;cursor:pointer;flex-shrink:0;font-size:11px;transition:opacity .12s,background .12s,color .12s}.sidebar-tree-node:hover .tree-node-quick-btn{opacity:.85}.tree-node-quick-btn:hover{opacity:1!important;color:var(--primary-color, #1890ff);background:color-mix(in srgb,var(--primary-color, #1890ff) 18%,transparent)}.sidebar-tree-empty{padding:4px 8px 4px 20px;font-size:11.5px;color:var(--app-text-muted, #94a3b8);font-style:italic}.drive-main{position:relative;padding:16px;display:flex;flex-direction:column;gap:12px;transition:background .15s,border-color .15s}.drive-main.external-drag-active{background:color-mix(in srgb,var(--primary-color, #1890ff) 6%,var(--app-container-bg, #ffffff));outline:2px dashed var(--primary-color, #1890ff);outline-offset:-6px}.external-drop-banner{pointer-events:none;display:flex;align-items:center;gap:14px;padding:12px 18px;border-radius:8px;background:color-mix(in srgb,var(--primary-color, #1890ff) 14%,var(--app-container-bg, #ffffff));border:1px dashed var(--primary-color, #1890ff);color:var(--app-text, #1e293b)}.drop-banner-icon{font-size:28px;color:var(--primary-color, #1890ff)}.drop-banner-title{font-size:14px;font-weight:500}.drop-banner-sub{font-size:12px;color:var(--app-text-muted, #64748b);margin-top:2px}.drive-toolbar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;padding-bottom:10px;border-bottom:1px solid var(--app-border, #f1f5f9)}.bulk-action-bar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;padding:8px 14px;border-radius:8px;background:color-mix(in srgb,var(--primary-color, #1890ff) 9%,var(--app-container-bg, #ffffff));border:1px solid color-mix(in srgb,var(--primary-color, #1890ff) 32%,var(--app-border, #cbd5e1));box-shadow:0 2px 8px #1890ff14}.bulk-action-summary{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:13px;color:var(--app-text, #1e293b)}.bulk-action-meta{font-size:12px;color:var(--app-text-muted, #64748b)}.bulk-action-buttons{display:flex;align-items:center;flex-wrap:wrap;gap:6px}.checkbox-col-th,.checkbox-col-td{-webkit-user-select:none;user-select:none;cursor:pointer}.trash-info-banner{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;padding:9px 14px;border-radius:8px;background:#ef44440f;border:1px solid rgba(239,68,68,.24);font-size:13px;color:var(--app-text, #334155)}.physical-path-bar{display:flex;align-items:center;gap:6px;margin-top:4px;font-size:12px;color:var(--app-text-muted, #64748b)}.toolbar-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.drive-row{cursor:pointer;transition:background .15s,outline .15s}.drive-row.row-checked>td,.drive-row.row-active>td,.drive-row.active>td{background:color-mix(in srgb,var(--primary-color, #1890ff) 11%,var(--app-container-bg, #ffffff))!important}.drive-row.row-checked>td:first-child,.drive-row.row-active>td:first-child,.drive-row.active>td:first-child{box-shadow:inset 3.5px 0 0 var(--primary-color, #1890ff)!important}.drive-row:not(.row-active):not(.row-checked):not(:hover):not(.drop-target-active)>td{background:transparent!important;box-shadow:none!important}.drive-row.dragging-row{opacity:.45}.drive-row.drop-target-active>td{background:color-mix(in srgb,var(--primary-color, #1890ff) 18%,transparent)!important;border-top:1px dashed var(--primary-color, #1890ff);border-bottom:1px dashed var(--primary-color, #1890ff)}.bc-drop-active,.drive-nav a.nav-drop-active{background:color-mix(in srgb,var(--primary-color, #1890ff) 22%,transparent)!important;outline:1.5px dashed var(--primary-color, #1890ff);color:var(--primary-color, #1890ff);font-weight:600}.node-name-cell{display:flex;align-items:center;gap:8px}.node-icon-wrap{position:relative;display:inline-flex;align-items:center;justify-content:center}.node-icon{font-size:18px}.shortcut-badge{position:absolute;right:-5px;bottom:-3px;width:13px;height:13px;border-radius:50%;background:#7c3aed;color:#fff;font-size:9px;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 0 0 1.5px var(--app-container-bg, #ffffff)}.node-title{font-weight:500}.action-btn-group{display:inline-flex;align-items:center;justify-content:center;gap:4px}.action-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;background:transparent;border-radius:6px;cursor:pointer;font-size:15px;transition:background .15s,transform .1s}.action-icon-btn:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 12%,transparent);transform:translateY(-1px)}.action-icon-btn.color-warn:hover{background:#ef44441f}.sortable-th{cursor:pointer;-webkit-user-select:none;user-select:none;transition:background .15s,color .15s}.sortable-th:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 8%,var(--app-sidebar-bg, #f8fafc))!important;color:var(--primary-color, #1890ff)}.th-sort-wrap{display:inline-flex;align-items:center;gap:6px;width:100%}.th-sort-wrap.justify-center{justify-content:center}.th-sort-wrap.justify-end{justify-content:flex-end}.sort-icon{font-size:13px;opacity:.35;transition:opacity .15s,color .15s}.sort-icon.active{opacity:1;color:var(--primary-color, #1890ff)}.sortable-th:hover .sort-icon{opacity:.85}.drawer-field-label{display:block;font-size:13px;font-weight:600;margin-bottom:6px;color:var(--app-text, #334155)}.drawer-meta-card{padding:12px 14px;background:var(--app-sidebar-bg, #f8fafc);border:1px solid var(--app-border, #e2e8f0);border-radius:8px;display:flex;flex-direction:column;gap:8px}.drawer-meta-header{display:flex;align-items:center;gap:10px}.drawer-meta-row{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px}.meta-label{color:var(--app-text-muted, #64748b)}.template-sidebar-box{padding:10px 12px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px}.template-chip-list{display:flex;flex-direction:column;gap:6px;max-height:175px;overflow-y:auto}.template-drag-item{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:6px 8px;border-radius:6px;border:1px dashed var(--app-border, #cbd5e1);background:var(--app-sidebar-bg, #f8fafc);cursor:grab;transition:all .15s}.template-drag-item:hover{border-color:var(--primary-color, #1890ff);background:color-mix(in srgb,var(--primary-color, #1890ff) 10%,transparent)}.template-item-title{font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.template-item-sub{font-size:10.5px;color:var(--app-text-muted, #64748b)}.template-editor-grid{display:grid;grid-template-columns:1.15fr 1fr;gap:10px}.template-tree-preview{border:1px solid var(--app-border, #e2e8f0);border-radius:6px;padding:10px;background:var(--app-sidebar-bg, #f8fafc);max-height:450px;overflow-y:auto}.preview-tree-row{display:flex;align-items:center;font-size:12.5px;padding:2.5px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.selectable-preview-row{cursor:pointer;padding:4px 6px;border-radius:5px;transition:background .12s,border-color .12s;border:1px solid transparent}.selectable-preview-row:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 10%,transparent)}.selectable-preview-row.active-perm-target{background:color-mix(in srgb,var(--primary-color, #1890ff) 16%,transparent);border-color:var(--primary-color, #1890ff);font-weight:600}.drive-preview-body-fill{--drive-preview-fill-height: calc(100vh - 103px) ;display:flex;flex-direction:column;flex:1 1 auto;width:100%;height:100%;min-height:var(--drive-preview-fill-height);overflow:hidden}.drive-preview-body-fill.no-drawer-footer{--drive-preview-fill-height: calc(100vh - 55px) }.drive-preview-body-fill ::ng-deep extend-view-file-content{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;width:100%!important;height:100%!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important}.drive-preview-body-fill ::ng-deep extend-view-file-content>*:not(style):not(script),.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer>div,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .html,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .ink-switch-box,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .zoom,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer #outerContainer,.drive-preview-body-fill ::ng-deep extend-view-file-content pdf-viewer,.drive-preview-body-fill ::ng-deep extend-view-file-content iframe,.drive-preview-body-fill ::ng-deep extend-view-file-content embed,.drive-preview-body-fill ::ng-deep extend-view-file-content object{display:block!important;flex:1 1 auto!important;width:100%!important;height:var(--drive-preview-fill-height)!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important}.drive-preview-body-fill ::ng-deep extend-view-file-content pre{flex:1 1 auto!important;width:100%!important;height:var(--drive-preview-fill-height)!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important;margin:0!important;padding:16px!important;overflow:auto!important;box-sizing:border-box!important}::ng-deep .nowrap-tooltip{max-width:none!important}::ng-deep .nowrap-tooltip .ant-tooltip-inner{white-space:nowrap!important;max-width:none!important;width:max-content!important}\n"] }]
|
|
36506
36776
|
}], ctorParameters: () => [] });
|
|
36507
36777
|
|
|
36508
36778
|
// ============================================================================
|
|
@@ -36680,6 +36950,22 @@ class DriveFolderEmbedComponent extends BaseComponent {
|
|
|
36680
36950
|
this.handleError(err);
|
|
36681
36951
|
}
|
|
36682
36952
|
}
|
|
36953
|
+
canUploadInEmbed() {
|
|
36954
|
+
if (this.readonly)
|
|
36955
|
+
return false;
|
|
36956
|
+
const root = this.recordRootFolder();
|
|
36957
|
+
if (!root || root.EffectiveAccess === undefined)
|
|
36958
|
+
return true;
|
|
36959
|
+
return root.EffectiveAccess >= DriveAccessLevel.Uploader;
|
|
36960
|
+
}
|
|
36961
|
+
canCreateFolderInEmbed() {
|
|
36962
|
+
if (this.readonly)
|
|
36963
|
+
return false;
|
|
36964
|
+
const root = this.recordRootFolder();
|
|
36965
|
+
if (!root || root.EffectiveAccess === undefined)
|
|
36966
|
+
return true;
|
|
36967
|
+
return root.EffectiveAccess >= DriveAccessLevel.Editor;
|
|
36968
|
+
}
|
|
36683
36969
|
isFolder(item) {
|
|
36684
36970
|
return (item.NodeType === DriveNodeType.Folder ||
|
|
36685
36971
|
(item.NodeType === DriveNodeType.Shortcut && item.ShortcutTargetType === DriveNodeType.Folder));
|
|
@@ -36894,7 +37180,7 @@ class DriveFolderEmbedComponent extends BaseComponent {
|
|
|
36894
37180
|
return 'file-text';
|
|
36895
37181
|
}
|
|
36896
37182
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: DriveFolderEmbedComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
36897
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: DriveFolderEmbedComponent, isStandalone: true, selector: "lib-drive-folder-embed", inputs: { moduleCode: "moduleCode", moduleRecordId: "moduleRecordId", recordFolderName: "recordFolderName", defaultSubFolders: "defaultSubFolders", rootFolderId: "rootFolderId", title: "title", isOrgNode: "isOrgNode", readonly: "readonly", templateCode: "templateCode", templateId: "templateId" }, providers: [NzImageService], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"drive-embed-shell\">\n <!-- TOOLBAR NH\u00DANG -->\n <div class=\"embed-toolbar\" nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <div>\n <nz-breadcrumb>\n <nz-breadcrumb-item\n class=\"cursor-pointer\"\n (click)=\"navigateEmbedFolder(recordRootFolder()?.Id || rootFolderId)\"\n >\n <nz-icon nzType=\"folder-open\"></nz-icon>\n <strong>{{ recordRootFolder()?.Name || title }}</strong>\n </nz-breadcrumb-item>\n @for (bc of subBreadcrumbs(); track bc.Id) {\n <nz-breadcrumb-item class=\"cursor-pointer\" (click)=\"navigateEmbedFolder(bc.Id)\">\n {{ bc.Name }}\n </nz-breadcrumb-item>\n }\n </nz-breadcrumb>\n </div>\n\n <div nz-flex nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"6\">\n <nz-input-group [nzSuffix]=\"embedSearchSuffix\" nzSize=\"small\" style=\"width: 210px\">\n <input\n nz-input\n type=\"text\"\n placeholder=\"T\u00ECm trong h\u1ED3 s\u01A1 n\u00E0y...\"\n [(ngModel)]=\"keyword\"\n (keyup.enter)=\"loadEmbedItems()\"\n />\n </nz-input-group>\n <ng-template #embedSearchSuffix>\n <nz-icon nzType=\"search\" class=\"cursor-pointer\" (click)=\"loadEmbedItems()\"></nz-icon>\n </ng-template>\n\n <input #embedFileInput type=\"file\" multiple hidden (change)=\"onEmbedUploadSelected($event)\" />\n @if (!readonly) {\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"embedFileInput.click()\">\n <nz-icon nzType=\"cloud-upload\"></nz-icon> T\u1EA3i l\u00EAn\n </button>\n\n <button nz-button nzType=\"default\" nzSize=\"small\" (click)=\"openCreateSubFolder()\">\n <nz-icon nzType=\"folder-add\"></nz-icon> T\u1EA1o th\u01B0 m\u1EE5c con\n </button>\n\n <button nz-button nzType=\"dashed\" nzSize=\"small\" (click)=\"pickerDrawerVisible = true\">\n <nz-icon nzType=\"link\"></nz-icon> \u0110\u00EDnh k\u00E8m t\u1EEB Drive\n </button>\n }\n\n @if (recordRootFolder() && !readonly) {\n <button\n nz-button\n nzType=\"default\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Ph\u00E2n quy\u1EC1n th\u01B0 m\u1EE5c h\u1ED3 s\u01A1\"\n (click)=\"openShare(recordRootFolder()!)\"\n >\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n\n <button nz-button nzType=\"default\" nzSize=\"small\" (click)=\"loadEmbedItems()\" nz-tooltip nzTooltipTitle=\"L\u00E0m m\u1EDBi\">\n <nz-icon nzType=\"reload\"></nz-icon>\n </button>\n </div>\n </div>\n\n <!-- B\u1EA2NG D\u1EEE LI\u1EC6U T\u1EACP TIN & TH\u01AF M\u1EE4C CON -->\n <nz-table #embedTable [nzData]=\"items()\" [nzLoading]=\"loading()\" nzSize=\"small\" [nzBordered]=\"true\" [nzPageSize]=\"15\">\n <thead>\n <tr>\n <th nzWidth=\"44px\" class=\"text-center\">#</th>\n <th>T\u00EAn th\u01B0 m\u1EE5c / T\u00E0i li\u1EC7u</th>\n <th nzWidth=\"135px\">Ng\u01B0\u1EDDi t\u1EA1o</th>\n <th nzWidth=\"105px\" class=\"text-right\">K\u00EDch th\u01B0\u1EDBc</th>\n <th nzWidth=\"135px\" class=\"text-center\">C\u1EADp nh\u1EADt</th>\n <th nzWidth=\"145px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (item of embedTable.data; track item.Id; let i = $index) {\n <tr\n class=\"drive-row\"\n [class.active]=\"activeNode()?.Id === item.Id\"\n [class.row-active]=\"activeNode()?.Id === item.Id\"\n (click)=\"activeNode.set(item)\"\n (contextmenu)=\"activeNode.set(item)\"\n (dblclick)=\"onItemClick(item)\"\n >\n <td class=\"text-center\">{{ i + 1 }}</td>\n <td>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-icon\n [nzType]=\"isFolder(item) ? 'folder-fill' : getFileIcon(item)\"\n [style.color]=\"isFolder(item) ? '#f59e0b' : 'var(--primary-color, #1890ff)'\"\n style=\"font-size: 18px\"\n ></nz-icon>\n <span class=\"link-detail\" style=\"font-weight: 500\" (click)=\"onItemClick(item)\">{{ item.Name }}</span>\n @if (item.NodeType === DriveNodeType.Shortcut) {\n <nz-tag nzColor=\"purple\">L\u1ED1i t\u1EAFt</nz-tag>\n }\n </div>\n </td>\n <td>{{ item.OwnerName || item.OwnerId }}</td>\n <td class=\"text-right\">{{ isFolder(item) ? \"\u2014\" : (item.SizeBytes | formatBytes) }}</td>\n <td class=\"text-center\">{{ item.UpdatedDate | date: \"dd/MM/yyyy HH:mm\" }}</td>\n <td class=\"text-center\">\n <div nz-flex nzJustify=\"center\" [nzGap]=\"4\">\n @if (!isFolder(item)) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Xem tr\u01B0\u1EDBc\"\n (click)=\"previewFile(item)\"\n >\n <nz-icon nzType=\"eye\"></nz-icon>\n </button>\n @if (item.CanDownload) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"T\u1EA3i xu\u1ED1ng\"\n (click)=\"downloadFile(item)\"\n >\n <nz-icon nzType=\"download\"></nz-icon>\n </button>\n }\n @if (!readonly && item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n\"\n (click)=\"openVersion(item)\"\n >\n <nz-icon nzType=\"history\"></nz-icon>\n </button>\n }\n }\n @if (!readonly && (item.CanShare || item.EffectiveAccess >= DriveAccessLevel.Manager)) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Ph\u00E2n quy\u1EC1n & Chia s\u1EBB\"\n (click)=\"openShare(item)\"\n >\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n @if (!readonly && item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"X\u00F3a / G\u1EE1 kh\u1ECFi h\u1ED3 s\u01A1\"\n (click)=\"deleteOrDetachItem(item)\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n </div>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n</div>\n\n<!-- DRAWER T\u1EA0O TH\u01AF M\u1EE4C CON -->\n<nz-drawer\n [nzVisible]=\"subFolderDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"420\"\n nzTitle=\"T\u1EA1o th\u01B0 m\u1EE5c con trong h\u1ED3 s\u01A1\"\n (nzOnClose)=\"subFolderDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"12\">\n <label style=\"font-weight: 600\">T\u00EAn th\u01B0 m\u1EE5c con</label>\n <input\n nz-input\n [(ngModel)]=\"newSubFolderName\"\n [appAutoFocus]=\"subFolderDrawerVisible\"\n placeholder=\"Nh\u1EADp t\u00EAn th\u01B0 m\u1EE5c con...\"\n (keyup.enter)=\"submitCreateSubFolder()\"\n />\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\" style=\"margin-top: 8px\">\n <button nz-button nzType=\"default\" (click)=\"subFolderDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitCreateSubFolder()\">\n <nz-icon nzType=\"check\"></nz-icon> T\u1EA1o th\u01B0 m\u1EE5c\n </button>\n </div>\n </div>\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER \u0110\u00CDNH K\u00C8M T\u1EEA DRIVE -->\n<nz-drawer\n [nzVisible]=\"pickerDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"820\"\n nzTitle=\"\u0110\u00EDnh k\u00E8m t\u00E0i li\u1EC7u / th\u01B0 m\u1EE5c t\u1EEB Drive v\u00E0o H\u1ED3 s\u01A1\"\n (nzOnClose)=\"pickerDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n <lib-drive-picker\n [selectMode]=\"'both'\"\n [multiple]=\"true\"\n (confirmed)=\"onAttachFromDrive($event)\"\n (cancelled)=\"pickerDrawerVisible = false\"\n ></lib-drive-picker>\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER XEM TR\u1EF0C TUY\u1EBEN -->\n<nz-drawer\n [nzVisible]=\"previewDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"'75vw'\"\n [nzBodyStyle]=\"{ padding: '0', height: '100%', display: 'flex', flexDirection: 'column', overflow: 'hidden' }\"\n [nzTitle]=\"previewTitle\"\n (nzOnClose)=\"previewDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n <div class=\"drive-preview-body-fill no-drawer-footer\">\n <extend-view-file-content [previewType]=\"previewType\" [previewContent]=\"previewContent\"></extend-view-file-content>\n </div>\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER L\u1ECACH S\u1EEC PHI\u00CAN B\u1EA2N -->\n<nz-drawer\n [nzVisible]=\"versionDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"740\"\n [nzTitle]=\"'L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n: ' + (activeNode()?.Name || '')\"\n (nzOnClose)=\"versionDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n @if (activeNode(); as node) {\n <lib-drive-version-modal\n [nodeId]=\"node.ShortcutTargetId || node.Id\"\n [nodeName]=\"node.Name\"\n [canEdit]=\"!readonly\"\n [canDownload]=\"node.CanDownload\"\n (closed)=\"versionDrawerVisible = false; loadEmbedItems()\"\n ></lib-drive-version-modal>\n }\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER CHIA S\u1EBA & PH\u00C2N QUY\u1EC0N -->\n<nz-drawer\n [nzVisible]=\"shareDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"920\"\n [nzTitle]=\"'Chia s\u1EBB & Ph\u00E2n quy\u1EC1n: ' + (activeNode()?.Name || '')\"\n (nzOnClose)=\"shareDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n @if (activeNode(); as node) {\n <lib-drive-share-modal [nodeId]=\"node.ShortcutTargetId || node.Id\"></lib-drive-share-modal>\n }\n </ng-container>\n</nz-drawer>\n", styles: ["@charset \"UTF-8\";.drive-embed-shell{border:1px solid var(--app-border, #e2e8f0);border-radius:8px;padding:14px;background:var(--app-container-bg, #ffffff);display:flex;flex-direction:column;gap:12px}.embed-toolbar{padding-bottom:10px;border-bottom:1px solid var(--app-border, #f1f5f9)}.drive-row{cursor:pointer;transition:background .15s}.drive-row.row-active>td,.drive-row.active>td{background:color-mix(in srgb,var(--primary-color, #1890ff) 11%,var(--app-container-bg, #ffffff))!important}.drive-row.row-active>td:first-child,.drive-row.active>td:first-child{box-shadow:inset 3.5px 0 0 var(--primary-color, #1890ff)!important}.drive-row:not(.row-active):not(:hover)>td{background:transparent!important;box-shadow:none!important}.drive-preview-body-fill{--drive-preview-fill-height: calc(100vh - 103px) ;display:flex;flex-direction:column;flex:1 1 auto;width:100%;height:100%;min-height:var(--drive-preview-fill-height);overflow:hidden}.drive-preview-body-fill.no-drawer-footer{--drive-preview-fill-height: calc(100vh - 55px) }.drive-preview-body-fill ::ng-deep extend-view-file-content{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;width:100%!important;height:100%!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important}.drive-preview-body-fill ::ng-deep extend-view-file-content>*:not(style):not(script),.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer>div,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .html,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .ink-switch-box,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .zoom,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer #outerContainer,.drive-preview-body-fill ::ng-deep extend-view-file-content pdf-viewer,.drive-preview-body-fill ::ng-deep extend-view-file-content iframe,.drive-preview-body-fill ::ng-deep extend-view-file-content embed,.drive-preview-body-fill ::ng-deep extend-view-file-content object{display:block!important;flex:1 1 auto!important;width:100%!important;height:var(--drive-preview-fill-height)!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important}.drive-preview-body-fill ::ng-deep extend-view-file-content pre{flex:1 1 auto!important;width:100%!important;height:var(--drive-preview-fill-height)!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important;margin:0!important;padding:16px!important;overflow:auto!important;box-sizing:border-box!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzFlexModule }, { kind: "directive", type: i3$4.NzFlexDirective, selector: "[nz-flex],nz-flex", inputs: ["nzVertical", "nzJustify", "nzAlign", "nzGap", "nzWrap", "nzFlex"], exportAs: ["nzFlex"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i6.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "directive", type: i6.NzTableCellDirective, selector: "th:not(.nz-disable-th):not([mat-cell]), td:not(.nz-disable-td):not([mat-cell])" }, { kind: "directive", type: i6.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i6.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i6.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i6.NzTrDirective, selector: "tr:not([mat-row]):not([mat-header-row]):not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i2$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i3$3.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i4$1.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i1$2.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i12.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: i12.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "directive", type: i12.NzInputGroupWhitSuffixOrPrefixDirective, selector: "nz-input-group[nzSuffix], nz-input-group[nzPrefix]" }, { kind: "ngmodule", type: NzBreadCrumbModule }, { kind: "component", type: i10.NzBreadCrumbComponent, selector: "nz-breadcrumb", inputs: ["nzAutoGenerate", "nzSeparator", "nzRouteLabel", "nzRouteLabelFn", "nzRouteFn"], exportAs: ["nzBreadcrumb"] }, { kind: "component", type: i10.NzBreadCrumbItemComponent, selector: "nz-breadcrumb-item", inputs: ["nzOverlay"], exportAs: ["nzBreadcrumbItem"] }, { kind: "ngmodule", type: NzTagModule }, { kind: "component", type: i11.NzTagComponent, selector: "nz-tag", inputs: ["nzMode", "nzColor", "nzChecked", "nzBordered"], outputs: ["nzOnClose", "nzCheckedChange"], exportAs: ["nzTag"] }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "directive", type: i8.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "ngmodule", type: NzDrawerModule }, { kind: "component", type: i14.NzDrawerComponent, selector: "nz-drawer", inputs: ["nzContent", "nzCloseIcon", "nzClosable", "nzMaskClosable", "nzMask", "nzCloseOnNavigation", "nzNoAnimation", "nzKeyboard", "nzTitle", "nzExtra", "nzFooter", "nzPlacement", "nzSize", "nzMaskStyle", "nzBodyStyle", "nzWrapClassName", "nzWidth", "nzHeight", "nzZIndex", "nzOffsetX", "nzOffsetY", "nzVisible"], outputs: ["nzOnViewInit", "nzOnClose", "nzVisibleChange"], exportAs: ["nzDrawer"] }, { kind: "directive", type: i14.NzDrawerContentDirective, selector: "[nzDrawerContent]", exportAs: ["nzDrawerContent"] }, { kind: "ngmodule", type: NzCheckboxModule }, { kind: "pipe", type: FormatBytesPipe, name: "formatBytes" }, { kind: "directive", type: AutoFocusDirective, selector: "[appAutoFocus]", inputs: ["appAutoFocus"] }, { kind: "component", type: ExtendViewFileContentComponent, selector: "extend-view-file-content", inputs: ["previewType", "previewContent"] }, { kind: "component", type: DriveShareModalComponent, selector: "lib-drive-share-modal", inputs: ["nodeId"] }, { kind: "component", type: DriveVersionModalComponent, selector: "lib-drive-version-modal", inputs: ["nodeId", "nodeName", "canEdit", "canDownload"], outputs: ["closed"] }, { kind: "component", type: DrivePickerComponent, selector: "lib-drive-picker", inputs: ["selectMode", "multiple", "acceptExtensions", "allowUploadNew", "initialScope"], outputs: ["confirmed", "cancelled"] }] });
|
|
37183
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: DriveFolderEmbedComponent, isStandalone: true, selector: "lib-drive-folder-embed", inputs: { moduleCode: "moduleCode", moduleRecordId: "moduleRecordId", recordFolderName: "recordFolderName", defaultSubFolders: "defaultSubFolders", rootFolderId: "rootFolderId", title: "title", isOrgNode: "isOrgNode", readonly: "readonly", templateCode: "templateCode", templateId: "templateId" }, providers: [NzImageService], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"drive-embed-shell\">\n <!-- TOOLBAR NH\u00DANG -->\n <div class=\"embed-toolbar\" nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <div>\n <nz-breadcrumb>\n <nz-breadcrumb-item\n class=\"cursor-pointer\"\n (click)=\"navigateEmbedFolder(recordRootFolder()?.Id || rootFolderId)\"\n >\n <nz-icon nzType=\"folder-open\"></nz-icon>\n <strong>{{ recordRootFolder()?.Name || title }}</strong>\n </nz-breadcrumb-item>\n @for (bc of subBreadcrumbs(); track bc.Id) {\n <nz-breadcrumb-item class=\"cursor-pointer\" (click)=\"navigateEmbedFolder(bc.Id)\">\n {{ bc.Name }}\n </nz-breadcrumb-item>\n }\n </nz-breadcrumb>\n </div>\n\n <div nz-flex nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"6\">\n <nz-input-group [nzSuffix]=\"embedSearchSuffix\" nzSize=\"small\" style=\"width: 210px\">\n <input\n nz-input\n type=\"text\"\n placeholder=\"T\u00ECm trong h\u1ED3 s\u01A1 n\u00E0y...\"\n [(ngModel)]=\"keyword\"\n (keyup.enter)=\"loadEmbedItems()\"\n />\n </nz-input-group>\n <ng-template #embedSearchSuffix>\n <nz-icon nzType=\"search\" class=\"cursor-pointer\" (click)=\"loadEmbedItems()\"></nz-icon>\n </ng-template>\n\n <input #embedFileInput type=\"file\" multiple hidden (change)=\"onEmbedUploadSelected($event)\" />\n @if (canUploadInEmbed()) {\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"embedFileInput.click()\">\n <nz-icon nzType=\"cloud-upload\"></nz-icon> T\u1EA3i l\u00EAn\n </button>\n }\n @if (canCreateFolderInEmbed()) {\n <button nz-button nzType=\"default\" nzSize=\"small\" (click)=\"openCreateSubFolder()\">\n <nz-icon nzType=\"folder-add\"></nz-icon> T\u1EA1o th\u01B0 m\u1EE5c con\n </button>\n\n <button nz-button nzType=\"dashed\" nzSize=\"small\" (click)=\"pickerDrawerVisible = true\">\n <nz-icon nzType=\"link\"></nz-icon> \u0110\u00EDnh k\u00E8m t\u1EEB Drive\n </button>\n }\n\n @if (recordRootFolder() && !readonly) {\n <button\n nz-button\n nzType=\"default\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Ph\u00E2n quy\u1EC1n th\u01B0 m\u1EE5c h\u1ED3 s\u01A1\"\n (click)=\"openShare(recordRootFolder()!)\"\n >\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n\n <button nz-button nzType=\"default\" nzSize=\"small\" (click)=\"loadEmbedItems()\" nz-tooltip nzTooltipTitle=\"L\u00E0m m\u1EDBi\">\n <nz-icon nzType=\"reload\"></nz-icon>\n </button>\n </div>\n </div>\n\n <!-- B\u1EA2NG D\u1EEE LI\u1EC6U T\u1EACP TIN & TH\u01AF M\u1EE4C CON -->\n <nz-table #embedTable [nzData]=\"items()\" [nzLoading]=\"loading()\" nzSize=\"small\" [nzBordered]=\"true\" [nzPageSize]=\"15\">\n <thead>\n <tr>\n <th nzWidth=\"44px\" class=\"text-center\">#</th>\n <th>T\u00EAn th\u01B0 m\u1EE5c / T\u00E0i li\u1EC7u</th>\n <th nzWidth=\"135px\">Ng\u01B0\u1EDDi t\u1EA1o</th>\n <th nzWidth=\"105px\" class=\"text-right\">K\u00EDch th\u01B0\u1EDBc</th>\n <th nzWidth=\"135px\" class=\"text-center\">C\u1EADp nh\u1EADt</th>\n <th nzWidth=\"145px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (item of embedTable.data; track item.Id; let i = $index) {\n <tr\n class=\"drive-row\"\n [class.active]=\"activeNode()?.Id === item.Id\"\n [class.row-active]=\"activeNode()?.Id === item.Id\"\n (click)=\"activeNode.set(item)\"\n (contextmenu)=\"activeNode.set(item)\"\n (dblclick)=\"onItemClick(item)\"\n >\n <td class=\"text-center\">{{ i + 1 }}</td>\n <td>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-icon\n [nzType]=\"isFolder(item) ? 'folder-fill' : getFileIcon(item)\"\n [style.color]=\"isFolder(item) ? '#f59e0b' : 'var(--primary-color, #1890ff)'\"\n style=\"font-size: 18px\"\n ></nz-icon>\n <span class=\"link-detail\" style=\"font-weight: 500\" (click)=\"onItemClick(item)\">{{ item.Name }}</span>\n @if (item.NodeType === DriveNodeType.Shortcut) {\n <nz-tag nzColor=\"purple\">L\u1ED1i t\u1EAFt</nz-tag>\n }\n </div>\n </td>\n <td>{{ item.OwnerName || item.OwnerId }}</td>\n <td class=\"text-right\">{{ isFolder(item) ? \"\u2014\" : (item.SizeBytes | formatBytes) }}</td>\n <td class=\"text-center\">{{ item.UpdatedDate | date: \"dd/MM/yyyy HH:mm\" }}</td>\n <td class=\"text-center\">\n <div nz-flex nzJustify=\"center\" [nzGap]=\"4\">\n @if (!isFolder(item)) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Xem tr\u01B0\u1EDBc\"\n (click)=\"previewFile(item)\"\n >\n <nz-icon nzType=\"eye\"></nz-icon>\n </button>\n @if (item.CanDownload) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"T\u1EA3i xu\u1ED1ng\"\n (click)=\"downloadFile(item)\"\n >\n <nz-icon nzType=\"download\"></nz-icon>\n </button>\n }\n @if (!readonly && item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n\"\n (click)=\"openVersion(item)\"\n >\n <nz-icon nzType=\"history\"></nz-icon>\n </button>\n }\n }\n @if (!readonly && (item.CanShare || item.EffectiveAccess >= DriveAccessLevel.Manager)) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Ph\u00E2n quy\u1EC1n & Chia s\u1EBB\"\n (click)=\"openShare(item)\"\n >\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n @if (!readonly && item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"X\u00F3a / G\u1EE1 kh\u1ECFi h\u1ED3 s\u01A1\"\n (click)=\"deleteOrDetachItem(item)\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n </div>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n</div>\n\n<!-- DRAWER T\u1EA0O TH\u01AF M\u1EE4C CON -->\n<nz-drawer\n [nzVisible]=\"subFolderDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"420\"\n nzTitle=\"T\u1EA1o th\u01B0 m\u1EE5c con trong h\u1ED3 s\u01A1\"\n (nzOnClose)=\"subFolderDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"12\">\n <label style=\"font-weight: 600\">T\u00EAn th\u01B0 m\u1EE5c con</label>\n <input\n nz-input\n [(ngModel)]=\"newSubFolderName\"\n [appAutoFocus]=\"subFolderDrawerVisible\"\n placeholder=\"Nh\u1EADp t\u00EAn th\u01B0 m\u1EE5c con...\"\n (keyup.enter)=\"submitCreateSubFolder()\"\n />\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\" style=\"margin-top: 8px\">\n <button nz-button nzType=\"default\" (click)=\"subFolderDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitCreateSubFolder()\">\n <nz-icon nzType=\"check\"></nz-icon> T\u1EA1o th\u01B0 m\u1EE5c\n </button>\n </div>\n </div>\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER \u0110\u00CDNH K\u00C8M T\u1EEA DRIVE -->\n<nz-drawer\n [nzVisible]=\"pickerDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"820\"\n nzTitle=\"\u0110\u00EDnh k\u00E8m t\u00E0i li\u1EC7u / th\u01B0 m\u1EE5c t\u1EEB Drive v\u00E0o H\u1ED3 s\u01A1\"\n (nzOnClose)=\"pickerDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n <lib-drive-picker\n [selectMode]=\"'both'\"\n [multiple]=\"true\"\n (confirmed)=\"onAttachFromDrive($event)\"\n (cancelled)=\"pickerDrawerVisible = false\"\n ></lib-drive-picker>\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER XEM TR\u1EF0C TUY\u1EBEN -->\n<nz-drawer\n [nzVisible]=\"previewDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"'75vw'\"\n [nzBodyStyle]=\"{ padding: '0', height: '100%', display: 'flex', flexDirection: 'column', overflow: 'hidden' }\"\n [nzTitle]=\"previewTitle\"\n (nzOnClose)=\"previewDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n <div class=\"drive-preview-body-fill no-drawer-footer\">\n <extend-view-file-content [previewType]=\"previewType\" [previewContent]=\"previewContent\"></extend-view-file-content>\n </div>\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER L\u1ECACH S\u1EEC PHI\u00CAN B\u1EA2N -->\n<nz-drawer\n [nzVisible]=\"versionDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"740\"\n [nzTitle]=\"'L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n: ' + (activeNode()?.Name || '')\"\n (nzOnClose)=\"versionDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n @if (activeNode(); as node) {\n <lib-drive-version-modal\n [nodeId]=\"node.ShortcutTargetId || node.Id\"\n [nodeName]=\"node.Name\"\n [canEdit]=\"!readonly\"\n [canDownload]=\"node.CanDownload\"\n (closed)=\"versionDrawerVisible = false; loadEmbedItems()\"\n ></lib-drive-version-modal>\n }\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER CHIA S\u1EBA & PH\u00C2N QUY\u1EC0N -->\n<nz-drawer\n [nzVisible]=\"shareDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"920\"\n [nzTitle]=\"'Chia s\u1EBB & Ph\u00E2n quy\u1EC1n: ' + (activeNode()?.Name || '')\"\n (nzOnClose)=\"shareDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n @if (activeNode(); as node) {\n <lib-drive-share-modal [nodeId]=\"node.ShortcutTargetId || node.Id\"></lib-drive-share-modal>\n }\n </ng-container>\n</nz-drawer>\n", styles: ["@charset \"UTF-8\";.drive-embed-shell{border:1px solid var(--app-border, #e2e8f0);border-radius:8px;padding:14px;background:var(--app-container-bg, #ffffff);display:flex;flex-direction:column;gap:12px}.embed-toolbar{padding-bottom:10px;border-bottom:1px solid var(--app-border, #f1f5f9)}.drive-row{cursor:pointer;transition:background .15s}.drive-row.row-active>td,.drive-row.active>td{background:color-mix(in srgb,var(--primary-color, #1890ff) 11%,var(--app-container-bg, #ffffff))!important}.drive-row.row-active>td:first-child,.drive-row.active>td:first-child{box-shadow:inset 3.5px 0 0 var(--primary-color, #1890ff)!important}.drive-row:not(.row-active):not(:hover)>td{background:transparent!important;box-shadow:none!important}.drive-preview-body-fill{--drive-preview-fill-height: calc(100vh - 103px) ;display:flex;flex-direction:column;flex:1 1 auto;width:100%;height:100%;min-height:var(--drive-preview-fill-height);overflow:hidden}.drive-preview-body-fill.no-drawer-footer{--drive-preview-fill-height: calc(100vh - 55px) }.drive-preview-body-fill ::ng-deep extend-view-file-content{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;width:100%!important;height:100%!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important}.drive-preview-body-fill ::ng-deep extend-view-file-content>*:not(style):not(script),.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer>div,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .html,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .ink-switch-box,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .zoom,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer #outerContainer,.drive-preview-body-fill ::ng-deep extend-view-file-content pdf-viewer,.drive-preview-body-fill ::ng-deep extend-view-file-content iframe,.drive-preview-body-fill ::ng-deep extend-view-file-content embed,.drive-preview-body-fill ::ng-deep extend-view-file-content object{display:block!important;flex:1 1 auto!important;width:100%!important;height:var(--drive-preview-fill-height)!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important}.drive-preview-body-fill ::ng-deep extend-view-file-content pre{flex:1 1 auto!important;width:100%!important;height:var(--drive-preview-fill-height)!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important;margin:0!important;padding:16px!important;overflow:auto!important;box-sizing:border-box!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzFlexModule }, { kind: "directive", type: i3$4.NzFlexDirective, selector: "[nz-flex],nz-flex", inputs: ["nzVertical", "nzJustify", "nzAlign", "nzGap", "nzWrap", "nzFlex"], exportAs: ["nzFlex"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i6.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "directive", type: i6.NzTableCellDirective, selector: "th:not(.nz-disable-th):not([mat-cell]), td:not(.nz-disable-td):not([mat-cell])" }, { kind: "directive", type: i6.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i6.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i6.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i6.NzTrDirective, selector: "tr:not([mat-row]):not([mat-header-row]):not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i2$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i3$3.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i4$1.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i1$2.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i12.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: i12.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "directive", type: i12.NzInputGroupWhitSuffixOrPrefixDirective, selector: "nz-input-group[nzSuffix], nz-input-group[nzPrefix]" }, { kind: "ngmodule", type: NzBreadCrumbModule }, { kind: "component", type: i10.NzBreadCrumbComponent, selector: "nz-breadcrumb", inputs: ["nzAutoGenerate", "nzSeparator", "nzRouteLabel", "nzRouteLabelFn", "nzRouteFn"], exportAs: ["nzBreadcrumb"] }, { kind: "component", type: i10.NzBreadCrumbItemComponent, selector: "nz-breadcrumb-item", inputs: ["nzOverlay"], exportAs: ["nzBreadcrumbItem"] }, { kind: "ngmodule", type: NzTagModule }, { kind: "component", type: i11.NzTagComponent, selector: "nz-tag", inputs: ["nzMode", "nzColor", "nzChecked", "nzBordered"], outputs: ["nzOnClose", "nzCheckedChange"], exportAs: ["nzTag"] }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "directive", type: i8.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "ngmodule", type: NzDrawerModule }, { kind: "component", type: i14.NzDrawerComponent, selector: "nz-drawer", inputs: ["nzContent", "nzCloseIcon", "nzClosable", "nzMaskClosable", "nzMask", "nzCloseOnNavigation", "nzNoAnimation", "nzKeyboard", "nzTitle", "nzExtra", "nzFooter", "nzPlacement", "nzSize", "nzMaskStyle", "nzBodyStyle", "nzWrapClassName", "nzWidth", "nzHeight", "nzZIndex", "nzOffsetX", "nzOffsetY", "nzVisible"], outputs: ["nzOnViewInit", "nzOnClose", "nzVisibleChange"], exportAs: ["nzDrawer"] }, { kind: "directive", type: i14.NzDrawerContentDirective, selector: "[nzDrawerContent]", exportAs: ["nzDrawerContent"] }, { kind: "ngmodule", type: NzCheckboxModule }, { kind: "pipe", type: FormatBytesPipe, name: "formatBytes" }, { kind: "directive", type: AutoFocusDirective, selector: "[appAutoFocus]", inputs: ["appAutoFocus"] }, { kind: "component", type: ExtendViewFileContentComponent, selector: "extend-view-file-content", inputs: ["previewType", "previewContent"] }, { kind: "component", type: DriveShareModalComponent, selector: "lib-drive-share-modal", inputs: ["nodeId", "hideInheritanceToggle"] }, { kind: "component", type: DriveVersionModalComponent, selector: "lib-drive-version-modal", inputs: ["nodeId", "nodeName", "canEdit", "canDownload"], outputs: ["closed"] }, { kind: "component", type: DrivePickerComponent, selector: "lib-drive-picker", inputs: ["selectMode", "multiple", "acceptExtensions", "allowUploadNew", "initialScope"], outputs: ["confirmed", "cancelled"] }] });
|
|
36898
37184
|
}
|
|
36899
37185
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: DriveFolderEmbedComponent, decorators: [{
|
|
36900
37186
|
type: Component,
|
|
@@ -36917,7 +37203,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
36917
37203
|
DriveShareModalComponent,
|
|
36918
37204
|
DriveVersionModalComponent,
|
|
36919
37205
|
DrivePickerComponent,
|
|
36920
|
-
], providers: [NzImageService], template: "<div class=\"drive-embed-shell\">\n <!-- TOOLBAR NH\u00DANG -->\n <div class=\"embed-toolbar\" nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <div>\n <nz-breadcrumb>\n <nz-breadcrumb-item\n class=\"cursor-pointer\"\n (click)=\"navigateEmbedFolder(recordRootFolder()?.Id || rootFolderId)\"\n >\n <nz-icon nzType=\"folder-open\"></nz-icon>\n <strong>{{ recordRootFolder()?.Name || title }}</strong>\n </nz-breadcrumb-item>\n @for (bc of subBreadcrumbs(); track bc.Id) {\n <nz-breadcrumb-item class=\"cursor-pointer\" (click)=\"navigateEmbedFolder(bc.Id)\">\n {{ bc.Name }}\n </nz-breadcrumb-item>\n }\n </nz-breadcrumb>\n </div>\n\n <div nz-flex nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"6\">\n <nz-input-group [nzSuffix]=\"embedSearchSuffix\" nzSize=\"small\" style=\"width: 210px\">\n <input\n nz-input\n type=\"text\"\n placeholder=\"T\u00ECm trong h\u1ED3 s\u01A1 n\u00E0y...\"\n [(ngModel)]=\"keyword\"\n (keyup.enter)=\"loadEmbedItems()\"\n />\n </nz-input-group>\n <ng-template #embedSearchSuffix>\n <nz-icon nzType=\"search\" class=\"cursor-pointer\" (click)=\"loadEmbedItems()\"></nz-icon>\n </ng-template>\n\n <input #embedFileInput type=\"file\" multiple hidden (change)=\"onEmbedUploadSelected($event)\" />\n @if (!readonly) {\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"embedFileInput.click()\">\n <nz-icon nzType=\"cloud-upload\"></nz-icon> T\u1EA3i l\u00EAn\n </button>\n\n <button nz-button nzType=\"default\" nzSize=\"small\" (click)=\"openCreateSubFolder()\">\n <nz-icon nzType=\"folder-add\"></nz-icon> T\u1EA1o th\u01B0 m\u1EE5c con\n </button>\n\n <button nz-button nzType=\"dashed\" nzSize=\"small\" (click)=\"pickerDrawerVisible = true\">\n <nz-icon nzType=\"link\"></nz-icon> \u0110\u00EDnh k\u00E8m t\u1EEB Drive\n </button>\n }\n\n @if (recordRootFolder() && !readonly) {\n <button\n nz-button\n nzType=\"default\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Ph\u00E2n quy\u1EC1n th\u01B0 m\u1EE5c h\u1ED3 s\u01A1\"\n (click)=\"openShare(recordRootFolder()!)\"\n >\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n\n <button nz-button nzType=\"default\" nzSize=\"small\" (click)=\"loadEmbedItems()\" nz-tooltip nzTooltipTitle=\"L\u00E0m m\u1EDBi\">\n <nz-icon nzType=\"reload\"></nz-icon>\n </button>\n </div>\n </div>\n\n <!-- B\u1EA2NG D\u1EEE LI\u1EC6U T\u1EACP TIN & TH\u01AF M\u1EE4C CON -->\n <nz-table #embedTable [nzData]=\"items()\" [nzLoading]=\"loading()\" nzSize=\"small\" [nzBordered]=\"true\" [nzPageSize]=\"15\">\n <thead>\n <tr>\n <th nzWidth=\"44px\" class=\"text-center\">#</th>\n <th>T\u00EAn th\u01B0 m\u1EE5c / T\u00E0i li\u1EC7u</th>\n <th nzWidth=\"135px\">Ng\u01B0\u1EDDi t\u1EA1o</th>\n <th nzWidth=\"105px\" class=\"text-right\">K\u00EDch th\u01B0\u1EDBc</th>\n <th nzWidth=\"135px\" class=\"text-center\">C\u1EADp nh\u1EADt</th>\n <th nzWidth=\"145px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (item of embedTable.data; track item.Id; let i = $index) {\n <tr\n class=\"drive-row\"\n [class.active]=\"activeNode()?.Id === item.Id\"\n [class.row-active]=\"activeNode()?.Id === item.Id\"\n (click)=\"activeNode.set(item)\"\n (contextmenu)=\"activeNode.set(item)\"\n (dblclick)=\"onItemClick(item)\"\n >\n <td class=\"text-center\">{{ i + 1 }}</td>\n <td>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-icon\n [nzType]=\"isFolder(item) ? 'folder-fill' : getFileIcon(item)\"\n [style.color]=\"isFolder(item) ? '#f59e0b' : 'var(--primary-color, #1890ff)'\"\n style=\"font-size: 18px\"\n ></nz-icon>\n <span class=\"link-detail\" style=\"font-weight: 500\" (click)=\"onItemClick(item)\">{{ item.Name }}</span>\n @if (item.NodeType === DriveNodeType.Shortcut) {\n <nz-tag nzColor=\"purple\">L\u1ED1i t\u1EAFt</nz-tag>\n }\n </div>\n </td>\n <td>{{ item.OwnerName || item.OwnerId }}</td>\n <td class=\"text-right\">{{ isFolder(item) ? \"\u2014\" : (item.SizeBytes | formatBytes) }}</td>\n <td class=\"text-center\">{{ item.UpdatedDate | date: \"dd/MM/yyyy HH:mm\" }}</td>\n <td class=\"text-center\">\n <div nz-flex nzJustify=\"center\" [nzGap]=\"4\">\n @if (!isFolder(item)) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Xem tr\u01B0\u1EDBc\"\n (click)=\"previewFile(item)\"\n >\n <nz-icon nzType=\"eye\"></nz-icon>\n </button>\n @if (item.CanDownload) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"T\u1EA3i xu\u1ED1ng\"\n (click)=\"downloadFile(item)\"\n >\n <nz-icon nzType=\"download\"></nz-icon>\n </button>\n }\n @if (!readonly && item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n\"\n (click)=\"openVersion(item)\"\n >\n <nz-icon nzType=\"history\"></nz-icon>\n </button>\n }\n }\n @if (!readonly && (item.CanShare || item.EffectiveAccess >= DriveAccessLevel.Manager)) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Ph\u00E2n quy\u1EC1n & Chia s\u1EBB\"\n (click)=\"openShare(item)\"\n >\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n @if (!readonly && item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"X\u00F3a / G\u1EE1 kh\u1ECFi h\u1ED3 s\u01A1\"\n (click)=\"deleteOrDetachItem(item)\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n </div>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n</div>\n\n<!-- DRAWER T\u1EA0O TH\u01AF M\u1EE4C CON -->\n<nz-drawer\n [nzVisible]=\"subFolderDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"420\"\n nzTitle=\"T\u1EA1o th\u01B0 m\u1EE5c con trong h\u1ED3 s\u01A1\"\n (nzOnClose)=\"subFolderDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"12\">\n <label style=\"font-weight: 600\">T\u00EAn th\u01B0 m\u1EE5c con</label>\n <input\n nz-input\n [(ngModel)]=\"newSubFolderName\"\n [appAutoFocus]=\"subFolderDrawerVisible\"\n placeholder=\"Nh\u1EADp t\u00EAn th\u01B0 m\u1EE5c con...\"\n (keyup.enter)=\"submitCreateSubFolder()\"\n />\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\" style=\"margin-top: 8px\">\n <button nz-button nzType=\"default\" (click)=\"subFolderDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitCreateSubFolder()\">\n <nz-icon nzType=\"check\"></nz-icon> T\u1EA1o th\u01B0 m\u1EE5c\n </button>\n </div>\n </div>\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER \u0110\u00CDNH K\u00C8M T\u1EEA DRIVE -->\n<nz-drawer\n [nzVisible]=\"pickerDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"820\"\n nzTitle=\"\u0110\u00EDnh k\u00E8m t\u00E0i li\u1EC7u / th\u01B0 m\u1EE5c t\u1EEB Drive v\u00E0o H\u1ED3 s\u01A1\"\n (nzOnClose)=\"pickerDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n <lib-drive-picker\n [selectMode]=\"'both'\"\n [multiple]=\"true\"\n (confirmed)=\"onAttachFromDrive($event)\"\n (cancelled)=\"pickerDrawerVisible = false\"\n ></lib-drive-picker>\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER XEM TR\u1EF0C TUY\u1EBEN -->\n<nz-drawer\n [nzVisible]=\"previewDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"'75vw'\"\n [nzBodyStyle]=\"{ padding: '0', height: '100%', display: 'flex', flexDirection: 'column', overflow: 'hidden' }\"\n [nzTitle]=\"previewTitle\"\n (nzOnClose)=\"previewDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n <div class=\"drive-preview-body-fill no-drawer-footer\">\n <extend-view-file-content [previewType]=\"previewType\" [previewContent]=\"previewContent\"></extend-view-file-content>\n </div>\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER L\u1ECACH S\u1EEC PHI\u00CAN B\u1EA2N -->\n<nz-drawer\n [nzVisible]=\"versionDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"740\"\n [nzTitle]=\"'L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n: ' + (activeNode()?.Name || '')\"\n (nzOnClose)=\"versionDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n @if (activeNode(); as node) {\n <lib-drive-version-modal\n [nodeId]=\"node.ShortcutTargetId || node.Id\"\n [nodeName]=\"node.Name\"\n [canEdit]=\"!readonly\"\n [canDownload]=\"node.CanDownload\"\n (closed)=\"versionDrawerVisible = false; loadEmbedItems()\"\n ></lib-drive-version-modal>\n }\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER CHIA S\u1EBA & PH\u00C2N QUY\u1EC0N -->\n<nz-drawer\n [nzVisible]=\"shareDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"920\"\n [nzTitle]=\"'Chia s\u1EBB & Ph\u00E2n quy\u1EC1n: ' + (activeNode()?.Name || '')\"\n (nzOnClose)=\"shareDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n @if (activeNode(); as node) {\n <lib-drive-share-modal [nodeId]=\"node.ShortcutTargetId || node.Id\"></lib-drive-share-modal>\n }\n </ng-container>\n</nz-drawer>\n", styles: ["@charset \"UTF-8\";.drive-embed-shell{border:1px solid var(--app-border, #e2e8f0);border-radius:8px;padding:14px;background:var(--app-container-bg, #ffffff);display:flex;flex-direction:column;gap:12px}.embed-toolbar{padding-bottom:10px;border-bottom:1px solid var(--app-border, #f1f5f9)}.drive-row{cursor:pointer;transition:background .15s}.drive-row.row-active>td,.drive-row.active>td{background:color-mix(in srgb,var(--primary-color, #1890ff) 11%,var(--app-container-bg, #ffffff))!important}.drive-row.row-active>td:first-child,.drive-row.active>td:first-child{box-shadow:inset 3.5px 0 0 var(--primary-color, #1890ff)!important}.drive-row:not(.row-active):not(:hover)>td{background:transparent!important;box-shadow:none!important}.drive-preview-body-fill{--drive-preview-fill-height: calc(100vh - 103px) ;display:flex;flex-direction:column;flex:1 1 auto;width:100%;height:100%;min-height:var(--drive-preview-fill-height);overflow:hidden}.drive-preview-body-fill.no-drawer-footer{--drive-preview-fill-height: calc(100vh - 55px) }.drive-preview-body-fill ::ng-deep extend-view-file-content{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;width:100%!important;height:100%!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important}.drive-preview-body-fill ::ng-deep extend-view-file-content>*:not(style):not(script),.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer>div,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .html,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .ink-switch-box,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .zoom,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer #outerContainer,.drive-preview-body-fill ::ng-deep extend-view-file-content pdf-viewer,.drive-preview-body-fill ::ng-deep extend-view-file-content iframe,.drive-preview-body-fill ::ng-deep extend-view-file-content embed,.drive-preview-body-fill ::ng-deep extend-view-file-content object{display:block!important;flex:1 1 auto!important;width:100%!important;height:var(--drive-preview-fill-height)!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important}.drive-preview-body-fill ::ng-deep extend-view-file-content pre{flex:1 1 auto!important;width:100%!important;height:var(--drive-preview-fill-height)!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important;margin:0!important;padding:16px!important;overflow:auto!important;box-sizing:border-box!important}\n"] }]
|
|
37206
|
+
], providers: [NzImageService], template: "<div class=\"drive-embed-shell\">\n <!-- TOOLBAR NH\u00DANG -->\n <div class=\"embed-toolbar\" nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <div>\n <nz-breadcrumb>\n <nz-breadcrumb-item\n class=\"cursor-pointer\"\n (click)=\"navigateEmbedFolder(recordRootFolder()?.Id || rootFolderId)\"\n >\n <nz-icon nzType=\"folder-open\"></nz-icon>\n <strong>{{ recordRootFolder()?.Name || title }}</strong>\n </nz-breadcrumb-item>\n @for (bc of subBreadcrumbs(); track bc.Id) {\n <nz-breadcrumb-item class=\"cursor-pointer\" (click)=\"navigateEmbedFolder(bc.Id)\">\n {{ bc.Name }}\n </nz-breadcrumb-item>\n }\n </nz-breadcrumb>\n </div>\n\n <div nz-flex nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"6\">\n <nz-input-group [nzSuffix]=\"embedSearchSuffix\" nzSize=\"small\" style=\"width: 210px\">\n <input\n nz-input\n type=\"text\"\n placeholder=\"T\u00ECm trong h\u1ED3 s\u01A1 n\u00E0y...\"\n [(ngModel)]=\"keyword\"\n (keyup.enter)=\"loadEmbedItems()\"\n />\n </nz-input-group>\n <ng-template #embedSearchSuffix>\n <nz-icon nzType=\"search\" class=\"cursor-pointer\" (click)=\"loadEmbedItems()\"></nz-icon>\n </ng-template>\n\n <input #embedFileInput type=\"file\" multiple hidden (change)=\"onEmbedUploadSelected($event)\" />\n @if (canUploadInEmbed()) {\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"embedFileInput.click()\">\n <nz-icon nzType=\"cloud-upload\"></nz-icon> T\u1EA3i l\u00EAn\n </button>\n }\n @if (canCreateFolderInEmbed()) {\n <button nz-button nzType=\"default\" nzSize=\"small\" (click)=\"openCreateSubFolder()\">\n <nz-icon nzType=\"folder-add\"></nz-icon> T\u1EA1o th\u01B0 m\u1EE5c con\n </button>\n\n <button nz-button nzType=\"dashed\" nzSize=\"small\" (click)=\"pickerDrawerVisible = true\">\n <nz-icon nzType=\"link\"></nz-icon> \u0110\u00EDnh k\u00E8m t\u1EEB Drive\n </button>\n }\n\n @if (recordRootFolder() && !readonly) {\n <button\n nz-button\n nzType=\"default\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Ph\u00E2n quy\u1EC1n th\u01B0 m\u1EE5c h\u1ED3 s\u01A1\"\n (click)=\"openShare(recordRootFolder()!)\"\n >\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n\n <button nz-button nzType=\"default\" nzSize=\"small\" (click)=\"loadEmbedItems()\" nz-tooltip nzTooltipTitle=\"L\u00E0m m\u1EDBi\">\n <nz-icon nzType=\"reload\"></nz-icon>\n </button>\n </div>\n </div>\n\n <!-- B\u1EA2NG D\u1EEE LI\u1EC6U T\u1EACP TIN & TH\u01AF M\u1EE4C CON -->\n <nz-table #embedTable [nzData]=\"items()\" [nzLoading]=\"loading()\" nzSize=\"small\" [nzBordered]=\"true\" [nzPageSize]=\"15\">\n <thead>\n <tr>\n <th nzWidth=\"44px\" class=\"text-center\">#</th>\n <th>T\u00EAn th\u01B0 m\u1EE5c / T\u00E0i li\u1EC7u</th>\n <th nzWidth=\"135px\">Ng\u01B0\u1EDDi t\u1EA1o</th>\n <th nzWidth=\"105px\" class=\"text-right\">K\u00EDch th\u01B0\u1EDBc</th>\n <th nzWidth=\"135px\" class=\"text-center\">C\u1EADp nh\u1EADt</th>\n <th nzWidth=\"145px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (item of embedTable.data; track item.Id; let i = $index) {\n <tr\n class=\"drive-row\"\n [class.active]=\"activeNode()?.Id === item.Id\"\n [class.row-active]=\"activeNode()?.Id === item.Id\"\n (click)=\"activeNode.set(item)\"\n (contextmenu)=\"activeNode.set(item)\"\n (dblclick)=\"onItemClick(item)\"\n >\n <td class=\"text-center\">{{ i + 1 }}</td>\n <td>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-icon\n [nzType]=\"isFolder(item) ? 'folder-fill' : getFileIcon(item)\"\n [style.color]=\"isFolder(item) ? '#f59e0b' : 'var(--primary-color, #1890ff)'\"\n style=\"font-size: 18px\"\n ></nz-icon>\n <span class=\"link-detail\" style=\"font-weight: 500\" (click)=\"onItemClick(item)\">{{ item.Name }}</span>\n @if (item.NodeType === DriveNodeType.Shortcut) {\n <nz-tag nzColor=\"purple\">L\u1ED1i t\u1EAFt</nz-tag>\n }\n </div>\n </td>\n <td>{{ item.OwnerName || item.OwnerId }}</td>\n <td class=\"text-right\">{{ isFolder(item) ? \"\u2014\" : (item.SizeBytes | formatBytes) }}</td>\n <td class=\"text-center\">{{ item.UpdatedDate | date: \"dd/MM/yyyy HH:mm\" }}</td>\n <td class=\"text-center\">\n <div nz-flex nzJustify=\"center\" [nzGap]=\"4\">\n @if (!isFolder(item)) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Xem tr\u01B0\u1EDBc\"\n (click)=\"previewFile(item)\"\n >\n <nz-icon nzType=\"eye\"></nz-icon>\n </button>\n @if (item.CanDownload) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"T\u1EA3i xu\u1ED1ng\"\n (click)=\"downloadFile(item)\"\n >\n <nz-icon nzType=\"download\"></nz-icon>\n </button>\n }\n @if (!readonly && item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n\"\n (click)=\"openVersion(item)\"\n >\n <nz-icon nzType=\"history\"></nz-icon>\n </button>\n }\n }\n @if (!readonly && (item.CanShare || item.EffectiveAccess >= DriveAccessLevel.Manager)) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Ph\u00E2n quy\u1EC1n & Chia s\u1EBB\"\n (click)=\"openShare(item)\"\n >\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n @if (!readonly && item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"X\u00F3a / G\u1EE1 kh\u1ECFi h\u1ED3 s\u01A1\"\n (click)=\"deleteOrDetachItem(item)\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n </div>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n</div>\n\n<!-- DRAWER T\u1EA0O TH\u01AF M\u1EE4C CON -->\n<nz-drawer\n [nzVisible]=\"subFolderDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"420\"\n nzTitle=\"T\u1EA1o th\u01B0 m\u1EE5c con trong h\u1ED3 s\u01A1\"\n (nzOnClose)=\"subFolderDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"12\">\n <label style=\"font-weight: 600\">T\u00EAn th\u01B0 m\u1EE5c con</label>\n <input\n nz-input\n [(ngModel)]=\"newSubFolderName\"\n [appAutoFocus]=\"subFolderDrawerVisible\"\n placeholder=\"Nh\u1EADp t\u00EAn th\u01B0 m\u1EE5c con...\"\n (keyup.enter)=\"submitCreateSubFolder()\"\n />\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\" style=\"margin-top: 8px\">\n <button nz-button nzType=\"default\" (click)=\"subFolderDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitCreateSubFolder()\">\n <nz-icon nzType=\"check\"></nz-icon> T\u1EA1o th\u01B0 m\u1EE5c\n </button>\n </div>\n </div>\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER \u0110\u00CDNH K\u00C8M T\u1EEA DRIVE -->\n<nz-drawer\n [nzVisible]=\"pickerDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"820\"\n nzTitle=\"\u0110\u00EDnh k\u00E8m t\u00E0i li\u1EC7u / th\u01B0 m\u1EE5c t\u1EEB Drive v\u00E0o H\u1ED3 s\u01A1\"\n (nzOnClose)=\"pickerDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n <lib-drive-picker\n [selectMode]=\"'both'\"\n [multiple]=\"true\"\n (confirmed)=\"onAttachFromDrive($event)\"\n (cancelled)=\"pickerDrawerVisible = false\"\n ></lib-drive-picker>\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER XEM TR\u1EF0C TUY\u1EBEN -->\n<nz-drawer\n [nzVisible]=\"previewDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"'75vw'\"\n [nzBodyStyle]=\"{ padding: '0', height: '100%', display: 'flex', flexDirection: 'column', overflow: 'hidden' }\"\n [nzTitle]=\"previewTitle\"\n (nzOnClose)=\"previewDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n <div class=\"drive-preview-body-fill no-drawer-footer\">\n <extend-view-file-content [previewType]=\"previewType\" [previewContent]=\"previewContent\"></extend-view-file-content>\n </div>\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER L\u1ECACH S\u1EEC PHI\u00CAN B\u1EA2N -->\n<nz-drawer\n [nzVisible]=\"versionDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"740\"\n [nzTitle]=\"'L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n: ' + (activeNode()?.Name || '')\"\n (nzOnClose)=\"versionDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n @if (activeNode(); as node) {\n <lib-drive-version-modal\n [nodeId]=\"node.ShortcutTargetId || node.Id\"\n [nodeName]=\"node.Name\"\n [canEdit]=\"!readonly\"\n [canDownload]=\"node.CanDownload\"\n (closed)=\"versionDrawerVisible = false; loadEmbedItems()\"\n ></lib-drive-version-modal>\n }\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER CHIA S\u1EBA & PH\u00C2N QUY\u1EC0N -->\n<nz-drawer\n [nzVisible]=\"shareDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"920\"\n [nzTitle]=\"'Chia s\u1EBB & Ph\u00E2n quy\u1EC1n: ' + (activeNode()?.Name || '')\"\n (nzOnClose)=\"shareDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n @if (activeNode(); as node) {\n <lib-drive-share-modal [nodeId]=\"node.ShortcutTargetId || node.Id\"></lib-drive-share-modal>\n }\n </ng-container>\n</nz-drawer>\n", styles: ["@charset \"UTF-8\";.drive-embed-shell{border:1px solid var(--app-border, #e2e8f0);border-radius:8px;padding:14px;background:var(--app-container-bg, #ffffff);display:flex;flex-direction:column;gap:12px}.embed-toolbar{padding-bottom:10px;border-bottom:1px solid var(--app-border, #f1f5f9)}.drive-row{cursor:pointer;transition:background .15s}.drive-row.row-active>td,.drive-row.active>td{background:color-mix(in srgb,var(--primary-color, #1890ff) 11%,var(--app-container-bg, #ffffff))!important}.drive-row.row-active>td:first-child,.drive-row.active>td:first-child{box-shadow:inset 3.5px 0 0 var(--primary-color, #1890ff)!important}.drive-row:not(.row-active):not(:hover)>td{background:transparent!important;box-shadow:none!important}.drive-preview-body-fill{--drive-preview-fill-height: calc(100vh - 103px) ;display:flex;flex-direction:column;flex:1 1 auto;width:100%;height:100%;min-height:var(--drive-preview-fill-height);overflow:hidden}.drive-preview-body-fill.no-drawer-footer{--drive-preview-fill-height: calc(100vh - 55px) }.drive-preview-body-fill ::ng-deep extend-view-file-content{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;width:100%!important;height:100%!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important}.drive-preview-body-fill ::ng-deep extend-view-file-content>*:not(style):not(script),.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer>div,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .html,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .ink-switch-box,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer .zoom,.drive-preview-body-fill ::ng-deep extend-view-file-content ngx-extended-pdf-viewer #outerContainer,.drive-preview-body-fill ::ng-deep extend-view-file-content pdf-viewer,.drive-preview-body-fill ::ng-deep extend-view-file-content iframe,.drive-preview-body-fill ::ng-deep extend-view-file-content embed,.drive-preview-body-fill ::ng-deep extend-view-file-content object{display:block!important;flex:1 1 auto!important;width:100%!important;height:var(--drive-preview-fill-height)!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important}.drive-preview-body-fill ::ng-deep extend-view-file-content pre{flex:1 1 auto!important;width:100%!important;height:var(--drive-preview-fill-height)!important;min-height:var(--drive-preview-fill-height)!important;max-height:none!important;margin:0!important;padding:16px!important;overflow:auto!important;box-sizing:border-box!important}\n"] }]
|
|
36921
37207
|
}], propDecorators: { moduleCode: [{
|
|
36922
37208
|
type: Input
|
|
36923
37209
|
}], moduleRecordId: [{
|