Make reload work
parent
4ddee7cd75
commit
9e42f0f1ed
|
@ -142,7 +142,7 @@ export default {
|
||||||
|
|
||||||
Promise.all(promises)
|
Promise.all(promises)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
// page.reload()
|
this.$store.commit('setReload', true)
|
||||||
// buttons.setDone('upload')
|
// buttons.setDone('upload')
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
|
|
|
@ -91,7 +91,7 @@ export default {
|
||||||
|
|
||||||
Promise.all(promises)
|
Promise.all(promises)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
// page.reload()
|
this.$store.commit('setReload', true)
|
||||||
})
|
})
|
||||||
.catch(error => console.log(error))
|
.catch(error => console.log(error))
|
||||||
},
|
},
|
||||||
|
|
|
@ -136,6 +136,7 @@ export default {
|
||||||
...mapState([
|
...mapState([
|
||||||
'req',
|
'req',
|
||||||
'user',
|
'user',
|
||||||
|
'reload',
|
||||||
'baseURL',
|
'baseURL',
|
||||||
'multiple',
|
'multiple',
|
||||||
'showInfo',
|
'showInfo',
|
||||||
|
@ -167,7 +168,11 @@ export default {
|
||||||
this.fetchData()
|
this.fetchData()
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$route': 'fetchData'
|
'$route': 'fetchData',
|
||||||
|
'reload': function () {
|
||||||
|
this.$store.commit('setReload', false)
|
||||||
|
this.fetchData()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
updateColumnSizes()
|
updateColumnSizes()
|
||||||
|
|
|
@ -110,7 +110,7 @@ export default {
|
||||||
conn.onclose = (event) => {
|
conn.onclose = (event) => {
|
||||||
this.ongoing = false
|
this.ongoing = false
|
||||||
this.scrollable.scrollTop = this.scrollable.scrollHeight
|
this.scrollable.scrollTop = this.scrollable.scrollHeight
|
||||||
// page.reload()
|
this.$store.commit('setReload', true)
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
|
@ -54,12 +54,12 @@ export default {
|
||||||
|
|
||||||
Promise.all(promises)
|
Promise.all(promises)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
// page.reload()
|
this.$store.commit('setReload', true)
|
||||||
// buttons.setDone('delete')
|
// buttons.setDone('delete')
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
// page.reload()
|
this.$store.commit('setReload', true)
|
||||||
// buttons.setDone('delete', false)
|
// buttons.setDone('delete', false)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,10 +61,8 @@ export default {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// TODO: keep selected after reload?
|
// TODO: keep selected after reload?
|
||||||
// page.reload()
|
|
||||||
// buttons.setDone('rename')
|
// buttons.setDone('rename')
|
||||||
console.log('reload')
|
this.$store.commit('setReload', true)
|
||||||
this.$router.go({ path: this.$route.path })
|
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
// buttons.setDone('rename', false)
|
// buttons.setDone('rename', false)
|
||||||
console.log(error)
|
console.log(error)
|
||||||
|
|
|
@ -17,6 +17,7 @@ const mutations = {
|
||||||
state.showNewDir = false
|
state.showNewDir = false
|
||||||
state.showDownload = false
|
state.showDownload = false
|
||||||
},
|
},
|
||||||
|
setReload: (state, value) => (state.reload = value),
|
||||||
setUser: (state, value) => (state.user = value),
|
setUser: (state, value) => (state.user = value),
|
||||||
setJWT: (state, value) => (state.jwt = value),
|
setJWT: (state, value) => (state.jwt = value),
|
||||||
multiple: (state, value) => (state.multiple = value),
|
multiple: (state, value) => (state.multiple = value),
|
||||||
|
|
|
@ -11,6 +11,7 @@ const state = {
|
||||||
baseURL: document.querySelector('meta[name="base"]').getAttribute('content'),
|
baseURL: document.querySelector('meta[name="base"]').getAttribute('content'),
|
||||||
ssl: (window.location.protocol === 'https:'),
|
ssl: (window.location.protocol === 'https:'),
|
||||||
jwt: '',
|
jwt: '',
|
||||||
|
reload: false,
|
||||||
selected: [],
|
selected: [],
|
||||||
multiple: false,
|
multiple: false,
|
||||||
showInfo: false,
|
showInfo: false,
|
||||||
|
|
Loading…
Reference in New Issue