mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 16:22:14 +00:00
- mobile create menu
This commit is contained in:
36
resources/js/components/FilesView/CreateListMobile.vue
Normal file
36
resources/js/components/FilesView/CreateListMobile.vue
Normal file
@@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<MenuMobile name="create-list">
|
||||
<MenuMobileGroup>
|
||||
<OptionGroup>
|
||||
<OptionUpload :class="{'is-inactive': canUploadInView || !hasCapacity }" :title="$t('actions.upload')" is-hover-disabled="true"/>
|
||||
<Option @click.native="createFolder" :class="{'is-inactive': canCreateFolderInView }" :title="$t('actions.create_folder')" icon="folder-plus" is-hover-disabled="true"/>
|
||||
</OptionGroup>
|
||||
</MenuMobileGroup>
|
||||
</MenuMobile>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MenuMobileGroup from '@/components/Mobile/MenuMobileGroup'
|
||||
import OptionUpload from '@/components/FilesView/OptionUpload'
|
||||
import OptionGroup from '@/components/FilesView/OptionGroup'
|
||||
import MenuMobile from '@/components/Mobile/MenuMobile'
|
||||
import Option from '@/components/FilesView/Option'
|
||||
import {mapGetters} from 'vuex'
|
||||
import {events} from '@/bus'
|
||||
|
||||
export default {
|
||||
name: 'FileMenuMobile',
|
||||
components: {
|
||||
MenuMobileGroup,
|
||||
OptionUpload,
|
||||
OptionGroup,
|
||||
MenuMobile,
|
||||
Option,
|
||||
},
|
||||
methods: {
|
||||
createFolder() {
|
||||
events.$emit('popup:open', {name: 'create-folder'})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -6,12 +6,12 @@
|
||||
<MobileActionButton @click.native="showLocations" icon="filter">
|
||||
{{ filterLocationTitle }}
|
||||
</MobileActionButton>
|
||||
<MobileActionButton @click.native="createFolder" icon="folder-plus">
|
||||
{{ $t('context_menu.add_folder') }}
|
||||
<MobileActionButton @click.native="createItems" icon="cloud-plus">
|
||||
{{ $t('mobile.create') }}
|
||||
</MobileActionButton>
|
||||
<MobileActionButtonUpload>
|
||||
<!-- <MobileActionButtonUpload>
|
||||
{{ $t('context_menu.upload') }}
|
||||
</MobileActionButtonUpload>
|
||||
</MobileActionButtonUpload>-->
|
||||
<MobileActionButton @click.native="enableMultiSelectMode" icon="check-square">
|
||||
{{ $t('context_menu.select') }}
|
||||
</MobileActionButton>
|
||||
@@ -152,6 +152,9 @@
|
||||
methods: {
|
||||
showLocations() {
|
||||
events.$emit('mobile-menu:show', 'file-filter')
|
||||
},
|
||||
createItems() {
|
||||
events.$emit('mobile-menu:show', 'create-list')
|
||||
},
|
||||
selectAll() {
|
||||
this.$store.commit('ADD_ALL_ITEMS_TO_CLIPBOARD')
|
||||
@@ -172,9 +175,6 @@
|
||||
showViewOptions() {
|
||||
events.$emit('mobile-menu:show', 'file-sorting')
|
||||
},
|
||||
createFolder() {
|
||||
events.$emit('popup:open', {name: 'create-folder'})
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
events.$on('mobileSelecting:stop', () => this.isSelectMode = false)
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<check-icon v-if="icon === 'check'" size="15" class="icon dark-text-theme" />
|
||||
<dollar-sign-icon v-if="icon === 'dollar-sign'" size="15" class="icon dark-text-theme" />
|
||||
<sorting-icon v-if="icon === 'preview-sorting'" class="icon dark-text-theme preview-sorting" />
|
||||
<cloud-plus-icon v-if="icon === 'cloud-plus'" class="icon dark-text-theme preview-sorting" />
|
||||
<span class="label">
|
||||
<slot></slot>
|
||||
</span>
|
||||
@@ -26,6 +27,7 @@
|
||||
|
||||
<script>
|
||||
import { RefreshCwIcon, DownloadIcon, CopyIcon, FilterIcon, DollarSignIcon, CheckIcon, XSquareIcon, CheckSquareIcon, FolderPlusIcon, ListIcon, GridIcon, TrashIcon, UserPlusIcon, PlusIcon, CreditCardIcon } from 'vue-feather-icons'
|
||||
import CloudPlusIcon from '@/components/FilesView/Icons/CloudPlusIcon'
|
||||
import SortingIcon from '@/components/FilesView/Icons/SortingIcon'
|
||||
|
||||
export default {
|
||||
@@ -39,6 +41,7 @@
|
||||
CreditCardIcon,
|
||||
FolderPlusIcon,
|
||||
RefreshCwIcon,
|
||||
CloudPlusIcon,
|
||||
UserPlusIcon,
|
||||
DownloadIcon,
|
||||
SortingIcon,
|
||||
|
||||
@@ -5,21 +5,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapGetters} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'MenuMobileGroup',
|
||||
components: {
|
||||
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['config']),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
<FileFilterMobile />
|
||||
<FileMenuMobile />
|
||||
|
||||
<CreateListMobile />
|
||||
|
||||
<MultiSelectToolbarMobile />
|
||||
|
||||
<!--Navigations-->
|
||||
@@ -39,6 +41,7 @@
|
||||
import FileSortingMobile from '@/components/FilesView/FileSortingMobile'
|
||||
import SidebarNavigation from '@/components/Sidebar/SidebarNavigation'
|
||||
import FileFilterMobile from '@/components/FilesView/FileFilterMobile'
|
||||
import CreateListMobile from '@/components/FilesView/CreateListMobile'
|
||||
import CreateFolderPopup from '@/components/Others/CreateFolderPopup'
|
||||
import ProcessingPopup from '@/components/FilesView/ProcessingPopup'
|
||||
import MobileNavigation from '@/components/Others/MobileNavigation'
|
||||
@@ -60,6 +63,7 @@
|
||||
CreateFolderPopup,
|
||||
FileSortingMobile,
|
||||
SidebarNavigation,
|
||||
CreateListMobile,
|
||||
FileFilterMobile,
|
||||
MobileNavigation,
|
||||
ShareCreatePopup,
|
||||
|
||||
Reference in New Issue
Block a user