diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-05-16 23:36:46 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-05-29 14:47:39 +0200 |
commit | 14635929e9a233146d7cf15f9f322cbbde247966 (patch) | |
tree | f3d540da21f5b9e76319d363ba8e26a3f7b907e1 /apps/files/src | |
parent | 1526a6f7c201a383fb6c41601dcbf8ec5f61fc2d (diff) | |
download | nextcloud-server-14635929e9a233146d7cf15f9f322cbbde247966.tar.gz nextcloud-server-14635929e9a233146d7cf15f9f322cbbde247966.zip |
fix(files): Keep 'back'-button for not found directories or if user can not upload
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/files/src')
-rw-r--r-- | apps/files/src/views/FilesList.vue | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/apps/files/src/views/FilesList.vue b/apps/files/src/views/FilesList.vue index b40af040984..0880e02ca0c 100644 --- a/apps/files/src/views/FilesList.vue +++ b/apps/files/src/views/FilesList.vue @@ -76,15 +76,21 @@ :name="currentView?.emptyTitle || t('files', 'No files in here')" :description="currentView?.emptyCaption || t('files', 'Upload some content or sync with your devices!')" data-cy-files-content-empty> - <template #action> + <template v-if="dir !== '/'" #action> <!-- Uploader --> - <UploadPicker v-if="dir !== '/'" + <UploadPicker v-if="currentFolder && canUpload && !isQuotaExceeded" :content="dirContents" :destination="currentFolder" - :multiple="true" class="files-list__header-upload-button" + multiple @failed="onUploadFail" @uploaded="onUpload" /> + <NcButton v-else + :aria-label="t('files', 'Go to the previous folder')" + :to="toPreviousDir" + type="primary"> + {{ t('files', 'Go back') }} + </NcButton> </template> <template #icon> <NcIconSvgWrapper :svg="currentView.icon" /> @@ -353,6 +359,14 @@ export default defineComponent({ && this.loading }, + /** + * Route to the previous directory. + */ + toPreviousDir(): Route { + const dir = this.dir.split('/').slice(0, -1).join('/') || '/' + return { ...this.$route, query: { dir } } + }, + shareAttributes(): number[] | undefined { if (!this.currentFolder?.attributes?.['share-types']) { return undefined |