[AAE-4429] Add readOnly breadcrumb to upload from device tab (#6664)

* [AAE-4429] Add readOnly breadcrumb to upload from device tab

* [AAE-4429] Added unit tests

* [AAE-4429] Moved unit tests

* [AAE-4429] Removed breadcrumb title
This commit is contained in:
Thomas Hunter
2021-02-12 12:20:06 +01:00
committed by GitHub
parent e1fee70cdc
commit 43ed8d7924
3 changed files with 23 additions and 10 deletions

View File

@@ -14,6 +14,16 @@
color: mat-color($foreground, base, 0.87);
}
.adf-toolbar .mat-toolbar {
max-height: 48px;
border-bottom-width: 0;
font-size: 14px;
&.mat-toolbar-single-row {
height: auto;
}
}
.adf-content-node-selector {
&-search-panel-container {
@@ -62,16 +72,6 @@
}
.adf-toolbar .mat-toolbar {
max-height: 48px;
border-bottom-width: 0;
font-size: 14px;
&.mat-toolbar-single-row {
height: auto;
}
}
&-breadcrumb {
.adf-dropdown-breadcrumb-trigger {
outline: none;

View File

@@ -34,6 +34,17 @@
</mat-tab>
<mat-tab *ngIf="canPerformLocalUpload()"
[disabled]="isNotAllowedToUpload()">
<adf-toolbar>
<adf-toolbar-title>
<adf-dropdown-breadcrumb
class="adf-content-node-selector-content-breadcrumb"
[folderNode]="breadcrumbFolderNode"
[rootId]="data?.currentFolderId"
[readOnly]="true"
data-automation-id="content-node-selector-upload-breadcrumb"
></adf-dropdown-breadcrumb>
</adf-toolbar-title>
</adf-toolbar>
<ng-template mat-tab-label>
{{ 'NODE_SELECTOR.UPLOAD_FROM_DEVICE' | translate }}
<mat-icon *ngIf="hasUploadError()"

View File

@@ -39,6 +39,7 @@ export class ContentNodeSelectorComponent implements OnInit {
hasAllowableOperations = false;
isLoading = true;
selectedTabIndex: number = 0;
breadcrumbFolderNode: Node;
constructor(private translation: TranslationService,
private contentService: ContentService,
@@ -116,6 +117,7 @@ export class ContentNodeSelectorComponent implements OnInit {
onCurrentFolder(currentFolder: Node) {
this.hasAllowableOperations = this.contentService.hasAllowableOperations(currentFolder, AllowableOperationsEnum.CREATE);
this.breadcrumbFolderNode = currentFolder;
}
isNotAllowedToUpload() {