design: Nubes style for DrHider, fix favicon + logo
Deploy contracts-flask / validate (push) Successful in 0s

This commit is contained in:
2026-06-29 14:50:36 +04:00
parent adb8defdfe
commit 647b4c51fe
4 changed files with 110 additions and 85 deletions
+79 -83
View File
@@ -4,79 +4,96 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DrHider — обфускация документов</title>
<link rel="icon" href="/static/favicon.svg" type="image/svg+xml">
<style>
:root {
--bg: #0d1117; --fg: #c9d1d9; --muted: #8b949e;
--accent: #58a6ff; --green: #3fb950; --red: #f85149; --border: #30363d;
--card-bg: #161b22; --orange: #d2991d;
--brand: #2563eb; --brand-dark: #1d4ed8;
--bg: #f8fafc; --card: #fff; --fg: #1e293b; --muted: #64748b;
--border: #e2e8f0; --red: #ef4444; --green: #22c55e;
--grey-light: #f3f4f6; --radius: 8px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font: 15px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--fg); max-width: 700px; margin: 0 auto; padding: 32px 20px 60px; }
h1 { font-size: 22px; margin-bottom: 4px; }
body { font: 14px/1.6 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--fg); }
.header { background: var(--card); border-bottom: 1px solid var(--border); padding: 12px 24px; display: flex; align-items: center; gap: 12px; }
.header img { height: 24px; }
.header .sep { color: var(--muted); }
.header a { color: var(--brand); text-decoration: none; font-size: 13px; }
.header a:hover { color: var(--brand-dark); }
main { max-width: 700px; margin: 0 auto; padding: 40px 20px 60px; }
h1 { font-size: 22px; font-weight: 600; margin-bottom: 4px; }
.sub { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.nav { margin-bottom: 20px; }
.nav a { color: var(--accent); text-decoration: none; font-size: 13px; }
.nav a:hover { text-decoration: underline; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.card-header { background: var(--grey-light); padding: 12px 16px; border-radius: 12px 12px 0 0; font-size: 14px; font-weight: 600; border-bottom: 1px solid var(--border); }
.card-body { padding: 16px; }
#dropZone {
border: 2px dashed var(--border); border-radius: 12px; padding: 40px 20px;
border: 2px dashed var(--border); border-radius: 12px; padding: 36px 20px;
text-align: center; cursor: pointer; transition: all .2s;
background: var(--card-bg); margin-bottom: 16px;
background: var(--grey-light); margin-bottom: 16px;
}
#dropZone:hover, #dropZone.active { border-color: var(--accent); background: #0d1a28; }
#dropZone:hover, #dropZone.active { border-color: var(--brand); background: #eff6ff; }
#dropZone p { color: var(--muted); margin: 4px 0; font-size: 14px; }
#dropZone .big { font-size: 36px; }
#dropZone .icon { font-size: 32px; margin-bottom: 8px; }
#fileList { display: none; margin: 16px 0; }
#fileList { display: none; }
#fileList.show { display: block; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 6px; margin-bottom: 6px; font-size: 13px; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--grey-light); border-radius: 6px; margin-bottom: 4px; font-size: 13px; }
.file-row .name { flex: 1; }
.file-row .size { color: var(--muted); }
.file-row .remove { cursor: pointer; color: var(--red); font-weight: bold; }
.file-row .remove { cursor: pointer; color: var(--red); font-weight: bold; font-size: 16px; }
#status { display: none; margin: 16px 0; padding: 12px; border-radius: 8px; font-size: 13px; }
#status { display: none; margin-top: 12px; padding: 12px 16px; border-radius: 8px; font-size: 13px; }
#status.show { display: block; }
#status.progress { background: #1a2a3a; border: 1px solid var(--accent); color: var(--accent); }
#status.done { background: #1a2a1a; border: 1px solid var(--green); color: var(--green); }
#status.error { background: #2a1a1a; border: 1px solid var(--red); color: var(--red); }
#status.progress { background: #eff6ff; border: 1px solid var(--brand); color: var(--brand); }
#status.done { background: #f0fdf4; border: 1px solid var(--green); color: #16a34a; }
#status.error { background: #fef2f2; border: 1px solid var(--red); color: var(--red); }
button {
padding: 10px 24px; border: none; border-radius: 8px; cursor: pointer;
font-size: 14px; font-weight: 600; transition: all .2s;
}
.btn-go { background: var(--green); color: #000; width: 100%; margin-top: 12px; }
.btn-go:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-go:hover:not(:disabled) { background: #4cd964; }
.note { margin-top: 24px; padding: 12px 16px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; font-size: 12px; color: var(--muted); }
.note strong { color: var(--orange); }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 16px; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; border: 1px solid var(--border); background: var(--card); transition: all .15s; }
.btn:hover { background: var(--grey-light); }
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); width: 100%; margin-top: 8px; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
</style>
</head>
<body>
<div class="nav"><a href="/">← Основной сервис</a></div>
<header class="header">
<img src="/static/logo.svg" alt="Nubes">
<span class="sep">|</span>
<a href="/">Сверка договоров</a>
<span class="sep">|</span>
<strong>DrHider</strong>
</header>
<h1>🛡️ DrHider — обфускация документов</h1>
<p class="sub">Загрузите документы — получите ZIP с обезличенными копиями и таблицей соответствия. Без сохранения на сервере.</p>
<main>
<h1>🛡️ DrHider — обфускация документов</h1>
<p class="sub">Загрузите документы — получите ZIP с обезличенными копиями и таблицей соответствия. Без сохранения на сервере.</p>
<div id="dropZone">
<div class="big">📁</div>
<p>Выберите файлы или перетащите сюда</p>
<p style="font-size:12px;">.docx .pdf .doc .zip</p>
<input type="file" id="fileInput" multiple accept=".docx,.pdf,.doc,.zip" style="display:none">
</div>
<div class="card">
<div class="card-header">📁 Загрузка файлов</div>
<div class="card-body">
<div id="dropZone">
<div class="icon">📄</div>
<p>Выберите файлы или перетащите сюда</p>
<p style="font-size:12px;">.docx .pdf .doc .zip</p>
<input type="file" id="fileInput" multiple accept=".docx,.pdf,.doc,.zip" style="display:none">
</div>
<div id="fileList"></div>
<button class="btn btn-primary" id="btnGo" disabled>Обфусцировать</button>
<div id="status"></div>
</div>
</div>
<div id="fileList"></div>
<button class="btn-go" id="btnGo" disabled>Обфусцировать</button>
<div id="status"></div>
<div class="note">
<strong>⚡ Всё в памяти.</strong> Файлы не сохраняются на сервер. После обработки данные удаляются.<br>
<strong>📋 mapping.csv</strong> — таблица «оригинал → замена» внутри ZIP.<br>
<strong>🔒 Результат</strong> — обезличенные файлы можно загружать в основной сервис сверки.
</div>
<div class="card" style="margin-top:16px;">
<div class="card-header">️ Как это работает</div>
<div class="card-body" style="font-size:13px;color:var(--muted);">
<p><strong>⚡ Всё в памяти.</strong> Файлы не сохраняются на сервер. После обработки данные удаляются.</p>
<p><strong>📋 mapping.csv</strong> — таблица «оригинал → замена» внутри ZIP.</p>
<p><strong>🔒 Результат</strong> — обезличенные файлы можно загружать в основной сервис сверки.</p>
</div>
</div>
</main>
<script>
const DZ = document.getElementById('dropZone');
@@ -88,59 +105,38 @@ let files = [];
DZ.onclick = () => INPUT.click();
INPUT.onchange = () => { addFiles(INPUT.files); INPUT.value = ''; };
DZ.ondragover = e => { e.preventDefault(); DZ.classList.add('active'); };
DZ.ondragleave = () => DZ.classList.remove('active');
DZ.ondrop = e => { e.preventDefault(); DZ.classList.remove('active'); addFiles(e.dataTransfer.files); };
function addFiles(fl) {
for (let f of fl) {
if (files.find(x => x.name === f.name && x.size === f.size)) continue;
files.push(f);
}
render();
}
function addFiles(fl) { for (let f of fl) { if (files.find(x => x.name===f.name && x.size===f.size)) continue; files.push(f); } render(); }
function remove(i) { files.splice(i, 1); render(); }
function render() {
LIST.innerHTML = files.map((f, i) =>
`<div class="file-row"><span class="name">${esc(f.name)}</span><span class="size">${fmt(f.size)}</span><span class="remove" onclick="remove(${i})">✕</span></div>`
).join('');
LIST.innerHTML = files.map((f,i) => `<div class="file-row"><span class="name">${esc(f.name)}</span><span class="size">${fmt(f.size)}</span><span class="remove" onclick="remove(${i})">×</span></div>`).join('');
LIST.className = files.length ? 'show' : '';
BTN.disabled = files.length === 0;
BTN.disabled = !files.length;
}
BTN.onclick = async () => {
if (!files.length) return;
BTN.disabled = true;
setStatus('progress', '⏳ Обработка...');
const fd = new FormData();
files.forEach(f => fd.append('files', f));
const fd = new FormData(); files.forEach(f => fd.append('files', f));
try {
const resp = await fetch('/api/drhider', { method: 'POST', body: fd });
if (!resp.ok) throw new Error(await resp.text());
const blob = await resp.blob();
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = 'drhider_output.zip';
a.click();
URL.revokeObjectURL(url);
setStatus('done', '✅ Готово! ZIP скачан. Файлы обезличены, mapping.csv внутри.');
} catch (e) {
setStatus('error', '❌ Ошибка: ' + e.message);
const r = await fetch('/api/drhider', { method:'POST', body:fd });
if (!r.ok) throw new Error(await r.text());
const blob = await r.blob();
const a = document.createElement('a'); a.href = URL.createObjectURL(blob); a.download = 'drhider_output.zip'; a.click();
setStatus('done', '✅ Готово! ZIP скачан.');
} catch(e) {
setStatus('error', '❌ ' + e.message);
}
BTN.disabled = false;
};
function setStatus(cls, msg) { STATUS.className = 'show ' + cls; STATUS.textContent = msg; }
function setStatus(c,m) { STATUS.className = 'show '+c; STATUS.textContent = m; }
function esc(s) { return s.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;'); }
function fmt(n) { return n > 1e6 ? (n/1e6).toFixed(1)+' MB' : n > 1e3 ? (n/1e3).toFixed(0)+' KB' : n+' B'; }
function fmt(n) { return n>1e6 ? (n/1e6).toFixed(1)+' MB' : n>1e3 ? (n/1e3).toFixed(0)+' KB' : n+' B'; }
</script>
</body>
</html>
+2 -2
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Сверка договоров — LLM</title>
<link rel="icon" type="image/png" href="/favicon.png">
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg">
<script src="https://unpkg.com/lucide@latest"></script>
<style>
:root { --brand-primary: #2563eb; --brand-primary-dark: #1d4ed8; --brand-gray: #d1d5db; --brand-grey-light: #f3f4f6; --background: #ffffff; --foreground: #1a1a1a; --muted: #6b7280; --destructive: #ef4444; --green: #22c55e; }
@@ -72,7 +72,7 @@
</head>
<body>
<div class="topbar">
<img src="/nubes-logo.svg" alt="Nubes">
<img src="/static/logo.svg" alt="Nubes">
<span class="title">Сверка договоров — LLM AI-driven Event Sourcing <span style="font-weight:400;color:var(--muted);font-size:12px;">v1.0.184-flask</span></span>
<div id="pipelineStepper" style="display:flex;gap:8px;font-size:11px;align-items:center;color:var(--muted);">
<span id="stepUpload">○ Загрузка</span><span></span>