Skip to content

Commit 960ce79

Browse files
committed
use some of CR approaches & keep some existing approaches to show the delete button
1 parent c3611fe commit 960ce79

4 files changed

Lines changed: 5 additions & 0 deletions

File tree

src/app/features/files/pages/files/files.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@
144144
(selectFile)="onFileTreeSelected($event)"
145145
(unselectFile)="onFileTreeUnselected($event)"
146146
(clearSelection)="onClearSelection()"
147+
(deleteEntryAction)="deleteEntry($event)"
147148
(entryFileClicked)="navigateToFile($event)"
148149
(renameEntryAction)="renameEntry($event)"
149150
(uploadFilesConfirmed)="uploadFiles($event)"

src/app/features/registries/components/custom-step/custom-step.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ <h3 class="mb-2">{{ 'files.actions.uploadFile' | translate }}</h3>
181181
(attachFile)="onAttachFile($event, q.responseKey!)"
182182
(openFile)="onOpenFile($event)"
183183
[filesViewOnly]="filesViewOnly()"
184+
[isDraftResource]="true"
184185
(removeFromAttachedFiles)="removeFromAttachedFiles($event, q.responseKey!)"
185186
></osf-files-control>
186187
</div>

src/app/features/registries/components/files-control/files-control.component.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151
[resourceId]="projectId()"
5252
[provider]="provider()"
5353
[selectedFiles]="filesSelection"
54+
[isDraftResource]="isDraftResource()"
55+
(deleteEntryAction)="deleteEntry($event)"
5456
(selectFile)="onFileTreeSelected($event)"
5557
(entryFileClicked)="onEntryFileClicked($event)"
5658
(uploadFilesConfirmed)="uploadFiles($event)"

src/app/features/registries/components/files-control/files-control.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export class FilesControlComponent {
5454
projectId = input.required<string>();
5555
provider = input.required<string>();
5656
filesViewOnly = input<boolean>(false);
57+
isDraftResource = input<boolean>(false);
5758
attachFile = output<FileModel>();
5859
removeFromAttachedFiles = output<string>();
5960
openFile = output<FileModel>();

0 commit comments

Comments
 (0)