You've already forked filebrowser
mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-11-26 14:25:26 +08:00
Working better :)
Former-commit-id: 935ee3c7cceb4deb31965501a80c202a0034da52 [formerly 3a68553e1ac0af9dad51bd2b8eab1152959a4dc2] [formerly 596f9d6676cceafac0e9fe66a9137683482c2685 [formerly 191b31e977]]
Former-commit-id: f0179a58c53f057f1b6f0f19b40fc2308b0edd15 [formerly 5151c85d599e8b3772dabab24973004105c29881]
Former-commit-id: c28c7b95e5ea1b1d9ae2af046f49cc5ffa848385
This commit is contained in:
@@ -93,6 +93,7 @@ import NewFilePrompt from './NewFilePrompt'
|
||||
import NewDirPrompt from './NewDirPrompt'
|
||||
import css from '@/utils/css'
|
||||
import auth from '@/utils/auth'
|
||||
import api from '@/utils/api'
|
||||
import {mapGetters, mapState} from 'vuex'
|
||||
|
||||
function updateColumnSizes () {
|
||||
@@ -149,7 +150,21 @@ export default {
|
||||
plugins: []
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
beforeRouteEnter (to, from, next) {
|
||||
api.fetch(to.params[0])
|
||||
.then(() => {
|
||||
next()
|
||||
})
|
||||
.catch(error => {
|
||||
// TODO: 404, 403 and 500!
|
||||
console.log(error)
|
||||
window.alert('Something went wrong. Please reload.')
|
||||
})
|
||||
},
|
||||
beforeRouteUpdate (to, from, next) {
|
||||
console.log('hey')
|
||||
},
|
||||
mounted () {
|
||||
updateColumnSizes()
|
||||
window.addEventListener('resize', updateColumnSizes)
|
||||
|
||||
@@ -157,7 +172,7 @@ export default {
|
||||
this.plugins = window.plugins
|
||||
}
|
||||
|
||||
document.title = this.req.data.name
|
||||
document.title = this.req.name
|
||||
window.history.replaceState({
|
||||
url: window.location.pathname,
|
||||
name: document.title
|
||||
|
||||
Reference in New Issue
Block a user