mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-27 04:49:47 +01:00
- manager-api 删除 liquibase-core 依赖、@DependsOn 及 changelog-master 配置 - config_loader 拉取远端配置时对密钥字段脱敏后再打印日志 - 新增 test-page 调试页面与 mydoc 文档、全量初始化 SQL - 更新本地开发数据库/Redis 连接配置与前端 package-lock Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
484 lines
8.5 KiB
CSS
484 lines
8.5 KiB
CSS
:root {
|
|
--bg: #eef2f7;
|
|
--bg-deep: #dfe7f1;
|
|
--card: #ffffff;
|
|
--border: #dbe3ed;
|
|
--text: #1f2937;
|
|
--text-soft: #64748b;
|
|
--primary: #2563eb;
|
|
--primary-dark: #1d4ed8;
|
|
--primary-soft: #e8efff;
|
|
--danger: #ef4444;
|
|
--assistant: #ffffff;
|
|
--shadow: 0 8px 24px rgba(31, 41, 55, 0.08);
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
html, body {
|
|
height: 100%;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
|
|
color: var(--text);
|
|
background: radial-gradient(circle at 12% 0%, #ffffff 0%, var(--bg) 42%, var(--bg-deep) 100%);
|
|
display: flex;
|
|
justify-content: center;
|
|
padding: 20px;
|
|
}
|
|
|
|
.app {
|
|
width: 100%;
|
|
max-width: 980px;
|
|
height: calc(100vh - 40px);
|
|
min-height: 560px;
|
|
background: rgba(255, 255, 255, 0.72);
|
|
border: 1px solid rgba(255, 255, 255, 0.9);
|
|
border-radius: 22px;
|
|
box-shadow: var(--shadow);
|
|
backdrop-filter: blur(10px);
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
padding: 16px 22px;
|
|
border-bottom: 1px solid var(--border);
|
|
background: rgba(255, 255, 255, 0.86);
|
|
}
|
|
|
|
.brand {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
min-width: 0;
|
|
}
|
|
|
|
.brand-mark {
|
|
width: 42px;
|
|
height: 42px;
|
|
flex: 0 0 42px;
|
|
border-radius: 13px;
|
|
background: linear-gradient(135deg, #3b82f6, #1d4ed8);
|
|
color: #fff;
|
|
font-size: 20px;
|
|
font-weight: 700;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
box-shadow: 0 6px 14px rgba(37, 99, 235, 0.28);
|
|
}
|
|
|
|
.brand-text h1 {
|
|
margin: 0;
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
letter-spacing: 0.2px;
|
|
}
|
|
|
|
.brand-text p {
|
|
margin: 3px 0 0;
|
|
font-size: 12px;
|
|
color: var(--text-soft);
|
|
}
|
|
|
|
.status {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 7px;
|
|
padding: 6px 12px;
|
|
border-radius: 999px;
|
|
background: #f1f5f9;
|
|
font-size: 12px;
|
|
color: var(--text-soft);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.status-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background: #94a3b8;
|
|
transition: background 0.2s ease;
|
|
}
|
|
|
|
.status-dot.on {
|
|
background: #22c55e;
|
|
box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
|
|
}
|
|
|
|
.status-dot.error {
|
|
background: var(--danger);
|
|
box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14);
|
|
}
|
|
|
|
.panel {
|
|
display: flex;
|
|
align-items: flex-end;
|
|
gap: 10px;
|
|
padding: 12px 22px;
|
|
border-bottom: 1px solid var(--border);
|
|
background: rgba(255, 255, 255, 0.6);
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.field {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
min-width: 140px;
|
|
}
|
|
|
|
.field.grow {
|
|
flex: 1 1 280px;
|
|
}
|
|
|
|
.field label {
|
|
font-size: 11px;
|
|
color: var(--text-soft);
|
|
padding-left: 2px;
|
|
}
|
|
|
|
input[type="text"] {
|
|
height: 36px;
|
|
padding: 0 11px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 10px;
|
|
background: #fff;
|
|
font-size: 13px;
|
|
color: var(--text);
|
|
outline: none;
|
|
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
min-width: 0;
|
|
}
|
|
|
|
input[type="text"]:focus {
|
|
border-color: #93b4f5;
|
|
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
|
|
}
|
|
|
|
input[type="text"]:disabled {
|
|
background: #f8fafc;
|
|
color: #94a3b8;
|
|
}
|
|
|
|
.actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
|
|
.btn {
|
|
height: 36px;
|
|
padding: 0 18px;
|
|
border-radius: 10px;
|
|
border: 1px solid transparent;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: background 0.15s ease, transform 0.05s ease, opacity 0.15s ease;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.btn:active:not(:disabled) {
|
|
transform: translateY(1px);
|
|
}
|
|
|
|
.btn:disabled {
|
|
opacity: 0.45;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.btn.primary {
|
|
background: var(--primary);
|
|
color: #fff;
|
|
}
|
|
|
|
.btn.primary:hover:not(:disabled) {
|
|
background: var(--primary-dark);
|
|
}
|
|
|
|
.btn.ghost {
|
|
background: #fff;
|
|
color: var(--text-soft);
|
|
border-color: var(--border);
|
|
}
|
|
|
|
.btn.ghost:hover:not(:disabled) {
|
|
background: #f8fafc;
|
|
}
|
|
|
|
.chat {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 20px 22px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
scroll-behavior: smooth;
|
|
}
|
|
|
|
.system-msg {
|
|
align-self: center;
|
|
max-width: 86%;
|
|
text-align: center;
|
|
font-size: 12px;
|
|
color: var(--text-soft);
|
|
background: rgba(255, 255, 255, 0.72);
|
|
border: 1px dashed var(--border);
|
|
border-radius: 10px;
|
|
padding: 8px 14px;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.msg {
|
|
display: flex;
|
|
flex-direction: column;
|
|
max-width: 78%;
|
|
gap: 4px;
|
|
animation: rise 0.18s ease-out;
|
|
}
|
|
|
|
@keyframes rise {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(6px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
.msg.user {
|
|
align-self: flex-end;
|
|
align-items: flex-end;
|
|
}
|
|
|
|
.msg.assistant {
|
|
align-self: flex-start;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.msg .meta {
|
|
font-size: 11px;
|
|
color: var(--text-soft);
|
|
padding: 0 4px;
|
|
}
|
|
|
|
.msg .bubble {
|
|
padding: 10px 14px;
|
|
border-radius: 14px;
|
|
font-size: 14px;
|
|
line-height: 1.65;
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
}
|
|
|
|
.msg.user .bubble {
|
|
background: linear-gradient(135deg, #3b82f6, #2563eb);
|
|
color: #fff;
|
|
border-bottom-right-radius: 4px;
|
|
}
|
|
|
|
.msg.assistant .bubble {
|
|
background: var(--assistant);
|
|
border: 1px solid var(--border);
|
|
color: var(--text);
|
|
border-bottom-left-radius: 4px;
|
|
box-shadow: 0 2px 8px rgba(31, 41, 55, 0.04);
|
|
}
|
|
|
|
.msg .bubble.pending {
|
|
color: var(--text-soft);
|
|
}
|
|
|
|
.typing {
|
|
display: inline-flex;
|
|
gap: 4px;
|
|
align-items: center;
|
|
height: 18px;
|
|
}
|
|
|
|
.typing i {
|
|
width: 6px;
|
|
height: 6px;
|
|
border-radius: 50%;
|
|
background: #94a3b8;
|
|
animation: blink 1.1s infinite ease-in-out;
|
|
}
|
|
|
|
.typing i:nth-child(2) {
|
|
animation-delay: 0.16s;
|
|
}
|
|
|
|
.typing i:nth-child(3) {
|
|
animation-delay: 0.32s;
|
|
}
|
|
|
|
@keyframes blink {
|
|
0%, 80%, 100% {
|
|
opacity: 0.25;
|
|
transform: translateY(0);
|
|
}
|
|
40% {
|
|
opacity: 1;
|
|
transform: translateY(-2px);
|
|
}
|
|
}
|
|
|
|
.composer {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 14px 22px;
|
|
border-top: 1px solid var(--border);
|
|
background: rgba(255, 255, 255, 0.86);
|
|
}
|
|
|
|
.composer input[type="text"] {
|
|
flex: 1;
|
|
height: 42px;
|
|
}
|
|
|
|
.mic-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 7px;
|
|
height: 42px;
|
|
padding: 0 16px;
|
|
border-radius: 999px;
|
|
border: 1px solid var(--border);
|
|
background: #fff;
|
|
color: var(--primary);
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.mic-btn:hover:not(:disabled) {
|
|
background: var(--primary-soft);
|
|
}
|
|
|
|
.mic-btn:disabled {
|
|
opacity: 0.45;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.mic-btn.recording {
|
|
background: var(--danger);
|
|
border-color: var(--danger);
|
|
color: #fff;
|
|
animation: pulse 1.4s infinite;
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0% {
|
|
box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.34);
|
|
}
|
|
70% {
|
|
box-shadow: 0 0 0 12px rgba(239, 68, 68, 0);
|
|
}
|
|
100% {
|
|
box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
|
|
}
|
|
}
|
|
|
|
.composer .btn.primary {
|
|
height: 42px;
|
|
}
|
|
|
|
.debug {
|
|
border-top: 1px solid var(--border);
|
|
background: rgba(248, 250, 252, 0.9);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.debug summary {
|
|
cursor: pointer;
|
|
padding: 9px 22px;
|
|
color: var(--text-soft);
|
|
user-select: none;
|
|
outline: none;
|
|
}
|
|
|
|
.debug summary span {
|
|
display: inline-block;
|
|
min-width: 18px;
|
|
padding: 0 5px;
|
|
border-radius: 999px;
|
|
background: #e2e8f0;
|
|
color: #475569;
|
|
text-align: center;
|
|
font-size: 11px;
|
|
}
|
|
|
|
.log {
|
|
margin: 0;
|
|
max-height: 140px;
|
|
overflow: auto;
|
|
padding: 0 22px 12px;
|
|
color: #475569;
|
|
font-family: Consolas, "Courier New", monospace;
|
|
font-size: 11px;
|
|
line-height: 1.6;
|
|
white-space: pre-wrap;
|
|
word-break: break-all;
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
body {
|
|
padding: 0;
|
|
}
|
|
|
|
.app {
|
|
height: 100vh;
|
|
min-height: 0;
|
|
border-radius: 0;
|
|
border: none;
|
|
}
|
|
|
|
.panel {
|
|
padding: 10px 14px;
|
|
}
|
|
|
|
.field {
|
|
flex: 1 1 45%;
|
|
min-width: 0;
|
|
}
|
|
|
|
.field.grow {
|
|
flex-basis: 100%;
|
|
}
|
|
|
|
.header, .composer {
|
|
padding-left: 14px;
|
|
padding-right: 14px;
|
|
}
|
|
|
|
.chat {
|
|
padding: 14px;
|
|
}
|
|
|
|
.msg {
|
|
max-width: 88%;
|
|
}
|
|
|
|
.mic-btn span {
|
|
display: none;
|
|
}
|
|
|
|
.mic-btn {
|
|
padding: 0 12px;
|
|
}
|
|
}
|