Spaces:
Paused
Paused
P7.2 echte Core-Stats, Admin-Badge, Palette-Keywords
Browse files- app.js +1 -1
- studios7.js +2 -2
app.js
CHANGED
|
@@ -276,7 +276,7 @@ function frame(now) {
|
|
| 276 |
if ((mmT += dt) > .1) { mmT = 0; drawMinimap(v); }
|
| 277 |
if (openId != null && !pop.hidden) { const p = screenPos(nodes[openId]); const r = pop.getBoundingClientRect(); const wl = $('#wl');
|
| 278 |
const tx = p.x < r.left ? r.left : r.right; wl.setAttribute('x1', p.x); wl.setAttribute('y1', p.y); wl.setAttribute('x2', tx); wl.setAttribute('y2', r.top + 14); }
|
| 279 |
-
if ((statT += dt) > .5) { statT = 0; const ld = (55 + Math.sin(t * .7) * 20) | 0; stats.innerHTML = `<h4>
|
| 280 |
}
|
| 281 |
}
|
| 282 |
setPR(1); applyQuality();
|
|
|
|
| 276 |
if ((mmT += dt) > .1) { mmT = 0; drawMinimap(v); }
|
| 277 |
if (openId != null && !pop.hidden) { const p = screenPos(nodes[openId]); const r = pop.getBoundingClientRect(); const wl = $('#wl');
|
| 278 |
const tx = p.x < r.left ? r.left : r.right; wl.setAttribute('x1', p.x); wl.setAttribute('y1', p.y); wl.setAttribute('x2', tx); wl.setAttribute('y2', r.top + 14); }
|
| 279 |
+
if ((statT += dt) > .5) { statT = 0; const ld = (55 + Math.sin(t * .7) * 20) | 0; stats.innerHTML = `<h4>STUDIUS</h4><dl><dt>Studios</dt><dd>${STUDIOS.length}</dd><dt>Kategorien</dt><dd>${CATS.length - 1}</dd><dt>Höhe</dt><dd>${Math.round(B.pos.y)} m</dd></dl><p>⌘K / Taste „/“ = Suchen</p>`; }
|
| 280 |
}
|
| 281 |
}
|
| 282 |
setPR(1); applyQuality();
|
studios7.js
CHANGED
|
@@ -6,7 +6,7 @@ const $ = (el, s) => el.querySelector(s);
|
|
| 6 |
const post = async (u, f) => { const fd = new FormData(); Object.entries(f).forEach(([k, v]) => fd.append(k, v)); const r = await fetch(u, { method: 'POST', body: fd, credentials: 'include' }); const j = await r.json().catch(() => ({})); if (!r.ok) throw new Error(j.detail || 'HTTP ' + r.status); return j; };
|
| 7 |
export const llm = (prompt, system = '', max_tokens = 1200) => post('/api/llm', { prompt, system, max_tokens });
|
| 8 |
// unified studio shell: header row (badge+status) · actions · output · hand-off bar is added by workspace on result
|
| 9 |
-
const shell = (body) => `<div class="row sh"><span class="badge real">
|
| 10 |
|
| 11 |
/* ---------- 1 DEV-BAUKASTEN (Stratum-Port: Prompt → HTML · Preview · Zeichenwerkzeuge → Follow-up) ---------- */
|
| 12 |
const DEVT = { Landingpage: 'Moderne Landingpage für ein Produkt, Hero, 3 Features, Call-to-Action', Dashboard: 'Dashboard mit 4 Kennzahl-Karten, einem Balkendiagramm (Canvas) und Tabelle', 'Mini-Spiel': 'Kleines Browser-Spiel mit Canvas, Punktestand und Neustart-Knopf', Formular: 'Kontaktformular mit Validierung und Danke-Meldung', Portfolio: 'Portfolio-Seite mit Raster aus Projekten und Filter' };
|
|
@@ -101,7 +101,7 @@ STUDIOS.push({ id: 'admin', icon: '⚙', name: 'Admin', like: 'Alles steuern –
|
|
| 101 |
<div class="adm-sec"><label>🧩 Studios <small>Klick = an/aus · 👁 = wer sieht es</small></label><div class="tiles"></div></div>
|
| 102 |
<div class="adm-sec"><label>🎨 Look <small>Live-Vorschau</small></label><div class="row"><input type="color" class="gold" aria-label="Gold-Ton"><input type="range" class="br" min=".6" max="1.4" step=".05" aria-label="Helligkeit"><select class="wq" aria-label="Welt-Qualität"><option value="auto">Welt: Auto (nach FPS)</option><option value="low">Welt: leicht</option><option value="high">Welt: schön</option></select></div></div>
|
| 103 |
<div class="adm-sec"><label>📊 Überblick</label><div class="ov">Lade…</div></div>
|
| 104 |
-
<div class="adm-sec"><label>💾 Config</label><div class="row"><input class="bk" placeholder="Bucket (z. B. 2Btainment/studius-ws)" value="${esc(ME.bucket || window.__ws?.bucket || '')}"><button class="btn alt exp">⬇ Export</button><label class="btn alt imp">⬆ Import<input type="file" accept=".json" hidden></label></div></div>`);
|
| 105 |
keep(el);
|
| 106 |
const propose = (next, why) => { draft = next; const l = diffLines(cfg, next); $(el, '.diff').innerHTML = l.length ? `<b>${esc(why)}</b><ul>${l.map(x => `<li>${esc(x)}</li>`).join('')}</ul>` : '<i>Keine Änderung erkannt.</i>'; $(el, '.ok').disabled = !l.length || !owner; $(el, '.no').disabled = !l.length; applyTheme(next.theme); };
|
| 107 |
const commit = async (next, undo) => { if (!undo) hist.push(cfg); sessionStorage.setItem('studius-admin-hist', JSON.stringify(hist.slice(-30))); cfg = next; draft = null; localStorage.setItem('studius-config', JSON.stringify(cfg)); applyTheme(cfg.theme); window.__studiusQ?.(cfg.world?.quality || 'auto'); draw();
|
|
|
|
| 6 |
const post = async (u, f) => { const fd = new FormData(); Object.entries(f).forEach(([k, v]) => fd.append(k, v)); const r = await fetch(u, { method: 'POST', body: fd, credentials: 'include' }); const j = await r.json().catch(() => ({})); if (!r.ok) throw new Error(j.detail || 'HTTP ' + r.status); return j; };
|
| 7 |
export const llm = (prompt, system = '', max_tokens = 1200) => post('/api/llm', { prompt, system, max_tokens });
|
| 8 |
// unified studio shell: header row (badge+status) · actions · output · hand-off bar is added by workspace on result
|
| 9 |
+
const shell = (body, b = 'REAL') => `<div class="row sh"><span class="badge real">${b}</span><span class="stat"></span></div>${body}`;
|
| 10 |
|
| 11 |
/* ---------- 1 DEV-BAUKASTEN (Stratum-Port: Prompt → HTML · Preview · Zeichenwerkzeuge → Follow-up) ---------- */
|
| 12 |
const DEVT = { Landingpage: 'Moderne Landingpage für ein Produkt, Hero, 3 Features, Call-to-Action', Dashboard: 'Dashboard mit 4 Kennzahl-Karten, einem Balkendiagramm (Canvas) und Tabelle', 'Mini-Spiel': 'Kleines Browser-Spiel mit Canvas, Punktestand und Neustart-Knopf', Formular: 'Kontaktformular mit Validierung und Danke-Meldung', Portfolio: 'Portfolio-Seite mit Raster aus Projekten und Filter' };
|
|
|
|
| 101 |
<div class="adm-sec"><label>🧩 Studios <small>Klick = an/aus · 👁 = wer sieht es</small></label><div class="tiles"></div></div>
|
| 102 |
<div class="adm-sec"><label>🎨 Look <small>Live-Vorschau</small></label><div class="row"><input type="color" class="gold" aria-label="Gold-Ton"><input type="range" class="br" min=".6" max="1.4" step=".05" aria-label="Helligkeit"><select class="wq" aria-label="Welt-Qualität"><option value="auto">Welt: Auto (nach FPS)</option><option value="low">Welt: leicht</option><option value="high">Welt: schön</option></select></div></div>
|
| 103 |
<div class="adm-sec"><label>📊 Überblick</label><div class="ov">Lade…</div></div>
|
| 104 |
+
<div class="adm-sec"><label>💾 Config</label><div class="row"><input class="bk" placeholder="Bucket (z. B. 2Btainment/studius-ws)" value="${esc(ME.bucket || window.__ws?.bucket || '')}"><button class="btn alt exp">⬇ Export</button><label class="btn alt imp">⬆ Import<input type="file" accept=".json" hidden></label></div></div>`, owner ? 'OWNER' : 'VORSCHAU');
|
| 105 |
keep(el);
|
| 106 |
const propose = (next, why) => { draft = next; const l = diffLines(cfg, next); $(el, '.diff').innerHTML = l.length ? `<b>${esc(why)}</b><ul>${l.map(x => `<li>${esc(x)}</li>`).join('')}</ul>` : '<i>Keine Änderung erkannt.</i>'; $(el, '.ok').disabled = !l.length || !owner; $(el, '.no').disabled = !l.length; applyTheme(next.theme); };
|
| 107 |
const commit = async (next, undo) => { if (!undo) hist.push(cfg); sessionStorage.setItem('studius-admin-hist', JSON.stringify(hist.slice(-30))); cfg = next; draft = null; localStorage.setItem('studius-config', JSON.stringify(cfg)); applyTheme(cfg.theme); window.__studiusQ?.(cfg.world?.quality || 'auto'); draw();
|