diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json index 499e474c..811a0bff 100644 --- a/frontend/src/i18n/en.json +++ b/frontend/src/i18n/en.json @@ -35,6 +35,7 @@ "selectMultiple": "Select multiple", "share": "Share", "shell": "Toggle shell", + "gotoParent": "Open parent dir", "submit": "Submit", "switchView": "Switch view", "toggleSidebar": "Toggle sidebar", diff --git a/frontend/src/views/files/FileListing.vue b/frontend/src/views/files/FileListing.vue index a26ac67e..ff8c9c68 100644 --- a/frontend/src/views/files/FileListing.vue +++ b/frontend/src/views/files/FileListing.vue @@ -47,6 +47,12 @@ /> + {{ fileStore.selectedCount }} selected + + (50); const columnWidth = ref(280); @@ -321,6 +336,7 @@ const layoutStore = useLayoutStore(); const { req } = storeToRefs(fileStore); const route = useRoute(); +const router = useRouter(); const { t } = useI18n(); @@ -404,6 +420,7 @@ const viewIcon = computed(() => { const headerButtons = computed(() => { return { + gotoParent: true, upload: authStore.user?.perm.create, download: authStore.user?.perm.download, shell: authStore.user?.perm.execute && enableExec, @@ -890,6 +907,15 @@ const download = () => { }); }; +const gotoParent = () => { + console.log(route.fullPath) + const url = (route.fullPath || "") + const parts = url.replace(/\/$/, '').split('/'); + parts.pop(); + const parentUrl = parts.join('/'); + router.push({ path: parentUrl }); +}; + const switchView = async () => { layoutStore.closeHovers();