-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathsettings.html
109 lines (109 loc) · 6.71 KB
/
settings.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link href="./styles.css" rel="stylesheet">
<title>Nightscout Widget Settings</title>
</head>
<body>
<main class="settings">
<header class="settings-header">
<h1 class="settings__title" data-i18n="settings.title" tabindex="-1">Widget settings</h1>
<div class="settings-language">
<button class="settings-language__button">en</button>
<ul class="language-list">
<li class="language-list__item" data-value="en" tabindex="0">English</li>
<li class="language-list__item" data-value="he" tabindex="0">Hebrew</li>
<li class="language-list__item" data-value="it" tabindex="0">Italian</li>
<li class="language-list__item" data-value="pl" tabindex="0">Polish</li>
<li class="language-list__item" data-value="ru" tabindex="0">Russian</li>
<li class="language-list__item" data-value="sk" tabindex="0">Slovak</li>
<li class="language-list__item" data-value="es" tabindex="0">Spanish</li>
<hr class="language-list__separator">
<li class="language-list__item" tabindex="0" data-i18n="settings.help_to_translate">Help us to translate</li>
</ul>
</div>
<button class="settings-button-close" type="button" id="button-close">
<img src="asset/icons8-check.png" alt="close" width="25px" height="25px">
</button>
</header>
<form name="settings-form">
<div class="settings-fields">
<section class="settings-field settings-fields__nightscout">
<h2 class="settings-field__title" data-i18n="settings.nightscout.title">Nightscout API settings</h2>
<div class="settings-input">
<input class="settings-input__field settings-input__field--text" type="text" name="nightscout-url" id="nightscout-url" spellcheck="false" required>
<label class="settings-input__label" for="nightscout-url" data-i18n="settings.nightscout.url">Nightscout URL</label>
</div>
<div class="settings-input">
<input class="settings-input__field settings-input__field--text" type="text" name="nightscout-token" id="nightscout-token" spellcheck="false" required>
<label class="settings-input__label" for="nightscout-token" data-i18n="settings.nightscout.token">Nightscout token</label>
</div>
<div class="settings-input">
<input class="settings-input__field settings-input__field--number" type="number" name="nightscout-interval" id="nightscout-interval" required>
<label class="settings-input__label" for="nightscout-interval" data-i18n="settings.nightscout.interval">Nightscout request interval (sec.)</label>
</div>
</section>
<section class="settings-field settings-fields__widget">
<h2 class="settings-field__title" data-i18n="settings.widget.title">Widget preferences</h2>
<div class="settings-input">
<input class="settings-input__field settings-input__field--number" type="number" step="1" min="0" max="999" name="age-limit" id="age-limit" required>
<label class="settings-input__label" for="age-limit" data-i18n="settings.widget.age_limit">Age limit (min.)</label>
</div>
<div class="settings-input">
<input class="settings-input__check" type="checkbox" name="show-age" id="show-age">
<label class="settings-input__check-wrapper" for="show-age">
<span class="settings-input__field settings-input__field--checkbox"></span>
<span class="settings-input__label" data-i18n="settings.widget.show_age">Show age</span>
</label>
</div>
<div class="settings-input">
<input class="settings-input__check" type="checkbox" name="units-in-mmol" id="units-in-mmol">
<label class="settings-input__check-wrapper" for="units-in-mmol">
<span class="settings-input__field settings-input__field--checkbox"></span>
<span class="settings-input__label" data-i18n="settings.widget.units_in_mmol">Units in mmol/l</span>
</label>
</div>
<div class="settings-input">
<input class="settings-input__check" type="checkbox" name="calc-trend" id="calc-trend">
<label class="settings-input__check-wrapper" for="calc-trend">
<span class="settings-input__field settings-input__field--checkbox"></span>
<span class="settings-input__label" data-i18n="settings.widget.calc_trend">Calc trend</span>
</label>
</div>
</section>
<section class="settings-field settings-fields__bg">
<h2 class="settings-field__title" data-i18n="settings.bg.title">Blood sugar levels preferences</h2>
<div class="settings-input">
<input class="settings-input__field settings-input__field--number" type="number" step="0.1" name="bg-high" id="bg-high" required>
<label class="settings-input__label" for="bg-high" data-i18n="settings.bg.high"">High level threshold</label>
</div>
<div class="settings-input">
<input class="settings-input__field settings-input__field--number" type="number" step="0.1" name="bg-target-top" id="bg-target-top" required>
<label class="settings-input__label" for="bg-target-top" data-i18n="settings.bg.target.top">Target top level</label>
</div>
<div class="settings-input">
<input class="settings-input__field settings-input__field--number" type="number" step="0.1" name="bg-target-bottom" id="bg-target-bottom" required>
<label class="settings-input__label" for="bg-target-bottom" data-i18n="settings.bg.target.bottom">Target bottom level</label>
</div>
<div class="settings-input">
<input class="settings-input__field settings-input__field--number" type="number" step="0.1" name="bg-low" id="bg-low" required>
<label class="settings-input__label" for="bg-low" data-i18n="settings.bg.low">Low level threshold</label>
</div>
</section>
</div>
<footer class="settings-footer">
<div class="settings-footer__buttons">
<button class="settings-button" type="submit" id="button-submit" data-i18n="settings.button-save">Save</button>
<button class="settings-button" type="button" id="button-test" data-i18n="settings.button-test">Test</button>
</div>
<div class="settings-footer__meta">
<p class="settings__app-version">v<span id="app-version">0.0.0</span></p>
<a class="settings__log-link" href="#" data-i18n="settings.show_logs">Logs ...</a>
</div>
</footer>
</form>
</main>
<script type="module" src="./js/settings.js"></script>
</body>
</html>