Skip to content

Commit 1427a36

Browse files
plateauandspbaijiangjie
authored andcommitted
feat(asset-tree): user custom favorite folders UI
- Add a Favorites tree (root -> folders -> assets), placed on top - Right-click menus: create/delete folder, create subfolder, favorite to a folder, remove favorite, connect / new window / split connect, batch connect - Nested folders, cascade checkbox; favorite/unfavorite update nodes locally via ztree addNodes/removeNode without rebuilding the tree (no collapse) - Remove the built-in flat Favorite node from My assets to avoid duplication
1 parent 38846f5 commit 1427a36

2 files changed

Lines changed: 508 additions & 50 deletions

File tree

src/app/elements/asset-tree/asset-tree.component.html

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
</a>
2525
<i
2626
(click)="toggleTreeCheckable($event, tree)"
27+
*ngIf="tree.checkbox"
2728
[nzTooltipTitle]="'Batch actions(select and right click)' | translate"
2829
nz-tooltip
2930
[ngClass]="isTreeCheckEnabled(tree) ? 'fa-check-square' : 'fa-square-o'"
@@ -68,7 +69,7 @@
6869
<td
6970
(click)="handleMenuClick(menu)"
7071
[attr.data-num]="i"
71-
[ngStyle]="{ display: menu.hide ? 'none' : '' }"
72+
[ngStyle]="{ display: menu.hide ? 'none' : '', opacity: menu.disabled ? 0.4 : 1 }"
7273
class="view-menu__data"
7374
>
7475
<span [ngClass]="menu.fa" class="view-menu__icon fa"></span> {{ menu.name | translate }}
@@ -77,3 +78,13 @@
7778
</tbody>
7879
</table>
7980
</div>
81+
82+
<!-- New favorite folder dialog content template -->
83+
<ng-template #folderModalContent>
84+
<input
85+
nz-input
86+
[(ngModel)]="folderNameInput"
87+
[placeholder]="'Folder name' | translate"
88+
type="text"
89+
/>
90+
</ng-template>

0 commit comments

Comments
 (0)