From bfc6778c769a5c0e23acd77155ef442544ada36c Mon Sep 17 00:00:00 2001 From: Seth Trowbridge Date: Sat, 24 Jun 2023 13:08:58 -0400 Subject: [PATCH] add labels --- js/ui.js | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/js/ui.js b/js/ui.js index 525024b..ca5c5fd 100644 --- a/js/ui.js +++ b/js/ui.js @@ -59,7 +59,7 @@ export const Header =()=>

Patient Reliability:

- <${Button} inactive=${State.Errs == 0} light=${State.Errs == 0} classes="flex-[1.5] text-xs" classesActive="" onClick=${()=>Dispatch({Name:"Errs", Data:0})}>Perfect (Training Mode) + <${Button} inactive=${State.Errs == 0} light=${State.Errs == 0} classes="flex-[1.5] text-xs" classesActive="" onClick=${()=>Dispatch({Name:"Errs", Data:0})}>Perfect(Training Mode) <${Button} inactive=${State.Errs == 1} light=${State.Errs == 1} classes="flex-1 text-xs" classesActive="bg-yellow-600" onClick=${()=>Dispatch({Name:"Errs", Data:1})}>Good <${Button} inactive=${State.Errs == 2} light=${State.Errs == 2} classes="flex-1 text-xs" classesActive="bg-orange-600" onClick=${()=>Dispatch({Name:"Errs", Data:2})}>Reduced <${Button} inactive=${State.Errs == 3} light=${State.Errs == 3} classes="flex-1 text-xs" classesActive="bg-red-600" onClick=${()=>Dispatch({Name:"Errs", Data:3})}>Poor @@ -68,7 +68,7 @@ export const Header =()=>
-
Complete: ${grade.Marks} of ${grade.Total}
+
Complete: ${grade.Marks} of ${grade.Total}
@@ -87,6 +87,7 @@ export const Display =()=>
+

Toggle Overlay

<${Button} light=${State.Show.Cursor} classes="flex-1 text-xs" onClick=${()=>Dispatch({Name:"ShowCursor", Data:!State.Show.Cursor})}>Cursor <${Button} light=${State.Show.Answer} classes="flex-1 text-xs" onClick=${()=>Dispatch({Name:"ShowAnswer", Data:!State.Show.Answer})}>Answer
@@ -142,7 +143,10 @@ export const Controls =()=>
-
${Store.ColumnMapping[State.Freq.Value][0]} Hz
+
+

Frequency

+ ${Store.ColumnMapping[State.Freq.Value][0]} Hz +
<${Button} disabled=${State.Freq.Value == State.Freq.Min} onClick=${()=>Dispatch({Name:"Freq", Data:-1})}> <${Glyph.Minus}/> @@ -157,7 +161,10 @@ export const Controls =()=>
-
${State.Stim.Value} dbHL
+
+

Level

+ ${State.Stim.Value} dbHL +
<${Button} disabled=${State.Stim.Value == State.Stim.Min} onClick=${()=>Dispatch({Name:"Stim", Data:-1})}> <${Glyph.Minus}/> @@ -177,6 +184,10 @@ export const Controls =()=>
+
+ <${Button} onClick=${()=>{pulsedSet(true )}} light=${pulsedGet } inactive${pulsedGet } classes="flex-1 text(center xs)">Pulsed + <${Button} onClick=${()=>{pulsedSet(false)}} light=${!pulsedGet} inactive${!pulsedGet} classes="flex-1 text(center xs)">Continuous +
<${Button} classes="w-full flex-1 self-center" onClick=${()=>playSet(1)} @@ -187,13 +198,11 @@ export const Controls =()=> > Present Tone -
- <${Button} onClick=${()=>{pulsedSet(true )}} light=${pulsedGet } inactive${pulsedGet } classes="flex-1 text(center xs)">Pulsed - <${Button} onClick=${()=>{pulsedSet(false)}} light=${!pulsedGet} inactive${!pulsedGet} classes="flex-1 text(center xs)">Continuous -
-

Response${State.Live.Mark.Errs > 0 && ` (${State.Live.Mark.Errs*100}% Error Chance)` }:

+

+ Response ${State.Live.Mark.Errs > 0 && ` (${State.Live.Mark.Errs*100}% Error Chance)` }: +

@@ -226,6 +235,7 @@ export const Controls =()=>
+ Threshold <${Button} onClick=${()=>Dispatch({Name:"Mark", Data:true })} classes="text-md w-full" @@ -335,7 +345,7 @@ export function Chart({children}) return html`
- Frequency in Hz + Frequency (Hz) Hearing Level (dbHL)