Improved tooltip behavior and styling.

This commit is contained in:
DebaucheryLibrarian
2020-12-27 04:21:10 +01:00
parent 229d74d266
commit a7e6f470f7
7 changed files with 181 additions and 19 deletions

View File

@@ -38,6 +38,24 @@ async function setConsent(consent) {
}
}
function blur(event) {
this.events.emit('blur', event);
}
function resize(event) {
this.events.emit('resize', event);
}
function mounted() {
document.addEventListener('click', this.blur);
window.addEventListener('resize', this.resize);
}
function beforeUnmount() {
document.removeEventListener('click', this.blur);
window.removeEventListener('resize', this.resize);
}
export default {
components: {
Header,
@@ -50,9 +68,13 @@ export default {
showWarning: localStorage.getItem('consent') !== window.env.sessionId,
};
},
mounted,
beforeUnmount,
methods: {
toggleSidebar,
setConsent,
blur,
resize,
},
};
</script>