templates/index.html aktualisiert

This commit is contained in:
2026-03-06 11:39:13 +00:00
parent 300531280b
commit 4d7f8c56e2

View File

@@ -260,10 +260,25 @@
document.addEventListener('DOMContentLoaded', function() { document.addEventListener('DOMContentLoaded', function() {
// GridStack laden // GridStack laden
try { try {
var grid = GridStack.init({ cellHeight: 80, margin: 10, float: true, handle: '.widget-header' }); // FIX: handles: 'all' hinzugefügt, damit man an jeder Seite ziehen kann
var grid = GridStack.init({
cellHeight: 80,
margin: 10,
float: true,
handle: '.widget-header',
resizable: { handles: 'all' }
});
const savedLayout = localStorage.getItem('pi-orch-layout-v2'); const savedLayout = localStorage.getItem('pi-orch-layout-v2');
if (savedLayout) grid.load(JSON.parse(savedLayout)); if (savedLayout) grid.load(JSON.parse(savedLayout));
grid.on('resizestop dragstop', () => localStorage.setItem('pi-orch-layout-v2', JSON.stringify(grid.save(false)))); grid.on('resizestop dragstop', () => localStorage.setItem('pi-orch-layout-v2', JSON.stringify(grid.save(false))));
grid.on('resizestop', (event, el) => {
// Wenn das Terminal-Widget vergrößert wurde, pass das Terminal-Layout an
if (el.getAttribute('gs-id') === 'term-widget') {
setTimeout(() => fitAddon.fit(), 100);
}
});
} catch(e) { console.error("GridStack Fehler:", e); } } catch(e) { console.error("GridStack Fehler:", e); }
// Terminal // Terminal