Skip to content

Commit 0ba6c78

Browse files
authored
fix(copy): updated copy titles (#529)
1 parent 70a73c6 commit 0ba6c78

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

src/app/features/files/components/move-file-dialog/move-file-dialog.component.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
</div>
55
} @else {
66
<div class="flex flex-column gap-2">
7-
<div class="flex gap-2">
8-
<h2 class="font-normal">{{ storageName }}</h2>
9-
</div>
7+
<h2 class="font-normal">{{ storageName }}</h2>
108

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

7270
<p-button
7371
[disabled]="isFolderSame() || isLoading() || isFilesUpdating()"
74-
[label]="(config.data.action === 'move' ? 'common.buttons.move' : 'common.buttons.copy') | translate"
72+
[label]="(isMoveAction ? 'common.buttons.move' : 'common.buttons.copy') | translate"
7573
(onClick)="moveFile()"
7674
></p-button>
7775
</div>

src/app/features/files/components/move-file-dialog/move-file-dialog.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ export class MoveFileDialogComponent {
7979
return this.currentFolder()?.id === parentFolder?.id;
8080
});
8181

82+
get isMoveAction() {
83+
return this.config.data.action === 'move';
84+
}
85+
8286
constructor() {
8387
this.initPreviousFolder();
8488
const filesLink = this.currentFolder()?.relationships?.filesLink;

src/app/shared/components/file-menu/file-menu.component.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ export class FileMenuComponent {
2626
menu = viewChild.required<TieredMenu>('menu');
2727
action = output<FileMenuAction>();
2828

29-
hasViewOnly = computed(() => {
30-
return hasViewOnlyParam(this.router);
31-
});
29+
hasViewOnly = computed(() => hasViewOnlyParam(this.router));
3230

3331
private readonly allMenuItems: MenuItem[] = [
3432
{
@@ -95,7 +93,7 @@ export class FileMenuComponent {
9593
},
9694
{
9795
id: FileMenuType.Copy,
98-
label: 'common.buttons.copy',
96+
label: 'common.buttons.copyTo',
9997
icon: 'fas fa-copy',
10098
command: () => this.emitAction(FileMenuType.Copy),
10199
},

src/assets/i18n/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"close": "Close",
1414
"download": "Download",
1515
"copy": "Copy",
16+
"copyTo": "Copy to",
1617
"move": "Move",
1718
"rename": "Rename",
1819
"share": "Share",
@@ -1091,7 +1092,7 @@
10911092
"pathError": "Path is not specified!"
10921093
},
10931094
"copyFile": {
1094-
"title": "Copy file"
1095+
"title": "Select location to copy file to"
10951096
},
10961097
"deleteFile": {
10971098
"title": "Delete File",

0 commit comments

Comments
 (0)