Files
Meleki ce50633e33 refactor: Inline-Styles durch CSS-Klassen ersetzt
- 40+ Utility-Klassen in form.css (clickable, text-danger, flex-row, loading-state, etc.)
- share-menu position/z-index in chat.css statt inline
- index.html: 0 Inline-Styles (hidden-Attribut, CSS-Klassen)
- 12 JS-Dateien bereinigt: style.cssText/style.* durch classList ersetzt
- Bugfix: var(--danger) → var(--dangerous) (nicht existierende Variable)
- display:none Toggles → hidden-Attribut wo passend
- Hardcoded font-sizes in chat.css → var(--font-size)

15 Dateien, nur Frontend (CSS/JS/HTML), kein Backend
2026-03-14 17:14:30 +01:00

37 lines
1.7 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
let buildTime = 0;
let serverIsWindows = false;
fetch('/api/info').then(r => r.json()).then(data => {
buildTime = data.buildTime || 0;
serverIsWindows = !!data.isWindows;
updateTitle();
setInterval(updateTitle, 1000);
if (data.embeddingAvailable === false) _showEmbeddingWarning();
});
function _showEmbeddingWarning() {
const { body } = _createModal('⚠️ Embedding-Modell nicht gefunden');
body.classList.add('lh-relaxed');
body.innerHTML =
'<p>Das Embedding-Modell <strong>all-MiniLM-L6-v2</strong> wurde nicht gefunden. ' +
'Ohne dieses Modell ist die semantische Suche (<code>memory_search</code>) deaktiviert.</p>' +
'<h3>So richtest du es ein:</h3>' +
'<ol>' +
'<li>Lade das Modell herunter: <a href="https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2" target="_blank">HuggingFace – all-MiniLM-L6-v2</a></li>' +
'<li>Benötigte Dateien: <code>model.onnx</code> und <code>vocab.txt</code></li>' +
'<li>Lege sie ab unter:<br><code>data/models/all-MiniLM-L6-v2/model.onnx</code><br><code>data/models/all-MiniLM-L6-v2/vocab.txt</code></li>' +
'<li>Starte den Server neu</li>' +
'</ol>';
}
function updateTitle() {
if (!buildTime) { document.title = '// gott'; return; }
const s = Math.floor(Date.now() / 1000) - buildTime;
let ago;
if (s < 60) ago = `${s} Sekunde${s !== 1 ? 'n' : ''}`;
else if (s < 3600) { const m = Math.floor(s / 60); ago = `${m} Minute${m !== 1 ? 'n' : ''}`; }
else if (s < 86400) { const h = Math.floor(s / 3600); ago = `${h} Stunde${h !== 1 ? 'n' : ''}`; }
else { const d = Math.floor(s / 86400); ago = `${d} Tag${d !== 1 ? 'en' : ''}`; }
document.title = `// gott :: Build vor ${ago}`;
}