Frontend refactor to move response handler, key input handling, and more into new utilities folder (#260)

Part of #124
This commit is contained in:
Keavon Chambers
2021-07-14 14:31:09 -07:00
committed by GitHub
parent 9d34aa4867
commit 726152759f
14 changed files with 80 additions and 66 deletions
+5 -3
View File
@@ -1,9 +1,11 @@
import { createApp } from "vue";
import { handleKeyUp, handleKeyDown } from "@/utilities/input";
import App from "./App.vue";
import { attachResponseHandlerToPage } from "./response-handler";
// Bind global browser events
document.addEventListener("contextmenu", (e) => e.preventDefault());
window.addEventListener("keyup", (e: KeyboardEvent) => handleKeyUp(e));
window.addEventListener("keydown", (e: KeyboardEvent) => handleKeyDown(e));
attachResponseHandlerToPage();
// Initialize the Vue application
createApp(App).mount("#app");