mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-28 19:10:40 +00:00
empty page refactored
This commit is contained in:
@@ -45,11 +45,23 @@
|
||||
<template v-slot:file-actions-mobile>
|
||||
<!-- todo: Implement mobile buttons-->
|
||||
</template>
|
||||
|
||||
<template v-slot:empty-file-page>
|
||||
<h1 class="title">{{ $t('empty_page.title') }}</h1>
|
||||
<p v-if="$checkPermission(['master', 'editor'])" class="description">{{ $t('empty_page.description') }}</p>
|
||||
<ButtonUpload
|
||||
v-if="$checkPermission(['master', 'editor'])"
|
||||
button-style="theme"
|
||||
>
|
||||
{{ $t('empty_page.call_to_action') }}
|
||||
</ButtonUpload>
|
||||
</template>
|
||||
</FileBrowser>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ButtonUpload from '/resources/js/components/FilesView/ButtonUpload'
|
||||
import FileBrowser from '/resources/js/components/FilesView/FileBrowser'
|
||||
import ContextMenu from '/resources/js/components/FilesView/ContextMenu'
|
||||
import OptionGroup from '/resources/js/components/FilesView/OptionGroup'
|
||||
@@ -60,6 +72,7 @@
|
||||
export default {
|
||||
name: 'Files',
|
||||
components: {
|
||||
ButtonUpload,
|
||||
OptionGroup,
|
||||
FileBrowser,
|
||||
ContextMenu,
|
||||
|
||||
@@ -37,6 +37,10 @@
|
||||
<template v-slot:file-actions-mobile>
|
||||
<!-- todo: Implement mobile buttons-->
|
||||
</template>
|
||||
|
||||
<template v-slot:empty-file-page>
|
||||
<h1 class="title">{{ $t('shared.empty_shared') }}</h1>
|
||||
</template>
|
||||
</FileBrowser>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -36,6 +36,10 @@
|
||||
<template v-slot:file-actions-mobile>
|
||||
<!-- todo: Implement mobile buttons-->
|
||||
</template>
|
||||
|
||||
<template v-slot:empty-file-page>
|
||||
<h1 class="title">{{ $t('empty_page.title') }}</h1>
|
||||
</template>
|
||||
</FileBrowser>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -100,8 +100,6 @@
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'config',
|
||||
'homeDirectory',
|
||||
'currentFolder',
|
||||
'clipboard',
|
||||
'config',
|
||||
|
||||
@@ -64,25 +64,14 @@
|
||||
return this.navigation ? this.navigation[0].folders : undefined
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
homeDirectory: undefined,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goHome() {
|
||||
this.$store.dispatch('browseShared', [{folder: this.homeDirectory, back: false, init: true}])
|
||||
this.$store.dispatch('browseShared')
|
||||
},
|
||||
contextMenu(event, item) {
|
||||
events.$emit('contextMenu:show', event, item)
|
||||
},
|
||||
initFileBrowser() {
|
||||
this.homeDirectory = {
|
||||
id: this.sharedDetail.item_id,
|
||||
name: this.$t('locations.home'),
|
||||
location: 'public',
|
||||
}
|
||||
|
||||
// Get folder tree
|
||||
this.$store.dispatch('getFolderTree')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user