Spaces:
Running
Running
Убери вообще вкладку Task Management и хотелось бы побольше адаптации для телефонов - Follow Up Deployment
Browse files- index.html +37 -88
index.html
CHANGED
|
@@ -24,17 +24,48 @@
|
|
| 24 |
/* Mobile-first responsive styles */
|
| 25 |
@media (max-width: 640px) {
|
| 26 |
.container {
|
| 27 |
-
padding-left:
|
| 28 |
-
padding-right:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
}
|
| 30 |
.bg-gray-800 {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
padding: 1rem;
|
|
|
|
| 32 |
}
|
|
|
|
|
|
|
|
|
|
| 33 |
#chatContainer, #consoleOutput {
|
| 34 |
-
height:
|
| 35 |
}
|
| 36 |
.chat-bubble-ai, .chat-bubble-user {
|
| 37 |
-
max-width:
|
| 38 |
}
|
| 39 |
}
|
| 40 |
|
|
@@ -118,10 +149,7 @@
|
|
| 118 |
</div>
|
| 119 |
<div class="flex items-center space-x-2">
|
| 120 |
<nav class="flex space-x-1 bg-gray-700 p-1 rounded-lg overflow-x-auto whitespace-nowrap">
|
| 121 |
-
<button data-tab="
|
| 122 |
-
<i class="fas fa-tasks mr-1 sm:mr-2"></i><span class="hidden sm:inline">Tasks</span>
|
| 123 |
-
</button>
|
| 124 |
-
<button data-tab="chat" class="tab-btn px-3 sm:px-4 py-2 rounded-md transition hover:bg-gray-600">
|
| 125 |
<i class="fas fa-comments mr-1 sm:mr-2"></i><span class="hidden sm:inline">Chat</span>
|
| 126 |
</button>
|
| 127 |
<button data-tab="console" class="tab-btn px-3 sm:px-4 py-2 rounded-md transition hover:bg-gray-600">
|
|
@@ -144,29 +172,7 @@
|
|
| 144 |
<!-- Main Content -->
|
| 145 |
<main class="container mx-auto px-4 py-8">
|
| 146 |
<!-- Tab Content -->
|
| 147 |
-
<div id="
|
| 148 |
-
<div class="bg-gray-800 rounded-xl p-6 shadow-lg">
|
| 149 |
-
<h2 class="text-xl font-bold mb-4 flex items-center">
|
| 150 |
-
<i class="fas fa-tasks mr-2 text-indigo-400"></i> Task Management
|
| 151 |
-
</h2>
|
| 152 |
-
<div class="flex mb-4">
|
| 153 |
-
<input type="text" id="taskInput" placeholder="Enter new task..." class="flex-grow bg-gray-700 text-white rounded-l-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-indigo-500">
|
| 154 |
-
<button id="addTaskBtn" class="bg-indigo-600 hover:bg-indigo-700 px-4 py-2 rounded-r-lg transition">
|
| 155 |
-
<i class="fas fa-plus"></i>
|
| 156 |
-
</button>
|
| 157 |
-
</div>
|
| 158 |
-
|
| 159 |
-
<div class="mt-6">
|
| 160 |
-
<h3 class="font-semibold mb-2 text-gray-300">Active Tasks</h3>
|
| 161 |
-
<div id="taskList" class="space-y-3">
|
| 162 |
-
<!-- Tasks will be added here -->
|
| 163 |
-
</div>
|
| 164 |
-
</div>
|
| 165 |
-
</div>
|
| 166 |
-
|
| 167 |
-
</div>
|
| 168 |
-
|
| 169 |
-
<div id="chat-tab" class="tab-content hidden">
|
| 170 |
<div class="grid grid-cols-1 gap-8">
|
| 171 |
<!-- Chat Interface -->
|
| 172 |
<div class="bg-gray-800 rounded-xl p-6 shadow-lg">
|
|
@@ -269,63 +275,6 @@
|
|
| 269 |
</footer>
|
| 270 |
|
| 271 |
<script>
|
| 272 |
-
// Task management
|
| 273 |
-
const taskInput = document.getElementById('taskInput');
|
| 274 |
-
const addTaskBtn = document.getElementById('addTaskBtn');
|
| 275 |
-
const taskList = document.getElementById('taskList');
|
| 276 |
-
|
| 277 |
-
addTaskBtn.addEventListener('click', addTask);
|
| 278 |
-
taskInput.addEventListener('keypress', (e) => {
|
| 279 |
-
if (e.key === 'Enter') addTask();
|
| 280 |
-
});
|
| 281 |
-
|
| 282 |
-
function addTask() {
|
| 283 |
-
const taskText = taskInput.value.trim();
|
| 284 |
-
if (taskText) {
|
| 285 |
-
const taskId = Date.now();
|
| 286 |
-
const taskItem = document.createElement('div');
|
| 287 |
-
taskItem.className = 'task-item bg-gray-700 rounded-lg p-3 flex items-center justify-between';
|
| 288 |
-
taskItem.innerHTML = `
|
| 289 |
-
<div class="flex items-center">
|
| 290 |
-
<div class="w-4 h-4 rounded-full border-2 border-indigo-400 mr-3"></div>
|
| 291 |
-
<span>${taskText}</span>
|
| 292 |
-
</div>
|
| 293 |
-
<div class="flex space-x-2">
|
| 294 |
-
<button class="text-gray-400 hover:text-green-400 transition" onclick="completeTask(${taskId})">
|
| 295 |
-
<i class="fas fa-check"></i>
|
| 296 |
-
</button>
|
| 297 |
-
<button class="text-gray-400 hover:text-red-400 transition" onclick="deleteTask(${taskId})">
|
| 298 |
-
<i class="fas fa-trash"></i>
|
| 299 |
-
</button>
|
| 300 |
-
</div>
|
| 301 |
-
`;
|
| 302 |
-
taskList.appendChild(taskItem);
|
| 303 |
-
taskInput.value = '';
|
| 304 |
-
|
| 305 |
-
// Simulate AI response to new task
|
| 306 |
-
simulateAIResponse(`Task added: "${taskText}"`);
|
| 307 |
-
addConsoleOutput(`agent --task "${taskText}"`);
|
| 308 |
-
}
|
| 309 |
-
}
|
| 310 |
-
|
| 311 |
-
function completeTask(id) {
|
| 312 |
-
const task = document.querySelector(`.task-item`);
|
| 313 |
-
if (task) {
|
| 314 |
-
task.classList.add('opacity-50');
|
| 315 |
-
task.querySelector('span').classList.add('line-through', 'text-gray-500');
|
| 316 |
-
simulateAIResponse('Task marked as completed!');
|
| 317 |
-
}
|
| 318 |
-
}
|
| 319 |
-
|
| 320 |
-
function deleteTask(id) {
|
| 321 |
-
const task = document.querySelector(`.task-item`);
|
| 322 |
-
if (task) {
|
| 323 |
-
task.classList.add('opacity-0', 'h-0', 'py-0', 'mb-0');
|
| 324 |
-
setTimeout(() => task.remove(), 300);
|
| 325 |
-
simulateAIResponse('Task removed successfully.');
|
| 326 |
-
}
|
| 327 |
-
}
|
| 328 |
-
|
| 329 |
// Chat functionality
|
| 330 |
const messageInput = document.getElementById('messageInput');
|
| 331 |
const sendMessageBtn = document.getElementById('sendMessageBtn');
|
|
|
|
| 24 |
/* Mobile-first responsive styles */
|
| 25 |
@media (max-width: 640px) {
|
| 26 |
.container {
|
| 27 |
+
padding-left: 0.5rem;
|
| 28 |
+
padding-right: 0.5rem;
|
| 29 |
+
}
|
| 30 |
+
header .container {
|
| 31 |
+
flex-direction: column;
|
| 32 |
+
gap: 1rem;
|
| 33 |
+
padding: 1rem;
|
| 34 |
}
|
| 35 |
.bg-gray-800 {
|
| 36 |
+
padding: 0.75rem;
|
| 37 |
+
}
|
| 38 |
+
#chatContainer, #consoleOutput {
|
| 39 |
+
height: 250px;
|
| 40 |
+
font-size: 0.9rem;
|
| 41 |
+
}
|
| 42 |
+
.chat-bubble-ai, .chat-bubble-user {
|
| 43 |
+
max-width: 85%;
|
| 44 |
+
font-size: 0.9rem;
|
| 45 |
+
}
|
| 46 |
+
.tab-btn {
|
| 47 |
+
padding: 0.5rem;
|
| 48 |
+
font-size: 0.8rem;
|
| 49 |
+
}
|
| 50 |
+
.tab-btn i {
|
| 51 |
+
margin-right: 0.25rem;
|
| 52 |
+
}
|
| 53 |
+
main {
|
| 54 |
+
padding-top: 1rem;
|
| 55 |
+
padding-bottom: 1rem;
|
| 56 |
+
}
|
| 57 |
+
footer {
|
| 58 |
padding: 1rem;
|
| 59 |
+
font-size: 0.8rem;
|
| 60 |
}
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
@media (max-width: 400px) {
|
| 64 |
#chatContainer, #consoleOutput {
|
| 65 |
+
height: 200px;
|
| 66 |
}
|
| 67 |
.chat-bubble-ai, .chat-bubble-user {
|
| 68 |
+
max-width: 80%;
|
| 69 |
}
|
| 70 |
}
|
| 71 |
|
|
|
|
| 149 |
</div>
|
| 150 |
<div class="flex items-center space-x-2">
|
| 151 |
<nav class="flex space-x-1 bg-gray-700 p-1 rounded-lg overflow-x-auto whitespace-nowrap">
|
| 152 |
+
<button data-tab="chat" class="tab-btn px-3 sm:px-4 py-2 rounded-md transition hover:bg-gray-600 active-tab">
|
|
|
|
|
|
|
|
|
|
| 153 |
<i class="fas fa-comments mr-1 sm:mr-2"></i><span class="hidden sm:inline">Chat</span>
|
| 154 |
</button>
|
| 155 |
<button data-tab="console" class="tab-btn px-3 sm:px-4 py-2 rounded-md transition hover:bg-gray-600">
|
|
|
|
| 172 |
<!-- Main Content -->
|
| 173 |
<main class="container mx-auto px-4 py-8">
|
| 174 |
<!-- Tab Content -->
|
| 175 |
+
<div id="chat-tab" class="tab-content active-tab">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 176 |
<div class="grid grid-cols-1 gap-8">
|
| 177 |
<!-- Chat Interface -->
|
| 178 |
<div class="bg-gray-800 rounded-xl p-6 shadow-lg">
|
|
|
|
| 275 |
</footer>
|
| 276 |
|
| 277 |
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 278 |
// Chat functionality
|
| 279 |
const messageInput = document.getElementById('messageInput');
|
| 280 |
const sendMessageBtn = document.getElementById('sendMessageBtn');
|