feat(ui): версия v1.0 и таймер обработки
This commit is contained in:
@@ -73,7 +73,7 @@
|
||||
<body>
|
||||
<div class="topbar">
|
||||
<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 class="content">
|
||||
@@ -123,10 +123,11 @@
|
||||
{% endfor %}
|
||||
|
||||
{% 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;">
|
||||
<i data-lucide="play" style="width:16px;height:16px;"></i> Обработать (LLM)
|
||||
</button>
|
||||
<div id="timer" style="text-align:center;margin-top:8px;color:var(--muted);font-size:13px;display:none;"></div>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -306,6 +307,19 @@
|
||||
const style = document.createElement('style');
|
||||
style.textContent = '@keyframes spin { to { transform: rotate(360deg); } }';
|
||||
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>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user