mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-28 19:10:40 +00:00
mobile spotlight
This commit is contained in:
-38
@@ -8,7 +8,6 @@ const defaultState = {
|
||||
currentFolder: undefined,
|
||||
navigation: undefined,
|
||||
|
||||
isSearching: false,
|
||||
isLoading: true,
|
||||
|
||||
browseHistory: [],
|
||||
@@ -23,12 +22,6 @@ const actions = {
|
||||
if (payload.init)
|
||||
commit('FLUSH_FOLDER_HISTORY')
|
||||
|
||||
// Clear search
|
||||
if (getters.isSearching) {
|
||||
commit('CHANGE_SEARCHING_STATE', false)
|
||||
events.$emit('clear-query')
|
||||
}
|
||||
|
||||
// Set folder location
|
||||
payload.folder.location = payload.folder.deleted_at || payload.folder.location === 'trash' ? 'trash' : 'base'
|
||||
|
||||
@@ -130,33 +123,6 @@ const actions = {
|
||||
})
|
||||
.catch(() => Vue.prototype.$isSomethingWrong())
|
||||
},
|
||||
getSearchResult: ({commit, getters}, query) => {
|
||||
commit('LOADING_STATE', {loading: true, data: []})
|
||||
commit('CHANGE_SEARCHING_STATE', true)
|
||||
|
||||
// Get route
|
||||
let route = undefined
|
||||
|
||||
if (getters.sharedDetail) {
|
||||
let permission = getters.sharedDetail.is_protected
|
||||
? 'private'
|
||||
: 'public'
|
||||
|
||||
route = `/api/browse/search/${permission}/${router.currentRoute.params.token}`
|
||||
|
||||
} else {
|
||||
route = '/api/browse/search'
|
||||
}
|
||||
|
||||
axios
|
||||
.get(route, {
|
||||
params: {query: query}
|
||||
})
|
||||
.then(response => {
|
||||
commit('LOADING_STATE', {loading: false, data: response.data})
|
||||
})
|
||||
.catch(() => Vue.prototype.$isSomethingWrong())
|
||||
},
|
||||
getFolderTree: ({commit, getters}) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
@@ -224,9 +190,6 @@ const mutations = {
|
||||
}
|
||||
})
|
||||
},
|
||||
CHANGE_SEARCHING_STATE(state, searchState) {
|
||||
state.isSearching = searchState
|
||||
},
|
||||
UPDATE_SHARED_ITEM(state, data) {
|
||||
state.entries.find(item => {
|
||||
if (item.id === data.item_id) item.shared = data
|
||||
@@ -274,7 +237,6 @@ const getters = {
|
||||
clipboard: state => state.clipboard,
|
||||
currentFolder: state => state.currentFolder,
|
||||
browseHistory: state => state.browseHistory,
|
||||
isSearching: state => state.isSearching,
|
||||
navigation: state => state.navigation,
|
||||
isLoading: state => state.isLoading,
|
||||
entries: state => state.entries,
|
||||
|
||||
Reference in New Issue
Block a user