diff --git a/src/app/features/project/addons/addons.component.spec.ts b/src/app/features/project/addons/addons.component.spec.ts index 4d1a6de4c..165e8abda 100644 --- a/src/app/features/project/addons/addons.component.spec.ts +++ b/src/app/features/project/addons/addons.component.spec.ts @@ -1,5 +1,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; +<<<<<<<< HEAD:src/app/features/project/addons/addons.component.spec.ts import { AddonsComponent } from './addons.component'; describe('AddonsComponent', () => { @@ -12,6 +13,20 @@ describe('AddonsComponent', () => { }).compileComponents(); fixture = TestBed.createComponent(AddonsComponent); +======== +import { MoveFileDialogComponent } from './move-file-dialog.component'; + +describe('MoveFileDialogComponent', () => { + let component: MoveFileDialogComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [MoveFileDialogComponent], + }).compileComponents(); + + fixture = TestBed.createComponent(MoveFileDialogComponent); +>>>>>>>> 0317809 (chore(files): api):src/app/features/project/files/components/move-file-dialog/move-file-dialog.component.spec.ts component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/src/app/features/project/files/components/move-file-dialog/move-file-dialog.component.ts b/src/app/features/project/files/components/move-file-dialog/move-file-dialog.component.ts index 5012f1e76..2a54e4123 100644 --- a/src/app/features/project/files/components/move-file-dialog/move-file-dialog.component.ts +++ b/src/app/features/project/files/components/move-file-dialog/move-file-dialog.component.ts @@ -101,7 +101,7 @@ export class MoveFileDialogComponent { path = '/'; } - this.dispatch.setFilesIsLoading(true); + this.isFilesUpdating.set(true); this.projectFilesService .moveFile(this.config.data.file.links.move, path, this.config.data.projectId, this.config.data.action) .pipe( @@ -110,9 +110,11 @@ export class MoveFileDialogComponent { finalize(() => { this.dispatch.setCurrentFolder(this.currentFolder()); this.dispatch.setMoveFileCurrentFolder(undefined); + this.isFilesUpdating.set(false); }) ) .subscribe((file) => { + this.dialogRef.close(); if (file.id) { const filesLink = this.currentFolder()?.relationships.filesLink; if (filesLink) { @@ -122,6 +124,5 @@ export class MoveFileDialogComponent { } } }); - this.dialogRef.close(); } } diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 664c7eb8e..47a729a04 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -562,6 +562,69 @@ "openResources": "Open Resources" } }, + "files": { + "title": "Files", + "storageLocation": "OSF Storage", + "searchPlaceholder": "Search your projects", + "sort": { + "placeholder": "Sort", + "nameAZ": "Name: A-Z", + "nameZA": "Name: Z-A", + "lastModifiedOldest": "Last modified: oldest to newest", + "lastModifiedNewest": "Last modified: newest to oldest" + }, + "actions": { + "downloadAsZip": "Download As Zip", + "createFolder": "Create Folder", + "uploadFile": "Upload File" + }, + "dialogs": { + "uploadFile": { + "title": "Upload file" + }, + "createFolder": { + "title": "Create folder", + "folderName": "New folder name", + "folderNamePlaceholder": "Please enter a folder name" + }, + "renameFile": { + "title": "Rename file", + "renameLabel": "Please rename the file" + }, + "moveFile": "Cannot move to the same folder" + }, + "emptyState": "This folder is empty", + "detail": { + "backToList": "Back to list of files", + "fileMetadata": { + "title": "File Metadata", + "edit": "Edit", + "fields": { + "title": "Title", + "description": "Description", + "resourceType": "Resource Type", + "resourceLanguage": "Resource Language" + } + }, + "projectMetadata": { + "title": "Project Metadata", + "edit": "Edit", + "fields": { + "funder": "Funder", + "awardTitle": "Award title", + "awardNumber": "Award number", + "awardUri": "Award URI", + "title": "Title", + "description": "Description", + "resourceType": "Resource type", + "resourceLanguage": "Resource language", + "dateCreated": "Date created", + "dateModified": "Date modified", + "contributors": "Contributors" + } + } + } + }, "files": { "title": "Files", "storageLocation": "OSF Storage",