Using teleport for tooltips. Moved theme class to body tag with UI observer.
This commit is contained in:
@@ -1,4 +1,13 @@
|
||||
function initUiObservers(store, _router) {
|
||||
const body = document.querySelector('body');
|
||||
|
||||
body.classList.add(store.state.ui.theme);
|
||||
|
||||
store.watch(state => state.ui.theme, (newTheme, oldTheme) => {
|
||||
body.classList.add(newTheme);
|
||||
body.classList.remove(oldTheme);
|
||||
});
|
||||
|
||||
document.addEventListener('keypress', (event) => {
|
||||
if (event.target.tagName === 'INPUT') {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user