mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-06 02:33:48 +00:00
empty page refactored
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
"/chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~chunks/~3e4fdd8b.js": "/chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~chunks/~3e4fdd8b.js?id=d36b3eb20b4899f2d899",
|
||||
"/chunks/admin~chunks/files~chunks/platform~chunks/shared~chunks/shared/file-browser.js": "/chunks/admin~chunks/files~chunks/platform~chunks/shared~chunks/shared/file-browser.js?id=c4764a39a8045b039a47",
|
||||
"/chunks/admin~chunks/files~chunks/settings~chunks/shared/file-browser.js": "/chunks/admin~chunks/files~chunks/settings~chunks/shared/file-browser.js?id=6632ba96ef28b8ec0c98",
|
||||
"/chunks/admin~chunks/platform.js": "/chunks/admin~chunks/platform.js?id=6ecc8cc8a2134eb223b5",
|
||||
"/chunks/admin~chunks/platform.js": "/chunks/admin~chunks/platform.js?id=383e66eea761fbf3ae9c",
|
||||
"/chunks/admin~chunks/platform~chunks/settings~chunks/shared.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.js?id=a80b8af62fd725c60bdb",
|
||||
"/chunks/admin~chunks/platform~chunks/shared.js": "/chunks/admin~chunks/platform~chunks/shared.js?id=673ff118200894d37cd5",
|
||||
"/chunks/app-appearance.js": "/chunks/app-appearance.js?id=5f8d3e698c1fd5b9b5a5",
|
||||
@@ -36,7 +36,7 @@
|
||||
"/chunks/dynamic-page.js": "/chunks/dynamic-page.js?id=1e02112873d0b86eb1ac",
|
||||
"/chunks/email-verified.js": "/chunks/email-verified.js?id=dc4aa33310fc98be6749",
|
||||
"/chunks/environment-setup.js": "/chunks/environment-setup.js?id=a547f8b4e9a83935a777",
|
||||
"/chunks/files.js": "/chunks/files.js?id=f932bee23cc859fb0fd3",
|
||||
"/chunks/files.js": "/chunks/files.js?id=69952994c602c0faa4f1",
|
||||
"/chunks/files~chunks/platform~chunks/shared/file-browser.js": "/chunks/files~chunks/platform~chunks/shared/file-browser.js?id=4711dbca9d83d061561c",
|
||||
"/chunks/files~chunks/platform~chunks/shared~chunks/shared/file-browser.js": "/chunks/files~chunks/platform~chunks/shared~chunks/shared/file-browser.js?id=74456138b2b60df5cb0d",
|
||||
"/chunks/files~chunks/platform~chunks/shared~chunks/shared/file-browser~chunks/shared/single-file.js": "/chunks/files~chunks/platform~chunks/shared~chunks/shared/file-browser~chunks/shared/single-file.js?id=a831ffd52ccae7b0b983",
|
||||
@@ -56,7 +56,7 @@
|
||||
"/chunks/plan-settings.js": "/chunks/plan-settings.js?id=17469545c5b6a16c3bbf",
|
||||
"/chunks/plan-subscribers.js": "/chunks/plan-subscribers.js?id=0dd0a5efe0e3cb511c48",
|
||||
"/chunks/plans.js": "/chunks/plans.js?id=5a3c28288952fcad96e5",
|
||||
"/chunks/platform.js": "/chunks/platform.js?id=ac3117837560f59645c5",
|
||||
"/chunks/platform.js": "/chunks/platform.js?id=aac851b167c665d19d7e",
|
||||
"/chunks/platform~chunks/shared.js": "/chunks/platform~chunks/shared.js?id=3434322e91f37e1887a6",
|
||||
"/chunks/profile.js": "/chunks/profile.js?id=658aa03af778cc2cc100",
|
||||
"/chunks/profile~chunks/settings-password.js": "/chunks/profile~chunks/settings-password.js?id=ddb7be518c092ed392ca",
|
||||
@@ -72,7 +72,7 @@
|
||||
"/chunks/setup-wizard.js": "/chunks/setup-wizard.js?id=8a499266af9527039582",
|
||||
"/chunks/shared.js": "/chunks/shared.js?id=5cd19a2f00303f1937e7",
|
||||
"/chunks/shared/authenticate.js": "/chunks/shared/authenticate.js?id=30b0b0d1930a1952648a",
|
||||
"/chunks/shared/file-browser.js": "/chunks/shared/file-browser.js?id=cf5842c6856902e2aaf8",
|
||||
"/chunks/shared/file-browser.js": "/chunks/shared/file-browser.js?id=fe7e3845f232b71ee329",
|
||||
"/chunks/shared/single-file.js": "/chunks/shared/single-file.js?id=b733dc84cd8e05a8f6f3",
|
||||
"/chunks/sign-in.js": "/chunks/sign-in.js?id=d5eed76acdad4d2c0b9b",
|
||||
"/chunks/sign-up.js": "/chunks/sign-up.js?id=f092210474e42bfd4525",
|
||||
@@ -113,7 +113,7 @@
|
||||
"/chunks/app-language~chunks/dashboard~chunks/invoices~chunks/pages~chunks/plans~chunks/platform~chunk~4546fed3.js": "/chunks/app-language~chunks/dashboard~chunks/invoices~chunks/pages~chunks/plans~chunks/platform~chunk~4546fed3.js?id=dcb0f3eb29f9bb036a83",
|
||||
"/chunks/app-language~chunks/dashboard~chunks/invoices~chunks/pages~chunks/plans~chunks/settings~chunk~4e1df859.js": "/chunks/app-language~chunks/dashboard~chunks/invoices~chunks/pages~chunks/plans~chunks/settings~chunk~4e1df859.js?id=ce01da2eb15ee1ebede4",
|
||||
"/chunks/files.61f541e551bb6ae551ff.hot-update.js": "/chunks/files.61f541e551bb6ae551ff.hot-update.js",
|
||||
"/chunks/platform~chunks/shared/file-browser.js": "/chunks/platform~chunks/shared/file-browser.js?id=1fbc199879f3dc7525db",
|
||||
"/chunks/platform~chunks/shared/file-browser.js": "/chunks/platform~chunks/shared/file-browser.js?id=a86bdb2b38d254a62eab",
|
||||
"/chunks/platform~chunks/shared~chunks/shared/file-browser.js": "/chunks/platform~chunks/shared~chunks/shared/file-browser.js?id=6ba92eab6a45cbab3af5",
|
||||
"/chunks/platform~chunks/shared~chunks/shared/file-browser~chunks/shared/single-file.js": "/chunks/platform~chunks/shared~chunks/shared/file-browser~chunks/shared/single-file.js?id=c9e60ce6e02af680eeaa",
|
||||
"/chunks/settings-subscription~chunks/shared/file-browser~chunks/user-subscription.js": "/chunks/settings-subscription~chunks/shared/file-browser~chunks/user-subscription.js?id=439e216b216fc2572483",
|
||||
@@ -311,10 +311,10 @@
|
||||
"/chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared~chunks/share~aaaa339d.js": "/chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared~chunks/share~aaaa339d.js?id=593b877c4ab874ceccfe",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/settings-subscription~chunks/shared~5df0355d.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/settings-subscription~chunks/shared~5df0355d.js?id=00e9511436f16aa2fb9f",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/shared/s~b80f3c10.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/shared/s~b80f3c10.js?id=b8f5bee79fa82cda17e2",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.js?id=2cd2ace8496e54da8138",
|
||||
"/chunks/my-shared-items.js": "/chunks/my-shared-items.js?id=1d444ac680acf19e977b",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.js?id=03ca5b9af8e64371d757",
|
||||
"/chunks/my-shared-items.js": "/chunks/my-shared-items.js?id=be67042ecb66b980c058",
|
||||
"/chunks/recent-uploads.e3ff88b07311820bcc70.hot-update.js": "/chunks/recent-uploads.e3ff88b07311820bcc70.hot-update.js",
|
||||
"/chunks/trash.js": "/chunks/trash.js?id=f12c3a66766e1356a7fd",
|
||||
"/chunks/trash.js": "/chunks/trash.js?id=e3b67a1768063dd1fe11",
|
||||
"/vendors~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared~chun~57b3f416.js": "/vendors~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared~chun~57b3f416.js?id=97d6f92560813d690f24",
|
||||
"/chunks/platform.5389987c296bbc0f9256.hot-update.js": "/chunks/platform.5389987c296bbc0f9256.hot-update.js",
|
||||
"/chunks/trash.0c591e25c8bd11631179.hot-update.js": "/chunks/trash.0c591e25c8bd11631179.hot-update.js",
|
||||
@@ -521,5 +521,26 @@
|
||||
"/chunks/trash.bed6af90c3a9e2126b58.hot-update.js": "/chunks/trash.bed6af90c3a9e2126b58.hot-update.js",
|
||||
"/chunks/recent-uploads.4c63b1d02554ed9c7f31.hot-update.js": "/chunks/recent-uploads.4c63b1d02554ed9c7f31.hot-update.js",
|
||||
"/chunks/my-shared-items.778e16dba085a8138fe3.hot-update.js": "/chunks/my-shared-items.778e16dba085a8138fe3.hot-update.js",
|
||||
"/chunks/files.5efa847b1820145f722c.hot-update.js": "/chunks/files.5efa847b1820145f722c.hot-update.js"
|
||||
"/chunks/files.5efa847b1820145f722c.hot-update.js": "/chunks/files.5efa847b1820145f722c.hot-update.js",
|
||||
"/chunks/files.e8db378c36ba471a973e.hot-update.js": "/chunks/files.e8db378c36ba471a973e.hot-update.js",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.efba6d2a7e92e501b537.hot-update.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.efba6d2a7e92e501b537.hot-update.js",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.e05ecd4f1f578de57dbd.hot-update.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.e05ecd4f1f578de57dbd.hot-update.js",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.395e602ebf688b629225.hot-update.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.395e602ebf688b629225.hot-update.js",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.49c8e0cc8f931f4f83d5.hot-update.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.49c8e0cc8f931f4f83d5.hot-update.js",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.1dfeb529f98e0d915fde.hot-update.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.1dfeb529f98e0d915fde.hot-update.js",
|
||||
"/chunks/my-shared-items.245cc73d2f07a64f63e7.hot-update.js": "/chunks/my-shared-items.245cc73d2f07a64f63e7.hot-update.js",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.27bd99df421db24fcb05.hot-update.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.27bd99df421db24fcb05.hot-update.js",
|
||||
"/chunks/trash.27bd99df421db24fcb05.hot-update.js": "/chunks/trash.27bd99df421db24fcb05.hot-update.js",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.4bd5c0134ff57e0a7262.hot-update.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.4bd5c0134ff57e0a7262.hot-update.js",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.aab6c2834127eb132a54.hot-update.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.aab6c2834127eb132a54.hot-update.js",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.e8b1d074dfff1a8fba5b.hot-update.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.e8b1d074dfff1a8fba5b.hot-update.js",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.8f9351b16faed06facb8.hot-update.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.8f9351b16faed06facb8.hot-update.js",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.01818794da7729b08fb0.hot-update.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.01818794da7729b08fb0.hot-update.js",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.6cbfff344a44173b2ad1.hot-update.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.6cbfff344a44173b2ad1.hot-update.js",
|
||||
"/chunks/shared/file-browser.c729ef2b7266b3448df0.hot-update.js": "/chunks/shared/file-browser.c729ef2b7266b3448df0.hot-update.js",
|
||||
"/js/main.a66331813c64be592be5.hot-update.js": "/js/main.a66331813c64be592be5.hot-update.js",
|
||||
"/chunks/admin~chunks/platform.a66331813c64be592be5.hot-update.js": "/chunks/admin~chunks/platform.a66331813c64be592be5.hot-update.js",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.a66331813c64be592be5.hot-update.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.a66331813c64be592be5.hot-update.js",
|
||||
"/chunks/platform.a66331813c64be592be5.hot-update.js": "/chunks/platform.a66331813c64be592be5.hot-update.js",
|
||||
"/chunks/platform~chunks/shared/file-browser.a66331813c64be592be5.hot-update.js": "/chunks/platform~chunks/shared/file-browser.a66331813c64be592be5.hot-update.js"
|
||||
}
|
||||
|
||||
@@ -121,8 +121,6 @@
|
||||
'isVisibleSidebar',
|
||||
'FilePreviewType',
|
||||
'currentFolder',
|
||||
'browseHistory',
|
||||
'homeDirectory',
|
||||
'clipboard',
|
||||
]),
|
||||
isLoadedFolder() {
|
||||
|
||||
@@ -1,31 +1,10 @@
|
||||
<template>
|
||||
<div class="empty-page" v-if="isLoading || isEmpty">
|
||||
<div class="empty-state">
|
||||
|
||||
<!--Shared empty message-->
|
||||
<div class="text-content" v-if="$isThisLocation(['shared']) && ! isLoading">
|
||||
<h1 class="title">{{ $t('shared.empty_shared') }}</h1>
|
||||
<div v-if="!isLoading" class="text-content">
|
||||
<slot></slot>
|
||||
</div>
|
||||
|
||||
<!--Trash empty message-->
|
||||
<div class="text-content" v-if="$isThisLocation(['trash', 'trash-root']) && ! isLoading">
|
||||
<h1 class="title">{{ $t('empty_page.title') }}</h1>
|
||||
</div>
|
||||
|
||||
<!--Base file browser empty message-->
|
||||
<div class="text-content" v-if="$isThisLocation(['base', 'public', 'latest']) && !isLoading">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<!--Spinner-->
|
||||
<div class="text-content" v-if="isLoading">
|
||||
<div v-else class="text-content">
|
||||
<Spinner />
|
||||
</div>
|
||||
</div>
|
||||
@@ -33,23 +12,16 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ButtonUpload from '/resources/js/components/FilesView/ButtonUpload'
|
||||
import Spinner from '/resources/js/components/FilesView/Spinner'
|
||||
import {mapGetters} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'EmptyFilePage',
|
||||
props: [
|
||||
'title',
|
||||
'description'
|
||||
],
|
||||
components: {
|
||||
ButtonUpload,
|
||||
Spinner,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'currentFolder',
|
||||
'isLoading',
|
||||
'entries',
|
||||
]),
|
||||
|
||||
@@ -20,9 +20,14 @@
|
||||
|
||||
<!--Mobile Actions-->
|
||||
<FileActionsMobile>
|
||||
<slot name="file-actions-mobile"></slot>
|
||||
<slot name="file-actions-mobile" />
|
||||
</FileActionsMobile>
|
||||
|
||||
<!--Show empty page if no content-->
|
||||
<EmptyFilePage>
|
||||
<slot name="empty-file-page" />
|
||||
</EmptyFilePage>
|
||||
|
||||
<!--Item previews list-->
|
||||
<div v-if="isList" class="file-list-wrapper">
|
||||
<transition-group
|
||||
@@ -64,9 +69,6 @@
|
||||
/>
|
||||
</transition-group>
|
||||
</div>
|
||||
|
||||
<!--Show empty page if folder is empty-->
|
||||
<EmptyFilePage />
|
||||
</div>
|
||||
|
||||
<!--File Info Panel-->
|
||||
|
||||
@@ -29,14 +29,9 @@ export default {
|
||||
MenuMobile,
|
||||
Option,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'homeDirectory'
|
||||
]),
|
||||
},
|
||||
methods: {
|
||||
goToFiles() {
|
||||
this.$store.dispatch('getFolder', [{folder: this.homeDirectory, back: false, init: true}])
|
||||
this.$store.dispatch('getFolder')
|
||||
},
|
||||
goToLatest() {
|
||||
this.$store.dispatch('getLatest')
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
<!-- Go back-->
|
||||
<div @click="goBack" class="go-back-button">
|
||||
<chevron-left-icon size="17" class="icon-back" :class="{'is-visible': browseHistory.length > 1}" />
|
||||
<chevron-left-icon size="17" class="icon-back" :class="{'is-visible': isLoadedFolder }" />
|
||||
|
||||
<!--Folder Title-->
|
||||
<div class="directory-name">
|
||||
@@ -26,7 +26,6 @@
|
||||
import { MenuIcon, ChevronLeftIcon } from 'vue-feather-icons'
|
||||
import {mapGetters} from 'vuex'
|
||||
import {events} from '/resources/js/bus'
|
||||
import {last} from 'lodash'
|
||||
|
||||
export default {
|
||||
name: 'MobileToolBar',
|
||||
@@ -41,39 +40,34 @@
|
||||
'isVisibleSidebar',
|
||||
'FilePreviewType',
|
||||
'currentFolder',
|
||||
'browseHistory',
|
||||
'homeDirectory',
|
||||
]),
|
||||
directoryName() {
|
||||
return this.currentFolder ? this.currentFolder.name : this.homeDirectory.name
|
||||
}
|
||||
directoryName() {
|
||||
if (this.currentFolder) {
|
||||
return this.currentFolder.name
|
||||
} else {
|
||||
return {
|
||||
'RecentUploads': this.$t('Recent'),
|
||||
'MySharedItems': this.$t('Shared'),
|
||||
'Trash': this.$t('Trash'),
|
||||
'Public': this.$t('Files'),
|
||||
'Files': this.$t('Files'),
|
||||
}[this.$route.name]
|
||||
}
|
||||
},
|
||||
isLoadedFolder() {
|
||||
return this.$route.params.id
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
showMobileNavigation() {
|
||||
events.$emit('mobile-menu:show', 'user-navigation')
|
||||
events.$emit('mobileSelecting:stop')
|
||||
},
|
||||
goBack() {
|
||||
let previousFolder = last(this.browseHistory)
|
||||
|
||||
if (previousFolder.location === 'trash-root') {
|
||||
this.$store.dispatch('getTrash')
|
||||
|
||||
} else if (previousFolder.location === 'shared') {
|
||||
this.$store.dispatch('getShared')
|
||||
|
||||
} else {
|
||||
|
||||
if ( this.$isThisLocation('public') ) {
|
||||
this.$store.dispatch('browseShared', [{folder: previousFolder, back: true, init: false}])
|
||||
} else {
|
||||
this.$store.dispatch('getFolder', [{folder: previousFolder, back: true, init: false}])
|
||||
}
|
||||
}
|
||||
},
|
||||
goBack() {
|
||||
if (this.isLoadedFolder) this.$router.back()
|
||||
},
|
||||
},
|
||||
created() {
|
||||
// Listen for hide sidebar
|
||||
events.$on('show:content', () => {
|
||||
if (this.isSidebarMenu) this.isSidebarMenu = false
|
||||
})
|
||||
|
||||
@@ -72,7 +72,6 @@
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'homeDirectory',
|
||||
'config',
|
||||
'user',
|
||||
]),
|
||||
@@ -105,7 +104,7 @@
|
||||
if (this.$route.name !== 'Files')
|
||||
this.$router.push({name: 'Files'})
|
||||
|
||||
this.$store.dispatch('getFolder', [{folder: this.homeDirectory, back: false, init: true}])
|
||||
this.$store.dispatch('getFolder')
|
||||
},
|
||||
logOut() {
|
||||
this.$store.dispatch('logOut')
|
||||
|
||||
3
resources/js/store/modules/app.js
vendored
3
resources/js/store/modules/app.js
vendored
@@ -7,7 +7,6 @@ const defaultState = {
|
||||
FilePreviewType: localStorage.getItem('preview_type') || 'list',
|
||||
config: undefined,
|
||||
index: undefined,
|
||||
homeDirectory: undefined,
|
||||
requestedPlan: undefined,
|
||||
emojis: undefined,
|
||||
sorting: {
|
||||
@@ -1029,7 +1028,6 @@ const mutations = {
|
||||
},
|
||||
INIT(state, data) {
|
||||
state.config = data.config
|
||||
state.homeDirectory = data.rootDirectory
|
||||
},
|
||||
SET_SAAS(state, data) {
|
||||
state.config.isSaaS = data
|
||||
@@ -1064,7 +1062,6 @@ const getters = {
|
||||
teamPermissions: state => state.teamPermissions,
|
||||
FilePreviewType: state => state.FilePreviewType,
|
||||
expirationList: state => state.expirationList,
|
||||
homeDirectory: state => state.homeDirectory,
|
||||
requestedPlan: state => state.requestedPlan,
|
||||
currencyList: state => state.currencyList,
|
||||
countries: state => state.countries,
|
||||
|
||||
2
resources/js/store/modules/fileBrowser.js
vendored
2
resources/js/store/modules/fileBrowser.js
vendored
@@ -9,7 +9,6 @@ const defaultState = {
|
||||
fastPreview: undefined,
|
||||
navigation: undefined,
|
||||
isLoading: true,
|
||||
browseHistory: [],
|
||||
clipboard: [],
|
||||
entries: [],
|
||||
}
|
||||
@@ -189,7 +188,6 @@ const mutations = {
|
||||
|
||||
const getters = {
|
||||
currentFolder: state => state.currentFolder,
|
||||
browseHistory: state => state.browseHistory,
|
||||
fastPreview: state => state.fastPreview,
|
||||
navigation: state => state.navigation,
|
||||
clipboard: state => state.clipboard,
|
||||
|
||||
4
resources/js/store/modules/fileFunctions.js
vendored
4
resources/js/store/modules/fileFunctions.js
vendored
@@ -333,9 +333,9 @@ const actions = {
|
||||
if (data.id === getters.currentFolder.id) {
|
||||
|
||||
if (getters.currentFolder.location === 'public') {
|
||||
dispatch('browseShared', [{folder: last(getters.browseHistory), back: true, init: false}])
|
||||
dispatch('browseShared')
|
||||
} else {
|
||||
dispatch('getFolder', [{folder: last(getters.browseHistory), back: true, init: false}])
|
||||
dispatch('getFolder')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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