aboutsummaryrefslogtreecommitdiff
path: root/src/view/index.html
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2023-07-13 16:04:55 -0500
committerFurkan Sahin <furkan-dev@proton.me>2023-07-13 16:04:55 -0500
commit3b78d10a5e5873e4a3170ee23c75ff1dc7c006f2 (patch)
treef3d6ff0c86ee9c761c6b640dc4b2f0eb407dbfee /src/view/index.html
parent1b5479c24ae601bf3a3732201fcee7ce3f60d9d0 (diff)
Refactor, move label-making components into the model class, create a single update function for all labels
Diffstat (limited to 'src/view/index.html')
-rw-r--r--src/view/index.html28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/view/index.html b/src/view/index.html
index b92cc6d..32dd74e 100644
--- a/src/view/index.html
+++ b/src/view/index.html
@@ -33,12 +33,12 @@
<script src="/freqtimer/js/bundle.min.js"></script>
<!-- Controller Bindings -->
<script>
- var timer_view = null;
+ var timer_controller = null;
var sound_handle = null;
var Module = {
onRuntimeInitialized: function() {
- timer_view = new Module.TimerView;
+ timer_controller = new Module.TimerController;
}
};
@@ -62,8 +62,8 @@
}
setInterval(() => {
- if (timer_view !== null) {
- timer_view.handle_timer_update();
+ if (timer_controller !== null) {
+ timer_controller.handle_timer_update();
}
}, 10);
</script>
@@ -100,37 +100,37 @@
<div class="col-6 p-1">
<button
class="btn btn-outline-primary w-100"
- onclick="timer_view.handle_inc_time(1);"
+ onclick="timer_controller.handle_inc_time(1);"
>1s</button>
</div>
<div class="col-6 p-1">
<button
class="btn btn-outline-primary w-100"
- onclick="timer_view.handle_inc_time(6);"
+ onclick="timer_controller.handle_inc_time(6);"
>6s</button>
</div>
<div class="col-6 p-1">
<button
class="btn btn-outline-primary w-100"
- onclick="timer_view.handle_inc_time(10);"
+ onclick="timer_controller.handle_inc_time(10);"
>10s</button>
</div>
<div class="col-6 p-1">
<button
class="btn btn-outline-primary w-100"
- onclick="timer_view.handle_inc_time(15);"
+ onclick="timer_controller.handle_inc_time(15);"
>15s</button>
</div>
<div class="col-6 p-1">
<button
class="btn btn-outline-primary w-100"
- onclick="timer_view.handle_inc_time(30);"
+ onclick="timer_controller.handle_inc_time(30);"
>30s</button>
</div>
<div class="col-6 p-1">
<button
class="btn btn-outline-primary w-100"
- onclick="timer_view.handle_inc_time(60);"
+ onclick="timer_controller.handle_inc_time(60);"
>60s</button>
</div>
</div>
@@ -139,12 +139,12 @@
<button
class="btn btn-danger btn-llg w-100"
id="clear-reset-btn"
- onclick="timer_view.handle_clear_reset();"
+ onclick="timer_controller.handle_clear_reset();"
>Reset</button>
<button
class="btn btn-success btn-llg w-100"
id="start-stop-btn"
- onclick="timer_view.handle_start_stop(); attach_ios_audio();"
+ onclick="timer_controller.handle_start_stop(); attach_ios_audio();"
>Start</button>
</div>
@@ -153,14 +153,14 @@
<button
class="btn btn-secondary btn-plus w-100"
id="increment-counter-1-btn"
- onclick="timer_view.handle_inc_counter(0);"
+ onclick="timer_controller.handle_inc_counter(0);"
>+1</button>
</div>
<div class="col-6 p-1">
<button
class="btn btn-secondary btn-plus w-100"
id="increment-counter-2-btn"
- onclick="timer_view.handle_inc_counter(1);"
+ onclick="timer_controller.handle_inc_counter(1);"
>+1</button>
</div>
</div>