Move some comments, and remove some of them
[vchess.git] / client / src / main.js
index 0b9b402..08893db 100644 (file)
@@ -1,7 +1,7 @@
 import Vue from "vue";
 import App from "./App.vue";
 import router from "./router";
-import { ajax } from "./utils/ajax";
+import { store } from "./store";
 
 Vue.config.productionTip = false;
 
@@ -10,18 +10,8 @@ new Vue({
   render: function(h) {
     return h(App);
   },
-       created: function() {
-               //alert("test");
-               ajax("http://localhost:3000/variants", "GET", variantArray => {
-                       console.log("Got variants:");
-                       console.log(variantArray);
-               });
-       },
+  created: function() {
+    window.doClick = (elemId) => { document.getElementById(elemId).click() };
+    store.initialize();
+  },
 }).$mount("#app");
-
-// TODO: get rules, dynamic import
-// Load a rules page (AJAX)
-// router.get("/rules/:vname([a-zA-Z0-9]+)", access.ajax, (req,res) => {
-//     const lang = selectLanguage(req, res);
-//     res.render("rules/" + req.params["vname"] + "/" + lang);
-// });