From 494771799a70602800fb2987bdcee61db4ac3999 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Fri, 24 Apr 2026 19:26:28 +0800 Subject: [PATCH] style: update font families and improve responsive design across components --- dashboard/index.html | 2 +- .../components/chat/ProviderConfigDialog.vue | 30 +++ .../provider/ProviderChatCompletionPanel.vue | 64 ++++++ .../provider/ProviderModelsPanel.vue | 56 +++++ .../provider/ProviderSourcesPanel.vue | 202 +++++++++++++++--- .../components/shared/ProviderSelector.vue | 45 ++++ dashboard/src/scss/_variables.scss | 2 +- dashboard/src/scss/layout/_container.scss | 8 - dashboard/src/stores/customizer.ts | 2 +- dashboard/src/views/ProviderPage.vue | 59 ++++- 10 files changed, 426 insertions(+), 44 deletions(-) diff --git a/dashboard/index.html b/dashboard/index.html index 771f72aff..5ffa2c117 100644 --- a/dashboard/index.html +++ b/dashboard/index.html @@ -9,7 +9,7 @@ diff --git a/dashboard/src/components/chat/ProviderConfigDialog.vue b/dashboard/src/components/chat/ProviderConfigDialog.vue index 90c3c7c2c..308d181b4 100644 --- a/dashboard/src/components/chat/ProviderConfigDialog.vue +++ b/dashboard/src/components/chat/ProviderConfigDialog.vue @@ -65,4 +65,34 @@ const dialog = computed({ max-height: 70dvh; margin: 0; } + +@media (max-width: 960px) { + .provider-config-dialog { + border-radius: 20px; + } + + :deep(.v-overlay__content) { + width: calc(100dvw - 24px); + height: calc(100dvh - 24px); + max-width: calc(100dvw - 24px); + max-height: calc(100dvh - 24px); + } +} + +@media (max-width: 600px) { + .provider-config-dialog { + border-radius: 0; + } + + .provider-config-dialog__body { + overflow: auto; + } + + :deep(.v-overlay__content) { + width: 100dvw; + height: 100dvh; + max-width: 100dvw; + max-height: 100dvh; + } +} diff --git a/dashboard/src/components/provider/ProviderChatCompletionPanel.vue b/dashboard/src/components/provider/ProviderChatCompletionPanel.vue index ebb60b90e..71d053f42 100644 --- a/dashboard/src/components/provider/ProviderChatCompletionPanel.vue +++ b/dashboard/src/components/provider/ProviderChatCompletionPanel.vue @@ -429,4 +429,68 @@ async function saveEditedProvider() { justify-content: center; color: rgba(var(--v-theme-on-surface), 0.56); } + +@media (max-width: 960px) { + .provider-workbench { + grid-template-columns: 1fr; + grid-template-rows: auto 1px minmax(0, 1fr); + } + + .provider-workbench__sidebar, + .provider-workbench__main, + .provider-workbench__divider { + height: auto; + } + + .provider-workbench__divider { + min-height: 1px; + } + + .provider-config-header { + align-items: stretch; + flex-direction: column; + gap: 12px; + padding: 16px; + } + + .provider-config-actions :deep(.v-btn) { + width: 100%; + } + + .provider-section { + padding: 16px; + } +} + +@media (max-width: 600px) { + .provider-chat-panel { + overflow: auto; + } + + .provider-workbench { + border-radius: 16px; + overflow: visible; + } + + .provider-workbench--borderless { + border-radius: 0; + } + + .provider-workbench__main { + overflow: visible; + } + + .provider-config-body { + overflow-y: visible; + } + + .provider-config-title { + font-size: 18px; + } + + .provider-empty-state { + min-height: 260px; + padding: 24px; + } +} diff --git a/dashboard/src/components/provider/ProviderModelsPanel.vue b/dashboard/src/components/provider/ProviderModelsPanel.vue index f7bf9aa72..3e787f059 100644 --- a/dashboard/src/components/provider/ProviderModelsPanel.vue +++ b/dashboard/src/components/provider/ProviderModelsPanel.vue @@ -311,6 +311,11 @@ const isProviderTesting = (providerId) => props.testingProviders.includes(provid line-height: 1.3; } +.provider-models-title-wrap { + min-width: 0; + flex-shrink: 0; +} + .provider-models-subtitle { display: block; margin-top: 6px; @@ -468,4 +473,55 @@ const isProviderTesting = (providerId) => props.testingProviders.includes(provid .provider-models-empty--small { min-height: 120px; } + +@media (max-width: 760px) { + .provider-models-toolbar { + align-items: stretch; + flex-direction: column; + } + + .provider-models-title-wrap { + flex-shrink: 1; + } + + .provider-models-toolbar__actions { + align-items: stretch; + justify-content: stretch; + flex-wrap: wrap; + } + + .provider-models-search { + flex: 1 1 100%; + min-width: 0; + max-width: none; + } + + .provider-models-toolbar__actions :deep(.v-btn) { + flex: 1 1 160px; + min-width: 0; + } + + .provider-models-toolbar__actions :deep(.v-btn__content) { + white-space: normal; + } +} + +@media (max-width: 600px) { + .provider-models-panel { + gap: 14px; + } + + .provider-model-row { + align-items: stretch; + flex-direction: column; + gap: 10px; + padding: 14px 0; + } + + .provider-model-row__actions { + align-self: flex-end; + flex-wrap: wrap; + justify-content: flex-end; + } +} diff --git a/dashboard/src/components/provider/ProviderSourcesPanel.vue b/dashboard/src/components/provider/ProviderSourcesPanel.vue index b8bb63c00..abf43ca6e 100644 --- a/dashboard/src/components/provider/ProviderSourcesPanel.vue +++ b/dashboard/src/components/provider/ProviderSourcesPanel.vue @@ -5,40 +5,91 @@

{{ tm('providerSources.title') }}

- - - - +
+ -