@@ -36,7 +36,15 @@ export function show(): void {
3636 textEl . classList . remove ( "hidden" ) ;
3737 } ,
3838 } ) ;
39- } else if ( Config . timerStyle === "flash" ) {
39+ } else if ( Config . timerStyle === "flash mini" ) {
40+ animate ( miniEl , {
41+ opacity : [ 0 , 1 ] ,
42+ duration : applyReducedMotion ( 125 ) ,
43+ onBegin : ( ) => {
44+ miniEl . classList . remove ( "hidden" ) ;
45+ } ,
46+ } ) ;
47+ } else if ( Config . timerStyle === "flash text" ) {
4048 animate ( textEl , {
4149 opacity : [ 0 , 1 ] ,
4250 duration : applyReducedMotion ( 125 ) ,
@@ -132,7 +140,18 @@ export function update(): void {
132140 if ( textEl !== null ) {
133141 textEl . innerHTML = "<div>" + displayTime + "</div>" ;
134142 }
135- } else if ( Config . timerStyle === "flash" ) {
143+ } else if ( Config . timerStyle === "flash mini" ) {
144+ let displayTime = DateTime . secondsToString ( maxtime - time ) ;
145+ if ( maxtime === 0 ) {
146+ displayTime = DateTime . secondsToString ( time ) ;
147+ }
148+ if ( miniEl !== null ) {
149+ miniEl . innerHTML =
150+ "<div>" +
151+ `${ ( maxtime - time ) % 15 !== 0 ? "" : displayTime } ` +
152+ "</div>" ;
153+ }
154+ } else if ( Config . timerStyle === "flash text" ) {
136155 let displayTime = DateTime . secondsToString ( maxtime - time ) ;
137156 if ( maxtime === 0 ) {
138157 displayTime = DateTime . secondsToString ( time ) ;
@@ -182,7 +201,13 @@ export function update(): void {
182201 } else {
183202 textEl . innerHTML = `<div>${ getCurrentCount ( ) } /${ outof } </div>` ;
184203 }
185- } else if ( Config . timerStyle === "flash" ) {
204+ } else if ( Config . timerStyle === "flash mini" ) {
205+ if ( outof === 0 ) {
206+ miniEl . innerHTML = `${ TestInput . input . getHistory ( ) . length } ` ;
207+ } else {
208+ miniEl . innerHTML = `${ getCurrentCount ( ) } /${ outof } ` ;
209+ }
210+ } else if ( Config . timerStyle === "flash text" ) {
186211 if ( outof === 0 ) {
187212 textEl . innerHTML = `<div>${ TestInput . input . getHistory ( ) . length } </div>` ;
188213 } else {
@@ -198,7 +223,9 @@ export function update(): void {
198223 } else if ( Config . mode === "zen" ) {
199224 if ( Config . timerStyle === "text" ) {
200225 textEl . innerHTML = `<div>${ TestInput . input . getHistory ( ) . length } </div>` ;
201- } else if ( Config . timerStyle === "flash" ) {
226+ } else if ( Config . timerStyle === "flash mini" ) {
227+ miniEl . innerHTML = `${ TestInput . input . getHistory ( ) . length } ` ;
228+ } else if ( Config . timerStyle === "flash text" ) {
202229 textEl . innerHTML = `<div>${ TestInput . input . getHistory ( ) . length } </div>` ;
203230 } else {
204231 miniEl . innerHTML = `${ TestInput . input . getHistory ( ) . length } ` ;
0 commit comments