Aggiunto vawe-ui per gli alert.
piccoli aggiustamenti sulla visualizzazione. adesso il punteggio inc e dec anche con le formazioni.
This commit is contained in:
3316
package-lock.json
generated
3316
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -10,7 +10,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"nosleep.js": "^0.12.0",
|
"nosleep.js": "^0.12.0",
|
||||||
"vue": "^3.2.47"
|
"vue": "^3.2.47",
|
||||||
|
"wave-ui": "^3.3.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vitejs/plugin-vue": "^4.1.0",
|
"@vitejs/plugin-vue": "^4.1.0",
|
||||||
|
|||||||
@@ -25,10 +25,8 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
closeApp() {
|
closeApp() {
|
||||||
if (confirm("Confermi di voler chiudere l'app ?")) {
|
var win = window.open("", "_self");
|
||||||
var win = window.open("", "_self");
|
win.close();
|
||||||
win.close();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
fullScreen() {
|
fullScreen() {
|
||||||
document.documentElement.requestFullscreen();
|
document.documentElement.requestFullscreen();
|
||||||
@@ -45,13 +43,22 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
resetta() {
|
resetta() {
|
||||||
if (confirm("Confermi il reset del punteggio ?")) {
|
this.$waveui.notify("RESETTATO", "success");
|
||||||
this.sp.punt.home = 0;
|
this.visuForm = false;
|
||||||
this.sp.punt.guest = 0;
|
this.sp.punt.home = 0;
|
||||||
this.sp.form = {
|
this.sp.punt.guest = 0;
|
||||||
home: ["1", "2", "3", "4", "5", "6"],
|
this.sp.set.home = 0;
|
||||||
guest: ["1", "2", "3", "4", "5", "6"],
|
this.sp.set.guest = 0;
|
||||||
}
|
this.sp.form = {
|
||||||
|
home: ["1", "2", "3", "4", "5", "6"],
|
||||||
|
guest: ["1", "2", "3", "4", "5", "6"],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
incSet(team) {
|
||||||
|
if (this.sp.set[team] == 2) {
|
||||||
|
this.sp.set[team] = 0;
|
||||||
|
} else {
|
||||||
|
this.sp.set[team]++;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
incPunt(team) {
|
incPunt(team) {
|
||||||
@@ -61,7 +68,7 @@ export default {
|
|||||||
decPunt(team) {
|
decPunt(team) {
|
||||||
// decrementa il punteggio se è > 0 e non siamo in
|
// decrementa il punteggio se è > 0 e non siamo in
|
||||||
// visualizza formazioni.
|
// visualizza formazioni.
|
||||||
if (this.sp.punt[team] > 0 && !this.visuForm) {
|
if (this.sp.punt[team] > 0) {
|
||||||
this.sp.punt[team]--;
|
this.sp.punt[team]--;
|
||||||
this.sp.form[team].unshift(this.sp.form[team].pop());
|
this.sp.form[team].unshift(this.sp.form[team].pop());
|
||||||
}
|
}
|
||||||
@@ -72,19 +79,28 @@ export default {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="campo">
|
<div class="campo">
|
||||||
<div class="hea home" @click="decPunt('home')">ANTONIANA
|
<div class="hea home">
|
||||||
<span v-if="visuForm">- {{ sp.punt.home }}</span>
|
<span @click="decPunt('home')" :style="{ 'float': 'left' }">
|
||||||
|
Antoniana
|
||||||
|
<span v-if="visuForm">{{ sp.punt.home }}</span>
|
||||||
|
</span>
|
||||||
|
<span @click="incSet('home')" class="mr3" :style="{ 'float': 'right' }">set {{ sp.set.home }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="hea guest" @click="decPunt('guest')">GUEST
|
<div class="hea guest">
|
||||||
<span v-if="visuForm">- {{ sp.punt.guest }}</span>
|
<span @click="decPunt('guest')" :style="{ 'float': 'right' }">
|
||||||
|
Guest
|
||||||
|
<span v-if="visuForm">{{ sp.punt.guest }}</span>
|
||||||
|
</span>
|
||||||
|
<span @click="incSet('guest')" class="ml3" :style="{ 'float': 'left' }">set {{ sp.set.guest }}</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<span v-if="visuForm">
|
<span v-if="visuForm">
|
||||||
<div class="col form home">
|
<div class="col form home" @click="incPunt('home')">
|
||||||
<div class="formdiv" v-for="x in [3, 2, 1, 4, 5, 0]">
|
<div class="formdiv" v-for="x in [3, 2, 1, 4, 5, 0]">
|
||||||
{{ sp.form.home[x] }}
|
{{ sp.form.home[x] }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col form guest">
|
<div class="col form guest" @click="incPunt('guest')">
|
||||||
<div class="formdiv" v-for="x in [3, 2, 1, 4, 5, 0]">
|
<div class="formdiv" v-for="x in [3, 2, 1, 4, 5, 0]">
|
||||||
{{ sp.form.guest[x] }}
|
{{ sp.form.guest[x] }}
|
||||||
</div>
|
</div>
|
||||||
@@ -95,12 +111,16 @@ export default {
|
|||||||
<div class="col punt guest" @click="incPunt('guest')">{{ sp.punt.guest }}</div>
|
<div class="col punt guest" @click="incPunt('guest')">{{ sp.punt.guest }}</div>
|
||||||
</span>
|
</span>
|
||||||
<div class="bot tal">
|
<div class="bot tal">
|
||||||
<button @click="visuForm = !visuForm">
|
<w-confirm top left v-if="isMobile()" question="CHIUDO ?" cancel="NO" confirm="SI" @confirm="closeApp">
|
||||||
<span v-if="visuForm">PUNTEGGI</span>
|
exit
|
||||||
|
</w-confirm>
|
||||||
|
<w-confirm top left question="Azzero tutto ?" cancel="NO" confirm="SI" @confirm="resetta">
|
||||||
|
RESET
|
||||||
|
</w-confirm>
|
||||||
|
<w-button @click="visuForm = !visuForm">
|
||||||
|
<span v-if="visuForm">PUNTEGGIO</span>
|
||||||
<span v-if="!visuForm">FORMAZIONI</span>
|
<span v-if="!visuForm">FORMAZIONI</span>
|
||||||
</button>
|
</w-button>
|
||||||
<button @click="resetta">RESET</button>
|
|
||||||
<button v-if="isMobile()" @click="closeApp">exit</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
import { createApp } from 'vue'
|
import { createApp } from 'vue'
|
||||||
import './style.css'
|
import './style.css'
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
|
import WaveUI from 'wave-ui'
|
||||||
|
import 'wave-ui/dist/wave-ui.css'
|
||||||
|
|
||||||
createApp(App).mount('#app')
|
const app = createApp(App)
|
||||||
|
|
||||||
|
app.use(WaveUI)
|
||||||
|
app.mount('#app')
|
||||||
|
|||||||
@@ -52,6 +52,12 @@ button:focus-visible {
|
|||||||
width: 50%;
|
width: 50%;
|
||||||
font-size: xx-large;
|
font-size: xx-large;
|
||||||
}
|
}
|
||||||
|
.hea span {
|
||||||
|
border: 1px solid #f3fb00;
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
.tal {
|
.tal {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
@@ -82,7 +88,6 @@ button:focus-visible {
|
|||||||
font-size: 5vh;
|
font-size: 5vh;
|
||||||
border-top: #fff dashed 25px;
|
border-top: #fff dashed 25px;
|
||||||
padding-top: 50px;
|
padding-top: 50px;
|
||||||
padding-bottom: 50px;
|
|
||||||
}
|
}
|
||||||
.formtit {
|
.formtit {
|
||||||
font-size: 5vh;
|
font-size: 5vh;
|
||||||
|
|||||||
Reference in New Issue
Block a user