Skip to content

Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.

feat(frontend:files): allow opening folders after creation

johavene340796591d9
diff --git a/frontend/src/app/applications/files/components/dialogs/files-new-dialog.component.ts b/frontend/src/app/applications/files/components/dialogs/files-new-dialog.component.ts
index ddddbbff..00447489 100644
--- a/frontend/src/app/applications/files/components/dialogs/files-new-dialog.component.ts
+++ b/frontend/src/app/applications/files/components/dialogs/files-new-dialog.component.ts
@@ -158,6 +158,7 @@ export class FilesNewDialogComponent implements OnInit, AfterViewInit {
}
protected canOpenAfterCreation(): boolean {
+ if (this.inputType === 'directory') return true
const docType = this.currentDocType()
if (this.inputType !== 'file' || docType === 'Other') return false
const extension = this.docTypes[docType].toLowerCase()
diff --git a/frontend/src/app/applications/spaces/components/spaces-browser.component.ts b/frontend/src/app/applications/spaces/components/spaces-browser.component.ts
index 575f2317..969559ee 100644
--- a/frontend/src/app/applications/spaces/components/spaces-browser.component.ts
+++ b/frontend/src/app/applications/spaces/components/spaces-browser.component.ts
@@ -747,9 +747,9 @@ export class SpacesBrowserComponent implements OnInit, AfterViewInit, OnDestroy
const fileName = this.openAfterReload
this.openAfterReload = null
const file = this.files.find((item) => item.name.toLowerCase() === fileName.toLowerCase())
- if (!file || (!file.isViewable && !file.isEditable)) return
+ if (!file || (!file.isDir && !file.isViewable && !file.isEditable)) return
this.setSelection([file], file, file)
- this.openViewerDialog()
+ this.shortcutOpen()
}
private focusOn(selectName: string) {