Prettier success messages
Former-commit-id: 7f53f2d0bf85480da75cbe2e531974ff326822a0 [formerly 2b7831c74b1706129af650f44090f9a47ce9043f] [formerly 821f8f04828c4ad0c4cbb84f905e546174e77a85 [formerly bb116fe5b0fd5218416131eae862fc9b9d59badd]] Former-commit-id: 547f74a1050f931d5ad27a49997ee9d34bb04b6d [formerly 93b0c22338244580f93d58263e7cdb36b269e18c] Former-commit-id: 7e12765f9fb423f81c6cc20981ea70a48e04a6f8
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<site-header></site-header>
|
||||
<sidebar></sidebar>
|
||||
<main>
|
||||
<router-view></router-view>
|
||||
<router-view v-on:css-updated="updateCSS"></router-view>
|
||||
</main>
|
||||
<prompts></prompts>
|
||||
</div>
|
||||
@@ -23,12 +23,23 @@ export default {
|
||||
SiteHeader,
|
||||
Prompts
|
||||
},
|
||||
watch: {
|
||||
'$route': function () {
|
||||
// Reset selected items and multiple selection.
|
||||
this.$store.commit('resetSelected')
|
||||
this.$store.commit('multiple', false)
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user