Initial commit

This commit is contained in:
2025-10-22 22:06:16 +02:00
commit d8ca4e154f
141 changed files with 32231 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Leds = void 0;
var morphux_1 = require("morphux");
var Leds = /** @class */ (function () {
function Leds(Main) {
this.container = document.querySelector(".ntsh_tab[tabid=\"leds\"]");
this._Main = Main;
this.registerTabListener();
}
Leds.prototype.createPreviewFrame = function () {
var container = (0, morphux_1.ce)('div', 'ntsh_leds');
var urlParams = new URLSearchParams(window.location.search);
var transform = urlParams.has('transform')
? "?transform=".concat(urlParams.get('transform'))
: '';
var frame = (0, morphux_1.ce)('iframe', 'ntsh_leds-frame', {
src: "http://".concat(window.location.hostname, ":84").concat(transform),
});
container.appendChild(frame);
this.container.appendChild(container);
};
Leds.prototype.removePreviewFrame = function () {
this.container.innerHTML = '';
};
Leds.prototype.registerTabListener = function () {
var _this = this;
this._Main.TabController.registerListener('leds', function (visible) {
if (visible)
_this.createPreviewFrame();
else
_this.removePreviewFrame();
});
};
return Leds;
}());
exports.Leds = Leds;
//# sourceMappingURL=leds%20copy.js.map