mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-05-24 05:26:42 +00:00
589 lines
8.9 KiB
CSS
589 lines
8.9 KiB
CSS
* {
|
|
box-sizing: border-box;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
:root {
|
|
--bg-primary: #ffffff;
|
|
--bg-secondary: #f8f9fa;
|
|
--bg-tertiary: #f1f3f5;
|
|
--text-primary: #212529;
|
|
--text-secondary: #6c757d;
|
|
--text-tertiary: #adb5bd;
|
|
--border-color: #e9ecef;
|
|
--accent: #228be6;
|
|
--accent-light: #e7f5ff;
|
|
--success: #40c057;
|
|
--error: #fa5252;
|
|
--warning: #fab005;
|
|
}
|
|
|
|
body {
|
|
width: 380px;
|
|
height: 520px;
|
|
font-family:
|
|
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
|
|
sans-serif;
|
|
font-size: 14px;
|
|
color: var(--text-primary);
|
|
background: var(--bg-primary);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.app {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
}
|
|
|
|
/* Header */
|
|
.header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 12px 16px;
|
|
border-bottom: 1px solid var(--border-color);
|
|
background: var(--bg-primary);
|
|
}
|
|
|
|
.header-left {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
.logo {
|
|
width: 24px;
|
|
height: 24px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.title {
|
|
font-weight: 600;
|
|
font-size: 15px;
|
|
}
|
|
|
|
.logo img {
|
|
display: block;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.icon-btn {
|
|
width: 32px;
|
|
height: 32px;
|
|
border: none;
|
|
background: transparent;
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
color: var(--text-secondary);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.icon-btn:hover {
|
|
background: var(--bg-secondary);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
/* Pages */
|
|
.page {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.page.hidden {
|
|
display: none;
|
|
}
|
|
|
|
/* Settings Page */
|
|
.settings-content {
|
|
flex: 1;
|
|
padding: 20px 16px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.settings-content h2 {
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
margin-bottom: 20px;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.setting-group {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.setting-group label {
|
|
display: block;
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
color: var(--text-secondary);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.connection-status {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.status-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background: var(--error);
|
|
}
|
|
|
|
.status-dot.connected {
|
|
background: var(--success);
|
|
}
|
|
|
|
.input {
|
|
width: 100%;
|
|
padding: 10px 12px;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 8px;
|
|
font-size: 14px;
|
|
transition: border-color 0.2s;
|
|
}
|
|
|
|
.input:focus {
|
|
outline: none;
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.current-page {
|
|
font-size: 13px;
|
|
color: var(--text-secondary);
|
|
word-break: break-all;
|
|
padding: 10px 12px;
|
|
background: var(--bg-secondary);
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.setting-actions {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.about-text {
|
|
font-size: 13px;
|
|
color: var(--text-secondary);
|
|
line-height: 1.5;
|
|
}
|
|
|
|
/* Buttons */
|
|
.btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
padding: 10px 16px;
|
|
border: none;
|
|
border-radius: 8px;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: var(--accent);
|
|
color: white;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: #1c7ed6;
|
|
}
|
|
|
|
.btn-primary:disabled {
|
|
background: var(--text-tertiary);
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: var(--bg-secondary);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.btn-secondary:hover {
|
|
background: var(--bg-tertiary);
|
|
}
|
|
|
|
.btn-full {
|
|
width: calc(100% - 32px);
|
|
margin: 16px;
|
|
}
|
|
|
|
.btn-loader {
|
|
width: 14px;
|
|
height: 14px;
|
|
border: 2px solid rgba(255, 255, 255, 0.3);
|
|
border-top-color: white;
|
|
border-radius: 50%;
|
|
animation: spin 0.8s linear infinite;
|
|
}
|
|
|
|
.btn-loader.hidden {
|
|
display: none;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
|
|
/* Chat Page */
|
|
.messages-container {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 16px;
|
|
}
|
|
|
|
.welcome-message {
|
|
text-align: center;
|
|
padding: 40px 20px;
|
|
}
|
|
|
|
.welcome-icon {
|
|
width: 48px;
|
|
height: 48px;
|
|
margin-bottom: 16px;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
}
|
|
|
|
.welcome-icon img {
|
|
display: block;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.welcome-message h3 {
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.welcome-message p {
|
|
font-size: 13px;
|
|
color: var(--text-secondary);
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.suggestions {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
justify-content: center;
|
|
}
|
|
|
|
.suggestion-chip {
|
|
padding: 8px 12px;
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 16px;
|
|
font-size: 12px;
|
|
color: var(--text-secondary);
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.suggestion-chip:hover {
|
|
background: var(--accent-light);
|
|
border-color: var(--accent);
|
|
color: var(--accent);
|
|
}
|
|
|
|
/* Message Bubbles */
|
|
.message {
|
|
margin-bottom: 16px;
|
|
animation: fadeInUp 0.3s ease;
|
|
}
|
|
|
|
@keyframes fadeInUp {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(10px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
.message-user {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
.message-user .message-content {
|
|
background: var(--accent);
|
|
color: white;
|
|
border-radius: 16px 16px 4px 16px;
|
|
padding: 10px 14px;
|
|
max-width: 85%;
|
|
}
|
|
|
|
.message-agent {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.message-agent .message-content {
|
|
background: var(--bg-secondary);
|
|
border-radius: 16px 16px 16px 4px;
|
|
padding: 12px 14px;
|
|
max-width: 85%;
|
|
}
|
|
|
|
.message-text {
|
|
font-size: 14px;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
/* Action Steps */
|
|
.action-steps {
|
|
margin-top: 12px;
|
|
}
|
|
|
|
.action-step {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 10px;
|
|
padding: 8px 0;
|
|
border-top: 1px solid var(--border-color);
|
|
animation: fadeIn 0.3s ease;
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
.action-icon {
|
|
width: 20px;
|
|
height: 20px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-shrink: 0;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.action-icon.pending {
|
|
background: var(--bg-tertiary);
|
|
color: var(--text-tertiary);
|
|
}
|
|
|
|
.action-icon.running {
|
|
background: var(--accent-light);
|
|
color: var(--accent);
|
|
animation: pulse 1.5s ease infinite;
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0%,
|
|
100% {
|
|
opacity: 1;
|
|
}
|
|
50% {
|
|
opacity: 0.5;
|
|
}
|
|
}
|
|
|
|
.action-icon.success {
|
|
background: #d3f9d8;
|
|
color: var(--success);
|
|
}
|
|
|
|
.action-icon.error {
|
|
background: #ffe3e3;
|
|
color: var(--error);
|
|
}
|
|
|
|
.action-icon svg {
|
|
width: 12px;
|
|
height: 12px;
|
|
}
|
|
|
|
.action-info {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.action-name {
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.action-detail {
|
|
font-size: 12px;
|
|
color: var(--text-secondary);
|
|
margin-top: 2px;
|
|
word-break: break-word;
|
|
}
|
|
|
|
/* Typing Indicator */
|
|
.typing-indicator {
|
|
display: flex;
|
|
gap: 4px;
|
|
padding: 12px 14px;
|
|
background: var(--bg-secondary);
|
|
border-radius: 16px;
|
|
width: fit-content;
|
|
}
|
|
|
|
.typing-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
background: var(--text-tertiary);
|
|
border-radius: 50%;
|
|
animation: typingBounce 1.4s ease infinite;
|
|
}
|
|
|
|
.typing-dot:nth-child(2) {
|
|
animation-delay: 0.2s;
|
|
}
|
|
.typing-dot:nth-child(3) {
|
|
animation-delay: 0.4s;
|
|
}
|
|
|
|
@keyframes typingBounce {
|
|
0%,
|
|
60%,
|
|
100% {
|
|
transform: translateY(0);
|
|
}
|
|
30% {
|
|
transform: translateY(-4px);
|
|
}
|
|
}
|
|
|
|
/* Input Area */
|
|
.input-area {
|
|
padding: 12px 16px 16px;
|
|
border-top: 1px solid var(--border-color);
|
|
background: var(--bg-primary);
|
|
}
|
|
|
|
.input-wrapper {
|
|
display: flex;
|
|
align-items: flex-end;
|
|
gap: 8px;
|
|
background: var(--bg-secondary);
|
|
border-radius: 20px;
|
|
padding: 4px 4px 4px 16px;
|
|
border: 1px solid var(--border-color);
|
|
transition: border-color 0.2s;
|
|
}
|
|
|
|
.input-wrapper:focus-within {
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
#messageInput {
|
|
flex: 1;
|
|
border: none;
|
|
background: transparent;
|
|
font-size: 14px;
|
|
line-height: 1.5;
|
|
resize: none;
|
|
max-height: 100px;
|
|
padding: 8px 0;
|
|
}
|
|
|
|
#messageInput:focus {
|
|
outline: none;
|
|
}
|
|
|
|
#messageInput::placeholder {
|
|
color: var(--text-tertiary);
|
|
}
|
|
|
|
.send-btn {
|
|
width: 36px;
|
|
height: 36px;
|
|
border: none;
|
|
background: var(--accent);
|
|
border-radius: 50%;
|
|
color: white;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: all 0.2s;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.send-btn:hover:not(:disabled) {
|
|
background: #1c7ed6;
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
.send-btn:disabled {
|
|
background: var(--text-tertiary);
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.input-hint {
|
|
margin-top: 8px;
|
|
text-align: center;
|
|
}
|
|
|
|
.status-hint {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
font-size: 12px;
|
|
color: var(--text-tertiary);
|
|
}
|
|
|
|
.hint-dot {
|
|
width: 6px;
|
|
height: 6px;
|
|
border-radius: 50%;
|
|
background: var(--error);
|
|
}
|
|
|
|
.status-hint.connected .hint-dot {
|
|
background: var(--success);
|
|
}
|
|
|
|
.status-hint.connected {
|
|
color: var(--success);
|
|
}
|
|
|
|
/* Scrollbar */
|
|
::-webkit-scrollbar {
|
|
width: 6px;
|
|
}
|
|
|
|
::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
background: var(--border-color);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb:hover {
|
|
background: var(--text-tertiary);
|
|
}
|