55 < meta name ="viewport " content ="width=device-width, initial-scale=1 ">
66
77 < link href ="/bootstrap.min.css " rel ="stylesheet ">
8+ < script src ="/bootstrap.bundle.min.js "> </ script >
89 < link rel ="icon " href ="/favicon.ico " type ="image/x-icon ">
9-
1010 < title > 00:00 #[[${room.name}]]</ title >
1111
1212 < style >
4141 </ div >
4242
4343 < div >
44- < div class ="btn-group mt-3 " style ="justify-content: center ">
45- < button class ="btn btn-outline-secondary " type ="button " id ="timer-button "> 10 ⏲</ button >
44+ < div class ="mt-3 " style ="justify-content: center ">
45+ < div class ="btn-group ">
46+ < button class ="btn btn-outline-secondary " type ="button " id ="timer-button "> 10 ⏲</ button >
47+ < button type ="button "
48+ class ="btn btn-outline-secondary dropdown-toggle dropdown-toggle-split "
49+ data-bs-toggle ="dropdown "
50+ aria-expanded ="false ">
51+ < span class ="visually-hidden "> Toggle Dropdown</ span >
52+ </ button >
53+ < ul id ="startTimerDropdown " class ="dropdown-menu " style ="min-width: auto ">
54+ < li > < button class ="dropdown-item " onclick ="startTimer(5); "> 5 ⏲</ button > </ li >
55+ < li > < button class ="dropdown-item " onclick ="startTimer(10); "> 10 ⏲</ button > </ li >
56+ < li > < button class ="dropdown-item " onclick ="startTimer(15); "> 15 ⏲</ button > </ li >
57+ < li > < button class ="dropdown-item " onclick ="startTimer(20); "> 20 ⏲</ button > </ li >
58+ < li > < button class ="dropdown-item " onclick ="startTimer(25); "> 25 ⏲</ button > </ li >
59+ < li > < button class ="dropdown-item " onclick ="startTimer(30); "> 30 ⏲</ button > </ li >
60+ </ ul >
61+ </ div >
62+ < div class ="btn-group ">
4663 < button class ="btn btn-outline-secondary " type ="button " id ="breaktimer-button "> 15 ☕</ button >
64+ < button type ="button "
65+ class ="btn btn-outline-secondary dropdown-toggle dropdown-toggle-split "
66+ data-bs-toggle ="dropdown "
67+ aria-expanded ="false ">
68+ < span class ="visually-hidden "> Toggle Dropdown</ span >
69+ </ button >
70+ < ul id ="startBreaktimerDropdown " class ="dropdown-menu " style ="min-width: auto ">
71+ < li > < button class ="dropdown-item " onclick ="startBreaktimer(5); "> 5 ☕</ button > </ li >
72+ < li > < button class ="dropdown-item " onclick ="startBreaktimer(10); "> 10 ☕</ button > </ li >
73+ < li > < button class ="dropdown-item " onclick ="startBreaktimer(15); "> 15 ☕</ button > </ li >
74+ </ ul >
75+ </ div >
76+
4777 < button type ="button " class ="btn btn-outline-secondary " data-bs-toggle ="modal " data-bs-target ="#configurationModal "> ⚙️</ button >
4878 </ div >
4979 </ div >
@@ -60,7 +90,7 @@ <h5 class="modal-title" id="configurationModalLabel">Edit Configuration</h5>
6090 </ div >
6191 < div class ="modal-body ">
6292 < div class ="input-group mb-3 ">
63- < span class ="input-group-text "> export MOB_TIMER_USER=</ span >
93+ < span class ="input-group-text "> MOB_TIMER_USER=</ span >
6494 < input type ="text " class ="form-control " placeholder ="username " id ="user-input ">
6595 </ div >
6696
@@ -73,6 +103,8 @@ <h5 class="modal-title" id="configurationModalLabel">Edit Configuration</h5>
73103 < span class ="input-group-text "> mob break</ span >
74104 < input type ="number " class ="form-control " placeholder ="minutes " value ="10 " id ="breaktimer-input ">
75105 </ div >
106+
107+ < p > Values are stored locally in your browser.</ p >
76108 </ div >
77109 </ div >
78110 </ div >
@@ -90,11 +122,13 @@ <h5>History <small class="text-muted">Last 24h</small></h5>
90122 </ div >
91123
92124 < div id ="usage-container ">
93- < h5 > Usage </ h5 >
125+ < h5 > Integration with the mob tool </ h5 >
94126 < ul class ="list-unstyled ">
95- < li > < code > export MOB_TIMER_ROOM=[[${room.name}]]</ code > </ li >
127+ < li > configure in ~/.mob</ li >
128+ < li > < code > MOB_TIMER_ROOM=[[${room.name}]]</ code > </ li >
96129 </ ul >
97130 < ul class ="list-unstyled ">
131+ < li > start timer in cli</ li >
98132 < li > < code > mob start 10</ code > </ li >
99133 < li > < code > mob timer 10</ code > </ li >
100134 < li > < code > mob break 5</ code > </ li >
@@ -123,7 +157,6 @@ <h5>Usage</h5>
123157 </ p >
124158</ footer >
125159
126- < script src ="/bootstrap.bundle.min.js "> </ script >
127160 < script src ="/howler.min.js "> </ script >
128161 < script type ="text/javascript ">
129162 if ( "Notification" in window ) {
@@ -432,28 +465,35 @@ <h5>Usage</h5>
432465 syncAndSetInitialValue ( 'user-input' , 'user' , '' ) ;
433466
434467 const timerButton = document . getElementById ( 'timer-button' ) ;
435- timerButton . addEventListener ( "click" , startTimer ) ;
468+ timerButton . addEventListener ( "click" , startTimerDefault ) ;
436469 syncAndSetInitialValue ( 'timer-input' , 'timer' , "10" , updateTimerButton ) ;
437- function startTimer ( ) {
438- sendTimer ( 'timer' , localStorage . getItem ( 'timer' ) , localStorage . getItem ( 'user' ) ) ;
470+ function startTimerDefault ( ) {
471+ startTimer ( localStorage . getItem ( 'timer' ) ) ;
472+ }
473+ function startTimer ( timer ) {
474+ sendTimer ( 'timer' , timer , localStorage . getItem ( 'user' ) ) ;
439475 }
440476 function updateTimerButton ( ) {
441477 timerButton . innerText = localStorage . getItem ( 'timer' ) + " ⏲" ;
442478 }
443479
444480 const breaktimerButton = document . getElementById ( 'breaktimer-button' ) ;
445- breaktimerButton . addEventListener ( "click" , startBreaktimer ) ;
481+ breaktimerButton . addEventListener ( "click" , startBreaktimerDefault ) ;
446482 syncAndSetInitialValue ( 'breaktimer-input' , 'breaktimer' , "15" , updateBreaktimerButton ) ;
447- function startBreaktimer ( ) {
448- sendTimer ( 'breaktimer' , localStorage . getItem ( 'breaktimer' ) , localStorage . getItem ( 'user ') ) ;
483+ function startBreaktimerDefault ( ) {
484+ startBreaktimer ( localStorage . getItem ( 'breaktimer' ) ) ;
449485 }
486+
487+ function startBreaktimer ( breaktimer ) {
488+ sendTimer ( 'breaktimer' , breaktimer , localStorage . getItem ( 'user' ) ) ;
489+ }
490+
450491 function updateBreaktimerButton ( ) {
451492 breaktimerButton . innerText = localStorage . getItem ( 'breaktimer' ) + " ☕" ;
452493 }
453494 </ script >
454495
455496<!-- Optional JavaScript -->
456- < script src ="/bootstrap.bundle.min.js "> </ script >
457497
458498< script async defer src ="https://scripts.simpleanalyticscdn.com/latest.js "> </ script >
459499< noscript > < img src ="https://queue.simpleanalyticscdn.com/noscript.gif " alt ="" referrerpolicy ="no-referrer-when-downgrade " /> </ noscript >
0 commit comments