Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
</div>
} @else {
<div class="flex flex-column gap-2">
<div class="flex gap-2">
<h2 class="font-normal">{{ storageName }}</h2>
</div>
<h2 class="font-normal">{{ storageName }}</h2>

<div class="files-table flex flex-column">
@if (previousFolder()) {
Expand Down Expand Up @@ -71,7 +69,7 @@ <h3 class="font-normal text-no-transform">{{ 'files.emptyState' | translate }}</

<p-button
[disabled]="isFolderSame() || isLoading() || isFilesUpdating()"
[label]="(config.data.action === 'move' ? 'common.buttons.move' : 'common.buttons.copy') | translate"
[label]="(isMoveAction ? 'common.buttons.move' : 'common.buttons.copy') | translate"
(onClick)="moveFile()"
></p-button>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ export class MoveFileDialogComponent {
return this.currentFolder()?.id === parentFolder?.id;
});

get isMoveAction() {
return this.config.data.action === 'move';
}

constructor() {
this.initPreviousFolder();
const filesLink = this.currentFolder()?.relationships?.filesLink;
Expand Down
6 changes: 2 additions & 4 deletions src/app/shared/components/file-menu/file-menu.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ export class FileMenuComponent {
menu = viewChild.required<TieredMenu>('menu');
action = output<FileMenuAction>();

hasViewOnly = computed(() => {
return hasViewOnlyParam(this.router);
});
hasViewOnly = computed(() => hasViewOnlyParam(this.router));

private readonly allMenuItems: MenuItem[] = [
{
Expand Down Expand Up @@ -95,7 +93,7 @@ export class FileMenuComponent {
},
{
id: FileMenuType.Copy,
label: 'common.buttons.copy',
label: 'common.buttons.copyTo',
icon: 'fas fa-copy',
command: () => this.emitAction(FileMenuType.Copy),
},
Expand Down
3 changes: 2 additions & 1 deletion src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"close": "Close",
"download": "Download",
"copy": "Copy",
"copyTo": "Copy to",
"move": "Move",
"rename": "Rename",
"share": "Share",
Expand Down Expand Up @@ -1091,7 +1092,7 @@
"pathError": "Path is not specified!"
},
"copyFile": {
"title": "Copy file"
"title": "Select location to copy file to"
},
"deleteFile": {
"title": "Delete File",
Expand Down
Loading