Skip to content

Commit 609bf74

Browse files
authored
Merge pull request #40 from khairulhaaziq/dev
change pending text opacity to color, add underline results page
2 parents 38818c8 + 717a771 commit 609bf74

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

components/InputDisplay.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
>
1010
<div>
1111
<template v-for="(word, index) in props.allData" :key="index">
12-
<span v-if="word.index >= props.startDisplayIndex && word.index <= props.startDisplayIndex+40" :class="`${word.status === 'error' ? 'underline decoration-red-500 underline-offset-8' : ''}`">
12+
<span v-if="word.index >= props.startDisplayIndex && word.index <= props.startDisplayIndex+40" :class="`${word.status === 'error' ? 'underline decoration-red-500 underline-offset-8 decoration-2' : ''}`">
1313
<span
1414
v-for="(char, charIndex) in word.characters"
1515
:key="charIndex"
@@ -45,14 +45,14 @@ const props = defineProps({
4545
const getClass = (char, index, charIndex) => {
4646
const baseClass =
4747
char.status === "correct"
48-
? "opacity-100"
48+
? ""
4949
: char.status === "extra"
50-
? "bg-[#F44250] text-white opacity-100"
50+
? "bg-[#F44250] text-white"
5151
: char.status === "error" && char.character === " "
5252
? "box-border border-b-2 border-red-600"
5353
: char.status === "error"
54-
? "text-[#F44250] opacity-100"
55-
: "opacity-40";
54+
? "text-[#F44250]"
55+
: "text-neutral-500";
5656
5757
const cursorClass =
5858
index === props.currentWordNum && charIndex === props.correctCharIndex

components/ResultsGrid.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@
191191
.logs"
192192
:key="index"
193193
>
194-
<span
194+
<span :class="`${word.status === 'error' ? 'underline decoration-red-500 underline-offset-4 decoration-1' : ''}`"
195195
><span
196196
v-for="(
197197
char,
@@ -201,19 +201,19 @@
201201
:class="` ${
202202
char.status ===
203203
'correct'
204-
? 'opacity-100'
204+
? ''
205205
: char.status ===
206206
'extra'
207-
? 'bg-[#F44250] text-white opacity-100'
207+
? 'bg-[#F44250] text-white'
208208
: char.status ===
209209
'error' &&
210210
char.character ===
211211
' '
212212
? 'box-border border-b border-red-600'
213213
: char.status ===
214214
'error'
215-
? 'text-[#F44250] opacity-100'
216-
: 'opacity-40'
215+
? 'text-[#F44250]'
216+
: 'text-neutral-500'
217217
} ${
218218
index ===
219219
props.currentWordNum &&

0 commit comments

Comments
 (0)