Skip to content

Commit fff8f85

Browse files
committed
web/tablet: Adjust position of timer
1 parent 845b4c5 commit fff8f85

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

web/control.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -728,16 +728,16 @@ async function init_timers() {
728728
endtime.setMinutes(parseInt(match_at[2]))
729729
duration = match_at[4]*60 || null
730730
endtime = Math.round(endtime.getTime()/1000)
731-
console.log('timer parse', match_at, endtime, duration)
731+
console.log('timer parse (end time)', match_at, endtime, duration)
732732
} else {
733733
// Simple match
734-
regex = /(\d\d?)(:(\d\d?))?(\/(\d\+))?/
734+
regex = /(\d\d?)(:(\d\d?))?(\/(\d+))?/
735735
match = input.value.match(regex)
736736
minutes = match[1]
737737
seconds = match[3] || 0
738738
duration = match[5]*60 || null
739739
endtime = Math.round(Date.now()/1000 + 60*parseInt(minutes) + parseInt(seconds))
740-
console.log('timer parse', match, minutes, seconds, duration)
740+
console.log('timer parse (duration)', match, minutes, seconds, duration)
741741
}
742742
if (duration === null) {
743743
duration = Math.round(endtime - Date.now()/1000)

web/tablet.html

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
<div id="main" style="height: 100%; display: grid; grid-template-columns: 9fr 1fr; background-color: white"> <!-- main (contains panel/sidebar) -->
4949
<div style="display: grid; grid-template-rows: .5fr 4.5fr"> <!-- main panel -->
50-
<div style="display: grid; grid-template-columns: repeat(9, 1fr); border: .5ex black solid"> <!-- top indicators -->
50+
<div style="display: grid; grid-template-columns: repeat(10, 1fr); border: .5ex black solid"> <!-- top indicators -->
5151
<div class="live centered centeredV" title="When red, (audio, camera gallery, or screenshare) may be being broadcasted">Live</div>
5252
<button class="indicator" id="warning">Warn</button>
5353
<button class="indicator" id="caution">Caution</button>
@@ -57,13 +57,10 @@
5757
<button class="indicator" id="chat">Chat</button>
5858
<button class="indicator" id="slower">Slower</button>
5959
<button class="indicator" id="faster">Faster</button>
60+
<input size="6" id="A" class="timer" style="text-align: center" title="Timer. Set the duration with formats MM[:SS][/DD] (time remaining) or @HH:MM[/DD] (end time), where DD is planned duration in minutes. It starts changing color 75% of the way through.">
6061
</div>
6162
<div style="display: grid; grid-template-columns: 1fr 2fr 2fr 1fr"> <!-- under indicators-->
6263
<div style="display:grid;"> <!-- first column-->
63-
<div>
64-
<div>Timer</div>
65-
<div class="centered"><input size="6" id="A" class="timer" style="text-align: center" title="Timer. Set the duration with formats MM[:SS][/DD] (time remaining) or @HH:MM[/DD] (end time), where DD is planned duration in minutes. It starts changing color 75% of the way through."></div>
66-
</div>
6764
<div>
6865
<div>Time:</div>
6966
<div class="time centered" title="Current time"></div>

0 commit comments

Comments
 (0)