mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
feat(files): Show upload menu in folders' emptycontent
Signed-off-by: Marco <marcoambrosini@icloud.com>
This commit is contained in:
parent
a7a055726e
commit
1526a6f7c2
1 changed files with 8 additions and 14 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue