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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/app/features/project/addons/addons.component.spec.ts
Original file line number Diff line number Diff line change
@@ -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', () => {
Expand All @@ -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<MoveFileDialogComponent>;

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();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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) {
Expand All @@ -122,6 +124,5 @@ export class MoveFileDialogComponent {
}
}
});
this.dialogRef.close();
}
}
63 changes: 63 additions & 0 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down