Files
scud_context_api/static/index.html
T

100 lines
6.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>SCUD Orion AI — Context Manager</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link rel="stylesheet" href="/static/css/styles.css">
</head>
<body class="bg-slate-50 text-slate-800 h-screen flex flex-col font-sans overflow-hidden">
<!-- Хедер -->
<header class="bg-white border-b border-slate-200 px-4 sm:px-6 py-2.5 sm:py-3 flex justify-between items-center shadow-sm shrink-0">
<div class="flex items-center space-x-2.5 sm:space-x-3">
<div class="bg-indigo-600 text-white p-1.5 sm:p-2 rounded-lg">
<i class="fa-solid fa-brain text-base sm:text-lg"></i>
</div>
<div>
<h1 class="text-sm sm:text-base font-bold leading-none text-slate-900">SCUD Orion AI</h1>
<span class="hidden sm:inline text-xs text-slate-500">Context & Task Manager</span>
</div>
</div>
<div class="flex items-center space-x-2 sm:space-x-4">
<span class="flex items-center text-[11px] sm:text-xs text-emerald-600 font-medium bg-emerald-50 px-2 sm:px-2.5 py-1 rounded-full border border-emerald-200">
<span class="h-1.5 w-1.5 sm:h-2 sm:w-2 rounded-full bg-emerald-500 mr-1.5"></span> API Online
</span>
<button onclick="toggleDrawer()" class="bg-indigo-50 hover:bg-indigo-100 text-indigo-700 px-2.5 sm:px-3.5 py-1.5 rounded-lg text-xs font-semibold flex items-center gap-1.5 sm:gap-2 transition border border-indigo-200">
<i class="fa-solid fa-list-check text-indigo-600"></i>
<span class="hidden sm:inline">Реестр задач</span>
<span id="task-count-badge" class="bg-indigo-600 text-white text-[10px] px-1.5 py-0.2 rounded-full">0</span>
</button>
</div>
</header>
<!-- Основная зона чата -->
<main class="flex-1 flex flex-col max-w-4xl w-full mx-auto bg-white my-0 sm:my-4 sm:rounded-xl border-x-0 sm:border border-slate-200 shadow-sm overflow-hidden">
<div id="chat-window" class="flex-1 p-3.5 sm:p-6 overflow-y-auto space-y-3.5 sm:space-y-4 bg-slate-50/50">
<div class="bg-white border border-slate-200 rounded-xl p-3.5 sm:p-4 max-w-2xl shadow-sm">
<p class="text-xs font-bold text-indigo-600 uppercase tracking-wider mb-1">
<i class="fa-solid fa-robot mr-1"></i> ИИ-Ассистент
</p>
<p class="text-slate-700 text-xs sm:text-sm leading-relaxed">
Привет! Я подключен к вашей базе задач и системным промптам. Вы можете писать команды прямо в чат или управлять задачами через панель задач.
</p>
</div>
</div>
<!-- Поле ввода -->
<div class="p-2.5 sm:p-4 bg-white border-t border-slate-200 shrink-0">
<form id="chat-form" onsubmit="sendMessage(event)" class="flex items-end gap-2">
<div class="flex-1 bg-slate-50 border border-slate-300 rounded-lg p-1 focus-within:border-indigo-600 focus-within:bg-white transition">
<textarea id="user-input" rows="1" autocomplete="off" autocorrect="off" spellcheck="false"
placeholder="Команда или вопрос..."
class="w-full bg-transparent text-slate-800 px-2.5 sm:px-3 py-1.5 text-xs sm:text-sm focus:outline-none resize-none overflow-y-auto max-h-[96px] leading-relaxed fade-scroll-top no-scrollbar"></textarea>
</div>
<button type="submit" id="send-btn" class="bg-indigo-600 hover:bg-indigo-700 text-white font-medium px-3.5 sm:px-5 h-[38px] sm:h-[42px] rounded-lg text-xs sm:text-sm transition flex items-center gap-1.5 shrink-0">
<span class="hidden sm:inline">Отправить</span>
<i class="fa-solid fa-paper-plane text-xs"></i>
</button>
</form>
</div>
</main>
<!-- Выезжающая панель (Drawer) — полноэкранная на смартфонах -->
<div id="drawer-backdrop" onclick="toggleDrawer()" class="fixed inset-0 bg-slate-900/40 backdrop-blur-sm hidden transition-opacity z-40"></div>
<aside id="task-drawer" class="fixed right-0 top-0 h-full w-full sm:w-[420px] bg-white border-l border-slate-200 shadow-2xl transform translate-x-full transition-transform duration-300 ease-in-out z-50 flex flex-col">
<div class="p-3.5 sm:p-4 border-b border-slate-200 flex justify-between items-center bg-slate-50 shrink-0">
<h2 class="font-bold text-slate-800 flex items-center gap-2 text-xs sm:text-sm">
<i class="fa-solid fa-list-check text-indigo-600"></i> Реестр задач
</h2>
<div class="flex items-center gap-2">
<button onclick="loadTasks()" class="text-xs text-slate-500 hover:text-indigo-600 transition p-1.5" title="Обновить">
<i class="fa-solid fa-rotate-right"></i>
</button>
<button onclick="toggleDrawer()" class="text-slate-400 hover:text-slate-700 transition p-1.5">
<i class="fa-solid fa-xmark text-lg"></i>
</button>
</div>
</div>
<!-- Фильтры задач с горизонтальным скроллом для смартфонов -->
<div class="flex border-b border-slate-200 bg-white px-2 pt-2 text-xs font-medium text-slate-500 gap-1 overflow-x-auto no-scrollbar shrink-0">
<button onclick="setFilter('ALL')" id="filter-ALL" class="px-3 py-1.5 rounded-t-lg border-b-2 border-indigo-600 text-indigo-600 font-bold whitespace-nowrap">Все</button>
<button onclick="setFilter('IN_PROGRESS')" id="filter-IN_PROGRESS" class="px-3 py-1.5 rounded-t-lg border-b-2 border-transparent hover:text-slate-700 whitespace-nowrap">В работе</button>
<button onclick="setFilter('BACKLOG')" id="filter-BACKLOG" class="px-3 py-1.5 rounded-t-lg border-b-2 border-transparent hover:text-slate-700 whitespace-nowrap">Бэклог</button>
<button onclick="setFilter('COMPLETED')" id="filter-COMPLETED" class="px-3 py-1.5 rounded-t-lg border-b-2 border-transparent hover:text-slate-700 whitespace-nowrap">Завершено</button>
</div>
<div id="tasks-container" class="flex-1 overflow-y-auto p-3.5 sm:p-4 space-y-3 bg-slate-50/50">
<div class="text-center text-slate-400 py-8 text-xs">Загрузка задач...</div>
</div>
</aside>
<script src="/static/js/app.js"></script>
</body>
</html>