return h(App);
},
created: function() {
- window.doClick = (elemId) => { document.getElementById(elemId).click() };
- document.addEventListener("keydown", (e) => {
- if (e.code === "Escape")
- {
+ // Several interactions on clicks on elements:
+ window.doClick = elemId => {
+ document.getElementById(elemId).click();
+ };
+ // Esc key can close some modals:
+ document.addEventListener("keydown", e => {
+ if (e.code === "Escape") {
let modalBoxes = document.querySelectorAll("[id^='modal']");
modalBoxes.forEach(m => {
- if (m.checked)
+ if (
+ m.checked &&
+ !["Accept", "Confirm", "Chat", "People"]
+ .includes(m.id.substr(5)) //modalThing --> Thing
+ ) {
m.checked = false;
+ }
});
}
});
- // TODO: why is this wrong? (Maybe because $route still uninitialized?)
- //store.initialize(this.$route.path);
- store.initialize(window.location.href.split("#")[1]);
- // NOTE: at this point, variants and tr(anslations) might be uninitialized
- },
+ store.initialize();
+ }
}).$mount("#app");