113 lines
5.3 KiB
HTML
113 lines
5.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="it">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
|
<meta name="color-scheme" content="dark light" />
|
|
<title>strata-ctl</title>
|
|
<link rel="icon" href="data:," />
|
|
<link rel="stylesheet" href="/assets/app.css" />
|
|
</head>
|
|
<body>
|
|
<div id="app">
|
|
<!-- Session drawer (off-canvas on mobile, sidebar on wide screens) -->
|
|
<aside id="drawer" aria-label="Sessioni">
|
|
<div class="drawer-head">
|
|
<span class="brand">strata‑ctl</span>
|
|
<button id="new-session" class="btn primary" title="Nuova conversazione">+ Nuova</button>
|
|
</div>
|
|
<ul id="session-list"></ul>
|
|
<div class="drawer-foot">
|
|
<button id="show-stats" class="btn ghost" data-i18n="stats.title">Statistiche</button>
|
|
</div>
|
|
</aside>
|
|
<div id="splitter" role="separator" aria-orientation="vertical" aria-label="Ridimensiona l'elenco delle discussioni" aria-valuemin="200" aria-valuemax="480" aria-valuenow="280" tabindex="0"></div>
|
|
<div id="scrim" hidden></div>
|
|
|
|
<!-- Main column -->
|
|
<main id="main">
|
|
<header id="topbar">
|
|
<button id="menu" class="btn icon" aria-label="Apri sessioni">☰</button>
|
|
<div class="title-wrap">
|
|
<span id="session-title">Conversazione</span>
|
|
<span id="model-name" class="muted"></span>
|
|
</div>
|
|
<button id="show-settings" class="btn icon" aria-label="Impostazioni">⚙️</button>
|
|
</header>
|
|
|
|
<section id="transcript" aria-live="polite"></section>
|
|
|
|
<div id="attachments" class="attachments" hidden></div>
|
|
<footer id="composer">
|
|
<textarea id="input" rows="1" placeholder="Scrivi un messaggio…" autocomplete="off"></textarea>
|
|
<button id="attach" class="btn ghost" aria-label="Allega file o immagini" title="Allega file o immagini">📎</button>
|
|
<button id="send" class="btn primary" aria-label="Invia">➤</button>
|
|
<input id="file-input" type="file" multiple hidden />
|
|
</footer>
|
|
</main>
|
|
</div>
|
|
|
|
<!-- Stats dashboard -->
|
|
<div id="stats-modal" hidden>
|
|
<div class="modal-card stats-card">
|
|
<div class="stats-head">
|
|
<h2 data-i18n="stats.title">Statistiche</h2>
|
|
<span id="stats-live" class="stats-live muted"></span>
|
|
<button id="close-stats" class="btn icon" aria-label="Chiudi">✕</button>
|
|
</div>
|
|
<div id="stats-content" class="stats-content"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Generic dialog (rename input / delete confirm); replaces native prompt/confirm -->
|
|
<div id="dialog" hidden>
|
|
<div class="modal-card">
|
|
<h2 id="dialog-title"></h2>
|
|
<p id="dialog-msg" class="muted"></p>
|
|
<input id="dialog-input" type="text" autocomplete="off" hidden />
|
|
<div class="dialog-actions">
|
|
<button id="dialog-cancel" class="btn">Annulla</button>
|
|
<button id="dialog-ok" class="btn primary">OK</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Settings modal: per-session instance or global defaults template -->
|
|
<div id="settings-modal" hidden>
|
|
<div class="modal-card settings-card">
|
|
<h2 id="settings-title">Impostazioni</h2>
|
|
<div class="scope-toggle">
|
|
<button id="set-scope-session" class="btn ghost active" data-i18n="settings.scope.session">Sessione</button>
|
|
<button id="set-scope-general" class="btn ghost" data-i18n="settings.scope.general">Generali</button>
|
|
</div>
|
|
<p id="set-hint" class="muted"></p>
|
|
<label class="field" id="set-username-field"><span data-i18n="settings.username">Nome utente</span>
|
|
<input id="set-username" type="text" autocomplete="off" data-i18n-ph="settings.username.ph" />
|
|
</label>
|
|
<label class="field" id="set-name-field"><span data-i18n="settings.name">Nome</span>
|
|
<input id="set-name" type="text" autocomplete="off" />
|
|
</label>
|
|
<p id="set-name-hint" class="muted small"></p>
|
|
<label class="field"><span data-i18n="settings.notes">Note (scopo della chat)</span>
|
|
<textarea id="set-notes" rows="2"></textarea>
|
|
</label>
|
|
<label class="field"><span data-i18n="settings.sp">System Prompt</span>
|
|
<textarea id="set-sp" rows="4"></textarea>
|
|
</label>
|
|
<div class="field-grid">
|
|
<label class="field"><span data-i18n="settings.temp">Temperature</span><input id="set-temp" type="number" step="0.1" min="0" /></label>
|
|
<label class="field"><span data-i18n="settings.topp">Top-p</span><input id="set-topp" type="number" step="0.05" min="0" max="1" /></label>
|
|
<label class="field"><span data-i18n="settings.topk">Top-k</span><input id="set-topk" type="number" step="1" min="0" /></label>
|
|
<label class="field"><span data-i18n="settings.minp">Min-p</span><input id="set-minp" type="number" step="0.05" min="0" max="1" /></label>
|
|
<label class="field"><span data-i18n="settings.maxtokens">Max token</span><input id="set-maxtokens" type="number" step="1" min="1" /></label>
|
|
</div>
|
|
<div class="dialog-actions">
|
|
<button id="set-cancel" class="btn" data-i18n="settings.cancel">Annulla</button>
|
|
<button id="set-save" class="btn primary" data-i18n="settings.save">Salva</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="module" src="/assets/app.js"></script>
|
|
</body>
|
|
</html> |