Fix some rules, complete rules translations
[vchess.git] / client / src / main.js
1 import Vue from "vue";
2 import App from "./App.vue";
3 import router from "./router";
4 import { store } from "./store";
5
6 Vue.config.productionTip = false;
7
8 new Vue({
9 router,
10 render: function(h) {
11 return h(App);
12 },
13 created: function() {
14 window.doClick = elemId => {
15 document.getElementById(elemId).click();
16 };
17 document.addEventListener("keydown", e => {
18 if (e.code === "Escape") {
19 let modalBoxes = document.querySelectorAll("[id^='modal']");
20 modalBoxes.forEach(m => {
21 if (m.checked && m.id != "modalAccept") m.checked = false;
22 });
23 }
24 });
25 store.initialize();
26 }
27 }).$mount("#app");