Initial commit
This commit is contained in:
38
frontend/views/dashboard/dist/leds copy.js
vendored
Normal file
38
frontend/views/dashboard/dist/leds copy.js
vendored
Normal 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
|
||||
Reference in New Issue
Block a user