v1.2 — дизайн как Nubes ipwhitelist

This commit is contained in:
2026-06-01 23:27:17 +03:00
parent b55390acc3
commit a7bf69a396
2 changed files with 85 additions and 94 deletions
+35 -31
View File
@@ -9,44 +9,48 @@
</head>
<body>
<div id="app">
<div id="main">
<header class="topbar">
<a href="/" class="topbar-logo"><img src="/nubes-logo.svg" alt="Nubes" width="100"></a>
<span class="topbar-sep">|</span>
<span class="topbar-title">Say <span id="ver">v1.0</span></span>
<span class="topbar-right">Голосовой ассистент</span>
</header>
<header style="background:#fff;border-bottom:1px solid var(--border);padding:0 1.5rem;height:48px;display:flex;align-items:center;gap:.75rem;font-size:.85rem;color:var(--muted);">
<img src="/nubes-logo.svg" alt="Nubes" width="130" height="28" style="display:block;">
<span style="color:var(--border);">|</span>
<b style="color:var(--text);">Say</b>
<span id="ver" style="margin-left:4px;"></span>
<span style="margin-left:auto;">Голосовой ассистент</span>
</header>
<div id="models">
<span class="model-tag">🤖 GPT-OSS-120B</span>
<span class="model-tag">🎤 Whisper-v3-Turbo</span>
</div>
<div id="visualizer">
<canvas id="meter" width="300" height="60"></canvas>
</div>
<div id="controls">
<button id="btnRecord">🎙 Записать</button>
<button id="btnPlay" disabled>▶ Прослушать</button>
<button id="btnReset">🗑 Сброс</button>
<button id="btnTheme" title="День/Ночь">🌙</button>
</div>
<div id="status"></div>
<div class="card">
<div id="chat"></div>
<div class="page">
<div class="main">
<div class="card">
<div class="card-header">Управление</div>
<div class="card-body">
<div style="display:flex;gap:8px;margin-bottom:8px;">
<span class="tag">🤖 GPT-OSS-120B</span>
<span class="tag">🎤 Whisper-v3-Turbo</span>
</div>
<canvas id="meter" width="400" height="60" style="width:100%;border-radius:6px;background:var(--grey-light);margin-bottom:8px;"></canvas>
<div style="display:flex;gap:.5rem;align-items:center;">
<button id="btnRecord" class="btn btn-primary">🎙 Записать</button>
<button id="btnPlay" class="btn" disabled>▶ Прослушать</button>
<button id="btnReset" class="btn">🗑 Сброс</button>
<button id="btnTheme" class="btn">🌙</button>
</div>
<div id="status" class="status"></div>
</div>
</div>
<div id="sidebar">
<div id="history-title">История</div>
<div id="history-list"></div>
<div class="card">
<div class="card-header">Диалог</div>
<div class="card-body" id="chat" style="min-height:200px;max-height:380px;overflow-y:auto;"></div>
</div>
</div>
<div class="side">
<div class="card">
<div class="card-header">История</div>
<div class="card-body" id="history-list"></div>
</div>
</div>
</div>
<script>
const VERSION = 'v1.1';
document.getElementById('ver').textContent = VERSION;
+50 -63
View File
@@ -1,14 +1,8 @@
/* === Nubes Design — точь-в-точь как ipwhitelist === */
:root {
--bg: #f4f4f8;
--card: #ffffff;
--text: #1a1a1a;
--muted: #6b7280;
--border: #e5e7eb;
--grey-light: #f9fafb;
--blue: #2563eb;
--blue-h: #1d4ed8;
--green: #10b981;
--pink: #e84393;
--bg: #f5f5f5; --card: #fff; --text: #1a1a1a; --muted: #6b7280;
--border: #d1d5db; --grey-light: #f3f4f6;
--blue: #2563eb; --blue-h: #1d4ed8;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
@@ -18,77 +12,70 @@ body {
font-size: 14px; line-height: 1.5;
}
#app { display: flex; height: 100vh; }
#main { flex: 1; padding: 20px; max-width: 780px; margin: 0 auto; overflow-y: auto; }
.tag {
font-size: .75rem; padding: 2px 10px; border-radius: 10px;
background: var(--grey-light); color: var(--muted);
border: 1px solid var(--border);
}
.page { max-width: 1100px; margin: 1.5rem auto; padding: 0 1rem; display: flex; gap: 1rem; }
.main { flex: 1; min-width: 0; }
.side { width: 272px; flex-shrink: 0; }
/* Cards */
.card {
background: var(--card); border: 1px solid var(--border);
border-radius: 10px; padding: 16px; margin-bottom: 14px;
box-shadow: 0 1px 3px rgba(0,0,0,.04);
border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.04);
margin-bottom: 1rem; overflow: hidden;
}
.topbar {
display: flex; align-items: center; gap: 10px;
padding: 12px 16px; background: var(--card);
border: 1px solid var(--border); border-radius: 10px; margin-bottom: 14px;
.card-header {
background: var(--grey-light); padding: .75rem 1rem;
font-weight: 600; font-size: 1rem; border-bottom: 1px solid var(--border);
}
.topbar-logo img { display: block; }
.topbar-sep { color: var(--border); font-size: 18px; }
.topbar-title { font-weight: 600; font-size: 16px; }
#ver { font-weight: 400; color: var(--muted); font-size: 12px; }
.topbar-right { margin-left: auto; color: var(--muted); font-size: 13px; }
.card-body { padding: 1rem; }
#models { display: flex; gap: 8px; margin-bottom: 4px; }
.model-tag {
padding: 3px 10px; background: var(--grey-light);
border: 1px solid var(--border); border-radius: 12px;
font-size: 11px; color: var(--muted);
.status { font-size: .85rem; color: var(--muted); margin-top: .5rem; min-height: 1.2rem; }
/* Buttons */
.btn {
display: inline-flex; align-items: center; gap: .35rem;
padding: .5rem 1rem; border: 1px solid var(--border);
border-radius: 6px; font-size: .85rem; font-weight: 500;
background: #fff; cursor: pointer; transition: background .15s;
white-space: nowrap; font-family: inherit;
}
.btn:hover { background: var(--grey-light); }
.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-h); }
.btn-primary:disabled { background: #93c5fd; cursor: not-allowed; border-color: #93c5fd; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
#visualizer { margin: 8px 0; text-align: center; }
#meter { border-radius: 6px; background: var(--grey-light); }
#controls { display: flex; gap: 8px; justify-content: center; margin: 10px 0; }
#controls button {
padding: 8px 18px; border-radius: 7px; font-size: 13px;
cursor: pointer; border: 1px solid transparent; font-family: inherit;
font-weight: 500;
}
#btnRecord { background: var(--pink); color: #fff; }
#btnRecord:disabled { opacity: 0.5; }
#btnPlay { background: var(--green); color: #fff; }
#btnPlay:disabled { opacity: 0.4; }
#btnReset, #btnTheme { background: var(--card); color: var(--text); border-color: var(--border); }
#status { text-align: center; color: var(--muted); font-size: 13px; min-height: 18px; margin: 4px 0; }
#chat { min-height: 200px; max-height: 360px; overflow-y: auto; line-height: 1.6; }
.msg { padding: 10px 14px; margin: 6px 0; border-radius: 8px; font-size: 14px; }
/* Chat */
.msg { padding: .75rem 1rem; border-radius: 8px; margin-bottom: .5rem; font-size: .9rem; line-height: 1.6; }
.msg.user { background: #eff6ff; border: 1px solid #dbeafe; color: #1e40af; }
.msg.bot { background: var(--grey-light); border: 1px solid var(--border); color: var(--text); }
.msg p { margin: 4px 0; }
.msg h1, .msg h2, .msg h3 { font-size: 15px; margin: 8px 0 4px; color: var(--text); }
.msg p { margin: 0; } .msg p + p { margin-top: .5rem; }
.msg b { color: #111; }
.msg code { background: #e5e7eb; padding: 1px 5px; border-radius: 3px; font-size: 13px; color: #b91c1c; }
.msg ul, .msg ol { margin: 4px 0; padding-left: 20px; }
.msg li { margin: 2px 0; }
.msg hr { border: none; border-top: 1px solid var(--border); margin: 10px 0; }
.msg code { background: #e5e7eb; padding: 1px 5px; border-radius: 3px; font-size: .85em; color: #b91c1c; }
.msg ul, .msg ol { margin: .25rem 0; padding-left: 1.25rem; }
.msg li { margin: .1rem 0; }
#sidebar {
width: 272px; background: var(--card);
border-left: 1px solid var(--border); padding: 16px; overflow-y: auto;
}
#history-title { font-weight: 600; color: var(--text); margin-bottom: 10px; font-size: 14px; }
.hitem { padding: 6px 8px; border-radius: 4px; cursor: pointer; margin-bottom: 3px; font-size: 12px; color: var(--muted); border: 1px solid transparent; }
.hitem:hover { background: var(--grey-light); border-color: var(--border); }
/* History */
.hitem { padding: 6px 8px; border-radius: 4px; cursor: pointer; margin-bottom: 3px; font-size: .8rem; color: var(--muted); }
.hitem:hover { background: var(--grey-light); }
.hq { display: block; }
/* Тёмная тема */
/* ===== ТЁМНАЯ ===== */
body.dark {
--bg: #0f0f1a; --card: #18182a; --text: #e0e0e0; --muted: #888;
--border: #2a2a40; --grey-light: #1e1e30;
}
body.dark header { background: var(--card) !important; border-color: var(--border) !important; }
body.dark .msg.user { background: #0a1e2e; border-color: #1e3a5f; color: #93c5fd; }
body.dark .msg.bot { background: var(--grey-light); border-color: var(--border); color: #d0d0f0; }
body.dark .msg b { color: #fff; }
body.dark .msg code { background: #2a2a44; color: #f8c291; }
body.dark .msg code { background: #2a2a44; color: #f8c291; }
body.dark .btn { background: var(--card); color: var(--text); }
body.dark .btn:hover { background: var(--border); }
body.dark .btn-primary { background: var(--blue); color: #fff; }
body.dark .btn-primary:hover { background: var(--blue-h); }