- Edit
- components/HelloWorld.vue to test HMR
-
- Check out - create-vue, the official Vue + Vite starter -
-- Install - Volar - in your IDE for a better DX -
-Click on the Vite and Vue logos to learn more
- - - diff --git a/src/components/HomePage.vue b/src/components/HomePage.vue index 1c46302..3a926d0 100644 --- a/src/components/HomePage.vue +++ b/src/components/HomePage.vue @@ -5,10 +5,19 @@ export default { components: {}, data() { return { + voices: null, + diaNomi: { + show: false, + home: "", + guest: "", + }, visuForm: false, + visuButt: true, sp: { + serv: "home", punt: { home: 0, guest: 0 }, set: { home: 0, guest: 0 }, + nomi: { home: "Antoniana", guest: "Guest" }, form: { home: ["1", "2", "3", "4", "5", "6"], guest: ["1", "2", "3", "4", "5", "6"], @@ -17,11 +26,36 @@ export default { } }, mounted() { + this.voices = window.speechSynthesis.getVoices(); if (this.isMobile()) { var noSleep = new NoSleep(); noSleep.enable(); document.documentElement.requestFullscreen(); } + window.addEventListener("keydown", (e) => { + e.preventDefault(); + if (e.ctrlKey && e.key == "m") { + this.diaNomi.show = true + } else if (e.ctrlKey && e.key == "b") { + this.visuButt = !this.visuButt + } else if (e.ctrlKey && e.key == "f") { + document.documentElement.requestFullscreen(); + } else if (e.ctrlKey && e.key == "z") { + this.visuForm = !this.visuForm + } else if (e.ctrlKey && e.key == "ArrowUp") { + this.incPunt("home") + } else if (e.ctrlKey && e.key == "ArrowDown") { + this.decPunt("home") + } else if (e.ctrlKey && e.key == "ArrowRight") { + this.incSet("home") + } else if (e.shiftKey && e.key == "ArrowUp") { + this.incPunt("guest") + } else if (e.shiftKey && e.key == "ArrowDown") { + this.decPunt("guest") + } else if (e.shiftKey && e.key == "ArrowRight") { + this.incSet("guest") + } else { return false } + }) }, methods: { closeApp() { @@ -43,12 +77,10 @@ export default { } }, resetta() { - this.$waveui.notify("RESETTATO", "success"); + this.$waveui.notify("Punteggio