Skip to content

Commit

Permalink
hotline option
Browse files Browse the repository at this point in the history
  • Loading branch information
strukturart committed Sep 23, 2023
1 parent 902032d commit e1e5beb
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 7 deletions.
4 changes: 2 additions & 2 deletions application/assets/js/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -947,9 +947,9 @@ const module = (() => {
alt: alt,
timestamp: ts.toISOString(),
});

console.log(setting);
try {
hotline(tracking_cache);
if (setting.hotline_view) hotline(tracking_cache);
} catch (e) {
console.log(e);
}
Expand Down
9 changes: 9 additions & 0 deletions application/assets/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ const settings = ((_) => {
localStorage.getItem("tips_view") != null
? JSON.parse(localStorage.getItem("tips_view"))
: true,

hotline_view:
localStorage.getItem("hotline_view") != null
? JSON.parse(localStorage.getItem("hotline_view"))
: true,
};

setting.tracking_screenlock
Expand Down Expand Up @@ -147,6 +152,10 @@ const settings = ((_) => {
? (document.getElementById("tips-ckb").checked = true)
: (document.getElementById("tips-ckb").checked = false);

setting.hotline_view
? (document.getElementById("hotline-ckb").checked = true)
: (document.getElementById("hotline-ckb").checked = false);

//show / hidde crosshair
setting.crosshair
? (document.getElementById("cross").style.visibility = "visible")
Expand Down
28 changes: 23 additions & 5 deletions application/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,6 @@ <h2>Tracking notifications</h2>
<label for="tracking-notification-time">Time</label>
<select id="tracking-notification-time" class="select-box">
<option value="0">0</option>
<option value="1">1min</option>

<option value="10">10min</option>
<option value="20">20min</option>
<option value="30">30min</option>
Expand All @@ -414,6 +412,19 @@ <h2>Tracking notifications</h2>
</select>
</div>


<div class="item input-parent flex" tabindex="6">
<label for="hotline-ckb" class="grid-col-14">Path with hotline ?</label>
<input
class="checkboxes grid-col-2"
type="checkbox"
id="hotline-ckb"
value="hotline_view"
/>
<div class="ckb-icon"></div>
<div class="toogle-button"></div>
</div>

<h2>Views</h2>
<div class="item input-parent flex" tabindex="6">
<label for="tips-ckb" class="grid-col-14">show tips ?</label>
Expand Down Expand Up @@ -455,8 +466,6 @@ <h2>Export</h2>
<div class="compass"></div>
<div class="accuracy">accuracy +- <span></span></div>
<div class="alt-accuracy">alt accuracy +- <span></span></div>


</section>

<section class="item" id="device-distance">
Expand Down Expand Up @@ -498,7 +507,7 @@ <h2>Export</h2>
</div>
</section>
</div>

<!--TRACKING-->
<div class="panel menu-box" id="tracking" name="Tracking">
<section class="item">
<strong><u>Distance</u></strong>
Expand Down Expand Up @@ -546,6 +555,8 @@ <h2>Export</h2>
</section>
<button id="follow-gpx-path" class="item" data-map="follow-path">Follow path</button>
<button class="item" data-map="remove-path">Remove path</button>
<button class="item" data-map="hotline">Hotline</button>


</div>
<!--ROUTING-->
Expand Down Expand Up @@ -719,6 +730,13 @@ <h2>Instructions</h2>
</div>
</div>

<div class="item" data-map="null">
<div class="flex justify-content-spacebetween">
<div>hotline</div>
<div>longpress 6</div>
</div>
</div>

<div class="item" data-map="share">
<div class="flex justify-content-spacebetween">
<div>share your position</div>
Expand Down

0 comments on commit e1e5beb

Please sign in to comment.