change some local storage stuff and css for wordle
Build / Build-image (push) Successful in 1m19s

This commit is contained in:
2026-09-05 13:51:59 +02:00
parent 2bce3f9a71
commit 890bb53ef6
3 changed files with 16 additions and 7 deletions
+10 -3
View File
@@ -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: {
+3 -3
View File
@@ -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;