empty page refactored

This commit is contained in:
Peter Papp
2021-08-20 17:51:58 +02:00
parent b5a8fe8b1a
commit b23259309c
15 changed files with 85 additions and 101 deletions
+13
View File
@@ -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>
+4
View File
@@ -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>
-2
View File
@@ -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')