feat(ui): add keyboard shortcuts and improve states

Keyboard Shortcuts:
- Ctrl+Enter: Quick Start
- Ctrl+K: Kill All Sessions
- Ctrl+L: Clear Terminal
- Ctrl+1/2/3: Switch Tabs
- Escape: Close modals

UI Improvements:
- Add keyboard shortcuts to terminal welcome message
- Improve scrollbar styling with gradients
- Add tooltip base styles
- Add loading states (loading, loading-lg, loading-container)
- Add empty state styles with icon/title/text
- Add error state styling with red background
- Add success state styling with green background

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-01-18 21:42:57 +01:00
co-authored by Claude Opus 4.5
parent 5b1941330b
commit 431732e326
2 changed files with 166 additions and 9 deletions
+120 -5
View File
@@ -699,10 +699,58 @@ body {
.msg-cost { color: var(--green); font-weight: 500; }
/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track {
background: rgba(0, 0, 0, 0.2);
border-radius: 5px;
}
::-webkit-scrollbar-thumb {
background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
border-radius: 5px;
border: 2px solid transparent;
background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
background: linear-gradient(135deg, #4a4a4a 0%, #3a3a3a 100%);
background-clip: padding-box;
}
::-webkit-scrollbar-corner {
background: transparent;
}
/* Tooltips */
[title] {
position: relative;
}
.tooltip {
position: absolute;
bottom: 100%;
left: 50%;
transform: translateX(-50%) translateY(-8px);
background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
color: var(--text);
padding: 0.5rem 0.75rem;
border-radius: 6px;
font-size: 0.75rem;
white-space: nowrap;
pointer-events: none;
opacity: 0;
transition: opacity 0.2s ease, transform 0.2s ease;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
border: 1px solid var(--border);
z-index: 1000;
}
.tooltip::after {
content: '';
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
border: 6px solid transparent;
border-top-color: #1a1a1a;
}
/* Responsive */
@media (max-width: 768px) {
@@ -743,16 +791,83 @@ body {
display: inline-block;
width: 16px;
height: 16px;
border: 2px solid var(--border);
border: 2px solid rgba(59, 130, 246, 0.2);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
.loading-lg {
width: 32px;
height: 32px;
border-width: 3px;
}
.loading-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 2rem;
gap: 1rem;
color: var(--text-muted);
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* Empty state */
.empty-state {
text-align: center;
padding: 2rem;
color: var(--text-muted);
font-size: 0.875rem;
}
.empty-state-icon {
font-size: 2.5rem;
margin-bottom: 1rem;
opacity: 0.5;
}
.empty-state-title {
font-size: 1rem;
font-weight: 500;
color: var(--text-dim);
margin-bottom: 0.5rem;
}
.empty-state-text {
font-size: 0.8rem;
color: var(--text-muted);
}
/* Error state */
.error-state {
text-align: center;
padding: 2rem;
background: rgba(239, 68, 68, 0.1);
border: 1px solid rgba(239, 68, 68, 0.3);
border-radius: var(--radius);
color: var(--red);
}
.error-state-icon {
font-size: 2rem;
margin-bottom: 0.5rem;
}
/* Success state */
.success-state {
text-align: center;
padding: 1rem;
background: rgba(34, 197, 94, 0.1);
border: 1px solid rgba(34, 197, 94, 0.3);
border-radius: var(--radius);
color: var(--green);
}
/* Tabs */
.tabs {
display: flex;