@@ -107,7 +107,7 @@ const autoStartingOptions: Array<{ label: string; value: AutoStartingPosition |
107107] ;
108108
109109const teleTowerOptions : TeleTowerResult [ ] = [ 'None' , 'Failed' , 'level1' , 'level2' , 'level3' ] ;
110- const driverQualityOptions : DriverQuality [ ] = [ 'great ' , 'good ' , 'ok ' , 'rough ' ] ;
110+ const driverQualityOptions : DriverQuality [ ] = [ 'Poor ' , 'Rough ' , 'Ok ' , 'Good' , 'Great '] ;
111111const breakdownOptions : BreakdownType [ ] = [ 'None' , 'stuck' , 'tipped' , 'comms' , 'mechanism' , 'other' ] ;
112112
113113const foulLabels : Array < {
@@ -423,7 +423,7 @@ function MatchApp() {
423423 const [ robotAbsent , setRobotAbsent ] = useState ( false ) ;
424424 const [ autoStartingPosition , setAutoStartingPosition ] = useState < AutoStartingPosition | null > ( null ) ;
425425 const [ teleTower , setTeleTower ] = useState < TeleTowerResult > ( 'None' ) ;
426- const [ driverQuality , setDriverQuality ] = useState < DriverQuality > ( 'ok ' ) ;
426+ const [ driverQuality , setDriverQuality ] = useState < DriverQuality > ( 'Poor ' ) ;
427427 const [ breakdown , setBreakdown ] = useState < BreakdownType > ( 'None' ) ;
428428 const [ defenseProvided , setDefenseProvided ] = useState < MatchData [ 'defenseProvided' ] > ( 'None' ) ;
429429 const [ defenseReceived , setDefenseReceived ] = useState ( false ) ;
@@ -948,7 +948,7 @@ function MatchApp() {
948948 }
949949 autoDrawingPointerIdRef . current = null ;
950950 setTeleTower ( 'None' ) ;
951- setDriverQuality ( 'ok ' ) ;
951+ setDriverQuality ( 'Ok ' ) ;
952952 setBreakdown ( 'None' ) ;
953953 setDefenseProvided ( 'None' ) ;
954954 setDefenseReceived ( false ) ;
@@ -1055,6 +1055,8 @@ function MatchApp() {
10551055 handleResetMatch ( ) ;
10561056 } ;
10571057
1058+ const [ shooterAccuracy , setAccuracy ] = useState ( 0 ) ;
1059+
10581060 if ( ! signedIn ) {
10591061 return (
10601062 < div className = 'min-h-screen bg-gradient-to-b from-[#151a25] via-[#111722] to-[#0b111a] pb-8 text-sm text-white' >
@@ -1110,7 +1112,7 @@ function MatchApp() {
11101112 < button
11111113 type = 'button'
11121114 onClick = { ( ) => setSignedIn ( false ) }
1113- className = 'rounded-lg bg-[#3a4254] px-3 py-2 text-xs font-semibold text-white' >
1115+ className = 'select-none rounded-lg bg-[#3a4254] px-3 py-2 text-xs font-semibold text-white' >
11141116 Switch Scout
11151117 </ button >
11161118 < LinkButton link = '/' className = 'snap-none' >
@@ -1143,7 +1145,7 @@ function MatchApp() {
11431145
11441146 < div className = 'mt-3' >
11451147 < p className = 'text-xs uppercase tracking-wide text-gray-300' > Starting Position</ p >
1146- < div className = 'mt-1 flex flex-wrap gap-2' >
1148+ < div className = 'select-none mt-1 flex flex-wrap gap-2' >
11471149 < MultiButton
11481150 onChange = { setAutoStartingPosition }
11491151 value = { autoStartingPosition }
@@ -1192,7 +1194,7 @@ function MatchApp() {
11921194 < button
11931195 type = 'button'
11941196 onClick = { ( ) => setAutoPanelManualOverride ( ! autoPanelOpen ) }
1195- className = 'rounded bg-[#48c55c] px-3 py-1 text-xs font-semibold text-black' >
1197+ className = 'select-none rounded bg-[#48c55c] px-3 py-1 text-xs font-semibold text-black' >
11961198 { autoPanelOpen ? 'Collapse' : 'Expand' }
11971199 </ button >
11981200 </ div >
@@ -1316,14 +1318,14 @@ function MatchApp() {
13161318 < button
13171319 type = 'button'
13181320 onClick = { handleMarkShot }
1319- className = 'rounded-lg bg-amber-400 px-3 py-2 text-xs font-semibold text-black'
1321+ className = 'select-none rounded-lg bg-amber-400 px-3 py-2 text-xs font-semibold text-black'
13201322 disabled = { ! autoDrawingTip && ! autoResumePoint } >
13211323 Mark Shot Position
13221324 </ button >
13231325 < button
13241326 type = 'button'
13251327 onClick = { clearAutoPath }
1326- className = 'rounded-lg bg-[#4b5568] px-3 py-2 text-xs font-semibold text-white'
1328+ className = 'select-none rounded-lg bg-[#4b5568] px-3 py-2 text-xs font-semibold text-white'
13271329 disabled = { autoPathPoints . length === 0 && autoShotMarkers . length === 0 } >
13281330 Clear Auto Path
13291331 </ button >
@@ -1363,14 +1365,14 @@ function MatchApp() {
13631365 < button
13641366 type = 'button'
13651367 onClick = { handleStartNewMatch }
1366- className = 'rounded-lg bg-[#48c55c] px-3 py-2 text-sm font-semibold text-black' >
1368+ className = 'select-none rounded-lg bg-[#48c55c] px-3 py-2 text-sm font-semibold text-black' >
13671369 Start Match
13681370 </ button >
13691371 < button
13701372 type = 'button'
13711373 onClick = { handlePauseResume }
13721374 disabled = { remainingSec <= 0 }
1373- className = { `rounded-lg px-3 py-2 text-sm font-semibold ${
1375+ className = { `select-none rounded-lg px-3 py-2 text-sm font-semibold ${
13741376 remainingSec <= 0
13751377 ? 'cursor-not-allowed bg-[#324056] text-gray-400'
13761378 : 'bg-sky-500 text-black'
@@ -1380,12 +1382,12 @@ function MatchApp() {
13801382 < button
13811383 type = 'button'
13821384 onClick = { handleResetMatch }
1383- className = 'rounded-lg bg-[#d15858] px-3 py-2 text-sm font-semibold text-white' >
1385+ className = 'select-none rounded-lg bg-[#d15858] px-3 py-2 text-sm font-semibold text-white' >
13841386 Reset Match
13851387 </ button >
13861388 </ div >
13871389
1388- < div className = 'mt-4 grid gap-3 md:grid-cols-2' >
1390+ < div className = 'select-none mt-4 grid gap-3 md:grid-cols-2' >
13891391 { (
13901392 [
13911393 { action : 'shoot' , label : 'HOLD TO TRACK SHOOTING' , color : 'bg-emerald-400' , ticks : shootTickCount } ,
@@ -1513,7 +1515,7 @@ function MatchApp() {
15131515 < section className = { sectionClass } >
15141516 < h2 className = 'text-base font-semibold text-[#48c55c]' > Endgame</ h2 >
15151517 < p className = 'mt-1 text-xs text-gray-300' > Climbing Result</ p >
1516- < div className = 'mt-2 flex flex-wrap gap-2' >
1518+ < div className = 'select-none mt-2 flex flex-wrap gap-2' >
15171519 < MultiButton
15181520 onChange = { setTeleTower }
15191521 value = { teleTower }
@@ -1532,11 +1534,11 @@ function MatchApp() {
15321534 < div className = 'mt-4 grid gap-4 md:grid-cols-2' >
15331535 < div >
15341536 < p className = 'text-xs uppercase tracking-wide text-gray-300' > Driver Quality</ p >
1535- < div className = 'mt-1 flex flex-wrap gap-2' >
1537+ < div className = 'select-none mt-1 flex flex-wrap gap-2' >
15361538 < MultiButton
15371539 onChange = { setDriverQuality }
15381540 value = { driverQuality }
1539- labels = { driverQualityOptions . map ( option => option . toUpperCase ( ) ) }
1541+ labels = { driverQualityOptions }
15401542 values = { driverQualityOptions }
15411543 selectedClassName = 'bg-[#48c55c] text-black'
15421544 unSelectedClassName = 'bg-[#3a4254] text-white'
@@ -1545,7 +1547,7 @@ function MatchApp() {
15451547 </ div >
15461548 < div >
15471549 < p className = 'text-xs uppercase tracking-wide text-gray-300' > Breakdown</ p >
1548- < div className = 'mt-1 flex flex-wrap gap-2' >
1550+ < div className = 'select-none mt-1 flex flex-wrap gap-2' >
15491551 < MultiButton
15501552 onChange = { setBreakdown }
15511553 value = { breakdown }
@@ -1558,7 +1560,7 @@ function MatchApp() {
15581560 </ div >
15591561 < div >
15601562 < p className = 'text-xs uppercase tracking-wide text-gray-300' > Defense Provided</ p >
1561- < div className = 'mt -1 flex flex-wrap gap-2' >
1563+ < div className = 'select-none mt-1 mb -1 flex flex-wrap gap-2' >
15621564 < MultiButton
15631565 onChange = { setDefenseProvided }
15641566 value = { defenseProvided }
@@ -1573,7 +1575,7 @@ function MatchApp() {
15731575 onChange = { setDefenseReceived }
15741576 className = 'mt-2 text-xs text-white'
15751577 boxClassName = 'size-4' >
1576- < span className = 'ml-1.5' > Was Defended</ span >
1578+ < span className = 'ml-1.5 text-center mb-5 ' > Was Defended</ span >
15771579 </ Checkbox >
15781580 </ div >
15791581 < div >
@@ -1602,7 +1604,7 @@ function MatchApp() {
16021604 onHold = { ( ) => adjustFoul ( entry . key , - 1 ) }
16031605 repeatDelay = { 120 }
16041606 repeatInterval = { 90 }
1605- className = 'rounded bg-[#c44e4e] px-2 py-1 text-xs font-semibold text-white' >
1607+ className = 'select-none rounded bg-[#c44e4e] px-2 py-1 text-xs font-semibold text-white' >
16061608 -
16071609 </ HoldButton >
16081610 < span className = 'flex-1 text-xs text-gray-200' > { entry . label } </ span >
@@ -1614,7 +1616,7 @@ function MatchApp() {
16141616 )
16151617 }
16161618 aria-expanded = { activeFoulInfo === entry . key }
1617- className = { `rounded-full border px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide transition ${
1619+ className = { `select-none rounded-full border px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide transition ${
16181620 activeFoulInfo === entry . key
16191621 ? 'border-sky-300/70 bg-sky-300/15 text-sky-100'
16201622 : 'border-white/25 bg-white/5 text-gray-300 hover:bg-white/10'
@@ -1628,7 +1630,7 @@ function MatchApp() {
16281630 onHold = { ( ) => adjustFoul ( entry . key , 1 ) }
16291631 repeatDelay = { 120 }
16301632 repeatInterval = { 90 }
1631- className = 'rounded bg-[#48c55c] px-2 py-1 text-xs font-semibold text-black' >
1633+ className = 'select-none rounded bg-[#48c55c] px-2 py-1 text-xs font-semibold text-black' >
16321634 +
16331635 </ HoldButton >
16341636 </ div >
@@ -1657,7 +1659,7 @@ function MatchApp() {
16571659 onHold = { ( ) => adjustBreak ( entry . key , - 1 ) }
16581660 repeatDelay = { 120 }
16591661 repeatInterval = { 90 }
1660- className = 'rounded bg-[#c44e4e] px-2 py-1 text-xs font-semibold text-white' >
1662+ className = 'select-none rounded bg-[#c44e4e] px-2 py-1 text-xs font-semibold text-white' >
16611663 -
16621664 </ HoldButton >
16631665 < span className = 'flex-1 text-xs text-gray-200' > { entry . label } </ span >
@@ -1669,7 +1671,7 @@ function MatchApp() {
16691671 )
16701672 }
16711673 aria-expanded = { activeBreakInfo === entry . key }
1672- className = { `rounded-full border px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide transition ${
1674+ className = { `select-none rounded-full border px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide transition ${
16731675 activeBreakInfo === entry . key
16741676 ? 'border-sky-300/70 bg-sky-300/15 text-sky-100'
16751677 : 'border-white/25 bg-white/5 text-gray-300 hover:bg-white/10'
@@ -1683,7 +1685,7 @@ function MatchApp() {
16831685 onHold = { ( ) => adjustBreak ( entry . key , 1 ) }
16841686 repeatDelay = { 120 }
16851687 repeatInterval = { 90 }
1686- className = 'rounded bg-[#48c55c] px-2 py-1 text-xs font-semibold text-black' >
1688+ className = 'select-none rounded bg-[#48c55c] px-2 py-1 text-xs font-semibold text-black' >
16871689 +
16881690 </ HoldButton >
16891691 </ div >
@@ -1697,13 +1699,39 @@ function MatchApp() {
16971699 ) ) }
16981700 </ div >
16991701 </ div >
1702+
1703+ < div className = 'col-span-2' >
1704+ < p className = 'text-xs font-semibold uppercase tracking-wide text-gray-300' >
1705+ Shooter Accuracy
1706+ </ p >
1707+ < div >
1708+ < input
1709+ type = 'range'
1710+ value = { shooterAccuracy }
1711+ onChange = { e => setAccuracy ( Number ( e . target . value ) ) }
1712+ min = { 0 }
1713+ max = { 100 }
1714+ className = 'w-full mt-3'
1715+ step = "5"
1716+ />
1717+ < div className = 'mt-1 text-sm' > Accuracy: { shooterAccuracy } %</ div >
1718+ < div className = 'mt-2 flex items-center justify-between text-xs text-gray-400' >
1719+ < span > 0</ span >
1720+ < span > 25</ span >
1721+ < span > 50</ span >
1722+ < span > 75</ span >
1723+ < span > 100</ span >
1724+ </ div >
1725+ </ div >
1726+ </ div >
1727+
17001728 </ div >
17011729 </ details >
17021730 < section className = { `${ sectionClass } flex flex-col gap-2` } >
17031731 < button
17041732 type = 'button'
17051733 onClick = { handleSubmit }
1706- className = 'rounded-lg bg-[#48c55c] px-4 py-3 text-sm font-semibold text-black' >
1734+ className = 'select-none rounded-lg bg-[#48c55c] px-4 py-3 text-sm font-semibold text-black' >
17071735 Submit Match
17081736 </ button >
17091737 < p className = 'text-xs text-gray-300' >
@@ -1712,7 +1740,7 @@ function MatchApp() {
17121740 < button
17131741 type = 'button'
17141742 onClick = { sendAll }
1715- className = 'rounded-lg bg-amber-500 px-4 py-2 text-xs font-semibold text-black' >
1743+ className = 'select-none rounded-lg bg-amber-500 px-4 py-2 text-xs font-semibold text-black' >
17161744 { sending ? 'Sending...' : 'Resend All' }
17171745 </ button >
17181746 </ section >
0 commit comments