Using teleport for tooltips. Moved theme class to body tag with UI observer.

This commit is contained in:
DebaucheryLibrarian
2020-12-27 02:15:06 +01:00
parent 12f247a927
commit 229d74d266
9 changed files with 172 additions and 160 deletions

View File

@@ -1,8 +1,5 @@
<template>
<div
class="container"
:class="theme"
>
<div class="container">
<Warning
v-if="showWarning"
class="warning-container"
@@ -26,16 +23,10 @@
</template>
<script>
import { mapState } from 'vuex';
import Warning from './warning.vue';
import Header from '../header/header.vue';
import Sidebar from '../sidebar/sidebar.vue';
function theme(state) {
return state.ui.theme;
}
function toggleSidebar(state) {
this.showSidebar = typeof state === 'boolean' ? state : !this.showSidebar;
}
@@ -59,11 +50,6 @@ export default {
showWarning: localStorage.getItem('consent') !== window.env.sessionId,
};
},
computed: {
...mapState({
theme,
}),
},
methods: {
toggleSidebar,
setConsent,