mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-05 18:23:48 +00:00
- added recent uploads
- added my shared items - added trash
This commit is contained in:
@@ -36,12 +36,12 @@
|
||||
"/chunks/dynamic-page.js": "/chunks/dynamic-page.js?id=1e02112873d0b86eb1ac",
|
||||
"/chunks/email-verified.js": "/chunks/email-verified.js?id=dc4aa33310fc98be6749",
|
||||
"/chunks/environment-setup.js": "/chunks/environment-setup.js?id=a547f8b4e9a83935a777",
|
||||
"/chunks/files.js": "/chunks/files.js?id=f7699c61807c439c44ea",
|
||||
"/chunks/files.js": "/chunks/files.js?id=89340491442f12ba0fc2",
|
||||
"/chunks/files~chunks/platform~chunks/shared/file-browser.js": "/chunks/files~chunks/platform~chunks/shared/file-browser.js?id=4711dbca9d83d061561c",
|
||||
"/chunks/files~chunks/platform~chunks/shared~chunks/shared/file-browser.js": "/chunks/files~chunks/platform~chunks/shared~chunks/shared/file-browser.js?id=74456138b2b60df5cb0d",
|
||||
"/chunks/files~chunks/platform~chunks/shared~chunks/shared/file-browser~chunks/shared/single-file.js": "/chunks/files~chunks/platform~chunks/shared~chunks/shared/file-browser~chunks/shared/single-file.js?id=a831ffd52ccae7b0b983",
|
||||
"/chunks/files~chunks/settings-subscription~chunks/shared/file-browser~chunks/user-subscription.js": "/chunks/files~chunks/settings-subscription~chunks/shared/file-browser~chunks/user-subscription.js?id=c5ec9502bcfad35c502e",
|
||||
"/chunks/files~chunks/shared/file-browser.js": "/chunks/files~chunks/shared/file-browser.js?id=e4167732f5c336b267ec",
|
||||
"/chunks/files~chunks/shared/file-browser.js": "/chunks/files~chunks/shared/file-browser.js?id=994f3dad74f53473e9cd",
|
||||
"/chunks/files~chunks/shared/file-browser~chunks/shared/single-file.js": "/chunks/files~chunks/shared/file-browser~chunks/shared/single-file.js?id=405a76566fbfd86d809b",
|
||||
"/chunks/forgotten-password.js": "/chunks/forgotten-password.js?id=61fb98fd41324af9cfea",
|
||||
"/chunks/homepage.js": "/chunks/homepage.js?id=6f2aac612b4c6eaabf61",
|
||||
@@ -56,7 +56,7 @@
|
||||
"/chunks/plan-settings.js": "/chunks/plan-settings.js?id=17469545c5b6a16c3bbf",
|
||||
"/chunks/plan-subscribers.js": "/chunks/plan-subscribers.js?id=0dd0a5efe0e3cb511c48",
|
||||
"/chunks/plans.js": "/chunks/plans.js?id=5a3c28288952fcad96e5",
|
||||
"/chunks/platform.js": "/chunks/platform.js?id=8a5f06bfac34b38287a8",
|
||||
"/chunks/platform.js": "/chunks/platform.js?id=6b3eb780969c508cbb61",
|
||||
"/chunks/platform~chunks/shared.js": "/chunks/platform~chunks/shared.js?id=3434322e91f37e1887a6",
|
||||
"/chunks/profile.js": "/chunks/profile.js?id=658aa03af778cc2cc100",
|
||||
"/chunks/profile~chunks/settings-password.js": "/chunks/profile~chunks/settings-password.js?id=ddb7be518c092ed392ca",
|
||||
@@ -257,5 +257,89 @@
|
||||
"/chunks/files.2794cdc38c8ca54d123e.hot-update.js": "/chunks/files.2794cdc38c8ca54d123e.hot-update.js",
|
||||
"/chunks/files.894abb6ec52da6cabd48.hot-update.js": "/chunks/files.894abb6ec52da6cabd48.hot-update.js",
|
||||
"/chunks/files~chunks/shared/file-browser.f88511affbcacf404db3.hot-update.js": "/chunks/files~chunks/shared/file-browser.f88511affbcacf404db3.hot-update.js",
|
||||
"/chunks/files.9322fd1e7e2da1962d6b.hot-update.js": "/chunks/files.9322fd1e7e2da1962d6b.hot-update.js"
|
||||
"/chunks/files.9322fd1e7e2da1962d6b.hot-update.js": "/chunks/files.9322fd1e7e2da1962d6b.hot-update.js",
|
||||
"/chunks/files.6460a6e22e9ed75c726c.hot-update.js": "/chunks/files.6460a6e22e9ed75c726c.hot-update.js",
|
||||
"/chunks/files~chunks/shared/file-browser.6460a6e22e9ed75c726c.hot-update.js": "/chunks/files~chunks/shared/file-browser.6460a6e22e9ed75c726c.hot-update.js",
|
||||
"/chunks/files.6a39dd5c9fe5a1416325.hot-update.js": "/chunks/files.6a39dd5c9fe5a1416325.hot-update.js",
|
||||
"/chunks/platform.203766bbbe91b5a232b2.hot-update.js": "/chunks/platform.203766bbbe91b5a232b2.hot-update.js",
|
||||
"/chunks/platform.39af1c52d9841b896471.hot-update.js": "/chunks/platform.39af1c52d9841b896471.hot-update.js",
|
||||
"/chunks/platform.d7f188f41c5899f55e28.hot-update.js": "/chunks/platform.d7f188f41c5899f55e28.hot-update.js",
|
||||
"/chunks/platform.74b5bfd67035108eff2c.hot-update.js": "/chunks/platform.74b5bfd67035108eff2c.hot-update.js",
|
||||
"/chunks/platform.dd453babfc0d0326fb9b.hot-update.js": "/chunks/platform.dd453babfc0d0326fb9b.hot-update.js",
|
||||
"/chunks/platform.b4922a7432f75baf468c.hot-update.js": "/chunks/platform.b4922a7432f75baf468c.hot-update.js",
|
||||
"/chunks/platform.72299c0ff36e93cad454.hot-update.js": "/chunks/platform.72299c0ff36e93cad454.hot-update.js",
|
||||
"/chunks/platform.1f9139d1e9777bf974f4.hot-update.js": "/chunks/platform.1f9139d1e9777bf974f4.hot-update.js",
|
||||
"/js/main.4fcc2cd21d913a0ac631.hot-update.js": "/js/main.4fcc2cd21d913a0ac631.hot-update.js",
|
||||
"/chunks/admin~chunks/files~chunks/platform~chunks/recent-uploads~chunks/shared~chunks/shared/file-browser.js": "/chunks/admin~chunks/files~chunks/platform~chunks/recent-uploads~chunks/shared~chunks/shared/file-browser.js?id=bdacd9bf3a90bd402b38",
|
||||
"/chunks/app-language~chunks/dashboard~chunks/files~chunks/invoices~chunks/pages~chunks/plans~chunks/p~ab3327f1.js": "/chunks/app-language~chunks/dashboard~chunks/files~chunks/invoices~chunks/pages~chunks/plans~chunks/p~ab3327f1.js?id=21b3319187d2b400d048",
|
||||
"/chunks/app-language~chunks/dashboard~chunks/files~chunks/invoices~chunks/pages~chunks/plans~chunks/r~98518b46.js": "/chunks/app-language~chunks/dashboard~chunks/files~chunks/invoices~chunks/pages~chunks/plans~chunks/r~98518b46.js?id=92a6fcac73dbb7ae4f93",
|
||||
"/chunks/files~chunks/platform~chunks/recent-uploads~chunks/shared/file-browser.js": "/chunks/files~chunks/platform~chunks/recent-uploads~chunks/shared/file-browser.js?id=1fb5dfe8da59fa80f189",
|
||||
"/chunks/files~chunks/platform~chunks/recent-uploads~chunks/shared~chunks/shared/file-browser.js": "/chunks/files~chunks/platform~chunks/recent-uploads~chunks/shared~chunks/shared/file-browser.js?id=d0b000f9d2012ab07c6a",
|
||||
"/chunks/files~chunks/platform~chunks/recent-uploads~chunks/shared~chunks/shared/file-browser~chunks/s~2c30a07d.js": "/chunks/files~chunks/platform~chunks/recent-uploads~chunks/shared~chunks/shared/file-browser~chunks/s~2c30a07d.js?id=6ecc39142a9b64d17b3b",
|
||||
"/chunks/files~chunks/recent-uploads~chunks/settings-subscription~chunks/shared/file-browser~chunks/us~e19a6aab.js": "/chunks/files~chunks/recent-uploads~chunks/settings-subscription~chunks/shared/file-browser~chunks/us~e19a6aab.js?id=c6db4e7202b511a9dad2",
|
||||
"/chunks/files~chunks/recent-uploads~chunks/shared/file-browser.js": "/chunks/files~chunks/recent-uploads~chunks/shared/file-browser.js?id=75529efcaced324a5a41",
|
||||
"/chunks/files~chunks/recent-uploads~chunks/shared/file-browser~chunks/shared/single-file.js": "/chunks/files~chunks/recent-uploads~chunks/shared/file-browser~chunks/shared/single-file.js?id=8edd48ae1858eec149cd",
|
||||
"/chunks/recent-uploads.js": "/chunks/recent-uploads.js?id=b589671a092ae4566e60",
|
||||
"/vendors~chunks/files~chunks/platform~chunks/recent-uploads~chunks/shared~chunks/shared/file-browser~~6b78b248.js": "/vendors~chunks/files~chunks/platform~chunks/recent-uploads~chunks/shared~chunks/shared/file-browser~~6b78b248.js?id=7daa0928ae6797db8131",
|
||||
"/chunks/platform.e2a097025658a9f4a106.hot-update.js": "/chunks/platform.e2a097025658a9f4a106.hot-update.js",
|
||||
"/js/main.9ff7db4e7f0964d55a3a.hot-update.js": "/js/main.9ff7db4e7f0964d55a3a.hot-update.js",
|
||||
"/js/main.98535eda5ef162c03c50.hot-update.js": "/js/main.98535eda5ef162c03c50.hot-update.js",
|
||||
"/chunks/recent-uploads.98535eda5ef162c03c50.hot-update.js": "/chunks/recent-uploads.98535eda5ef162c03c50.hot-update.js",
|
||||
"/js/main.b46da8d3f8f60007dbad.hot-update.js": "/js/main.b46da8d3f8f60007dbad.hot-update.js",
|
||||
"/chunks/recent-uploads.b46da8d3f8f60007dbad.hot-update.js": "/chunks/recent-uploads.b46da8d3f8f60007dbad.hot-update.js",
|
||||
"/chunks/recent-uploads.ef83efe69ff122ca694d.hot-update.js": "/chunks/recent-uploads.ef83efe69ff122ca694d.hot-update.js",
|
||||
"/chunks/recent-uploads.363f1a70b5bbd6609b01.hot-update.js": "/chunks/recent-uploads.363f1a70b5bbd6609b01.hot-update.js",
|
||||
"/chunks/recent-uploads.bdf892c49dbbca1df6ed.hot-update.js": "/chunks/recent-uploads.bdf892c49dbbca1df6ed.hot-update.js",
|
||||
"/chunks/files.13a00d88971ab19fa5ad.hot-update.js": "/chunks/files.13a00d88971ab19fa5ad.hot-update.js",
|
||||
"/js/main.1992c50a3d747f382baa.hot-update.js": "/js/main.1992c50a3d747f382baa.hot-update.js",
|
||||
"/chunks/recent-uploads.1992c50a3d747f382baa.hot-update.js": "/chunks/recent-uploads.1992c50a3d747f382baa.hot-update.js",
|
||||
"/js/main.0f4184451587cdf52e71.hot-update.js": "/js/main.0f4184451587cdf52e71.hot-update.js",
|
||||
"/js/main.1dee545ed381f89c9c24.hot-update.js": "/js/main.1dee545ed381f89c9c24.hot-update.js",
|
||||
"/chunks/platform.1dee545ed381f89c9c24.hot-update.js": "/chunks/platform.1dee545ed381f89c9c24.hot-update.js",
|
||||
"/chunks/recent-uploads.1dee545ed381f89c9c24.hot-update.js": "/chunks/recent-uploads.1dee545ed381f89c9c24.hot-update.js",
|
||||
"/chunks/recent-uploads.4c6c689d087dde7707bc.hot-update.js": "/chunks/recent-uploads.4c6c689d087dde7707bc.hot-update.js",
|
||||
"/chunks/recent-uploads.df849ef4f147951d8f91.hot-update.js": "/chunks/recent-uploads.df849ef4f147951d8f91.hot-update.js",
|
||||
"/chunks/recent-uploads.a7cb2dd657f086d4d12b.hot-update.js": "/chunks/recent-uploads.a7cb2dd657f086d4d12b.hot-update.js",
|
||||
"/js/main.afa524c4a5835d471cde.hot-update.js": "/js/main.afa524c4a5835d471cde.hot-update.js",
|
||||
"/js/main.de8ab938e5fdb86dcb86.hot-update.js": "/js/main.de8ab938e5fdb86dcb86.hot-update.js",
|
||||
"/js/main.e3ff88b07311820bcc70.hot-update.js": "/js/main.e3ff88b07311820bcc70.hot-update.js",
|
||||
"/chunks/admin~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared~e44242d2.js": "/chunks/admin~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared~e44242d2.js?id=6ca8fdbb207af2bc1226",
|
||||
"/chunks/app-language~chunks/dashboard~chunks/files~chunks/invoices~chunks/my-shared-items~chunks/page~d96f8396.js": "/chunks/app-language~chunks/dashboard~chunks/files~chunks/invoices~chunks/my-shared-items~chunks/page~d96f8396.js?id=08b366de8d35a6920680",
|
||||
"/chunks/app-language~chunks/dashboard~chunks/files~chunks/invoices~chunks/my-shared-items~chunks/page~dd84f5af.js": "/chunks/app-language~chunks/dashboard~chunks/files~chunks/invoices~chunks/my-shared-items~chunks/page~dd84f5af.js?id=09a3ccd0818042bbd00f",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared/file-browser~d426c4eb.js": "/chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared/file-browser~d426c4eb.js?id=73d323596b22f3fb5775",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared~chunks/share~9a5728b1.js": "/chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared~chunks/share~9a5728b1.js?id=4f10f893c25e398f40bc",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared~chunks/share~aaaa339d.js": "/chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared~chunks/share~aaaa339d.js?id=593b877c4ab874ceccfe",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/settings-subscription~chunks/shared~5df0355d.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/settings-subscription~chunks/shared~5df0355d.js?id=00e9511436f16aa2fb9f",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/shared/s~b80f3c10.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/shared/s~b80f3c10.js?id=b8f5bee79fa82cda17e2",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/file-browser~chunks/trash.js?id=2cd2ace8496e54da8138",
|
||||
"/chunks/my-shared-items.js": "/chunks/my-shared-items.js?id=fcb7f49258a33d719b5d",
|
||||
"/chunks/recent-uploads.e3ff88b07311820bcc70.hot-update.js": "/chunks/recent-uploads.e3ff88b07311820bcc70.hot-update.js",
|
||||
"/chunks/trash.js": "/chunks/trash.js?id=36f47de5ca4a87f9b913",
|
||||
"/vendors~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared~chun~57b3f416.js": "/vendors~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared~chun~57b3f416.js?id=97d6f92560813d690f24",
|
||||
"/chunks/platform.5389987c296bbc0f9256.hot-update.js": "/chunks/platform.5389987c296bbc0f9256.hot-update.js",
|
||||
"/chunks/trash.0c591e25c8bd11631179.hot-update.js": "/chunks/trash.0c591e25c8bd11631179.hot-update.js",
|
||||
"/chunks/trash.bfa2a54ad7fb705cfe71.hot-update.js": "/chunks/trash.bfa2a54ad7fb705cfe71.hot-update.js",
|
||||
"/chunks/trash.993289bbaead44676da3.hot-update.js": "/chunks/trash.993289bbaead44676da3.hot-update.js",
|
||||
"/chunks/trash.e1c0a01e857c872e4e70.hot-update.js": "/chunks/trash.e1c0a01e857c872e4e70.hot-update.js",
|
||||
"/chunks/trash.4a90b88884e33401a5bf.hot-update.js": "/chunks/trash.4a90b88884e33401a5bf.hot-update.js",
|
||||
"/chunks/trash.ca3b6478da7aa485374d.hot-update.js": "/chunks/trash.ca3b6478da7aa485374d.hot-update.js",
|
||||
"/chunks/files.64f3c95dc0dedb45e6be.hot-update.js": "/chunks/files.64f3c95dc0dedb45e6be.hot-update.js",
|
||||
"/chunks/my-shared-items.81ad04da835ff593b6e9.hot-update.js": "/chunks/my-shared-items.81ad04da835ff593b6e9.hot-update.js",
|
||||
"/chunks/recent-uploads.81ad04da835ff593b6e9.hot-update.js": "/chunks/recent-uploads.81ad04da835ff593b6e9.hot-update.js",
|
||||
"/chunks/trash.81ad04da835ff593b6e9.hot-update.js": "/chunks/trash.81ad04da835ff593b6e9.hot-update.js",
|
||||
"/js/main.13298d1f909ea13addb9.hot-update.js": "/js/main.13298d1f909ea13addb9.hot-update.js",
|
||||
"/js/main.b364ff4c5fb13fc97764.hot-update.js": "/js/main.b364ff4c5fb13fc97764.hot-update.js",
|
||||
"/chunks/platform.b364ff4c5fb13fc97764.hot-update.js": "/chunks/platform.b364ff4c5fb13fc97764.hot-update.js",
|
||||
"/chunks/platform.44ba1788329de6cf8352.hot-update.js": "/chunks/platform.44ba1788329de6cf8352.hot-update.js",
|
||||
"/chunks/platform.a2f81a0d37ffe8910705.hot-update.js": "/chunks/platform.a2f81a0d37ffe8910705.hot-update.js",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared/file-browser~d426c4eb.c1337ebfcc929d0c4c07.hot-update.js": "/chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared/file-browser~d426c4eb.c1337ebfcc929d0c4c07.hot-update.js",
|
||||
"/chunks/platform.a56274997f14b21ff2d2.hot-update.js": "/chunks/platform.a56274997f14b21ff2d2.hot-update.js",
|
||||
"/js/main.9bd7c889b7b9948619ab.hot-update.js": "/js/main.9bd7c889b7b9948619ab.hot-update.js",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared/file-browser~d426c4eb.70615bf6552965d4a5c7.hot-update.js": "/chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared/file-browser~d426c4eb.70615bf6552965d4a5c7.hot-update.js",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared/file-browser~d426c4eb.30d2ff67b1b7009ef0f3.hot-update.js": "/chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared/file-browser~d426c4eb.30d2ff67b1b7009ef0f3.hot-update.js",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared/file-browser~d426c4eb.26ea26912808891d2959.hot-update.js": "/chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared/file-browser~d426c4eb.26ea26912808891d2959.hot-update.js",
|
||||
"/js/main.cb31c8e951615eb1e3a1.hot-update.js": "/js/main.cb31c8e951615eb1e3a1.hot-update.js",
|
||||
"/js/main.e123ff26f3f3f227b8fe.hot-update.js": "/js/main.e123ff26f3f3f227b8fe.hot-update.js",
|
||||
"/chunks/admin~chunks/platform.068c46bd7c6b6bbeef39.hot-update.js": "/chunks/admin~chunks/platform.068c46bd7c6b6bbeef39.hot-update.js",
|
||||
"/chunks/admin~chunks/platform.5bca50650c704e335f3d.hot-update.js": "/chunks/admin~chunks/platform.5bca50650c704e335f3d.hot-update.js"
|
||||
}
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
<MobileToolbar />
|
||||
|
||||
<!--Mobile Actions-->
|
||||
<FileActionsMobile />
|
||||
<FileActionsMobile>
|
||||
<slot name="file-actions-mobile"></slot>
|
||||
</FileActionsMobile>
|
||||
|
||||
<!--Item previews list-->
|
||||
<div v-if="isList" class="file-list-wrapper">
|
||||
|
||||
@@ -35,24 +35,17 @@ export default {
|
||||
]),
|
||||
},
|
||||
methods: {
|
||||
flushBrowseHistory() {
|
||||
this.$store.commit('FLUSH_FOLDER_HISTORY')
|
||||
},
|
||||
goToFiles() {
|
||||
this.$store.dispatch('getFolder', [{folder: this.homeDirectory, back: false, init: true}])
|
||||
this.flushBrowseHistory()
|
||||
},
|
||||
goToLatest() {
|
||||
this.$store.dispatch('getLatest')
|
||||
this.flushBrowseHistory()
|
||||
},
|
||||
goToTrash() {
|
||||
this.$store.dispatch('getTrash')
|
||||
this.flushBrowseHistory()
|
||||
},
|
||||
goToShared() {
|
||||
this.$store.dispatch('getShared', [{back: false, init: false}])
|
||||
this.flushBrowseHistory()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,7 +223,6 @@ export default {
|
||||
if (this.$isThisLocation('public')) {
|
||||
this.$store.dispatch('browseShared', [{folder: this.item, back: false, init: false}])
|
||||
} else {
|
||||
//this.$store.dispatch('getFolder', [{folder: this.item, back: false, init: false}])
|
||||
this.$router.push({name: 'Files', params: {id: this.item.id}})
|
||||
}
|
||||
} else {
|
||||
@@ -261,8 +260,14 @@ export default {
|
||||
if (this.$isThisLocation('public')) {
|
||||
this.$store.dispatch('browseShared', [{folder: this.item, back: false, init: false}])
|
||||
} else {
|
||||
//this.$store.dispatch('getFolder', [{folder: this.item, back: false, init: false}])
|
||||
this.$router.push({name: 'Files', params: {id: this.item.id}})
|
||||
let route = this.$router.currentRoute.name
|
||||
|
||||
if (route === 'Files')
|
||||
this.$router.push({name: 'Files', params: {id: this.item.id}})
|
||||
if (route === 'Trash')
|
||||
this.$router.push({name: 'Trash', params: {id: this.item.id}})
|
||||
else
|
||||
this.$router.push({name: 'Files', params: {id: this.item.id}})
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
27
resources/js/router.js
vendored
27
resources/js/router.js
vendored
@@ -405,6 +405,33 @@ const routesUser = [
|
||||
requiresAuth: true
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'RecentUploads',
|
||||
path: '/platform/recent-uploads',
|
||||
component: () =>
|
||||
import(/* webpackChunkName: "chunks/recent-uploads" */ './views/FileView/RecentUploads/RecentUploads'),
|
||||
meta: {
|
||||
requiresAuth: true
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'MySharedItems',
|
||||
path: '/platform/my-shared-items',
|
||||
component: () =>
|
||||
import(/* webpackChunkName: "chunks/my-shared-items" */ './views/FileView/MySharedItems/MySharedItems'),
|
||||
meta: {
|
||||
requiresAuth: true
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'Trash',
|
||||
path: '/platform/trash/:id?',
|
||||
component: () =>
|
||||
import(/* webpackChunkName: "chunks/trash" */ './views/FileView/Trash/Trash'),
|
||||
meta: {
|
||||
requiresAuth: true
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'Settings',
|
||||
path: '/platform/settings',
|
||||
|
||||
47
resources/js/store/modules/fileBrowser.js
vendored
47
resources/js/store/modules/fileBrowser.js
vendored
@@ -43,16 +43,9 @@ const actions = {
|
||||
}
|
||||
})
|
||||
},
|
||||
getLatest: ({commit, getters}) => {
|
||||
getRecentUploads: ({commit, getters}) => {
|
||||
commit('LOADING_STATE', {loading: true, data: []})
|
||||
|
||||
commit('STORE_PREVIOUS_FOLDER', getters.currentFolder)
|
||||
commit('STORE_CURRENT_FOLDER', {
|
||||
name: i18n.t('sidebar.latest'),
|
||||
id: undefined,
|
||||
location: 'latest',
|
||||
})
|
||||
|
||||
axios
|
||||
.get(getters.api + '/browse/latest')
|
||||
.then(response => {
|
||||
@@ -61,45 +54,25 @@ const actions = {
|
||||
})
|
||||
.catch(() => Vue.prototype.$isSomethingWrong())
|
||||
},
|
||||
getShared: ({commit, getters}) => {
|
||||
getMySharedItems: ({commit, getters}) => {
|
||||
commit('LOADING_STATE', {loading: true, data: []})
|
||||
commit('FLUSH_FOLDER_HISTORY')
|
||||
|
||||
let currentFolder = {
|
||||
name: i18n.t('sidebar.my_shared'),
|
||||
location: 'shared',
|
||||
id: undefined,
|
||||
}
|
||||
|
||||
commit('STORE_CURRENT_FOLDER', currentFolder)
|
||||
|
||||
axios
|
||||
.get(getters.api + '/browse/share' + getters.sorting.URI)
|
||||
.then(response => {
|
||||
commit('LOADING_STATE', {loading: false, data: response.data})
|
||||
commit('STORE_PREVIOUS_FOLDER', currentFolder)
|
||||
|
||||
events.$emit('scrollTop')
|
||||
})
|
||||
.catch(() => Vue.prototype.$isSomethingWrong())
|
||||
},
|
||||
getTrash: ({commit, getters}) => {
|
||||
getTrash: ({commit, getters}, id) => {
|
||||
commit('LOADING_STATE', {loading: true, data: []})
|
||||
commit('FLUSH_FOLDER_HISTORY')
|
||||
|
||||
let trash = {
|
||||
name: i18n.t('locations.trash'),
|
||||
id: undefined,
|
||||
location: 'trash-root',
|
||||
}
|
||||
|
||||
commit('STORE_CURRENT_FOLDER', trash)
|
||||
|
||||
axios
|
||||
.get(getters.api + '/browse/trash' + getters.sorting.URI)
|
||||
.get(`${getters.api}/browse/trash/${id}/${getters.sorting.URI}`)
|
||||
.then(response => {
|
||||
commit('LOADING_STATE', {loading: false, data: response.data})
|
||||
commit('STORE_PREVIOUS_FOLDER', trash)
|
||||
|
||||
events.$emit('scrollTop')
|
||||
})
|
||||
@@ -142,20 +115,11 @@ const mutations = {
|
||||
UPDATE_FOLDER_TREE(state, tree) {
|
||||
state.navigation = tree
|
||||
},
|
||||
FLUSH_FOLDER_HISTORY(state) {
|
||||
state.browseHistory = []
|
||||
},
|
||||
FLUSH_SHARED(state, id) {
|
||||
state.entries.find(item => {
|
||||
if (item.id === id) item.shared = undefined
|
||||
})
|
||||
},
|
||||
STORE_PREVIOUS_FOLDER(state, folder) {
|
||||
state.browseHistory.push(folder)
|
||||
},
|
||||
REMOVE_BROWSER_HISTORY(state) {
|
||||
state.browseHistory.pop()
|
||||
},
|
||||
CHANGE_ITEM_NAME(state, updatedFile) {
|
||||
|
||||
// Rename filename in clipboard
|
||||
@@ -191,9 +155,6 @@ const mutations = {
|
||||
if (el.id && el.id === id) el.items++
|
||||
})
|
||||
},
|
||||
STORE_CURRENT_FOLDER(state, folder) {
|
||||
state.currentFolder = folder
|
||||
},
|
||||
REMOVE_ITEM_FROM_CLIPBOARD(state, item) {
|
||||
state.clipboard = state.clipboard.filter(element => element.id !== item.id)
|
||||
},
|
||||
|
||||
10
resources/js/store/modules/sharing.js
vendored
10
resources/js/store/modules/sharing.js
vendored
@@ -24,12 +24,6 @@ const actions = {
|
||||
browseShared: ({commit, getters}, [payload]) => {
|
||||
commit('LOADING_STATE', {loading: true, data: []})
|
||||
|
||||
if (payload.init)
|
||||
commit('FLUSH_FOLDER_HISTORY')
|
||||
|
||||
if (! payload.back && !payload.sorting)
|
||||
commit('STORE_PREVIOUS_FOLDER', getters.currentFolder)
|
||||
|
||||
payload.folder.location = 'public'
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
@@ -37,12 +31,8 @@ const actions = {
|
||||
.get(`/api/browse/folders/${payload.folder.id}/${router.currentRoute.params.token}${getters.sorting.URI}`)
|
||||
.then(response => {
|
||||
commit('LOADING_STATE', {loading: false, data: response.data})
|
||||
commit('STORE_CURRENT_FOLDER', payload.folder)
|
||||
events.$emit('scrollTop')
|
||||
|
||||
if (payload.back && !payload.sorting)
|
||||
commit('REMOVE_BROWSER_HISTORY')
|
||||
|
||||
resolve(response)
|
||||
})
|
||||
.catch((error) => {
|
||||
|
||||
@@ -11,18 +11,15 @@
|
||||
<OptionGroup v-if="isFolder">
|
||||
<Option @click.native="addToFavourites" :title="isInFavourites ? $t('context_menu.remove_from_favourites') : $t('context_menu.add_to_favourites')" icon="favourites" />
|
||||
</OptionGroup>
|
||||
|
||||
<OptionGroup>
|
||||
<Option @click.native="$renameFileOrFolder(item)" :title="$t('context_menu.rename')" icon="rename" />
|
||||
<Option @click.native="$moveFileOrFolder(item)" :title="$t('context_menu.move')" icon="move-item" />
|
||||
<Option @click.native="$deleteFileOrFolder(item)" :title="$t('context_menu.delete')" icon="trash" />
|
||||
</OptionGroup>
|
||||
|
||||
<OptionGroup>
|
||||
<Option @click.native="$shareFileOrFolder(item)" :title="item.shared ? $t('context_menu.share_edit') : $t('context_menu.share')" icon="share" />
|
||||
<Option @click.native="$updateTeamFolder(item)" v-if="isFolder" :title="$t('Convert as Team Folder')" icon="users" />
|
||||
</OptionGroup>
|
||||
|
||||
<OptionGroup>
|
||||
<Option @click.native="$openInDetailPanel(item)" :title="$t('context_menu.detail')" icon="detail" />
|
||||
<Option @click.native="downloadItem" :title="$t('context_menu.download')" icon="download" />
|
||||
@@ -33,12 +30,10 @@
|
||||
<OptionGroup v-if="!hasFile">
|
||||
<Option @click.native="addToFavourites" :title="isInFavourites ? $t('context_menu.remove_from_favourites') : $t('context_menu.add_to_favourites')" icon="favourites" />
|
||||
</OptionGroup>
|
||||
|
||||
<OptionGroup>
|
||||
<Option @click.native="$moveFileOrFolder(item)" v-if="!$isThisLocation(['latest'])" :title="$t('context_menu.move')" icon="move-item" />
|
||||
<Option @click.native="$moveFileOrFolder(item)" :title="$t('context_menu.move')" icon="move-item" />
|
||||
<Option @click.native="$deleteFileOrFolder(item)" :title="$t('context_menu.delete')" icon="trash" />
|
||||
</OptionGroup>
|
||||
|
||||
<OptionGroup>
|
||||
<Option @click.native="downloadItem" :title="$t('context_menu.download')" icon="download" />
|
||||
</OptionGroup>
|
||||
@@ -46,7 +41,11 @@
|
||||
</ContextMenu>
|
||||
|
||||
<!--Show files & folders-->
|
||||
<FileBrowser/>
|
||||
<FileBrowser>
|
||||
<template v-slot:file-actions-mobile>
|
||||
<!-- todo: Implement mobile buttons-->
|
||||
</template>
|
||||
</FileBrowser>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -59,7 +58,7 @@
|
||||
import {events} from "../../../bus";
|
||||
|
||||
export default {
|
||||
name: 'FilesView',
|
||||
name: 'Files',
|
||||
components: {
|
||||
OptionGroup,
|
||||
FileBrowser,
|
||||
|
||||
117
resources/js/views/FileView/MySharedItems/MySharedItems.vue
Normal file
117
resources/js/views/FileView/MySharedItems/MySharedItems.vue
Normal file
@@ -0,0 +1,117 @@
|
||||
<template>
|
||||
<div>
|
||||
<ContextMenu>
|
||||
<template v-slot:single-select v-if="item">
|
||||
<OptionGroup v-if="isFolder">
|
||||
<Option @click.native="addToFavourites" :title="isInFavourites ? $t('context_menu.remove_from_favourites') : $t('context_menu.add_to_favourites')" icon="favourites" />
|
||||
</OptionGroup>
|
||||
<OptionGroup>
|
||||
<Option @click.native="$renameFileOrFolder(item)" :title="$t('context_menu.rename')" icon="rename" />
|
||||
<Option @click.native="$deleteFileOrFolder(item)" :title="$t('context_menu.delete')" icon="trash" />
|
||||
</OptionGroup>
|
||||
<OptionGroup>
|
||||
<Option @click.native="$shareFileOrFolder(item)" :title="item.shared ? $t('context_menu.share_edit') : $t('context_menu.share')" icon="share" />
|
||||
</OptionGroup>
|
||||
<OptionGroup>
|
||||
<Option @click.native="$openInDetailPanel(item)" :title="$t('context_menu.detail')" icon="detail" />
|
||||
<Option @click.native="downloadItem" :title="$t('context_menu.download')" icon="download" />
|
||||
</OptionGroup>
|
||||
</template>
|
||||
|
||||
<template v-slot:multiple-select v-if="item">
|
||||
<OptionGroup v-if="!hasFile">
|
||||
<Option @click.native="addToFavourites" :title="isInFavourites ? $t('context_menu.remove_from_favourites') : $t('context_menu.add_to_favourites')" icon="favourites" />
|
||||
</OptionGroup>
|
||||
<OptionGroup>
|
||||
<Option @click.native="$shareCancel" :title="$t('context_menu.share_cancel')" icon="share" />
|
||||
<Option @click.native="$deleteFileOrFolder(item)" :title="$t('context_menu.delete')" icon="trash" />
|
||||
</OptionGroup>
|
||||
<OptionGroup>
|
||||
<Option @click.native="downloadItem" :title="$t('context_menu.download')" icon="download" />
|
||||
</OptionGroup>
|
||||
</template>
|
||||
</ContextMenu>
|
||||
|
||||
<!--Show files & folders-->
|
||||
<FileBrowser>
|
||||
<template v-slot:file-actions-mobile>
|
||||
<!-- todo: Implement mobile buttons-->
|
||||
</template>
|
||||
</FileBrowser>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import FileBrowser from '/resources/js/components/FilesView/FileBrowser'
|
||||
import ContextMenu from '/resources/js/components/FilesView/ContextMenu'
|
||||
import OptionGroup from '/resources/js/components/FilesView/OptionGroup'
|
||||
import Option from '/resources/js/components/FilesView/Option'
|
||||
import { mapGetters } from 'vuex'
|
||||
import {events} from "../../../bus";
|
||||
|
||||
export default {
|
||||
name: 'MySharedItems',
|
||||
components: {
|
||||
OptionGroup,
|
||||
FileBrowser,
|
||||
ContextMenu,
|
||||
Option,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'clipboard',
|
||||
'user',
|
||||
]),
|
||||
isFolder() {
|
||||
return this.item && this.item.type === 'folder'
|
||||
},
|
||||
isInFavourites() {
|
||||
return this.favourites.find((el) => el.id === this.item.id)
|
||||
},
|
||||
hasFile() {
|
||||
return this.clipboard.find(item => item.type !== 'folder')
|
||||
},
|
||||
favourites() {
|
||||
return this.user.data.relationships.favourites.data.attributes.folders
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
item: undefined,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
addToFavourites() {
|
||||
// Check if folder is in favourites and then add/remove from favourites
|
||||
if (
|
||||
this.favourites &&
|
||||
!this.favourites.find(el => el.id === this.item.id)
|
||||
) {
|
||||
// Add to favourite folder that is not selected
|
||||
if (!this.clipboard.includes(this.item)) {
|
||||
this.$store.dispatch('addToFavourites', this.item)
|
||||
}
|
||||
|
||||
// Add to favourites all selected folders
|
||||
if (this.clipboard.includes(this.item)) {
|
||||
this.$store.dispatch('addToFavourites', null)
|
||||
}
|
||||
} else {
|
||||
this.$store.dispatch('removeFromFavourites', this.item)
|
||||
}
|
||||
},
|
||||
downloadItem() {
|
||||
if (this.clipboard.length > 1 || (this.clipboard.length === 1 && this.clipboard[0].type === 'folder'))
|
||||
this.$store.dispatch('downloadZip')
|
||||
else {
|
||||
this.$downloadFile(this.item.file_url, this.item.name + '.' + this.item.mimetype)
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.$store.dispatch('getMySharedItems')
|
||||
|
||||
events.$on('contextMenu:show', (event, item) => this.item = item)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -8,66 +8,66 @@
|
||||
<!--Locations-->
|
||||
<ContentGroup :title="$t('sidebar.locations_title')">
|
||||
<div class="menu-list-wrapper vertical">
|
||||
<a class="menu-list-item link">
|
||||
<router-link :to="{name: 'Files'}" class="menu-list-item link">
|
||||
<div class="icon text-theme">
|
||||
<home-icon size="17" />
|
||||
</div>
|
||||
<div class="label text-theme">
|
||||
{{ $t('sidebar.home') }}
|
||||
</div>
|
||||
</a>
|
||||
<a class="menu-list-item link">
|
||||
</router-link>
|
||||
<router-link :to="{name: 'RecentUploads'}" class="menu-list-item link">
|
||||
<div class="icon text-theme">
|
||||
<upload-cloud-icon size="17" />
|
||||
</div>
|
||||
<div class="label text-theme">
|
||||
{{ $t('sidebar.latest') }}
|
||||
</div>
|
||||
</a>
|
||||
<a class="menu-list-item link">
|
||||
</router-link>
|
||||
<router-link :to="{name: 'MySharedItems'}" class="menu-list-item link">
|
||||
<div class="icon text-theme">
|
||||
<link-icon size="17" />
|
||||
</div>
|
||||
<div class="label text-theme">
|
||||
{{ $t('sidebar.my_shared') }}
|
||||
</div>
|
||||
</a>
|
||||
<a class="menu-list-item link">
|
||||
</router-link>
|
||||
<router-link :to="{name: 'Trash'}" class="menu-list-item link">
|
||||
<div class="icon text-theme">
|
||||
<trash2-icon size="17" />
|
||||
</div>
|
||||
<div class="label text-theme">
|
||||
{{ $t('locations.trash') }}
|
||||
</div>
|
||||
</a>
|
||||
</router-link>
|
||||
</div>
|
||||
</ContentGroup>
|
||||
|
||||
<!--Locations-->
|
||||
<ContentGroup :title="$t('Collaboration')" slug="collaboration" :can-collapse="true">
|
||||
<div class="menu-list-wrapper vertical">
|
||||
<a class="menu-list-item link">
|
||||
<router-link class="menu-list-item link">
|
||||
<div class="icon text-theme">
|
||||
<users-icon size="17" />
|
||||
</div>
|
||||
<div class="label text-theme">
|
||||
{{ $t('Team Folders') }}
|
||||
</div>
|
||||
</a>
|
||||
<a class="menu-list-item link">
|
||||
</router-link>
|
||||
<router-link class="menu-list-item link">
|
||||
<div class="icon text-theme">
|
||||
<user-check-icon size="17" />
|
||||
</div>
|
||||
<div class="label text-theme">
|
||||
{{ $t('Shared with Me') }}
|
||||
</div>
|
||||
</a>
|
||||
</router-link>
|
||||
</div>
|
||||
</ContentGroup>
|
||||
|
||||
<!--Navigator-->
|
||||
<ContentGroup :title="$t('sidebar.navigator_title')" slug="navigator" :can-collapse="true" class="navigator">
|
||||
<span class="empty-note navigator" v-if="tree.length === 0">
|
||||
<span v-if="tree.length === 0" class="empty-note navigator">
|
||||
{{ $t('sidebar.folders_empty') }}
|
||||
</span>
|
||||
<TreeMenuNavigator class="folder-tree" :depth="0" :nodes="folder" v-for="folder in tree" :key="folder.id"/>
|
||||
@@ -82,13 +82,13 @@
|
||||
{{ $t('sidebar.favourites_empty') }}
|
||||
</span>
|
||||
|
||||
<a class="menu-list-item" v-for="folder in favourites" :key="folder.id">
|
||||
<router-link :to="{name: 'Files', params: {id: folder.id}}" v-for="folder in favourites" :key="folder.id" class="menu-list-item">
|
||||
<div class="text-theme">
|
||||
<folder-icon size="17" class="folder-icon text-theme"></folder-icon>
|
||||
<folder-icon size="17" class="folder-icon text-theme" />
|
||||
<span class="label text-theme">{{ folder.name }}</span>
|
||||
</div>
|
||||
<x-icon size="17" @click.stop="$removeFavourite(folder)" class="delete-icon"></x-icon>
|
||||
</a>
|
||||
<x-icon @click.stop="$removeFavourite(folder)" size="17" class="delete-icon" />
|
||||
</router-link>
|
||||
</transition-group>
|
||||
</div>
|
||||
</ContentGroup>
|
||||
@@ -165,8 +165,6 @@ export default {
|
||||
// Prevent to move folders to self
|
||||
if (this.clipboard.length > 0 && this.clipboard.find(item => item.type !== 'folder')) return
|
||||
|
||||
// Store favourites folder
|
||||
|
||||
//Add to favourites non selected folder
|
||||
if (!this.clipboard.includes(this.draggedItem)) {
|
||||
this.$store.dispatch('addToFavourites', this.draggedItem)
|
||||
|
||||
81
resources/js/views/FileView/RecentUploads/RecentUploads.vue
Normal file
81
resources/js/views/FileView/RecentUploads/RecentUploads.vue
Normal file
@@ -0,0 +1,81 @@
|
||||
<template>
|
||||
<div>
|
||||
<ContextMenu>
|
||||
<template v-slot:single-select v-if="item">
|
||||
<OptionGroup>
|
||||
<Option @click.native="$renameFileOrFolder(item)" :title="$t('context_menu.rename')" icon="rename" />
|
||||
<Option @click.native="$moveFileOrFolder(item)" :title="$t('context_menu.move')" icon="move-item" />
|
||||
<Option @click.native="$deleteFileOrFolder(item)" :title="$t('context_menu.delete')" icon="trash" />
|
||||
</OptionGroup>
|
||||
<OptionGroup>
|
||||
<Option @click.native="$shareFileOrFolder(item)" :title="item.shared ? $t('context_menu.share_edit') : $t('context_menu.share')" icon="share" />
|
||||
</OptionGroup>
|
||||
<OptionGroup>
|
||||
<Option @click.native="$openInDetailPanel(item)" :title="$t('context_menu.detail')" icon="detail" />
|
||||
<Option @click.native="downloadItem" :title="$t('context_menu.download')" icon="download" />
|
||||
</OptionGroup>
|
||||
</template>
|
||||
|
||||
<template v-slot:multiple-select v-if="item">
|
||||
<OptionGroup>
|
||||
<Option @click.native="$moveFileOrFolder(item)" :title="$t('context_menu.move')" icon="move-item" />
|
||||
<Option @click.native="$deleteFileOrFolder(item)" :title="$t('context_menu.delete')" icon="trash" />
|
||||
</OptionGroup>
|
||||
<OptionGroup>
|
||||
<Option @click.native="downloadItem" :title="$t('context_menu.download')" icon="download" />
|
||||
</OptionGroup>
|
||||
</template>
|
||||
</ContextMenu>
|
||||
|
||||
<!--Show files & folders-->
|
||||
<FileBrowser>
|
||||
<template v-slot:file-actions-mobile>
|
||||
<!-- todo: Implement mobile buttons-->
|
||||
</template>
|
||||
</FileBrowser>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import FileBrowser from '/resources/js/components/FilesView/FileBrowser'
|
||||
import ContextMenu from '/resources/js/components/FilesView/ContextMenu'
|
||||
import OptionGroup from '/resources/js/components/FilesView/OptionGroup'
|
||||
import Option from '/resources/js/components/FilesView/Option'
|
||||
import { mapGetters } from 'vuex'
|
||||
import {events} from "../../../bus";
|
||||
|
||||
export default {
|
||||
name: 'RecentUploads',
|
||||
components: {
|
||||
OptionGroup,
|
||||
FileBrowser,
|
||||
ContextMenu,
|
||||
Option,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'clipboard',
|
||||
'user',
|
||||
])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
item: undefined,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
downloadItem() {
|
||||
if (this.clipboard.length > 1 || (this.clipboard.length === 1 && this.clipboard[0].type === 'folder'))
|
||||
this.$store.dispatch('downloadZip')
|
||||
else {
|
||||
this.$downloadFile(this.item.file_url, this.item.name + '.' + this.item.mimetype)
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.$store.dispatch('getRecentUploads')
|
||||
|
||||
events.$on('contextMenu:show', (event, item) => this.item = item)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
84
resources/js/views/FileView/Trash/Trash.vue
Normal file
84
resources/js/views/FileView/Trash/Trash.vue
Normal file
@@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<div>
|
||||
<ContextMenu>
|
||||
<template v-slot:empty-select>
|
||||
<OptionGroup>
|
||||
<Option @click.native="$emptyTrash" :title="$t('context_menu.empty_trash')" icon="empty-trash" />
|
||||
</OptionGroup>
|
||||
</template>
|
||||
|
||||
<template v-slot:single-select v-if="item">
|
||||
<OptionGroup>
|
||||
<Option @click.native="$restoreFileOrFolder(item)" v-if="item" :title="$t('context_menu.restore')" icon="restore" />
|
||||
<Option @click.native="$deleteFileOrFolder(item)" v-if="item" :title="$t('context_menu.delete')" icon="trash" />
|
||||
<Option @click.native="$emptyTrash" :title="$t('context_menu.empty_trash')" icon="empty-trash" />
|
||||
</OptionGroup>
|
||||
<OptionGroup>
|
||||
<Option @click.native="$openInDetailPanel(item)" :title="$t('context_menu.detail')" icon="detail" />
|
||||
<Option @click.native="downloadItem" :title="$t('context_menu.download')" icon="download" />
|
||||
</OptionGroup>
|
||||
</template>
|
||||
|
||||
<template v-slot:multiple-select v-if="item">
|
||||
<OptionGroup>
|
||||
<Option @click.native="$restoreFileOrFolder(item)" v-if="item" :title="$t('context_menu.restore')" icon="restore" />
|
||||
<Option @click.native="$deleteFileOrFolder(item)" :title="$t('context_menu.delete')" icon="trash" />
|
||||
<Option @click.native="$emptyTrash" :title="$t('context_menu.empty_trash')" icon="empty-trash" />
|
||||
</OptionGroup>
|
||||
<OptionGroup>
|
||||
<Option @click.native="downloadItem" :title="$t('context_menu.download')" icon="download" />
|
||||
</OptionGroup>
|
||||
</template>
|
||||
</ContextMenu>
|
||||
|
||||
<!--Show files & folders-->
|
||||
<FileBrowser>
|
||||
<template v-slot:file-actions-mobile>
|
||||
<!-- todo: Implement mobile buttons-->
|
||||
</template>
|
||||
</FileBrowser>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import FileBrowser from '/resources/js/components/FilesView/FileBrowser'
|
||||
import ContextMenu from '/resources/js/components/FilesView/ContextMenu'
|
||||
import OptionGroup from '/resources/js/components/FilesView/OptionGroup'
|
||||
import Option from '/resources/js/components/FilesView/Option'
|
||||
import { mapGetters } from 'vuex'
|
||||
import {events} from "../../../bus";
|
||||
|
||||
export default {
|
||||
name: 'Trash',
|
||||
components: {
|
||||
OptionGroup,
|
||||
FileBrowser,
|
||||
ContextMenu,
|
||||
Option,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'clipboard',
|
||||
]),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
item: undefined,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
downloadItem() {
|
||||
if (this.clipboard.length > 1 || (this.clipboard.length === 1 && this.clipboard[0].type === 'folder'))
|
||||
this.$store.dispatch('downloadZip')
|
||||
else {
|
||||
this.$downloadFile(this.item.file_url, this.item.name + '.' + this.item.mimetype)
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.$store.dispatch('getTrash', this.$route.params.id)
|
||||
|
||||
events.$on('contextMenu:show', (event, item) => this.item = item)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -50,7 +50,7 @@ Route::group(['middleware' => ['auth:sanctum']], function () {
|
||||
Route::get('/navigation', NavigationFolderTreeController::class);
|
||||
Route::get('/search', SearchFilesAndFoldersController::class);
|
||||
Route::get('/latest', BrowseLatestFilesController::class);
|
||||
Route::get('/trash', BrowseTrashContentController::class);
|
||||
Route::get('/trash/{id}', BrowseTrashContentController::class);
|
||||
Route::get('/share', BrowseSharedItemsController::class);
|
||||
});
|
||||
|
||||
|
||||
@@ -15,25 +15,6 @@ class BrowseFolderContentController
|
||||
): Collection {
|
||||
$root_id = $id === 'undefined' ? null : $id;
|
||||
|
||||
// Get folder trash items
|
||||
if ($request->query('trash')) {
|
||||
// Get folders and files
|
||||
$folders = Folder::onlyTrashed()
|
||||
->with('parent')
|
||||
->where('parent_id', $root_id)
|
||||
->sortable()
|
||||
->get();
|
||||
|
||||
$files = File::onlyTrashed()
|
||||
->with('parent')
|
||||
->where('folder_id', $root_id)
|
||||
->sortable()
|
||||
->get();
|
||||
|
||||
// Collect folders and files to single array
|
||||
return collect([$folders, $files])->collapse();
|
||||
}
|
||||
|
||||
// Get folders and files
|
||||
$folders = Folder::with(['parent:id,name', 'shared:token,id,item_id,permission,is_protected,expire_in'])
|
||||
->where('parent_id', $root_id)
|
||||
|
||||
@@ -8,9 +8,30 @@ use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class BrowseTrashContentController
|
||||
{
|
||||
public function __invoke(): Collection
|
||||
public function __invoke(string $id): Collection
|
||||
{
|
||||
$user_id = Auth::id();
|
||||
$root_id = $id === 'undefined' ? null : $id;
|
||||
|
||||
if ($root_id) {
|
||||
|
||||
// Get folders and files
|
||||
$folders = Folder::onlyTrashed()
|
||||
->with('parent')
|
||||
->where('parent_id', $root_id)
|
||||
->sortable()
|
||||
->get();
|
||||
|
||||
$files = File::onlyTrashed()
|
||||
->with('parent')
|
||||
->where('folder_id', $root_id)
|
||||
->sortable()
|
||||
->get();
|
||||
|
||||
// Collect folders and files to single array
|
||||
return collect([$folders, $files])
|
||||
->collapse();
|
||||
}
|
||||
|
||||
// Get folders and files
|
||||
$folders_trashed = Folder::onlyTrashed()
|
||||
|
||||
Reference in New Issue
Block a user