mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-05 18:23:48 +00:00
- data renamed to entries
This commit is contained in:
@@ -29,17 +29,17 @@
|
||||
"/chunks/contact-us~chunks/dynamic-page~chunks/homepage.js": "/chunks/contact-us~chunks/dynamic-page~chunks/homepage.js?id=22bd5db44c72e8de5f5b",
|
||||
"/chunks/create-new-password.js": "/chunks/create-new-password.js?id=48dc53ccbd502c2739ec",
|
||||
"/chunks/dashboard.js": "/chunks/dashboard.js?id=9825336101be68307708",
|
||||
"/chunks/dashboard~chunks/invoices~chunks/pages~chunks/plan-subscribers~chunks/plans~chunks/settings-i~0e2a0654.js": "/chunks/dashboard~chunks/invoices~chunks/pages~chunks/plan-subscribers~chunks/plans~chunks/settings-i~0e2a0654.js?id=7540af768b1cfda01a13",
|
||||
"/chunks/dashboard~chunks/invoices~chunks/pages~chunks/plan-subscribers~chunks/plans~chunks/settings-i~0e2a0654.js": "/chunks/dashboard~chunks/invoices~chunks/pages~chunks/plan-subscribers~chunks/plans~chunks/settings-i~0e2a0654.js?id=9c449e322b1d52b8ad89",
|
||||
"/chunks/database.js": "/chunks/database.js?id=7374830dc3cbddf41abb",
|
||||
"/chunks/dynamic-page.js": "/chunks/dynamic-page.js?id=6dccc2158cc6278f683d",
|
||||
"/chunks/environment-setup.js": "/chunks/environment-setup.js?id=208de84df68177288a2a",
|
||||
"/chunks/files.js": "/chunks/files.js?id=26ad1fca7599f4094b4a",
|
||||
"/chunks/files.js": "/chunks/files.js?id=bf20a51646206cd14f25",
|
||||
"/chunks/files~chunks/platform~chunks/shared-files~chunks/shared/file-browser.js": "/chunks/files~chunks/platform~chunks/shared-files~chunks/shared/file-browser.js?id=39233d603662ca3738e8",
|
||||
"/chunks/files~chunks/platform~chunks/shared~chunks/shared-files~chunks/shared/file-browser.js": "/chunks/files~chunks/platform~chunks/shared~chunks/shared-files~chunks/shared/file-browser.js?id=7b36e1f9a8327a215083",
|
||||
"/chunks/files~chunks/platform~chunks/shared~chunks/shared-files~chunks/shared/file-browser~chunks/sha~8510f6c9.js": "/chunks/files~chunks/platform~chunks/shared~chunks/shared-files~chunks/shared/file-browser~chunks/sha~8510f6c9.js?id=b4ccb4a816e5c72a0b85",
|
||||
"/chunks/files~chunks/settings-subscription~chunks/shared-files~chunks/shared/file-browser~chunks/user~9058a49f.js": "/chunks/files~chunks/settings-subscription~chunks/shared-files~chunks/shared/file-browser~chunks/user~9058a49f.js?id=31a17ad1d2536342abbe",
|
||||
"/chunks/files~chunks/shared-files~chunks/shared/file-browser.js": "/chunks/files~chunks/shared-files~chunks/shared/file-browser.js?id=53cc373faf35904b6e75",
|
||||
"/chunks/files~chunks/shared-files~chunks/shared/file-browser~chunks/shared/single-file.js": "/chunks/files~chunks/shared-files~chunks/shared/file-browser~chunks/shared/single-file.js?id=3565df0bec142bf6d5d5",
|
||||
"/chunks/files~chunks/shared-files~chunks/shared/file-browser.js": "/chunks/files~chunks/shared-files~chunks/shared/file-browser.js?id=d9db59939f1b66e598d9",
|
||||
"/chunks/files~chunks/shared-files~chunks/shared/file-browser~chunks/shared/single-file.js": "/chunks/files~chunks/shared-files~chunks/shared/file-browser~chunks/shared/single-file.js?id=243b3903521d9cc036b9",
|
||||
"/chunks/files~chunks/shared/file-browser.js": "/chunks/files~chunks/shared/file-browser.js?id=44899a3c3880630dbcd9",
|
||||
"/chunks/forgotten-password.js": "/chunks/forgotten-password.js?id=877a9289b77ac3885042",
|
||||
"/chunks/homepage.js": "/chunks/homepage.js?id=48e0e9b3c870c46218ce",
|
||||
@@ -55,7 +55,7 @@
|
||||
"/chunks/plan-subscribers.js": "/chunks/plan-subscribers.js?id=08e2056bc3744b2ea8f9",
|
||||
"/chunks/plans.js": "/chunks/plans.js?id=83fc2cc3cd4b76c8f8f0",
|
||||
"/chunks/platform.js": "/chunks/platform.js?id=7de76831b9b233a9620c",
|
||||
"/chunks/platform~chunks/shared.js": "/chunks/platform~chunks/shared.js?id=bd77df66c73522ed90a5",
|
||||
"/chunks/platform~chunks/shared.js": "/chunks/platform~chunks/shared.js?id=cee45879fb91f25a02ea",
|
||||
"/chunks/profile.js": "/chunks/profile.js?id=1c1c666004fb44b1c404",
|
||||
"/chunks/profile~chunks/settings-password.js": "/chunks/profile~chunks/settings-password.js?id=d0a44ee2cc3e9882c14a",
|
||||
"/chunks/purchase-code.js": "/chunks/purchase-code.js?id=e00ee12cde704060e15b",
|
||||
@@ -70,7 +70,7 @@
|
||||
"/chunks/shared.js": "/chunks/shared.js?id=a2c4342bfddd4946cb85",
|
||||
"/chunks/shared-files.js": "/chunks/shared-files.js?id=9560ed081afc308a115a",
|
||||
"/chunks/shared/authenticate.js": "/chunks/shared/authenticate.js?id=3d5c7754d438830a4204",
|
||||
"/chunks/shared/file-browser.js": "/chunks/shared/file-browser.js?id=3127fab4cfd3d5f00a72",
|
||||
"/chunks/shared/file-browser.js": "/chunks/shared/file-browser.js?id=367a4e50adb8694ca080",
|
||||
"/chunks/shared/single-file.js": "/chunks/shared/single-file.js?id=e8aedb75df7fe227d693",
|
||||
"/chunks/sign-in.js": "/chunks/sign-in.js?id=162161aa204ab6931826",
|
||||
"/chunks/sign-up.js": "/chunks/sign-up.js?id=ce15b1156cf37c0a9703",
|
||||
@@ -99,5 +99,17 @@
|
||||
"/chunks/files~chunks/shared-files~chunks/shared/file-browser~chunks/shared/single-file.c735c5b585be594e788e.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared/file-browser~chunks/shared/single-file.c735c5b585be594e788e.hot-update.js",
|
||||
"/chunks/files~chunks/shared/file-browser.c735c5b585be594e788e.hot-update.js": "/chunks/files~chunks/shared/file-browser.c735c5b585be594e788e.hot-update.js",
|
||||
"/chunks/platform~chunks/shared.c735c5b585be594e788e.hot-update.js": "/chunks/platform~chunks/shared.c735c5b585be594e788e.hot-update.js",
|
||||
"/js/main.a221fcac26c21dc2d62f.hot-update.js": "/js/main.a221fcac26c21dc2d62f.hot-update.js"
|
||||
"/js/main.a221fcac26c21dc2d62f.hot-update.js": "/js/main.a221fcac26c21dc2d62f.hot-update.js",
|
||||
"/chunks/files.2f7c2b773b211c84bbfe.hot-update.js": "/chunks/files.2f7c2b773b211c84bbfe.hot-update.js",
|
||||
"/chunks/files.56accf7443a3e796d634.hot-update.js": "/chunks/files.56accf7443a3e796d634.hot-update.js",
|
||||
"/chunks/files.6f12724d593f5772a053.hot-update.js": "/chunks/files.6f12724d593f5772a053.hot-update.js",
|
||||
"/chunks/shared/file-browser.8beb806e6fba8fc5b6f7.hot-update.js": "/chunks/shared/file-browser.8beb806e6fba8fc5b6f7.hot-update.js",
|
||||
"/chunks/files~chunks/shared-files~chunks/shared/file-browser.1710e94f3a5d12112c0a.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared/file-browser.1710e94f3a5d12112c0a.hot-update.js",
|
||||
"/js/main.5c849f5f08dffdf3cba0.hot-update.js": "/js/main.5c849f5f08dffdf3cba0.hot-update.js",
|
||||
"/chunks/dashboard~chunks/invoices~chunks/pages~chunks/plan-subscribers~chunks/plans~chunks/settings-i~0e2a0654.5c849f5f08dffdf3cba0.hot-update.js": "/chunks/dashboard~chunks/invoices~chunks/pages~chunks/plan-subscribers~chunks/plans~chunks/settings-i~0e2a0654.5c849f5f08dffdf3cba0.hot-update.js",
|
||||
"/chunks/files~chunks/shared-files~chunks/shared/file-browser.5c849f5f08dffdf3cba0.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared/file-browser.5c849f5f08dffdf3cba0.hot-update.js",
|
||||
"/chunks/files~chunks/shared-files~chunks/shared/file-browser~chunks/shared/single-file.5c849f5f08dffdf3cba0.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared/file-browser~chunks/shared/single-file.5c849f5f08dffdf3cba0.hot-update.js",
|
||||
"/chunks/platform~chunks/shared.5c849f5f08dffdf3cba0.hot-update.js": "/chunks/platform~chunks/shared.5c849f5f08dffdf3cba0.hot-update.js",
|
||||
"/js/main.80e5082d1c4050f7af73.hot-update.js": "/js/main.80e5082d1c4050f7af73.hot-update.js",
|
||||
"/chunks/files~chunks/shared-files~chunks/shared/file-browser.c0e88f81e89f47892001.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared/file-browser.c0e88f81e89f47892001.hot-update.js"
|
||||
}
|
||||
|
||||
@@ -50,9 +50,9 @@
|
||||
Spinner
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['data', 'isLoading', 'currentFolder']),
|
||||
...mapGetters(['entries', 'isLoading', 'currentFolder']),
|
||||
isEmpty() {
|
||||
return this.data && this.data.length == 0
|
||||
return this.entries && this.entries.length == 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
@drop.stop.native.prevent="dragFinish(item, $event)"
|
||||
@contextmenu.native.prevent="contextMenu($event, item)"
|
||||
:item="item"
|
||||
v-for="item in data"
|
||||
v-for="item in entries"
|
||||
:key="item.id"
|
||||
class="file-item"
|
||||
:class="draggedItems.includes(item) ? 'dragged' : '' "
|
||||
@@ -56,7 +56,7 @@
|
||||
@drop.native.prevent="dragFinish(item, $event)"
|
||||
@contextmenu.native.prevent="contextMenu($event, item)"
|
||||
:item="item"
|
||||
v-for="item in data"
|
||||
v-for="item in entries"
|
||||
:key="item.id"
|
||||
class="file-item"
|
||||
:class="draggedItems.includes(item) ? 'dragged' : '' "
|
||||
@@ -123,11 +123,11 @@
|
||||
'filesInQueueTotal',
|
||||
'fileInfoVisible',
|
||||
'FilePreviewType',
|
||||
'clipboard',
|
||||
'currentFolder',
|
||||
'isSearching',
|
||||
'clipboard',
|
||||
'isLoading',
|
||||
'data'
|
||||
'entries'
|
||||
]),
|
||||
isGrid() {
|
||||
return this.FilePreviewType === 'grid'
|
||||
@@ -136,7 +136,7 @@
|
||||
return this.FilePreviewType === 'list'
|
||||
},
|
||||
isEmpty() {
|
||||
return this.data.length == 0
|
||||
return this.entries.length == 0
|
||||
},
|
||||
draggedItems() {
|
||||
//Set opacity for dragged items
|
||||
|
||||
@@ -84,7 +84,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'FilePreviewType', 'sharedDetail', 'clipboard', 'data'
|
||||
'FilePreviewType', 'sharedDetail', 'clipboard', 'entries'
|
||||
]),
|
||||
folderEmojiOrColor() {
|
||||
|
||||
@@ -188,8 +188,8 @@ export default {
|
||||
}
|
||||
} else if (e.shiftKey) {
|
||||
// Click + Shift
|
||||
let lastItem = this.data.indexOf(this.clipboard[this.clipboard.length - 1])
|
||||
let clickedItem = this.data.indexOf(this.item)
|
||||
let lastItem = this.entries.indexOf(this.clipboard[this.clipboard.length - 1])
|
||||
let clickedItem = this.entries.indexOf(this.item)
|
||||
|
||||
// If Click + Shift + Ctrl dont remove already selected items
|
||||
if (!e.ctrlKey && !e.metaKey) {
|
||||
@@ -199,12 +199,12 @@ export default {
|
||||
//Shift selecting from top to bottom
|
||||
if (lastItem < clickedItem) {
|
||||
for (let i = lastItem; i <= clickedItem; i++) {
|
||||
this.$store.commit('ADD_ITEM_TO_CLIPBOARD', this.data[i])
|
||||
this.$store.commit('ADD_ITEM_TO_CLIPBOARD', this.entries[i])
|
||||
}
|
||||
//Shift selecting from bottom to top
|
||||
} else {
|
||||
for (let i = lastItem; i >= clickedItem; i--) {
|
||||
this.$store.commit('ADD_ITEM_TO_CLIPBOARD', this.data[i])
|
||||
this.$store.commit('ADD_ITEM_TO_CLIPBOARD', this.entries[i])
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<transition name="slide-from-left">
|
||||
<div class="check-select" v-if="mobileMultiSelect">
|
||||
<div class="select-box" :class="{'select-box-active' : isClicked } ">
|
||||
<CheckIcon v-if="isClicked" class="icon" size="17"/>
|
||||
<CheckIcon v-if="isClicked" class="icon" size="17" />
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
@@ -26,12 +26,12 @@
|
||||
</span>
|
||||
|
||||
<!--Folder thumbnail-->
|
||||
<FontAwesomeIcon v-if="isFile || (isImage && !item.thumbnail)" class="file-icon" icon="file"/>
|
||||
<FontAwesomeIcon v-if="isFile || (isImage && !item.thumbnail)" class="file-icon" icon="file" />
|
||||
|
||||
<!--Image thumbnail-->
|
||||
<img loading="lazy" v-if="isImage && item.thumbnail" class="image" :src="item.thumbnail" :alt="item.name"/>
|
||||
<img loading="lazy" v-if="isImage && item.thumbnail" class="image" :src="item.thumbnail" :alt="item.name" />
|
||||
|
||||
<!--Else show only folder icon-->
|
||||
<!--Else show only folder icon-->
|
||||
<FolderIcon v-if="isFolder" :item="item" location="file-item-list" class="folder svg-color-theme" />
|
||||
</div>
|
||||
|
||||
@@ -73,11 +73,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { LinkIcon, UserPlusIcon, CheckIcon, MoreVerticalIcon } from 'vue-feather-icons'
|
||||
import {LinkIcon, UserPlusIcon, CheckIcon, MoreVerticalIcon} from 'vue-feather-icons'
|
||||
import FolderIcon from '@/components/FilesView/FolderIcon'
|
||||
import { debounce } from 'lodash'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { events } from '@/bus'
|
||||
import {debounce} from 'lodash'
|
||||
import {mapGetters} from 'vuex'
|
||||
import {events} from '@/bus'
|
||||
|
||||
export default {
|
||||
name: 'FileItemList',
|
||||
@@ -90,7 +90,11 @@ export default {
|
||||
CheckIcon,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['FilePreviewType', 'clipboard', 'data']),
|
||||
...mapGetters([
|
||||
'FilePreviewType',
|
||||
'clipboard',
|
||||
'entries'
|
||||
]),
|
||||
isClicked() {
|
||||
return this.clipboard.some(element => element.id === this.item.id)
|
||||
},
|
||||
@@ -120,7 +124,7 @@ export default {
|
||||
return !this.isDeleted && this.$checkPermission(['master', 'editor'])
|
||||
},
|
||||
timeStamp() {
|
||||
return this.item.deleted_at ? this.$t('item_thumbnail.deleted_at', { time: this.item.deleted_at }) : this.item.created_at
|
||||
return this.item.deleted_at ? this.$t('item_thumbnail.deleted_at', {time: this.item.deleted_at}) : this.item.created_at
|
||||
},
|
||||
folderItems() {
|
||||
return this.item.deleted_at ? this.item.trashed_items : this.item.items
|
||||
@@ -183,8 +187,8 @@ export default {
|
||||
}
|
||||
} else if (e.shiftKey) {
|
||||
// Click + Shift
|
||||
let lastItem = this.data.indexOf(this.clipboard[this.clipboard.length - 1])
|
||||
let clickedItem = this.data.indexOf(this.item)
|
||||
let lastItem = this.entries.indexOf(this.clipboard[this.clipboard.length - 1])
|
||||
let clickedItem = this.entries.indexOf(this.item)
|
||||
|
||||
// If Click + Shift + Ctrl dont remove already selected items
|
||||
if (!e.ctrlKey && !e.metaKey) {
|
||||
@@ -194,12 +198,12 @@ export default {
|
||||
//Shift selecting from top to bottom
|
||||
if (lastItem < clickedItem) {
|
||||
for (let i = lastItem; i <= clickedItem; i++) {
|
||||
this.$store.commit('ADD_ITEM_TO_CLIPBOARD', this.data[i])
|
||||
this.$store.commit('ADD_ITEM_TO_CLIPBOARD', this.entries[i])
|
||||
}
|
||||
//Shift selecting from bottom to top
|
||||
} else {
|
||||
for (let i = lastItem; i >= clickedItem; i--) {
|
||||
this.$store.commit('ADD_ITEM_TO_CLIPBOARD', this.data[i])
|
||||
this.$store.commit('ADD_ITEM_TO_CLIPBOARD', this.entries[i])
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -214,9 +218,9 @@ export default {
|
||||
if (this.isFolder) {
|
||||
|
||||
if (this.$isThisLocation('public')) {
|
||||
this.$store.dispatch('browseShared', [{ folder: this.item, back: false, init: false }])
|
||||
this.$store.dispatch('browseShared', [{folder: this.item, back: false, init: false}])
|
||||
} else {
|
||||
this.$store.dispatch('getFolder', [{ folder: this.item, back: false, init: false }])
|
||||
this.$store.dispatch('getFolder', [{folder: this.item, back: false, init: false}])
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -251,13 +255,13 @@ export default {
|
||||
this.$store.commit('CLIPBOARD_CLEAR')
|
||||
|
||||
if (this.$isThisLocation('public')) {
|
||||
this.$store.dispatch('browseShared', [{ folder: this.item, back: false, init: false }])
|
||||
this.$store.dispatch('browseShared', [{folder: this.item, back: false, init: false}])
|
||||
} else {
|
||||
this.$store.dispatch('getFolder', [{ folder: this.item, back: false, init: false }])
|
||||
this.$store.dispatch('getFolder', [{folder: this.item, back: false, init: false}])
|
||||
}
|
||||
}
|
||||
},
|
||||
renameItem: debounce(function(e) {
|
||||
renameItem: debounce(function (e) {
|
||||
// Prevent submit empty string
|
||||
if (e.target.innerText.trim() === '') return
|
||||
|
||||
@@ -274,7 +278,7 @@ export default {
|
||||
|
||||
events.$on('newFolder:focus', (id) => {
|
||||
|
||||
if(this.item.id === id && !this.$isMobile()) {
|
||||
if (this.item.id === id && !this.$isMobile()) {
|
||||
this.$refs[id].focus()
|
||||
document.execCommand('selectAll')
|
||||
}
|
||||
@@ -455,7 +459,7 @@ export default {
|
||||
flex: 0 0 50px;
|
||||
line-height: 0;
|
||||
margin-right: 20px;
|
||||
|
||||
|
||||
.folder {
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
|
||||
@@ -80,7 +80,7 @@ export default {
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'clipboard',
|
||||
'data',
|
||||
'entries',
|
||||
]),
|
||||
currentFile() {
|
||||
return this.files[Math.abs(this.currentIndex) % this.files.length]
|
||||
@@ -174,7 +174,7 @@ export default {
|
||||
getFilesForView() {
|
||||
let requestedFile = this.clipboard[0]
|
||||
|
||||
this.data.map(element => {
|
||||
this.entries.map(element => {
|
||||
|
||||
if (requestedFile.mimetype === 'pdf') {
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'clipboard',
|
||||
'data'
|
||||
'entries'
|
||||
]),
|
||||
isImage() {
|
||||
return this.clipboard[0].type === 'image'
|
||||
@@ -56,7 +56,7 @@
|
||||
files() {
|
||||
let files = []
|
||||
|
||||
this.data.map(element => {
|
||||
this.entries.map(element => {
|
||||
|
||||
if (this.clipboard[0].mimetype === 'pdf') {
|
||||
|
||||
|
||||
@@ -121,7 +121,6 @@
|
||||
<script>
|
||||
import {ChevronUpIcon, ChevronLeftIcon, ChevronRightIcon} from 'vue-feather-icons'
|
||||
import DatatableCell from '@/components/Others/Tables/DatatableCell'
|
||||
import {chunk, sortBy} from 'lodash'
|
||||
import axios from "axios";
|
||||
|
||||
export default {
|
||||
|
||||
24
resources/js/store/modules/fileBrowser.js
vendored
24
resources/js/store/modules/fileBrowser.js
vendored
@@ -13,7 +13,7 @@ const defaultState = {
|
||||
|
||||
browseHistory: [],
|
||||
clipboard: [],
|
||||
data: [],
|
||||
entries: [],
|
||||
}
|
||||
|
||||
const actions = {
|
||||
@@ -207,7 +207,7 @@ const actions = {
|
||||
const mutations = {
|
||||
LOADING_STATE(state, payload) {
|
||||
state.clipboard = []
|
||||
state.data = payload.data
|
||||
state.entries = payload.data
|
||||
state.isLoading = payload.loading
|
||||
},
|
||||
UPDATE_FOLDER_TREE(state, tree) {
|
||||
@@ -217,7 +217,7 @@ const mutations = {
|
||||
state.browseHistory = []
|
||||
},
|
||||
FLUSH_SHARED(state, id) {
|
||||
state.data.find(item => {
|
||||
state.entries.find(item => {
|
||||
if (item.id === id) item.shared = undefined
|
||||
})
|
||||
},
|
||||
@@ -235,7 +235,7 @@ const mutations = {
|
||||
}
|
||||
|
||||
// Rename item name in data view
|
||||
state.data.find(item => {
|
||||
state.entries.find(item => {
|
||||
if (item.id === updatedFile.id) {
|
||||
item.name = updatedFile.name
|
||||
item.color = updatedFile.color ? updatedFile.color : null
|
||||
@@ -247,21 +247,21 @@ const mutations = {
|
||||
state.isSearching = searchState
|
||||
},
|
||||
UPDATE_SHARED_ITEM(state, data) {
|
||||
state.data.find(item => {
|
||||
state.entries.find(item => {
|
||||
if (item.id === data.item_id) item.shared = data
|
||||
})
|
||||
},
|
||||
ADD_NEW_FOLDER(state, folder) {
|
||||
state.data.unshift(folder)
|
||||
state.entries.unshift(folder)
|
||||
},
|
||||
ADD_NEW_ITEMS(state, items) {
|
||||
state.data = state.data.concat(items)
|
||||
state.entries = state.entries.concat(items)
|
||||
},
|
||||
REMOVE_ITEM(state, id) {
|
||||
state.data = state.data.filter(el => el.id !== id)
|
||||
state.entries = state.entries.filter(el => el.id !== id)
|
||||
},
|
||||
INCREASE_FOLDER_ITEM(state, id) {
|
||||
state.data.map(el => {
|
||||
state.entries.map(el => {
|
||||
if (el.id && el.id === id) el.items++
|
||||
})
|
||||
},
|
||||
@@ -272,10 +272,10 @@ const mutations = {
|
||||
state.clipboard = state.clipboard.filter(element => element.id !== item.id)
|
||||
},
|
||||
ADD_ALL_ITEMS_TO_CLIPBOARD(state) {
|
||||
state.clipboard = state.data
|
||||
state.clipboard = state.entries
|
||||
},
|
||||
ADD_ITEM_TO_CLIPBOARD(state, item) {
|
||||
let selectedItem = state.data.find(el => el.id === item.id)
|
||||
let selectedItem = state.entries.find(el => el.id === item.id)
|
||||
|
||||
if (state.clipboard.includes(selectedItem)) return
|
||||
|
||||
@@ -293,7 +293,7 @@ const getters = {
|
||||
isSearching: state => state.isSearching,
|
||||
navigation: state => state.navigation,
|
||||
isLoading: state => state.isLoading,
|
||||
data: state => state.data,
|
||||
entries: state => state.entries,
|
||||
}
|
||||
|
||||
export default {
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<span class="empty-note navigator" v-if="tree.length == 0">
|
||||
{{ $t('sidebar.folders_empty') }}
|
||||
</span>
|
||||
<TreeMenuNavigator class="folder-tree" :depth="0" :nodes="items" v-for="items in tree" :key="items.id"/>
|
||||
<TreeMenuNavigator class="folder-tree" :depth="0" :nodes="folder" v-for="folder in tree" :key="folder.id"/>
|
||||
</ContentGroup>
|
||||
|
||||
<!--Favourites-->
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
<!--Navigator-->
|
||||
<ContentGroup :title="$t('sidebar.navigator_title')" class="navigator">
|
||||
<TreeMenuNavigator class="folder-tree" :depth="0" :nodes="items" v-for="items in navigationTree" :key="items.id" />
|
||||
<TreeMenuNavigator class="folder-tree" :depth="0" :nodes="folder" v-for="folder in navigationTree" :key="folder.id" />
|
||||
</ContentGroup>
|
||||
</ContentSidebar>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user