mirror of
https://github.com/DrizzleTime/Foxel.git
synced 2026-06-28 18:51:31 +08:00
feat: add AI Settings tab for managing providers and models
This commit is contained in:
361
web/src/styles/ai-settings.css
Normal file
361
web/src/styles/ai-settings.css
Normal file
@@ -0,0 +1,361 @@
|
||||
.fx-ai-top-bar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20px 28px;
|
||||
border-radius: 16px;
|
||||
background: linear-gradient(120deg, rgba(99, 102, 241, 0.16), rgba(167, 139, 250, 0.12));
|
||||
border: 1px solid rgba(99, 102, 241, 0.15);
|
||||
}
|
||||
|
||||
.fx-ai-provider-card {
|
||||
border-radius: 16px;
|
||||
overflow: hidden;
|
||||
box-shadow: var(--ant-box-shadow-secondary);
|
||||
}
|
||||
|
||||
.fx-ai-provider-header {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
height: 80px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.fx-ai-provider-meta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.fx-ai-provider-logo {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 12px;
|
||||
object-fit: cover;
|
||||
background: var(--ant-color-fill-alter);
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.fx-ai-provider-name {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.fx-ai-provider-sub {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
margin-top: 4px;
|
||||
color: var(--ant-color-text-tertiary);
|
||||
}
|
||||
|
||||
.fx-ai-model-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.fx-ai-model-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
gap: 12px;
|
||||
padding: 12px 14px;
|
||||
border-radius: 10px;
|
||||
background: var(--ant-color-fill-secondary);
|
||||
border: 1px solid var(--ant-color-border);
|
||||
}
|
||||
|
||||
.fx-ai-model-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.fx-ai-model-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.fx-ai-model-title {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.fx-ai-model-tags .ant-tag {
|
||||
border-radius: 999px;
|
||||
padding: 0 8px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.fx-ai-model-meta {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.fx-ai-model-desc {
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.fx-ai-model-metrics {
|
||||
color: var(--ant-color-text-quaternary);
|
||||
}
|
||||
|
||||
.fx-ai-model-actions {
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.fx-ai-model-actions .ant-btn {
|
||||
min-width: 32px;
|
||||
}
|
||||
|
||||
.fx-ai-empty-card {
|
||||
border-radius: 16px;
|
||||
background: var(--ant-color-fill-tertiary);
|
||||
}
|
||||
|
||||
.fx-ai-provider-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.fx-ai-defaults-card {
|
||||
border-radius: 16px;
|
||||
box-shadow: var(--ant-box-shadow-secondary);
|
||||
}
|
||||
|
||||
.fx-ai-default-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
padding: 12px 0;
|
||||
border-bottom: 1px solid var(--ant-color-border-secondary);
|
||||
}
|
||||
|
||||
.fx-ai-default-row:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.fx-ai-default-meta {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.fx-ai-default-icon {
|
||||
width: 46px;
|
||||
height: 46px;
|
||||
border-radius: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 22px;
|
||||
color: var(--ant-color-text-light-solid);
|
||||
}
|
||||
|
||||
.fx-ai-default-desc {
|
||||
color: var(--ant-color-text-tertiary);
|
||||
}
|
||||
|
||||
.fx-ai-provider-option {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.fx-ai-provider-option img {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 6px;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.fx-ai-model-option {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.fx-ai-model-name {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.fx-ai-model-provider-tag {
|
||||
padding: 0 8px;
|
||||
border-radius: 999px;
|
||||
background: var(--ant-color-fill-tertiary);
|
||||
color: var(--ant-color-text-tertiary);
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.fx-ai-add-provider-steps {
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.fx-ai-template-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.fx-ai-template-card {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 16px;
|
||||
border-radius: 16px;
|
||||
background: var(--ant-color-fill-quaternary);
|
||||
border: 1px solid transparent;
|
||||
cursor: pointer;
|
||||
transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
|
||||
}
|
||||
|
||||
.fx-ai-template-card:hover {
|
||||
border-color: var(--ant-color-primary);
|
||||
box-shadow: var(--ant-box-shadow-secondary);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.fx-ai-template-card:focus-visible {
|
||||
outline: 2px solid var(--ant-color-primary);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.fx-ai-template-card-main {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.fx-ai-template-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.fx-ai-template-icon.summary {
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
border-radius: 18px;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.fx-ai-template-icon img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: inherit;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.fx-ai-template-text {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.fx-ai-template-name {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: var(--ant-color-text);
|
||||
}
|
||||
|
||||
.fx-ai-template-desc {
|
||||
font-size: 12px;
|
||||
color: var(--ant-color-text-tertiary);
|
||||
}
|
||||
|
||||
.fx-ai-template-summary {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
padding: 16px;
|
||||
border-radius: 16px;
|
||||
background: var(--ant-color-fill-quaternary);
|
||||
}
|
||||
|
||||
.fx-ai-template-summary-text {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.fx-ai-template-summary-text .fx-ai-template-name {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.fx-ai-template-summary-text .fx-ai-template-desc {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.fx-ai-template-arrow {
|
||||
color: var(--ant-color-text-quaternary);
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.fx-ai-remote-models {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
max-height: 320px;
|
||||
padding: 12px;
|
||||
border-radius: 12px;
|
||||
background: var(--ant-color-fill-quaternary);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.fx-ai-remote-item {
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
.fx-ai-remote-item .ant-checkbox-wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.fx-ai-remote-item-main {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.fx-ai-remote-desc {
|
||||
color: var(--ant-color-text-tertiary);
|
||||
}
|
||||
|
||||
.fx-ai-chat {
|
||||
background: linear-gradient(135deg, #805ad5, #6b46c1);
|
||||
}
|
||||
|
||||
.fx-ai-vision {
|
||||
background: linear-gradient(135deg, #4c6ef5, #4263eb);
|
||||
}
|
||||
|
||||
.fx-ai-embedding {
|
||||
background: linear-gradient(135deg, #f7b733, #fc4a1a);
|
||||
}
|
||||
|
||||
.fx-ai-rerank {
|
||||
background: linear-gradient(135deg, #0ea5e9, #0284c7);
|
||||
}
|
||||
|
||||
.fx-ai-voice {
|
||||
background: linear-gradient(135deg, #f97316, #ea580c);
|
||||
}
|
||||
|
||||
.fx-ai-tools {
|
||||
background: linear-gradient(135deg, #ec4899, #db2777);
|
||||
}
|
||||
Reference in New Issue
Block a user