165 lines
11 KiB
HTML
165 lines
11 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="ru">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>SCUD Orion AI — Управление и Аналитика</title>
|
||
<!-- Tailwind CSS CDN -->
|
||
<script src="https://cdn.tailwindcss.com"></script>
|
||
<!-- FontAwesome Icons -->
|
||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
||
<link rel="stylesheet" href="/css/styles.css">
|
||
</head>
|
||
<body class="bg-slate-100 font-sans h-screen flex overflow-hidden text-slate-800">
|
||
|
||
<!-- Боковая панель (Задачи и Навигация) -->
|
||
<aside id="task-drawer" class="w-80 sm:w-96 bg-white border-r border-slate-200 flex flex-col shrink-0 h-full z-20 shadow-sm transition-all duration-300">
|
||
<!-- Шапка панели задач -->
|
||
<div class="p-4 border-b border-slate-200 flex items-center justify-between bg-slate-50/70">
|
||
<div class="flex items-center gap-2">
|
||
<div class="w-8 h-8 rounded-lg bg-indigo-600 flex items-center justify-center text-white shadow-sm">
|
||
<i class="fa-solid fa-list-check text-sm"></i>
|
||
</div>
|
||
<div>
|
||
<h2 class="font-bold text-sm text-slate-900 leading-tight">Бэклог задач</h2>
|
||
<p class="text-[11px] text-slate-500">SCUD Orion AI Roadmap</p>
|
||
</div>
|
||
</div>
|
||
<button type="button" onclick="openAddTaskModal()" title="Добавить задачу"
|
||
class="px-2.5 py-1.5 bg-indigo-50 hover:bg-indigo-100 text-indigo-700 border border-indigo-200 rounded-lg text-xs font-semibold flex items-center gap-1 transition cursor-pointer">
|
||
<i class="fa-solid fa-plus"></i>
|
||
<span>Задача</span>
|
||
</button>
|
||
</div>
|
||
|
||
<!-- Фильтры задач -->
|
||
<div class="px-4 py-2.5 border-b border-slate-100 flex items-center justify-between gap-1 text-xs">
|
||
<button onclick="filterTasksByTab('IN_PROGRESS')" id="tab-in-progress" class="task-tab-btn font-semibold px-2.5 py-1 rounded-md text-indigo-600 bg-indigo-50 transition">В работе</button>
|
||
<button onclick="filterTasksByTab('BACKLOG')" id="tab-backlog" class="task-tab-btn font-medium px-2.5 py-1 rounded-md text-slate-600 hover:bg-slate-100 transition">В планах</button>
|
||
<button onclick="filterTasksByTab('COMPLETED')" id="tab-completed" class="task-tab-btn font-medium px-2.5 py-1 rounded-md text-slate-600 hover:bg-slate-100 transition">Готово</button>
|
||
<button onclick="filterTasksByTab('ALL')" id="tab-all" class="task-tab-btn font-medium px-2.5 py-1 rounded-md text-slate-600 hover:bg-slate-100 transition">Все</button>
|
||
</div>
|
||
|
||
<!-- Список задач с прокруткой (ID исправлен на tasks-list) -->
|
||
<div id="tasks-list" class="flex-1 overflow-y-auto p-3 space-y-2.5">
|
||
<div class="text-center py-8 text-xs text-slate-400">Загрузка задач...</div>
|
||
</div>
|
||
|
||
<!-- Подвал панели пользователя -->
|
||
<div class="p-3 border-t border-slate-200 bg-slate-50/50 flex items-center justify-between text-xs">
|
||
<div class="flex items-center gap-2">
|
||
<div class="w-7 h-7 rounded-full bg-slate-300 flex items-center justify-center text-slate-700 font-bold">
|
||
<i class="fa-solid fa-user text-xs"></i>
|
||
</div>
|
||
<div class="truncate">
|
||
<span id="current-username" class="font-semibold text-slate-900 block truncate">Александр Пушков</span>
|
||
<span id="user-role-badge" class="text-[10px] text-indigo-600 font-medium">Администратор</span>
|
||
</div>
|
||
</div>
|
||
<button onclick="logout()" title="Выйти" class="p-1.5 text-slate-400 hover:text-rose-600 transition">
|
||
<i class="fa-solid fa-arrow-right-from-bracket"></i>
|
||
</button>
|
||
</div>
|
||
</aside>
|
||
|
||
<!-- Основная рабочая область чата -->
|
||
<main class="flex-1 flex flex-col min-w-0 bg-white relative h-full overflow-hidden">
|
||
<!-- Верхний заголовок чата -->
|
||
<header class="h-14 border-b border-slate-200 px-4 flex items-center justify-between bg-white shrink-0 z-10">
|
||
<div class="flex items-center gap-3">
|
||
<button type="button" onclick="toggleTaskDrawer()" class="p-1.5 text-slate-500 hover:text-indigo-600 hover:bg-slate-100 rounded-lg transition" title="Переключить боковую панель">
|
||
<i class="fa-solid fa-bars"></i>
|
||
</button>
|
||
<div>
|
||
<h1 class="font-bold text-sm text-slate-900 flex items-center gap-2">
|
||
<span>SCUD Orion AI Assistant</span>
|
||
<span class="inline-flex items-center px-1.5 py-0.5 rounded-full text-[10px] font-semibold bg-emerald-100 text-emerald-800">Online</span>
|
||
</h1>
|
||
<p class="text-[11px] text-slate-500">Система интеллектуального аудита и контроля СКУД / 1С</p>
|
||
</div>
|
||
</div>
|
||
<div class="flex items-center gap-2 text-xs">
|
||
<button type="button" onclick="handleActionButtonClick('покажи системный промпт')" class="px-2.5 py-1 text-slate-600 hover:text-indigo-600 hover:bg-slate-100 rounded-md border border-slate-200 transition">
|
||
<i class="fa-solid fa-terminal mr-1"></i> Промпт
|
||
</button>
|
||
<button type="button" onclick="handleActionButtonClick('покажи снапшоты')" class="px-2.5 py-1 text-slate-600 hover:text-indigo-600 hover:bg-slate-100 rounded-md border border-slate-200 transition">
|
||
<i class="fa-solid fa-camera mr-1"></i> Срезы СКУД
|
||
</button>
|
||
</div>
|
||
</header>
|
||
|
||
<!-- Drop Overlay при перетаскивании файлов -->
|
||
<div id="drop-overlay" class="hidden absolute inset-0 bg-indigo-600/10 backdrop-blur-[2px] border-2 border-dashed border-indigo-500 rounded-2xl m-4 z-50 items-center justify-center flex-col gap-2 pointer-events-none">
|
||
<i class="fa-solid fa-cloud-arrow-up text-3xl text-indigo-600 animate-bounce"></i>
|
||
<p class="text-xs font-bold text-indigo-900">Перетащите файл сюда для отправки в диалог</p>
|
||
</div>
|
||
|
||
<!-- Окно сообщений с центрированием контента -->
|
||
<div id="chat-window" class="flex-1 p-4 overflow-y-auto bg-slate-50/50 scroll-smooth">
|
||
<!-- Центрирующая колонка для сообщений -->
|
||
<div class="max-w-4xl w-full mx-auto space-y-4">
|
||
|
||
<!-- Стартовое приветственное сообщение -->
|
||
<div class="chat-message-card bg-white border border-slate-200 rounded-2xl p-4 shadow-sm w-full">
|
||
<p class="text-[11px] font-bold text-indigo-600 uppercase tracking-wider mb-1">
|
||
<i class="fa-solid fa-robot mr-1"></i> ИИ-Ассистент SCUD Orion AI
|
||
</p>
|
||
<div class="text-slate-800 text-xs sm:text-sm leading-relaxed">
|
||
Привет! У каждого пользователя свое изолированное пространство задач. Вы можете задавать вопросы нейросети, прикреплять файлы или ставить персональные задачи.
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Невидимая распорка в самом низу для свободного скролла любого вопроса наверх -->
|
||
<div id="chat-bottom-spacer" class="min-h-[85vh] pointer-events-none w-full"></div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Центрированная нижняя панель ввода -->
|
||
<div class="p-3 bg-white border-t border-slate-200 shrink-0 z-10">
|
||
<div class="max-w-4xl w-full mx-auto">
|
||
<!-- Блок предпросмотра прикрепленного файла -->
|
||
<div id="file-preview-container" class="hidden mb-2 p-2 bg-indigo-50 border border-indigo-200 rounded-xl flex items-center justify-between">
|
||
<div class="flex items-center gap-2 min-w-0">
|
||
<i class="fa-solid fa-file-arrow-up text-indigo-600 text-sm"></i>
|
||
<span id="file-name-display" class="text-xs font-semibold text-slate-800 truncate"></span>
|
||
<span id="file-size-display" class="text-[10px] text-slate-500"></span>
|
||
</div>
|
||
<button type="button" onclick="clearAttachedFile()" class="text-slate-400 hover:text-rose-600 transition p-1">
|
||
<i class="fa-solid fa-xmark"></i>
|
||
</button>
|
||
</div>
|
||
|
||
<!-- Форма отправки -->
|
||
<form id="chat-form" onsubmit="sendMessage(event)" class="flex items-end gap-2">
|
||
<input type="file" id="file-input" class="hidden" onchange="handleFileSelect(event)" />
|
||
|
||
<button type="button" onclick="document.getElementById('file-input').click()"
|
||
title="Прикрепить файл"
|
||
class="p-2.5 text-slate-500 hover:text-indigo-600 hover:bg-slate-100 rounded-xl transition shrink-0 cursor-pointer">
|
||
<i class="fa-solid fa-paperclip text-sm"></i>
|
||
</button>
|
||
|
||
<div class="flex-1 bg-slate-100 border border-slate-300 focus-within:border-indigo-600 focus-within:bg-white rounded-2xl p-1.5 transition flex items-center shadow-inner">
|
||
<textarea id="user-input" rows="1"
|
||
placeholder="Команда, вопрос или перетащите файл сюда..."
|
||
class="w-full bg-transparent px-2 text-xs sm:text-sm text-slate-800 focus:outline-none resize-none overflow-y-auto leading-relaxed"
|
||
style="height: 24px; max-height: 120px;"></textarea>
|
||
</div>
|
||
|
||
<button type="submit" id="send-btn"
|
||
class="bg-indigo-600 hover:bg-indigo-700 active:bg-indigo-800 text-white p-2.5 rounded-xl transition shrink-0 shadow-sm cursor-pointer">
|
||
<i class="fa-solid fa-paper-plane text-sm"></i>
|
||
</button>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
</main>
|
||
|
||
<!-- Скрипты клиентской логики -->
|
||
<script src="/js/auth.js"></script>
|
||
<script src="/js/tasks.js"></script>
|
||
<script src="/js/chat/task_widget.js"></script>
|
||
<script src="/js/chat/core.js"></script>
|
||
<script src="/js/app.js"></script>
|
||
</body>
|
||
</html> |