stub in bambu management channel into ui and add storage in device definition

This commit is contained in:
Stewart Allen 2025-01-26 20:13:31 -05:00
commit a3bc6ceb67
4 changed files with 27 additions and 3 deletions

View file

@ -383,7 +383,9 @@
"bedBelt": false,
"fwRetract": false,
"filamentSource": "direct",
"extras": {},
"extras": {
"bbl": {}
},
"imageURL": "",
"deviceZMax": 0,
"gcodeTime": 1,

View file

@ -274,6 +274,7 @@ gapp.register("kiri.devices", (root, exports) => {
}
uc.refresh(1);
api.event.emit('device.selected', dev);
} catch (e) {
console.log({error:e, device:code, devicename});
api.show.alert(`invalid or deprecated device: "${devicename}"`, 10);

View file

@ -76,7 +76,12 @@ let h = exports({
bind: (el, data, opt = {}) => {
let ctx = [];
let html = build(data, ctx).join('');
if (opt.append) {
if (opt.after || opt.before) {
let tmpl = document.createElement('template');
tmpl.innerHTML = html;
opt.before && el.before(tmpl.content);
opt.after && el.after(tmpl.content);
} else if (opt.append) {
el.innerHTML += html;
} else {
el.innerHTML = html;