mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-23 09:40:39 +00:00
- shared pages refactored
This commit is contained in:
+21
-1
@@ -66,7 +66,7 @@ const actions = {
|
||||
})
|
||||
})
|
||||
},
|
||||
shareCancel: ({commit, getters} , singleItem) => {
|
||||
shareCancel: ({commit, getters}, singleItem) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
let tokens = []
|
||||
@@ -120,6 +120,26 @@ const actions = {
|
||||
commit('STORE_SHARED_FILE', response.data)
|
||||
})
|
||||
},
|
||||
getShareDetail: ({commit, state}, token) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
axios
|
||||
.get(`/api/browse/shared/${token}`)
|
||||
.then(response => {
|
||||
resolve(response)
|
||||
|
||||
// Commit shared item options
|
||||
commit('SET_SHARED_DETAIL', response.data.data.attributes)
|
||||
commit('SET_PERMISSION', response.data.data.attributes.permission)
|
||||
})
|
||||
.catch(error => {
|
||||
reject(error)
|
||||
|
||||
if (error.response.status == 404) {
|
||||
router.push({name: 'NotFound'})
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
}
|
||||
const mutations = {
|
||||
SET_SHARED_DETAIL(state, data) {
|
||||
|
||||
Reference in New Issue
Block a user