This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<WordleRow v-if="guesses.length > i" :guess="guesses[i]" :length="correct.length" :correct="correct"/>
|
||||
|
||||
<UForm @submit="onsubmit" v-if="guesses.length == i">
|
||||
<UPinInput v-if="guesses[guesses.length-1].toString().replace(/\,/gi, '') != correct" default class="mb-2" autofocus v-model="guess" color="neutral" :length="correct.length" size="lg" :correct="correct" />
|
||||
<UPinInput v-if="guesses[guesses.length-1].toString().replace(/\,/gi, '') != correct" default class="mb-2" autofocus v-model="guess" color="neutral" :length="correct.length" size="md" :correct="correct" />
|
||||
|
||||
<WordleRow v-else :length="correct.length"/>
|
||||
|
||||
@@ -54,11 +54,18 @@
|
||||
index: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
}
|
||||
},
|
||||
date: {
|
||||
type: String,
|
||||
default: '1970-01-01',
|
||||
}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.guesses = JSON.parse(localStorage.getItem('guesses-' + this.index) || '[""]');
|
||||
if (localStorage.date) {
|
||||
if (localStorage.date === this.date) this.guesses = JSON.parse(localStorage.getItem('guesses-' + this.index) || '[""]'); console.log(this.guesses);
|
||||
} else localStorage.date = this.date;
|
||||
|
||||
this.max_guesses = this.correct.length > 5 ? this.correct.length : 6
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -63,9 +63,9 @@
|
||||
.wr-div {
|
||||
justify-content: center;
|
||||
border-radius: 6px;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
background-color: transparent;
|
||||
text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
|
||||
Reference in New Issue
Block a user