Lots of changes

-    Feedback van dataSensor array
-    dataSliders min/max and unit
-    Camera before Unity
-    Restart knop buiten service mode
-    Operator phonenumber button
-    Gracefull shutdown
-    Out of service control
This commit is contained in:
2025-10-23 17:45:35 +02:00
parent f07ba57168
commit cd33670361
36 changed files with 1444 additions and 277 deletions

View File

@@ -21,18 +21,19 @@ var setStatusState = function (statusElement, state) {
statusElement.classList.add("ntsh_status-".concat(state));
};
exports.setStatusState = setStatusState;
var setProgressState = function (progressElement, percentage) {
var value = progressElement.querySelector('.ntsh_progress-value');
value.style.width = "".concat(percentage * 100, "%");
var setProgressState = function (progressElement, value, min, max, unit) {
var percentage = (value - min) / (max - min);
var progressValue = progressElement.querySelector('.ntsh_progress-value');
progressValue.style.width = "".concat(percentage * 100, "%");
var label = progressElement.querySelector('.ntsh_progress-label');
label.innerText = "".concat(Math.round(percentage * 100), "%");
label.innerText = "".concat(value).concat(unit);
};
exports.setProgressState = setProgressState;
var createProgress = function (value) {
var createProgress = function (value, min, max, unit) {
var progress = (0, morphux_1.ce)('div', 'ntsh_progress');
progress.appendChild((0, morphux_1.ce)('div', 'ntsh_progress-value'));
progress.appendChild((0, morphux_1.ce)('div', 'ntsh_progress-label'));
(0, exports.setProgressState)(progress, value);
(0, exports.setProgressState)(progress, value, min, max, unit);
return progress;
};
exports.createProgress = createProgress;