diff --git a/client/src/components/TaskPanel.css b/client/src/components/TaskPanel.css new file mode 100644 index 0000000..c2ee061 --- /dev/null +++ b/client/src/components/TaskPanel.css @@ -0,0 +1,430 @@ +.task-panel { + padding: 1.5rem; + background: #0f172a; + border-radius: 0.5rem; + height: 100%; + overflow-y: auto; +} + +.task-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 1.5rem; +} + +.task-header h2 { + font-size: 1.5rem; + font-weight: 700; + color: #f9fafb; + margin: 0; +} + +.create-task-btn { + padding: 0.75rem 1.5rem; + background: #3b82f6; + border: none; + border-radius: 0.375rem; + color: white; + font-weight: 600; + font-size: 0.875rem; + cursor: pointer; + transition: all 0.2s; +} + +.create-task-btn:hover { + background: #2563eb; + transform: translateY(-2px); + box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4); +} + +.message { + padding: 0.75rem 1rem; + border-radius: 0.5rem; + margin-bottom: 1rem; + font-size: 0.875rem; + font-weight: 600; + animation: slideIn 0.3s; +} + +.message.success { + background: #10b98133; + color: #10b981; + border: 1px solid #10b981; +} + +.message.error { + background: #ef444433; + color: #ef4444; + border: 1px solid #ef4444; +} + +@keyframes slideIn { + from { + opacity: 0; + transform: translateY(-10px); + } + to { + opacity: 1; + transform: translateY(0); + } +} + +/* Create Task Form */ +.create-task-form { + background: #1e293b; + border-radius: 0.5rem; + padding: 1.5rem; + margin-bottom: 1.5rem; + animation: slideIn 0.3s; +} + +.create-task-form h3 { + font-size: 1rem; + font-weight: 600; + color: #f9fafb; + margin: 0 0 1rem 0; +} + +.create-task-form form { + display: flex; + flex-direction: column; + gap: 1rem; +} + +.form-row { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 1rem; +} + +.create-task-form label { + display: flex; + flex-direction: column; + gap: 0.5rem; + font-size: 0.875rem; + font-weight: 600; + color: #e5e7eb; +} + +.create-task-form select, +.create-task-form input[type="text"], +.create-task-form input[type="number"] { + padding: 0.75rem; + background: #0f172a; + border: 1px solid #334155; + border-radius: 0.375rem; + color: #e5e7eb; + font-size: 0.875rem; +} + +.create-task-form select:focus, +.create-task-form input:focus { + outline: none; + border-color: #3b82f6; +} + +.create-task-form input[type="range"] { + width: 100%; +} + +.priority-value { + font-size: 0.875rem; + font-weight: 600; + text-align: center; +} + +.coordinates-section h4 { + font-size: 0.875rem; + font-weight: 600; + color: #94a3b8; + margin: 0 0 0.75rem 0; +} + +.coordinates-grid { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 1rem; +} + +.coord-group { + display: flex; + flex-direction: column; + gap: 0.5rem; +} + +.coord-group span { + font-size: 0.75rem; + font-weight: 600; + color: #94a3b8; + text-transform: uppercase; +} + +.coord-group input { + padding: 0.5rem; + background: #0f172a; + border: 1px solid #334155; + border-radius: 0.25rem; + color: #e5e7eb; + font-size: 0.75rem; +} + +.submit-btn { + padding: 0.75rem 1.5rem; + background: #10b981; + border: none; + border-radius: 0.375rem; + color: white; + font-weight: 600; + cursor: pointer; + transition: all 0.2s; +} + +.submit-btn:hover { + background: #059669; + transform: translateY(-2px); + box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4); +} + +/* Task Filters */ +.task-filters { + display: flex; + gap: 0.5rem; + margin-bottom: 1.5rem; + flex-wrap: wrap; +} + +.task-filters button { + padding: 0.5rem 1rem; + background: #1e293b; + border: none; + border-radius: 0.375rem; + color: #94a3b8; + font-weight: 600; + font-size: 0.875rem; + cursor: pointer; + transition: all 0.2s; +} + +.task-filters button:hover { + color: #e5e7eb; + background: #334155; +} + +.task-filters button.active { + background: #3b82f6; + color: white; +} + +/* Tasks List */ +.tasks-list { + display: flex; + flex-direction: column; + gap: 1rem; +} + +.loading { + text-align: center; + padding: 2rem; + color: #94a3b8; + font-size: 0.875rem; +} + +.task-card { + background: #1e293b; + border-radius: 0.5rem; + padding: 1.5rem; + transition: all 0.2s; +} + +.task-card:hover { + background: #334155; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); +} + +.task-card-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 1rem; + flex-wrap: wrap; + gap: 0.75rem; +} + +.task-title { + display: flex; + align-items: center; + gap: 0.5rem; +} + +.task-icon { + font-size: 1.5rem; +} + +.task-type { + font-size: 1rem; + font-weight: 600; + color: #e5e7eb; +} + +.task-badges { + display: flex; + gap: 0.5rem; +} + +.priority-badge, +.status-badge { + padding: 0.25rem 0.75rem; + border-radius: 0.25rem; + font-size: 0.75rem; + font-weight: 700; + color: white; + text-transform: uppercase; + letter-spacing: 0.05em; +} + +.task-assignment { + font-size: 0.875rem; + color: #94a3b8; + margin-bottom: 0.75rem; + padding: 0.5rem; + background: #0f172a; + border-radius: 0.25rem; +} + +.task-parameters { + font-size: 0.75rem; + color: #94a3b8; + margin-bottom: 0.75rem; + padding: 0.5rem; + background: #0f172a; + border-radius: 0.25rem; + font-family: 'Courier New', monospace; +} + +.task-result { + font-size: 0.875rem; + color: #10b981; + margin-bottom: 0.75rem; + padding: 0.75rem; + background: #10b98120; + border-radius: 0.25rem; + border-left: 3px solid #10b981; +} + +.task-actions { + display: flex; + gap: 0.5rem; + margin-bottom: 0.75rem; +} + +.task-actions button { + padding: 0.5rem 1rem; + background: #0f172a; + border: 1px solid #334155; + border-radius: 0.25rem; + color: #e5e7eb; + font-size: 0.75rem; + font-weight: 600; + cursor: pointer; + transition: all 0.2s; +} + +.task-actions button:hover { + background: #1e293b; + border-color: #3b82f6; + transform: translateY(-2px); +} + +.task-timestamp { + font-size: 0.75rem; + color: #64748b; + font-style: italic; +} + +/* Empty State */ +.empty-state { + text-align: center; + padding: 4rem 2rem; +} + +.empty-icon { + font-size: 4rem; + margin-bottom: 1rem; + opacity: 0.5; +} + +.empty-title { + font-size: 1.25rem; + font-weight: 600; + color: #e5e7eb; + margin-bottom: 0.5rem; +} + +.empty-text { + font-size: 0.875rem; + color: #94a3b8; +} + +/* Mobile Responsive */ +@media (max-width: 768px) { + .task-panel { + padding: 1rem; + } + + .task-header { + flex-direction: column; + align-items: stretch; + gap: 1rem; + } + + .create-task-btn { + width: 100%; + } + + .form-row { + grid-template-columns: 1fr; + } + + .coordinates-grid { + grid-template-columns: 1fr; + } + + .task-filters { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } + + .task-filters button { + white-space: nowrap; + } + + .task-card-header { + flex-direction: column; + align-items: flex-start; + } + + .task-actions { + flex-wrap: wrap; + } + + .task-actions button { + flex: 1; + min-width: 120px; + } +} + +@media (max-width: 480px) { + .task-header h2 { + font-size: 1.25rem; + } + + .task-card { + padding: 1rem; + } + + .task-actions button { + min-width: 100px; + font-size: 0.7rem; + } +}