mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 00:02:15 +00:00
EmptyFilePage refactoring
This commit is contained in:
@@ -11,10 +11,6 @@
|
||||
tabindex="-1"
|
||||
@click.self="filesContainerClick"
|
||||
>
|
||||
<!--Show empty page if no content-->
|
||||
<EmptyFilePage>
|
||||
<slot name="empty-file-page" />
|
||||
</EmptyFilePage>
|
||||
|
||||
<!--Item previews list-->
|
||||
<div v-if="isList" class="file-list-wrapper">
|
||||
@@ -61,22 +57,16 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import EmptyFilePage from '/resources/js/components/FilesView/EmptyFilePage'
|
||||
import EmptyMessage from '/resources/js/components/FilesView/EmptyMessage'
|
||||
import FileItemList from '/resources/js/components/FilesView/FileItemList'
|
||||
import FileItemGrid from '/resources/js/components/FilesView/FileItemGrid'
|
||||
import InfoSidebar from '/resources/js/components/FilesView/InfoSidebar'
|
||||
import {mapGetters} from 'vuex'
|
||||
import {events} from '/resources/js/bus'
|
||||
|
||||
export default {
|
||||
name: 'FileBrowser',
|
||||
components: {
|
||||
EmptyFilePage,
|
||||
FileItemList,
|
||||
FileItemGrid,
|
||||
EmptyMessage,
|
||||
InfoSidebar,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
|
||||
@@ -97,24 +97,24 @@
|
||||
</MobileActionButton>
|
||||
</FileActionsMobile>
|
||||
|
||||
<FileBrowser>
|
||||
<EmptyFilePage>
|
||||
<h1 class="title">
|
||||
{{ $t('empty_page.title') }}
|
||||
</h1>
|
||||
<p class="description">
|
||||
{{ $t('empty_page.description') }}
|
||||
</p>
|
||||
<ButtonUpload button-style="theme">
|
||||
{{ $t('empty_page.call_to_action') }}
|
||||
</ButtonUpload>
|
||||
</EmptyFilePage>
|
||||
|
||||
<template v-slot:empty-file-page>
|
||||
<h1 class="title">
|
||||
{{ $t('empty_page.title') }}
|
||||
</h1>
|
||||
<p class="description">
|
||||
{{ $t('empty_page.description') }}
|
||||
</p>
|
||||
<ButtonUpload button-style="theme">
|
||||
{{ $t('empty_page.call_to_action') }}
|
||||
</ButtonUpload>
|
||||
</template>
|
||||
</FileBrowser>
|
||||
<FileBrowser />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import EmptyFilePage from "../../components/FilesView/EmptyFilePage";
|
||||
import FileActionsMobile from "../../components/FilesView/FileActionsMobile";
|
||||
import MobileActionButtonUpload from '/resources/js/components/FilesView/MobileActionButtonUpload'
|
||||
import MobileMultiSelectToolbar from "/resources/js/components/FilesView/MobileMultiSelectToolbar"
|
||||
@@ -134,6 +134,7 @@
|
||||
export default {
|
||||
name: 'Files',
|
||||
components: {
|
||||
EmptyFilePage,
|
||||
FileActionsMobile,
|
||||
MobileActionButtonUpload,
|
||||
MobileMultiSelectToolbar,
|
||||
|
||||
@@ -63,11 +63,11 @@
|
||||
</MobileActionButton>
|
||||
</FileActionsMobile>
|
||||
|
||||
<FileBrowser>
|
||||
<template v-slot:empty-file-page>
|
||||
<h1 class="title">{{ $t('shared.empty_shared') }}</h1>
|
||||
</template>
|
||||
</FileBrowser>
|
||||
<EmptyFilePage>
|
||||
<h1 class="title">{{ $t('shared.empty_shared') }}</h1>
|
||||
</EmptyFilePage>
|
||||
|
||||
<FileBrowser />
|
||||
|
||||
<MobileMultiSelectToolbar>
|
||||
<ToolbarButton @click.native="$downloadSelection(item)" class="action-btn" source="download" :action="$t('actions.download')" />
|
||||
@@ -77,6 +77,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import EmptyFilePage from "../../components/FilesView/EmptyFilePage";
|
||||
import FileActionsMobile from "../../components/FilesView/FileActionsMobile";
|
||||
import MobileActionButtonUpload from '/resources/js/components/FilesView/MobileActionButtonUpload'
|
||||
import MobileActionButton from '/resources/js/components/FilesView/MobileActionButton'
|
||||
@@ -103,6 +104,7 @@
|
||||
ContextMenu,
|
||||
Option,
|
||||
FileActionsMobile,
|
||||
EmptyFilePage,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
|
||||
@@ -99,30 +99,31 @@
|
||||
</template>
|
||||
</FileActionsMobile>
|
||||
|
||||
<FileBrowser>
|
||||
<template v-slot:empty-file-page>
|
||||
<template v-if="$checkPermission('editor')">
|
||||
<h1 class="title">
|
||||
{{ $t('empty_page.title') }}
|
||||
</h1>
|
||||
<p class="description">
|
||||
{{ $t('empty_page.description') }}
|
||||
</p>
|
||||
<ButtonUpload button-style="theme">
|
||||
{{ $t('empty_page.call_to_action') }}
|
||||
</ButtonUpload>
|
||||
</template>
|
||||
<template v-if="$checkPermission('visitor')">
|
||||
<h1 class="title">
|
||||
{{ $t('empty_page.title') }}
|
||||
</h1>
|
||||
</template>
|
||||
<EmptyFilePage>
|
||||
<template v-if="$checkPermission('editor')">
|
||||
<h1 class="title">
|
||||
{{ $t('empty_page.title') }}
|
||||
</h1>
|
||||
<p class="description">
|
||||
{{ $t('empty_page.description') }}
|
||||
</p>
|
||||
<ButtonUpload button-style="theme">
|
||||
{{ $t('empty_page.call_to_action') }}
|
||||
</ButtonUpload>
|
||||
</template>
|
||||
</FileBrowser>
|
||||
<template v-if="$checkPermission('visitor')">
|
||||
<h1 class="title">
|
||||
{{ $t('empty_page.title') }}
|
||||
</h1>
|
||||
</template>
|
||||
</EmptyFilePage>
|
||||
|
||||
<FileBrowser />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import EmptyFilePage from "../../components/FilesView/EmptyFilePage";
|
||||
import FileActionsMobile from "../../components/FilesView/FileActionsMobile";
|
||||
import MobileMultiSelectToolbar from "/resources/js/components/FilesView/MobileMultiSelectToolbar"
|
||||
import MobileActionButton from '/resources/js/components/FilesView/MobileActionButton'
|
||||
@@ -153,6 +154,7 @@
|
||||
ContextMenu,
|
||||
Option,
|
||||
FileActionsMobile,
|
||||
EmptyFilePage,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
|
||||
@@ -57,19 +57,19 @@
|
||||
</MobileActionButton>
|
||||
</FileActionsMobile>
|
||||
|
||||
<FileBrowser>
|
||||
<template v-slot:empty-file-page>
|
||||
<h1 class="title">
|
||||
{{ $t('empty_page.title') }}
|
||||
</h1>
|
||||
<p class="description">
|
||||
{{ $t('empty_page.description') }}
|
||||
</p>
|
||||
<ButtonUpload button-style="theme">
|
||||
{{ $t('empty_page.call_to_action') }}
|
||||
</ButtonUpload>
|
||||
</template>
|
||||
</FileBrowser>
|
||||
<EmptyFilePage>
|
||||
<h1 class="title">
|
||||
{{ $t('empty_page.title') }}
|
||||
</h1>
|
||||
<p class="description">
|
||||
{{ $t('empty_page.description') }}
|
||||
</p>
|
||||
<ButtonUpload button-style="theme">
|
||||
{{ $t('empty_page.call_to_action') }}
|
||||
</ButtonUpload>
|
||||
</EmptyFilePage>
|
||||
|
||||
<FileBrowser />
|
||||
|
||||
<MobileMultiSelectToolbar>
|
||||
<ToolbarButton @click.native="$deleteFileOrFolder(clipboard)" class="action-btn" source="trash" :class="{'is-inactive' : clipboard.length < 1}" :action="$t('actions.delete')" />
|
||||
@@ -79,6 +79,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import EmptyFilePage from "../../components/FilesView/EmptyFilePage";
|
||||
import FileActionsMobile from "../../components/FilesView/FileActionsMobile";
|
||||
import MobileActionButtonUpload from '/resources/js/components/FilesView/MobileActionButtonUpload'
|
||||
import MobileActionButton from '/resources/js/components/FilesView/MobileActionButton'
|
||||
@@ -107,6 +108,7 @@
|
||||
ContextMenu,
|
||||
Option,
|
||||
FileActionsMobile,
|
||||
EmptyFilePage,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
|
||||
@@ -75,44 +75,45 @@
|
||||
</MobileActionButton>
|
||||
</FileActionsMobile>
|
||||
|
||||
<FileBrowser>
|
||||
<template v-slot:empty-file-page>
|
||||
<EmptyFilePage>
|
||||
|
||||
<!--Homepage-->
|
||||
<template v-if="isTeamFolderHomepage">
|
||||
<h1 class="title">
|
||||
{{ $t('Nothing shared with you') }}
|
||||
</h1>
|
||||
<p class="description">
|
||||
{{ $t('All items that are shared with you will be visible here.') }}
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<!--Empty folder wit can-edit privileges -->
|
||||
<template v-if="canEdit && ! isTeamFolderHomepage">
|
||||
<h1 class="title">
|
||||
{{ $t('empty_page.title') }}
|
||||
</h1>
|
||||
<p class="description">
|
||||
{{ $t('empty_page.description') }}
|
||||
</p>
|
||||
<ButtonUpload button-style="theme">
|
||||
{{ $t('empty_page.call_to_action') }}
|
||||
</ButtonUpload>
|
||||
</template>
|
||||
|
||||
<!--Empty folder wit can-view privileges -->
|
||||
<template v-if="! canEdit && ! isTeamFolderHomepage">
|
||||
<h1 class="title">
|
||||
{{ $t('There is Nothing Yet') }}
|
||||
</h1>
|
||||
</template>
|
||||
<!--Homepage-->
|
||||
<template v-if="isTeamFolderHomepage">
|
||||
<h1 class="title">
|
||||
{{ $t('Nothing shared with you') }}
|
||||
</h1>
|
||||
<p class="description">
|
||||
{{ $t('All items that are shared with you will be visible here.') }}
|
||||
</p>
|
||||
</template>
|
||||
</FileBrowser>
|
||||
|
||||
<!--Empty folder wit can-edit privileges -->
|
||||
<template v-if="canEdit && ! isTeamFolderHomepage">
|
||||
<h1 class="title">
|
||||
{{ $t('empty_page.title') }}
|
||||
</h1>
|
||||
<p class="description">
|
||||
{{ $t('empty_page.description') }}
|
||||
</p>
|
||||
<ButtonUpload button-style="theme">
|
||||
{{ $t('empty_page.call_to_action') }}
|
||||
</ButtonUpload>
|
||||
</template>
|
||||
|
||||
<!--Empty folder wit can-view privileges -->
|
||||
<template v-if="! canEdit && ! isTeamFolderHomepage">
|
||||
<h1 class="title">
|
||||
{{ $t('There is Nothing Yet') }}
|
||||
</h1>
|
||||
</template>
|
||||
</EmptyFilePage>
|
||||
|
||||
<FileBrowser />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import EmptyFilePage from "../../components/FilesView/EmptyFilePage";
|
||||
import FileActionsMobile from "../../components/FilesView/FileActionsMobile";
|
||||
import MobileActionButtonUpload from '/resources/js/components/FilesView/MobileActionButtonUpload'
|
||||
import MobileMultiSelectToolbar from "/resources/js/components/FilesView/MobileMultiSelectToolbar"
|
||||
@@ -149,6 +150,7 @@
|
||||
ButtonBase,
|
||||
Option,
|
||||
FileActionsMobile,
|
||||
EmptyFilePage,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
|
||||
@@ -98,38 +98,38 @@
|
||||
</MobileActionButton>
|
||||
</FileActionsMobile>
|
||||
|
||||
<FileBrowser>
|
||||
<template v-slot:empty-file-page>
|
||||
|
||||
<template v-if="isTeamFolderHomepage">
|
||||
<h1 class="title">
|
||||
{{ $t('Create your Team Folder') }}
|
||||
</h1>
|
||||
<p class="description">
|
||||
{{ $t('Share your files with your team easily by creating new team folder.') }}
|
||||
</p>
|
||||
<ButtonBase @click.native="$createTeamFolder" button-style="theme" class="m-center">
|
||||
{{ $t('Create Team Folder') }}
|
||||
</ButtonBase>
|
||||
</template>
|
||||
|
||||
<template v-if="! isTeamFolderHomepage">
|
||||
<h1 class="title">
|
||||
{{ $t('empty_page.title') }}
|
||||
</h1>
|
||||
<p class="description">
|
||||
{{ $t('empty_page.description') }}
|
||||
</p>
|
||||
<ButtonUpload button-style="theme">
|
||||
{{ $t('empty_page.call_to_action') }}
|
||||
</ButtonUpload>
|
||||
</template>
|
||||
<EmptyFilePage>
|
||||
<template v-if="isTeamFolderHomepage">
|
||||
<h1 class="title">
|
||||
{{ $t('Create your Team Folder') }}
|
||||
</h1>
|
||||
<p class="description">
|
||||
{{ $t('Share your files with your team easily by creating new team folder.') }}
|
||||
</p>
|
||||
<ButtonBase @click.native="$createTeamFolder" button-style="theme" class="m-center">
|
||||
{{ $t('Create Team Folder') }}
|
||||
</ButtonBase>
|
||||
</template>
|
||||
</FileBrowser>
|
||||
|
||||
<template v-if="! isTeamFolderHomepage">
|
||||
<h1 class="title">
|
||||
{{ $t('empty_page.title') }}
|
||||
</h1>
|
||||
<p class="description">
|
||||
{{ $t('empty_page.description') }}
|
||||
</p>
|
||||
<ButtonUpload button-style="theme">
|
||||
{{ $t('empty_page.call_to_action') }}
|
||||
</ButtonUpload>
|
||||
</template>
|
||||
</EmptyFilePage>
|
||||
|
||||
<FileBrowser />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import EmptyFilePage from "../../components/FilesView/EmptyFilePage";
|
||||
import FileActionsMobile from "../../components/FilesView/FileActionsMobile";
|
||||
import MobileActionButtonUpload from '/resources/js/components/FilesView/MobileActionButtonUpload'
|
||||
import MobileMultiSelectToolbar from "/resources/js/components/FilesView/MobileMultiSelectToolbar"
|
||||
@@ -166,6 +166,7 @@
|
||||
ButtonBase,
|
||||
Option,
|
||||
FileActionsMobile,
|
||||
EmptyFilePage,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
|
||||
@@ -60,11 +60,11 @@
|
||||
</MobileActionButton>
|
||||
</FileActionsMobile>
|
||||
|
||||
<FileBrowser>
|
||||
<template v-slot:empty-file-page>
|
||||
<h1 class="title">{{ $t('empty_page.title') }}</h1>
|
||||
</template>
|
||||
</FileBrowser>
|
||||
<EmptyFilePage>
|
||||
<h1 class="title">{{ $t('empty_page.title') }}</h1>
|
||||
</EmptyFilePage>
|
||||
|
||||
<FileBrowser />
|
||||
|
||||
<MobileMultiSelectToolbar>
|
||||
<ToolbarButton @click.native="$deleteFileOrFolder(clipboard)" class="action-btn" source="trash" :class="{'is-inactive' : clipboard.length < 1}" :action="$t('actions.delete')" />
|
||||
@@ -74,6 +74,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import EmptyFilePage from "../../components/FilesView/EmptyFilePage";
|
||||
import FileActionsMobile from "../../components/FilesView/FileActionsMobile";
|
||||
import MobileActionButtonUpload from '/resources/js/components/FilesView/MobileActionButtonUpload'
|
||||
import MobileActionButton from '/resources/js/components/FilesView/MobileActionButton'
|
||||
@@ -100,6 +101,7 @@
|
||||
ContextMenu,
|
||||
Option,
|
||||
FileActionsMobile,
|
||||
EmptyFilePage,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
|
||||
Reference in New Issue
Block a user