mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 08:12:15 +00:00
- Fixed issue when upload doesn't start after you drag the file into empty view
- pointer cursor over file item
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
- Ability to manually synchronize plans in fixed subscription type
|
- Ability to manually synchronize plans in fixed subscription type
|
||||||
- Improved sanitization for .env values to prevent crash your app
|
- Improved sanitization for .env values to prevent crash your app
|
||||||
- Improved reCaptcha validation error logs
|
- Improved reCaptcha validation error logs
|
||||||
|
- Fixed issue when upload doesn't start after you drag the file into empty view
|
||||||
|
|
||||||
## Version 2.1.2
|
## Version 2.1.2
|
||||||
#### Release date: 8. May 2022
|
#### Release date: 8. May 2022
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
'grid-view-sidebar': itemViewType === 'grid' && isVisibleSidebar,
|
'grid-view-sidebar': itemViewType === 'grid' && isVisibleSidebar,
|
||||||
}"
|
}"
|
||||||
class="px-4 lg:h-full lg:w-full lg:overflow-y-auto lg:px-0"
|
class="px-4 lg:h-full lg:w-full lg:overflow-y-auto lg:px-0"
|
||||||
@drop.stop.prevent="uploadDroppedItems($event)"
|
@drop.prevent="dragStop($event)"
|
||||||
@keydown.delete="deleteItems"
|
@keydown.delete="deleteItems"
|
||||||
@dragover="dragEnter"
|
@dragover="dragEnter"
|
||||||
@dragleave="dragLeave"
|
@dragleave="dragLeave"
|
||||||
@@ -62,9 +62,7 @@ export default {
|
|||||||
this.$store.dispatch('deleteItem')
|
this.$store.dispatch('deleteItem')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
uploadDroppedItems(event) {
|
dragStop() {
|
||||||
this.$uploadDraggedFiles(event, this.currentFolder.data.id)
|
|
||||||
|
|
||||||
this.isDragging = false
|
this.isDragging = false
|
||||||
},
|
},
|
||||||
dragEnter() {
|
dragEnter() {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
'bg-light-background dark:bg-dark-foreground': isClicked && canHover,
|
'bg-light-background dark:bg-dark-foreground': isClicked && canHover,
|
||||||
'dark:hover:bg-dark-foreground lg:hover:bg-light-background': canHover,
|
'dark:hover:bg-dark-foreground lg:hover:bg-light-background': canHover,
|
||||||
}"
|
}"
|
||||||
class="relative z-0 flex h-48 select-none flex-wrap items-center justify-center rounded-lg border-2 border-dashed border-transparent px-1 pt-2 text-center sm:h-56 lg:h-60"
|
class="relative z-0 flex h-48 select-none flex-wrap items-center justify-center rounded-lg border-2 border-dashed border-transparent px-1 pt-2 text-center sm:h-56 lg:h-60 cursor-pointer"
|
||||||
:draggable="canDrag"
|
:draggable="canDrag"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
>
|
>
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
<!--Item Title-->
|
<!--Item Title-->
|
||||||
<span
|
<span
|
||||||
class="inline-block w-full overflow-hidden text-ellipsis whitespace-nowrap text-sm font-bold leading-3 tracking-tight md:px-6"
|
class="inline-block w-full overflow-hidden text-ellipsis whitespace-nowrap text-sm font-bold leading-3 tracking-tight md:px-6"
|
||||||
:class="{ 'hover:underline': canEditName }"
|
:class="{ 'hover:underline cursor-text': canEditName }"
|
||||||
ref="name"
|
ref="name"
|
||||||
@input="renameItem"
|
@input="renameItem"
|
||||||
@keydown.delete.stop
|
@keydown.delete.stop
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
'bg-light-background dark:bg-dark-foreground': isClicked && highlight,
|
'bg-light-background dark:bg-dark-foreground': isClicked && highlight,
|
||||||
'hover:bg-light-background dark:hover:bg-dark-foreground': highlight,
|
'hover:bg-light-background dark:hover:bg-dark-foreground': highlight,
|
||||||
}"
|
}"
|
||||||
class="flex select-none items-center rounded-xl border-2 border-dashed border-transparent px-2.5 py-2"
|
class="flex select-none items-center rounded-xl border-2 border-dashed border-transparent px-2.5 py-2 cursor-pointer"
|
||||||
:draggable="canDrag"
|
:draggable="canDrag"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
>
|
>
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
<!--Item Title-->
|
<!--Item Title-->
|
||||||
<span
|
<span
|
||||||
class="mb-0.5 block overflow-hidden text-ellipsis whitespace-nowrap text-sm font-bold"
|
class="mb-0.5 block overflow-hidden text-ellipsis whitespace-nowrap text-sm font-bold"
|
||||||
:class="{ 'hover:underline': canEditName }"
|
:class="{ 'hover:underline cursor-text': canEditName }"
|
||||||
style="max-width: 240px"
|
style="max-width: 240px"
|
||||||
ref="name"
|
ref="name"
|
||||||
@input="renameItem"
|
@input="renameItem"
|
||||||
|
|||||||
2
resources/js/helpers/functionHelpers.js
vendored
2
resources/js/helpers/functionHelpers.js
vendored
@@ -177,7 +177,7 @@ const FunctionHelpers = {
|
|||||||
|
|
||||||
Vue.prototype.$uploadDraggedFiles = async function (event, parent_id) {
|
Vue.prototype.$uploadDraggedFiles = async function (event, parent_id) {
|
||||||
// Show alert message when upload is disabled
|
// Show alert message when upload is disabled
|
||||||
if (!store.getters.user.data.meta.restrictions.canUpload) {
|
if (store.getters.user && !store.getters.user.data.meta.restrictions.canUpload) {
|
||||||
Vue.prototype.$temporarilyDisabledUpload()
|
Vue.prototype.$temporarilyDisabledUpload()
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
<div v-if="config.allowedAdsense && config.adsenseBanner01" v-html="config.adsenseBanner01" class="mb-5 min-h-[120px]"></div>
|
<div v-if="config.allowedAdsense && config.adsenseBanner01" v-html="config.adsenseBanner01" class="mb-5 min-h-[120px]"></div>
|
||||||
|
|
||||||
<!--File list & info sidebar-->
|
<!--File list & info sidebar-->
|
||||||
<div class="flex space-x-3 lg:overflow-hidden grow">
|
<div class="flex space-x-3 lg:overflow-hidden grow" @drop.stop.prevent="uploadDroppedItems($event)" @dragenter.prevent @dragover.prevent>
|
||||||
<router-view id="file-view" class="relative w-full" :key="$route.fullPath" />
|
<router-view id="file-view" class="relative w-full" :key="$route.fullPath" />
|
||||||
|
|
||||||
<InfoSidebar v-if="isVisibleSidebar" />
|
<InfoSidebar v-if="isVisibleSidebar" />
|
||||||
@@ -110,7 +110,7 @@ export default {
|
|||||||
DragUI,
|
DragUI,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['isVisibleSidebar', 'isLimitedUser', 'config']),
|
...mapGetters(['isVisibleSidebar', 'isLimitedUser', 'config', 'currentFolder']),
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -118,6 +118,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
uploadDroppedItems(event) {
|
||||||
|
this.$uploadDraggedFiles(event, this.currentFolder?.data.id)
|
||||||
|
},
|
||||||
contextMenu(event, item) {
|
contextMenu(event, item) {
|
||||||
events.$emit('context-menu:show', event, item)
|
events.$emit('context-menu:show', event, item)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
<div v-if="config.allowedAdsense && config.adsenseBanner01" v-html="config.adsenseBanner01" class="mb-5 min-h-[120px]"></div>
|
<div v-if="config.allowedAdsense && config.adsenseBanner01" v-html="config.adsenseBanner01" class="mb-5 min-h-[120px]"></div>
|
||||||
|
|
||||||
<!--File list & info sidebar-->
|
<!--File list & info sidebar-->
|
||||||
<div class="flex space-x-3 lg:overflow-hidden grow">
|
<div class="flex space-x-3 lg:overflow-hidden grow" @drop.stop.prevent="uploadDroppedItems($event)" @dragenter.prevent @dragover.prevent>
|
||||||
<router-view id="file-view" class="relative w-full" :key="$route.fullPath" />
|
<router-view id="file-view" class="relative w-full" :key="$route.fullPath" />
|
||||||
|
|
||||||
<InfoSidebar v-if="isVisibleSidebar" />
|
<InfoSidebar v-if="isVisibleSidebar" />
|
||||||
@@ -87,7 +87,7 @@ export default {
|
|||||||
Alert,
|
Alert,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['isVisibleSidebar', 'sharedDetail', 'config']),
|
...mapGetters(['isVisibleSidebar', 'sharedDetail', 'config', 'currentFolder']),
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -95,6 +95,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
uploadDroppedItems(event) {
|
||||||
|
this.$uploadDraggedFiles(event, this.currentFolder?.data.id)
|
||||||
|
},
|
||||||
contextMenu(event, item) {
|
contextMenu(event, item) {
|
||||||
events.$emit('context-menu:show', event, item)
|
events.$emit('context-menu:show', event, item)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
<div v-if="config.allowedAdsense && config.adsenseBanner01" v-html="config.adsenseBanner01" class="mb-5 min-h-[120px]"></div>
|
<div v-if="config.allowedAdsense && config.adsenseBanner01" v-html="config.adsenseBanner01" class="mb-5 min-h-[120px]"></div>
|
||||||
|
|
||||||
<!--File list & info sidebar-->
|
<!--File list & info sidebar-->
|
||||||
<div class="flex space-x-3 lg:overflow-hidden grow">
|
<div class="flex space-x-3 lg:overflow-hidden grow" @drop.stop.prevent="uploadDroppedItems($event)" @dragenter.prevent @dragover.prevent>
|
||||||
<router-view id="file-view" class="relative w-full" :key="$route.fullPath" />
|
<router-view id="file-view" class="relative w-full" :key="$route.fullPath" />
|
||||||
|
|
||||||
<InfoSidebarUploadRequest v-if="canShowUI && isVisibleSidebar" />
|
<InfoSidebarUploadRequest v-if="canShowUI && isVisibleSidebar" />
|
||||||
@@ -76,7 +76,7 @@ export default {
|
|||||||
DragUI,
|
DragUI,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['isVisibleSidebar', 'config', 'uploadRequest', 'fileQueue']),
|
...mapGetters(['isVisibleSidebar', 'config', 'uploadRequest', 'fileQueue', 'currentFolder']),
|
||||||
canShowUI() {
|
canShowUI() {
|
||||||
return (this.uploadRequest && this.uploadRequest.data.attributes.status === 'filling') || this.fileQueue.length > 0
|
return (this.uploadRequest && this.uploadRequest.data.attributes.status === 'filling') || this.fileQueue.length > 0
|
||||||
}
|
}
|
||||||
@@ -87,6 +87,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
uploadDroppedItems(event) {
|
||||||
|
this.$uploadDraggedFiles(event, this.currentFolder?.data.id)
|
||||||
|
},
|
||||||
contextMenu(event, item) {
|
contextMenu(event, item) {
|
||||||
events.$emit('context-menu:show', event, item)
|
events.$emit('context-menu:show', event, item)
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user