diff options
author | Marco <marcoambrosini@icloud.com> | 2024-03-18 12:55:23 +0100 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-05-29 14:44:57 +0200 |
commit | 1526a6f7c201a383fb6c41601dcbf8ec5f61fc2d (patch) | |
tree | 71527967b151ee9fa33e92c3b407ac32b3fa8e14 /apps | |
parent | a7a055726edd366db4092c6c43b778c19f55f63f (diff) | |
download | nextcloud-server-1526a6f7c201a383fb6c41601dcbf8ec5f61fc2d.tar.gz nextcloud-server-1526a6f7c201a383fb6c41601dcbf8ec5f61fc2d.zip |
feat(files): Show upload menu in folders' emptycontent
Signed-off-by: Marco <marcoambrosini@icloud.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/src/views/FilesList.vue | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/apps/files/src/views/FilesList.vue b/apps/files/src/views/FilesList.vue index 2df6ce10ec2..b40af040984 100644 --- a/apps/files/src/views/FilesList.vue +++ b/apps/files/src/views/FilesList.vue @@ -77,12 +77,14 @@ :description="currentView?.emptyCaption || t('files', 'Upload some content or sync with your devices!')" data-cy-files-content-empty> <template #action> - <NcButton v-if="dir !== '/'" - :aria-label="t('files', 'Go to the previous folder')" - type="primary" - :to="toPreviousDir"> - {{ t('files', 'Go back') }} - </NcButton> + <!-- Uploader --> + <UploadPicker v-if="dir !== '/'" + :content="dirContents" + :destination="currentFolder" + :multiple="true" + class="files-list__header-upload-button" + @failed="onUploadFail" + @uploaded="onUpload" /> </template> <template #icon> <NcIconSvgWrapper :svg="currentView.icon" /> @@ -351,14 +353,6 @@ 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 |