feat(ui): версия v1.0 и таймер обработки
This commit is contained in:
@@ -73,7 +73,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<div class="topbar">
|
<div class="topbar">
|
||||||
<img src="{{ url_for('static', filename='nubes-logo.svg') }}" alt="Nubes">
|
<img src="{{ url_for('static', filename='nubes-logo.svg') }}" alt="Nubes">
|
||||||
<span class="title">Сверка договоров</span>
|
<span class="title">Сверка договоров <span style="font-weight:400;color:var(--muted);font-size:12px;">v1.0</span></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
@@ -123,10 +123,11 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% if unprocessed %}
|
{% if unprocessed %}
|
||||||
<form method="POST" action="/process/{{ contract.id }}" style="margin-top:12px;">
|
<form method="POST" action="/process/{{ contract.id }}" style="margin-top:12px;" onsubmit="startTimer()">
|
||||||
<button type="submit" class="btn btn-primary" style="width:100%;justify-content:center;">
|
<button type="submit" class="btn btn-primary" style="width:100%;justify-content:center;">
|
||||||
<i data-lucide="play" style="width:16px;height:16px;"></i> Обработать (LLM)
|
<i data-lucide="play" style="width:16px;height:16px;"></i> Обработать (LLM)
|
||||||
</button>
|
</button>
|
||||||
|
<div id="timer" style="text-align:center;margin-top:8px;color:var(--muted);font-size:13px;display:none;"></div>
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
@@ -306,6 +307,19 @@
|
|||||||
const style = document.createElement('style');
|
const style = document.createElement('style');
|
||||||
style.textContent = '@keyframes spin { to { transform: rotate(360deg); } }';
|
style.textContent = '@keyframes spin { to { transform: rotate(360deg); } }';
|
||||||
document.head.appendChild(style);
|
document.head.appendChild(style);
|
||||||
|
|
||||||
|
// Таймер обработки
|
||||||
|
function startTimer() {
|
||||||
|
const timer = document.getElementById('timer');
|
||||||
|
if (!timer) return;
|
||||||
|
timer.style.display = 'block';
|
||||||
|
let sec = 0;
|
||||||
|
timer.textContent = '⏳ Обработка... ' + sec + 'с';
|
||||||
|
window._timerInterval = setInterval(() => {
|
||||||
|
sec++;
|
||||||
|
timer.textContent = '⏳ Обработка... ' + sec + 'с';
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user