mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-06 02:33:48 +00:00
- moving files fix
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
"/chunks/plan-subscribers.js": "/chunks/plan-subscribers.js?id=2bdbb5f9141052aaaa3d",
|
||||
"/chunks/plans.js": "/chunks/plans.js?id=a3a16f546521050656fb",
|
||||
"/chunks/platform.js": "/chunks/platform.js?id=ecc47ed750bef78f68e8",
|
||||
"/chunks/platform~chunks/shared.js": "/chunks/platform~chunks/shared.js?id=c50ef968f6ea0157acb1",
|
||||
"/chunks/platform~chunks/shared.js": "/chunks/platform~chunks/shared.js?id=a32b7db311613c63769e",
|
||||
"/chunks/profile.js": "/chunks/profile.js?id=91ea55260c78ea4e7abd",
|
||||
"/chunks/profile~chunks/settings-password.js": "/chunks/profile~chunks/settings-password.js?id=7b80324eef831d31e3e8",
|
||||
"/chunks/purchase-code.js": "/chunks/purchase-code.js?id=26a3951e09a8862d8dc2",
|
||||
@@ -100,5 +100,24 @@
|
||||
"/vendors~chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~25aaad73.js": "/vendors~chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~25aaad73.js?id=0de519ac9b2c2754e0c2",
|
||||
"/vendors~chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~81c8aec0.js": "/vendors~chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~81c8aec0.js?id=ca3b57f70682c1c315f7",
|
||||
"/vendors~chunks/admin~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunk~3c02639c.js": "/vendors~chunks/admin~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunk~3c02639c.js?id=e31953d811b86273037b",
|
||||
"/vendors~chunks/admin~chunks/platform~chunks/settings~chunks/shared.js": "/vendors~chunks/admin~chunks/platform~chunks/settings~chunks/shared.js?id=90d4a5c68188a1bbce59"
|
||||
"/vendors~chunks/admin~chunks/platform~chunks/settings~chunks/shared.js": "/vendors~chunks/admin~chunks/platform~chunks/settings~chunks/shared.js?id=90d4a5c68188a1bbce59",
|
||||
"/chunks/platform~chunks/shared.cb1aa30179d11be7dccf.hot-update.js": "/chunks/platform~chunks/shared.cb1aa30179d11be7dccf.hot-update.js",
|
||||
"/chunks/platform~chunks/shared.b982f815eaab5015f892.hot-update.js": "/chunks/platform~chunks/shared.b982f815eaab5015f892.hot-update.js",
|
||||
"/chunks/platform~chunks/shared.5722e8906a9eba233567.hot-update.js": "/chunks/platform~chunks/shared.5722e8906a9eba233567.hot-update.js",
|
||||
"/chunks/platform~chunks/shared.495381808384fd0640bc.hot-update.js": "/chunks/platform~chunks/shared.495381808384fd0640bc.hot-update.js",
|
||||
"/chunks/platform~chunks/shared.448f2d2676b39dc92824.hot-update.js": "/chunks/platform~chunks/shared.448f2d2676b39dc92824.hot-update.js",
|
||||
"/chunks/platform~chunks/shared.333b3cecc35a2b073830.hot-update.js": "/chunks/platform~chunks/shared.333b3cecc35a2b073830.hot-update.js",
|
||||
"/chunks/platform~chunks/shared.7a587439c69e3706b8a3.hot-update.js": "/chunks/platform~chunks/shared.7a587439c69e3706b8a3.hot-update.js",
|
||||
"/chunks/platform~chunks/shared.2ec5382f12ef526bcbdd.hot-update.js": "/chunks/platform~chunks/shared.2ec5382f12ef526bcbdd.hot-update.js",
|
||||
"/chunks/platform~chunks/shared.9b110a3a50c3298b46f9.hot-update.js": "/chunks/platform~chunks/shared.9b110a3a50c3298b46f9.hot-update.js",
|
||||
"/chunks/platform~chunks/shared.9d28a9271e904faa8b5e.hot-update.js": "/chunks/platform~chunks/shared.9d28a9271e904faa8b5e.hot-update.js",
|
||||
"/chunks/platform~chunks/shared.e71315b2abe2640cf551.hot-update.js": "/chunks/platform~chunks/shared.e71315b2abe2640cf551.hot-update.js",
|
||||
"/chunks/platform~chunks/shared.e7f518e2d6c5a53496c6.hot-update.js": "/chunks/platform~chunks/shared.e7f518e2d6c5a53496c6.hot-update.js",
|
||||
"/js/main.4b266bad00e78dd36b3d.hot-update.js": "/js/main.4b266bad00e78dd36b3d.hot-update.js",
|
||||
"/js/main.844945c01d249c235cff.hot-update.js": "/js/main.844945c01d249c235cff.hot-update.js",
|
||||
"/js/main.675725b6826e6865cdbf.hot-update.js": "/js/main.675725b6826e6865cdbf.hot-update.js",
|
||||
"/js/main.7ba1b4bc5772f48db70c.hot-update.js": "/js/main.7ba1b4bc5772f48db70c.hot-update.js",
|
||||
"/js/main.33a95bbab94bca89339a.hot-update.js": "/js/main.33a95bbab94bca89339a.hot-update.js",
|
||||
"/chunks/platform~chunks/shared.5b2e2cd09d01a879b649.hot-update.js": "/chunks/platform~chunks/shared.5b2e2cd09d01a879b649.hot-update.js",
|
||||
"/chunks/platform~chunks/shared.88cb2aaa58c930e730bb.hot-update.js": "/chunks/platform~chunks/shared.88cb2aaa58c930e730bb.hot-update.js"
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<template>
|
||||
<!--Folder Icon-->
|
||||
<div class="folder-item-wrapper" :class="{'is-inactive': disabledById && disabledById.data.id === nodes.id || !disableId} ">
|
||||
<div class="folder-item-wrapper" :class="{'is-inactive': disabledById && disabledById.data.id === nodes.id || !disableId}">
|
||||
|
||||
<div class="folder-item text-theme dark-text-theme" :class="{'is-selected': isSelected}" @click="getFolder" :style="indent">
|
||||
<chevron-right-icon @click.stop="showTree" size="17" class="icon-arrow" :class="{'is-opened': isVisible, 'is-visible': nodes.folders.length !== 0}"/>
|
||||
<hard-drive-icon v-if="nodes.location === 'base'" size="17" class="icon text-theme dark-text-theme"/>
|
||||
<folder-icon v-if="nodes.location !== 'base'" size="17" class="icon text-theme dark-text-theme"/>
|
||||
<div @click="getFolder" :class="{'is-selected': isSelected, 'is-disabled-item': nodes.location === 'team-folders'}" :style="indent" class="folder-item text-theme dark-text-theme">
|
||||
<chevron-right-icon @click.stop="showTree" :class="{'is-opened': isVisible, 'is-visible': nodes.folders.length !== 0}" size="17" class="icon-arrow"/>
|
||||
<hard-drive-icon v-if="nodes.location === 'files'" size="17" class="icon text-theme dark-text-theme"/>
|
||||
<users-icon v-if="nodes.location === 'team-folders'" size="17" class="icon text-theme dark-text-theme"/>
|
||||
<folder-icon v-if="! nodes.location" size="17" class="icon text-theme dark-text-theme"/>
|
||||
<span class="label">{{ nodes.name }}</span>
|
||||
</div>
|
||||
|
||||
@@ -15,28 +16,34 @@
|
||||
|
||||
<script>
|
||||
import TreeMenu from '/resources/js/components/Others/TreeMenu'
|
||||
import {FolderIcon, ChevronRightIcon, HardDriveIcon} from 'vue-feather-icons'
|
||||
import {FolderIcon, ChevronRightIcon, HardDriveIcon, UsersIcon} from 'vue-feather-icons'
|
||||
import {events} from '/resources/js/bus'
|
||||
import {mapGetters} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'TreeMenu',
|
||||
props: [
|
||||
'nodes', 'depth', 'disabledById'
|
||||
'disabledById',
|
||||
'nodes',
|
||||
'depth',
|
||||
],
|
||||
components: {
|
||||
ChevronRightIcon,
|
||||
HardDriveIcon,
|
||||
FolderIcon,
|
||||
UsersIcon,
|
||||
TreeMenu,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['clipboard']),
|
||||
...mapGetters([
|
||||
'clipboard'
|
||||
]),
|
||||
indent() {
|
||||
return { paddingLeft: this.depth * 20 + 'px' }
|
||||
},
|
||||
disableId() {
|
||||
let canBeShow = true
|
||||
|
||||
if(this.clipboard.includes(this.disabledById)){
|
||||
this.clipboard.map(item => {
|
||||
if(item.data.id === this.nodes.id) {
|
||||
@@ -92,7 +99,8 @@
|
||||
@import '/resources/sass/vuefilemanager/_variables';
|
||||
@import '/resources/sass/vuefilemanager/_mixins';
|
||||
|
||||
.is-inactive {
|
||||
.is-inactive,
|
||||
.is-disabled-item {
|
||||
opacity: 0.5;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="team-folder-preview">
|
||||
<div class="info">
|
||||
<b class="title">{{ teamFolder.data.attributes.name }}</b>
|
||||
<span class="subtitle">Last update a week ago</span>
|
||||
<span class="subtitle">Created at {{ teamFolder.data.attributes.created_at }}</span>
|
||||
<TeamMembersPreview :folder="teamFolder" :avatar-size="32" class="members" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
4
resources/js/store/modules/fileFunctions.js
vendored
4
resources/js/store/modules/fileFunctions.js
vendored
@@ -58,7 +58,7 @@ const actions = {
|
||||
? `/api/editor/move/${router.currentRoute.params.token}`
|
||||
: '/api/move'
|
||||
|
||||
let moveToId = undefined
|
||||
let moveToId = null
|
||||
|
||||
if (to_item.data)
|
||||
moveToId = to_item.data.id
|
||||
@@ -73,7 +73,7 @@ const actions = {
|
||||
.then(() => {
|
||||
itemsToMove.forEach(item => {
|
||||
commit('REMOVE_ITEM', item.id)
|
||||
commit('INCREASE_FOLDER_ITEM', to_item.data.id)
|
||||
commit('INCREASE_FOLDER_ITEM', moveToId)
|
||||
|
||||
if (item.type === 'folder')
|
||||
dispatch('getAppData')
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace Domain\Folders\Controllers;
|
||||
|
||||
use Domain\Folders\Models\Folder;
|
||||
@@ -24,12 +25,16 @@ class NavigationFolderTreeController
|
||||
|
||||
return [
|
||||
[
|
||||
'name' => 'Files',
|
||||
'folders' => $folders,
|
||||
'location' => 'files',
|
||||
'name' => 'Files',
|
||||
'folders' => $folders,
|
||||
'isMovable' => true,
|
||||
],
|
||||
[
|
||||
'name' => 'Team Folders',
|
||||
'folders' => $teamFolders,
|
||||
'location' => 'team-folders',
|
||||
'name' => 'Team Folders',
|
||||
'folders' => $teamFolders,
|
||||
'isMovable' => false,
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ class MoveFileOrFolderAction
|
||||
/**
|
||||
* Move folder or file to new location
|
||||
*/
|
||||
public function __invoke($request, string $to_id): void
|
||||
public function __invoke($request, ?string $to_id): void
|
||||
{
|
||||
foreach ($request->items as $item) {
|
||||
// Move folder
|
||||
|
||||
Reference in New Issue
Block a user