|
|
|
|
:root {
|
|
|
|
|
--bg-primary: #0d0f14;
|
|
|
|
|
--bg-secondary: #151820;
|
|
|
|
|
--bg-card: #1a1d28;
|
|
|
|
|
--bg-card-hover: #222633;
|
|
|
|
|
--border-color: #2a2d3a;
|
|
|
|
|
--text-primary: #e8eaed;
|
|
|
|
|
--text-secondary: #9aa0ab;
|
|
|
|
|
--text-muted: #6b7280;
|
|
|
|
|
--green: #22c55e;
|
|
|
|
|
--green-bg: rgba(34, 197, 94, 0.15);
|
|
|
|
|
--green-border: rgba(34, 197, 94, 0.3);
|
|
|
|
|
--red: #ef4444;
|
|
|
|
|
--red-bg: rgba(239, 68, 68, 0.15);
|
|
|
|
|
--blue: #3b82f6;
|
|
|
|
|
--purple: #8b5cf6;
|
|
|
|
|
--orange: #f59e0b;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
* {
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 0;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
body {
|
|
|
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
|
|
|
|
|
background: var(--bg-primary);
|
|
|
|
|
color: var(--text-primary);
|
|
|
|
|
line-height: 1.5;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-container {
|
|
|
|
|
min-height: 100vh;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.top-nav {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
padding: 12px 24px;
|
|
|
|
|
background: var(--bg-secondary);
|
|
|
|
|
border-bottom: 1px solid var(--border-color);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.nav-left {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 16px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.back-link {
|
|
|
|
|
color: var(--text-secondary);
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 6px;
|
|
|
|
|
transition: color 0.2s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.back-link:hover {
|
|
|
|
|
color: var(--text-primary);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.page-title {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 10px;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.page-title i {
|
|
|
|
|
color: var(--green);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.nav-right {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 16px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.nav-icon-btn {
|
|
|
|
|
color: var(--text-secondary);
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
padding: 6px;
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
transition: all 0.2s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.nav-icon-btn:hover {
|
|
|
|
|
color: var(--text-primary);
|
|
|
|
|
background: var(--bg-card);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.main-content {
|
|
|
|
|
flex: 1;
|
|
|
|
|
padding: 24px;
|
|
|
|
|
max-width: 900px;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.config-container {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 20px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.config-card {
|
|
|
|
|
background: var(--bg-card);
|
|
|
|
|
border: 1px solid var(--border-color);
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
padding: 20px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-header {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
padding-bottom: 12px;
|
|
|
|
|
border-bottom: 1px solid var(--border-color);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-header h3 {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 10px;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-header h3 i {
|
|
|
|
|
color: var(--green);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 提供商网格 */
|
|
|
|
|
.provider-grid {
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
|
|
|
|
|
gap: 12px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.provider-card {
|
|
|
|
|
padding: 16px;
|
|
|
|
|
background: var(--bg-secondary);
|
|
|
|
|
border: 2px solid var(--border-color);
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: all 0.2s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.provider-card:hover {
|
|
|
|
|
border-color: var(--text-muted);
|
|
|
|
|
background: var(--bg-card-hover);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.provider-card.active {
|
|
|
|
|
border-color: var(--green);
|
|
|
|
|
background: var(--green-bg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.provider-card i {
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
margin-bottom: 8px;
|
|
|
|
|
color: var(--text-secondary);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.provider-card.active i {
|
|
|
|
|
color: var(--green);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.provider-card .provider-name {
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 表单 */
|
|
|
|
|
.form-grid {
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: repeat(2, 1fr);
|
|
|
|
|
gap: 16px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.form-group {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 6px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.form-group label {
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
color: var(--text-secondary);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.form-control {
|
|
|
|
|
padding: 10px 14px;
|
|
|
|
|
background: var(--bg-secondary);
|
|
|
|
|
border: 1px solid var(--border-color);
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
color: var(--text-primary);
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
outline: none;
|
|
|
|
|
transition: border-color 0.2s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.form-control:focus {
|
|
|
|
|
border-color: var(--green);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.input-with-toggle {
|
|
|
|
|
position: relative;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.input-with-toggle .form-control {
|
|
|
|
|
flex: 1;
|
|
|
|
|
padding-right: 40px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.toggle-visibility {
|
|
|
|
|
position: absolute;
|
|
|
|
|
right: 10px;
|
|
|
|
|
background: none;
|
|
|
|
|
border: none;
|
|
|
|
|
color: var(--text-muted);
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
padding: 4px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.form-range {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 6px;
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
background: var(--bg-secondary);
|
|
|
|
|
outline: none;
|
|
|
|
|
-webkit-appearance: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.form-range::-webkit-slider-thumb {
|
|
|
|
|
-webkit-appearance: none;
|
|
|
|
|
width: 18px;
|
|
|
|
|
height: 18px;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
background: var(--green);
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.range-labels {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
color: var(--text-muted);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.form-actions {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 12px;
|
|
|
|
|
margin-top: 16px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.test-result {
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.test-result.success {
|
|
|
|
|
color: var(--green);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.test-result.error {
|
|
|
|
|
color: var(--red);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 当前启用的AI卡片 */
|
|
|
|
|
.active-ai-card {
|
|
|
|
|
border-color: var(--green-border);
|
|
|
|
|
background: var(--green-bg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.active-ai-card .card-header h3 {
|
|
|
|
|
color: var(--green);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.active-ai-card .card-header i {
|
|
|
|
|
color: var(--green);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.active-ai-display {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 16px;
|
|
|
|
|
padding: 12px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.active-ai-icon {
|
|
|
|
|
width: 48px;
|
|
|
|
|
height: 48px;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
background: rgba(34, 197, 94, 0.15);
|
|
|
|
|
border: 1px solid var(--green-border);
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
color: var(--green);
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.active-ai-info {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 4px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.active-ai-name {
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: var(--text-primary);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.active-ai-model {
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
color: var(--text-secondary);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 设置列表 */
|
|
|
|
|
.settings-list {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 16px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.setting-item {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
padding: 12px 0;
|
|
|
|
|
border-bottom: 1px solid var(--border-color);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.setting-item:last-child {
|
|
|
|
|
border-bottom: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.setting-info {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 2px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.setting-name {
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.setting-desc {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
color: var(--text-muted);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 开关 */
|
|
|
|
|
.switch {
|
|
|
|
|
position: relative;
|
|
|
|
|
width: 48px;
|
|
|
|
|
height: 26px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.switch input {
|
|
|
|
|
opacity: 0;
|
|
|
|
|
width: 0;
|
|
|
|
|
height: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.slider {
|
|
|
|
|
position: absolute;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
top: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
right: 0;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
background: var(--bg-secondary);
|
|
|
|
|
border: 1px solid var(--border-color);
|
|
|
|
|
border-radius: 26px;
|
|
|
|
|
transition: 0.3s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.slider:before {
|
|
|
|
|
position: absolute;
|
|
|
|
|
content: "";
|
|
|
|
|
height: 20px;
|
|
|
|
|
width: 20px;
|
|
|
|
|
left: 2px;
|
|
|
|
|
bottom: 2px;
|
|
|
|
|
background: var(--text-muted);
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
transition: 0.3s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
input:checked + .slider {
|
|
|
|
|
background: var(--green-bg);
|
|
|
|
|
border-color: var(--green-border);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
input:checked + .slider:before {
|
|
|
|
|
transform: translateX(22px);
|
|
|
|
|
background: var(--green);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 模型列表 */
|
|
|
|
|
.models-list {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.model-item {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
padding: 12px 16px;
|
|
|
|
|
background: var(--bg-secondary);
|
|
|
|
|
border: 1px solid var(--border-color);
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.model-info {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 12px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.model-status {
|
|
|
|
|
width: 10px;
|
|
|
|
|
height: 10px;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.model-status.active {
|
|
|
|
|
background: var(--green);
|
|
|
|
|
box-shadow: 0 0 8px var(--green);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.model-status.inactive {
|
|
|
|
|
background: var(--text-muted);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.model-name {
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.model-provider {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
color: var(--text-muted);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.model-actions {
|
|
|
|
|
display: flex;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.model-actions button {
|
|
|
|
|
padding: 6px 12px;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
border: none;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: all 0.2s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-set-active {
|
|
|
|
|
background: var(--green-bg);
|
|
|
|
|
color: var(--green);
|
|
|
|
|
border: 1px solid var(--green-border);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-set-active:hover {
|
|
|
|
|
background: var(--green);
|
|
|
|
|
color: white;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-delete {
|
|
|
|
|
background: var(--red-bg);
|
|
|
|
|
color: var(--red);
|
|
|
|
|
border: 1px solid var(--red-border);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-delete:hover {
|
|
|
|
|
background: var(--red);
|
|
|
|
|
color: white;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 按钮 */
|
|
|
|
|
.btn {
|
|
|
|
|
padding: 10px 20px;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
border: none;
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
transition: all 0.2s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-sm {
|
|
|
|
|
padding: 6px 12px;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-lg {
|
|
|
|
|
padding: 12px 28px;
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-primary {
|
|
|
|
|
background: var(--green);
|
|
|
|
|
color: white;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-primary:hover {
|
|
|
|
|
background: #16a34a;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-secondary {
|
|
|
|
|
background: var(--bg-secondary);
|
|
|
|
|
color: var(--text-primary);
|
|
|
|
|
border: 1px solid var(--border-color);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-secondary:hover {
|
|
|
|
|
background: var(--bg-card-hover);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.save-actions {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
gap: 16px;
|
|
|
|
|
padding: 20px 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 响应式 */
|
|
|
|
|
@media (max-width: 768px) {
|
|
|
|
|
.form-grid {
|
|
|
|
|
grid-template-columns: 1fr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.provider-grid {
|
|
|
|
|
grid-template-columns: repeat(3, 1fr);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.save-actions {
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.save-actions .btn {
|
|
|
|
|
width: 100%;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
}
|
|
|
|
|
}
|