iobroker.mywebui 1.42.9 → 1.42.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/io-package.json
CHANGED
package/package.json
CHANGED
|
@@ -857,22 +857,34 @@ export class IobrokerWebui3DScreenEditor extends BaseCustomWebComponentConstruct
|
|
|
857
857
|
const assetsListContent = this._getDomElement('assetsListContent');
|
|
858
858
|
|
|
859
859
|
if (!this.sceneData.assets || this.sceneData.assets.length === 0) {
|
|
860
|
-
assetsListContent.innerHTML = '<div style="color:#888;"
|
|
860
|
+
assetsListContent.innerHTML = '<div style="color:#888;padding:20px;text-align:center;font-size:12px;">📦 No assets<br><br>Click "+ Model" to add</div>';
|
|
861
861
|
return;
|
|
862
862
|
}
|
|
863
863
|
|
|
864
|
-
let html = '';
|
|
864
|
+
let html = '<div style="display:grid;grid-template-columns:1fr 1fr;gap:8px;">';
|
|
865
865
|
for (const asset of this.sceneData.assets) {
|
|
866
866
|
html += `
|
|
867
|
-
<div style="
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
867
|
+
<div style="
|
|
868
|
+
padding:12px;
|
|
869
|
+
background:linear-gradient(135deg, #2a2a2a 0%, #242424 100%);
|
|
870
|
+
border:1px solid #333;
|
|
871
|
+
border-radius:6px;
|
|
872
|
+
cursor:pointer;
|
|
873
|
+
display:flex;
|
|
874
|
+
flex-direction:column;
|
|
875
|
+
align-items:center;
|
|
876
|
+
text-align:center;
|
|
877
|
+
font-size:11px;
|
|
878
|
+
"
|
|
879
|
+
onmouseover="this.style.borderColor='#0f0'"
|
|
880
|
+
onmouseout="this.style.borderColor='#333'">
|
|
881
|
+
<div style="font-size:28px;margin-bottom:6px;">📦</div>
|
|
882
|
+
<div style="color:#0f0;font-weight:bold;margin-bottom:3px;word-break:break-word;max-width:100%;">${asset.name.substring(0, 25)}</div>
|
|
883
|
+
<div style="color:#888;font-size:10px;">${asset.type}</div>
|
|
873
884
|
</div>
|
|
874
885
|
`;
|
|
875
886
|
}
|
|
887
|
+
html += '</div>';
|
|
876
888
|
assetsListContent.innerHTML = html;
|
|
877
889
|
}
|
|
878
890
|
|
|
@@ -24,6 +24,7 @@ import "./IobrokerWebuiEventAssignment.js";
|
|
|
24
24
|
import "./IobrokerWebuiPropertyGrid.js";
|
|
25
25
|
import "./IobrokerWebuiControlPropertiesEditor.js";
|
|
26
26
|
import { IobrokerWebuiScreenEditor } from './IobrokerWebuiScreenEditor.js';
|
|
27
|
+
import { IobrokerWebui3DScreenEditor } from './IobrokerWebui3DScreenEditor.js';
|
|
27
28
|
import { IobrokerWebuiConfirmationWrapper } from './IobrokerWebuiConfirmationWrapper.js';
|
|
28
29
|
import { getPanelContainerForElement } from './DockHelper.js';
|
|
29
30
|
import { IobrokerWebuiPropertyGrid } from './IobrokerWebuiPropertyGrid.js';
|
|
@@ -1496,6 +1497,16 @@ export class IobrokerWebuiAppShell extends BaseCustomWebComponentConstructorAppe
|
|
|
1496
1497
|
this.openDock(screenEditor);
|
|
1497
1498
|
}
|
|
1498
1499
|
}
|
|
1500
|
+
async open3DScreenEditor(name) {
|
|
1501
|
+
let id = '3dscreen_' + name;
|
|
1502
|
+
if (!this.isDockOpenAndActivate(id)) {
|
|
1503
|
+
let editor = new IobrokerWebui3DScreenEditor();
|
|
1504
|
+
editor.id = id;
|
|
1505
|
+
editor.title = '3D: ' + name;
|
|
1506
|
+
editor.setAttribute('scene-name', name);
|
|
1507
|
+
this.openDock(editor);
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1499
1510
|
async openGlobalStyleEditor(style, title, editPart) {
|
|
1500
1511
|
let id = "global_styleEditor";
|
|
1501
1512
|
if (!this.isDockOpenAndActivate(id)) {
|
|
@@ -174,10 +174,7 @@ export class IobrokerWebuiSolutionExplorer extends BaseCustomWebComponentConstru
|
|
|
174
174
|
}
|
|
175
175
|
};
|
|
176
176
|
await iobrokerHandler.saveObject('3dscreen', (dir ?? '') + '/' + screenName, defaultScene);
|
|
177
|
-
|
|
178
|
-
const editor = document.createElement('iobroker-webui-3dscreen-editor');
|
|
179
|
-
editor.setAttribute('scene-name', screenName);
|
|
180
|
-
window.appShell.openDialog(editor, { x: 50, y: 50, width: 1200, height: 800 });
|
|
177
|
+
window.appShell.open3DScreenEditor((dir ?? '') + '/' + screenName);
|
|
181
178
|
} else {
|
|
182
179
|
const defaultScript = type === 'control' ? defaultNewControlScript : null;
|
|
183
180
|
window.appShell.openScreenEditor((dir ?? '') + '/' + screenName, type, '', defaultNewStyle, defaultScript, {});
|
|
@@ -369,17 +366,7 @@ export class IobrokerWebuiSolutionExplorer extends BaseCustomWebComponentConstru
|
|
|
369
366
|
window.appShell.openScreenEditor(nm, type, s.html, s.style, s.script, s.settings, s.properties);
|
|
370
367
|
}
|
|
371
368
|
else if (type == '3dscreen') {
|
|
372
|
-
|
|
373
|
-
const editor = document.createElement('iobroker-webui-3dscreen-editor');
|
|
374
|
-
editor.setAttribute('scene-name', nm);
|
|
375
|
-
// Open as borderless, full-size dialog
|
|
376
|
-
window.appShell.openDialog(editor, {
|
|
377
|
-
x: 0, y: 0,
|
|
378
|
-
width: window.innerWidth,
|
|
379
|
-
height: window.innerHeight,
|
|
380
|
-
modal: true,
|
|
381
|
-
title: '3D Screen: ' + nm
|
|
382
|
-
});
|
|
369
|
+
window.appShell.open3DScreenEditor(nm);
|
|
383
370
|
}
|
|
384
371
|
});
|
|
385
372
|
},
|