mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-05-08 19:22:57 +00:00

Former-commit-id: e79f1477c572712812bff35e889dcd40bdd4b53c [formerly b0bc8f1ca07a70c3677b835039c37e829a1bda37] [formerly d36856934e188cfd989977229c048b71dabd5a22 [formerly 1645a8830ec0a674f6684113a3058ba00ffcd88a]] Former-commit-id: f055189acbc2c0a431683c46d8662bc5c910663f [formerly 9e521e32ec949532dc7dce003534f5fe726254f7] Former-commit-id: 132cc78a5eda743ea6e1a3675442819ad87cbcf2
54 lines
1.2 KiB
Vue
54 lines
1.2 KiB
Vue
<template>
|
|
<div>
|
|
<site-header></site-header>
|
|
<sidebar></sidebar>
|
|
<main>
|
|
<router-view v-on:css-updated="updateCSS"></router-view>
|
|
</main>
|
|
<prompts></prompts>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import Search from './Search'
|
|
import Sidebar from './Sidebar'
|
|
import Prompts from './prompts/Prompts'
|
|
import SiteHeader from './Header'
|
|
|
|
export default {
|
|
name: 'main',
|
|
components: {
|
|
Search,
|
|
Sidebar,
|
|
SiteHeader,
|
|
Prompts
|
|
},
|
|
watch: {
|
|
'$route': function () {
|
|
this.$store.commit('resetSelected')
|
|
this.$store.commit('multiple', false)
|
|
if (this.$store.state.show !== 'success') this.$store.commit('closeHovers')
|
|
}
|
|
},
|
|
mounted () {
|
|
this.updateCSS()
|
|
},
|
|
methods: {
|
|
updateCSS () {
|
|
let css = this.$store.state.user.css
|
|
|
|
let style = document.querySelector('style[title="user-css"]')
|
|
if (style !== undefined && style !== null) {
|
|
style.parentElement.removeChild(style)
|
|
}
|
|
|
|
style = document.createElement('style')
|
|
style.title = 'user-css'
|
|
style.type = 'text/css'
|
|
style.appendChild(document.createTextNode(css))
|
|
document.head.appendChild(style)
|
|
}
|
|
}
|
|
}
|
|
</script>
|