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

@@ -45,6 +45,9 @@ var MenuBar = /** @class */ (function () {
this.container = document.querySelector('.ntsh_menubar');
this._Main = main;
this.build();
this._Main.socket.on('supportNumber', function (number) {
_this.supportNumber = number;
});
setTimeout(function () {
if ((localStorage === null || localStorage === void 0 ? void 0 : localStorage.getItem('serviceMode')) === 'true')
_this.toggleServiceMode(true, true);
@@ -53,10 +56,49 @@ var MenuBar = /** @class */ (function () {
MenuBar.prototype.build = function () {
var _this = this;
this.menubar = new Component_MenuBar_1.ComponentMenuBar({
mobile: {
left: [
{
type: 'icon',
text: 'Restart',
materialIcon: 'restart_alt',
uniqueIdentifier: 'restart_installation',
click: function () { return __awaiter(_this, void 0, void 0, function () {
var mobileMenu;
return __generator(this, function (_a) {
mobileMenu = document.querySelector('.mux_mobilemenu');
mobileMenu === null || mobileMenu === void 0 ? void 0 : mobileMenu.click();
this.restartInstallation();
return [2 /*return*/];
});
}); },
},
],
right: [
{
type: 'icon',
text: 'Support',
materialIcon: 'call_quality',
uniqueIdentifier: 'call_support',
click: function () { return _this.showSupport(); },
},
],
},
left: [
{
type: 'image',
url: '/img/morphix_logo_white.png',
type: 'normal',
text: 'Restart',
materialIcon: 'restart_alt',
uniqueIdentifier: 'restart_installation',
click: function () { return __awaiter(_this, void 0, void 0, function () {
var mobileMenu;
return __generator(this, function (_a) {
mobileMenu = document.querySelector('.mux_mobilemenu');
mobileMenu === null || mobileMenu === void 0 ? void 0 : mobileMenu.click();
this.restartInstallation();
return [2 /*return*/];
});
}); },
},
{
type: 'normal',
@@ -92,7 +134,16 @@ var MenuBar = /** @class */ (function () {
],
right: [
{
type: 'normal',
type: 'icon',
text: 'Support',
materialIcon: 'call_quality',
uniqueIdentifier: 'call_support',
click: function () { return _this.showSupport(); },
},
{
type: document.body.classList.contains('ntsh_service')
? 'normal'
: 'icon',
text: document.body.classList.contains('ntsh_service')
? 'Exit Service'
: 'Service Mode',
@@ -115,6 +166,55 @@ var MenuBar = /** @class */ (function () {
this.container.innerHTML = '';
this.container.appendChild(this.menubar.container);
};
MenuBar.prototype.showSupport = function () {
return __awaiter(this, void 0, void 0, function () {
var dialog, callAnchor;
return __generator(this, function (_a) {
dialog = new morphux_1.MorphComponent.Dialog({
title: 'Contact Support',
width: 'medium',
height: 'auto',
okButtonVisible: false,
cancelButtonVisible: false,
});
this.supportNumber.slice();
callAnchor = (0, morphux_1.ce)('a', 'ntsh_callanchor', { href: "tel:".concat(this.supportNumber) }, "+".concat(this.supportNumber));
dialog.content.appendChild(callAnchor);
setTimeout(function () { return callAnchor.click(); }, 100);
return [2 /*return*/];
});
});
};
MenuBar.prototype.restartInstallation = function () {
return __awaiter(this, void 0, void 0, function () {
var confirmed;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, morphux_1.MorphFeature.Confirm({
title: 'Restart Installation',
message: 'Are you sure you want to restart the installation?',
})];
case 1:
confirmed = _a.sent();
if (!confirmed)
return [2 /*return*/];
morphux_1.MorphFeature.Loader({
active: true,
message: 'Restarting installation...',
});
this._Main.socket.emit('restartInstallation', function (response) {
morphux_1.MorphFeature.Loader({ active: false });
if (!response.succeed)
return morphux_1.MorphFeature.Alert({
title: 'Error',
message: response.message,
});
});
return [2 /*return*/];
}
});
});
};
MenuBar.prototype.toggleServiceMode = function (mode, skipPin) {
return __awaiter(this, void 0, void 0, function () {
var newMode, servicePin;