mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-29 03:10:51 +00:00
implemented navigation tree controller for teams
This commit is contained in:
Vendored
+17
@@ -2,6 +2,7 @@ import router from "../../router";
|
||||
import {events} from "../../bus";
|
||||
import i18n from "../../i18n";
|
||||
import axios from "axios";
|
||||
import Vue from "vue";
|
||||
|
||||
const defaultState = {
|
||||
currentTeamFolder: undefined,
|
||||
@@ -88,6 +89,22 @@ const actions = {
|
||||
}
|
||||
})
|
||||
},
|
||||
getTeamFolderTree: ({commit, getters}) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
axios
|
||||
.get(`/api/teams/tree/${getters.currentTeamFolder.data.id}${getters.sorting.URI}`)
|
||||
.then(response => {
|
||||
resolve(response)
|
||||
|
||||
commit('UPDATE_FOLDER_TREE', response.data)
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error)
|
||||
|
||||
Vue.prototype.$isSomethingWrong()
|
||||
})
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
const mutations = {
|
||||
|
||||
Reference in New Issue
Block a user