Browse Source
feat(files): Show upload menu in folders' emptycontent
Signed-off-by: Marco <marcoambrosini@icloud.com>
pull/44272/head
Marco
2 years ago
committed by
Ferdinand Thiessen
No known key found for this signature in database
GPG Key ID: 45FAE7268762B400
1 changed files with
8 additions and
14 deletions
-
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 |
|
|
|
|