diff --git a/frontend/src/assets/img/datasource-rss.svg b/frontend/src/assets/img/datasource-rss.svg new file mode 100644 index 00000000..31bf206d --- /dev/null +++ b/frontend/src/assets/img/datasource-rss.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/frontend/src/components/settings/SettingDrawer.vue b/frontend/src/components/settings/SettingDrawer.vue index 0948711a..c0e59385 100644 --- a/frontend/src/components/settings/SettingDrawer.vue +++ b/frontend/src/components/settings/SettingDrawer.vue @@ -7,9 +7,9 @@
- + :class="drawerClass"> -
+ +
- - {{ t('credential.unconfigured') }} -
- - {{ t('credential.configure') }} - +
+ + {{ t('credential.unconfigured') }} +
+ + {{ t('credential.configure') }} + +
-
+ +
+
@@ -1280,7 +1419,7 @@ const drawerConfirmText = computed(() => { @import './datasource-surface.less'; .ds-steps { display: flex; - gap: 4px; + gap: 8px; margin-bottom: 20px; border-bottom: 1px solid var(--td-component-stroke); padding-bottom: 14px; @@ -1289,22 +1428,32 @@ const drawerConfirmText = computed(() => { .ds-step { display: flex; align-items: center; - gap: 6px; + gap: 8px; flex: 1; + min-width: 0; font-size: 13px; color: var(--td-text-color-placeholder); } +.ds-step-title { + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + .ds-step.active { color: var(--td-brand-color); - font-weight: 600; + font-weight: 500; } .ds-step.done { color: var(--td-text-color-secondary); + font-weight: 500; } .ds-step-num { + flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; @@ -1312,7 +1461,10 @@ const drawerConfirmText = computed(() => { align-items: center; justify-content: center; font-size: 12px; - border: 1px solid currentColor; + font-weight: 600; + border: 1px solid var(--td-component-stroke); + color: var(--td-text-color-placeholder); + background: transparent; } .ds-step.active .ds-step-num { @@ -1322,9 +1474,13 @@ const drawerConfirmText = computed(() => { } .ds-step.done .ds-step-num { - background: var(--td-bg-color-secondarycontainer); - color: var(--td-success-color); - border-color: color-mix(in srgb, var(--td-success-color) 35%, var(--td-component-stroke)); + background: color-mix(in srgb, var(--td-brand-color) 12%, transparent); + color: var(--td-brand-color); + border-color: transparent; +} + +.ds-step-check { + font-size: 14px; } .ds-loading-center { @@ -1422,6 +1578,10 @@ const drawerConfirmText = computed(() => { gap: 4px; } +.ds-setup-guide--standalone { + margin-bottom: 4px; +} + .ds-setup-guide__toggle { display: flex; align-items: center; @@ -1594,25 +1754,6 @@ const drawerConfirmText = computed(() => { margin: 0 2px; } -.credential-edit { - display: flex; - flex-direction: column; - gap: 10px; -} - -.credential-field { - display: flex; - flex-direction: column; - gap: 6px; -} - -.credential-field-label { - font-size: 13px; - font-weight: 500; - color: var(--td-text-color-primary); - line-height: 1.4; -} - .credential-edit-actions { display: flex; justify-content: flex-end; @@ -1625,7 +1766,7 @@ const drawerConfirmText = computed(() => { } .form-item { - margin-bottom: 16px; + margin-bottom: 0; } .form-item--flat { @@ -1644,11 +1785,15 @@ const drawerConfirmText = computed(() => { font-weight: 500; margin-bottom: 6px; color: var(--td-text-color-primary); -} + line-height: 1.4; -.required-mark { - color: var(--td-error-color); - margin-left: 2px; + &.required::before { + content: '*'; + color: var(--td-error-color); + margin-right: 4px; + font-weight: 500; + line-height: 1; + } } .form-desc { @@ -1936,6 +2081,55 @@ const drawerConfirmText = computed(() => { gap: 16px; } +.custom-headers-header { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 6px; +} + +.custom-headers-desc { + margin: 0 0 10px 0; + font-size: 12px; + line-height: 1.5; + color: var(--td-text-color-placeholder); +} + +.custom-headers-list { + display: flex; + flex-direction: column; + gap: 8px; +} + +.custom-header-row { + display: flex; + align-items: center; + gap: 8px; + + .custom-header-key { + flex: 0 0 38%; + } + + .custom-header-value { + flex: 1; + } + + .custom-header-remove { + flex-shrink: 0; + width: 32px; + height: 32px; + padding: 0; + color: var(--td-text-color-placeholder); + border-radius: 6px; + transition: all 0.18s ease; + + &:hover { + background: var(--td-error-color-light); + color: var(--td-error-color); + } + } +} + .ds-empty-retry { padding: 0; border: none; @@ -2001,3 +2195,20 @@ const drawerConfirmText = computed(() => { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); } + + + diff --git a/frontend/src/views/knowledge/settings/DataSourceSettings.vue b/frontend/src/views/knowledge/settings/DataSourceSettings.vue index 20ad768d..ca727c34 100644 --- a/frontend/src/views/knowledge/settings/DataSourceSettings.vue +++ b/frontend/src/views/knowledge/settings/DataSourceSettings.vue @@ -202,11 +202,11 @@ onBeforeUnmount(stopPolling) v-for="ds in dataSources" :key="ds.id" :type="canManageDataSource ? 'button' : undefined" - :class="['ds-card', { 'ds-card--clickable': canManageDataSource }]" + :class="['ds-card', `ds-card--${ds.type}`, { 'ds-card--clickable': canManageDataSource }]" @click="canManageDataSource ? openEdit(ds) : undefined" >
- +
@@ -452,10 +452,23 @@ onBeforeUnmount(stopPolling) display: flex; align-items: center; justify-content: center; - background: color-mix(in srgb, var(--td-brand-color) 10%, transparent); + margin-top: 1px; + font-size: 15px; + font-weight: 600; + letter-spacing: 0.02em; + background: rgba(7, 192, 95, 0.12); + color: #07c05f; overflow: hidden; } + &--feishu .ds-card__badge, + &--notion .ds-card__badge, + &--yuque .ds-card__badge, + &--rss .ds-card__badge { + background: var(--td-bg-color-container, #fff); + box-shadow: inset 0 0 0 1px var(--td-component-stroke); + } + &__body { flex: 1; min-width: 0; diff --git a/frontend/src/views/knowledge/settings/DataSourceTypeIcon.vue b/frontend/src/views/knowledge/settings/DataSourceTypeIcon.vue index 215d674d..0a18c175 100644 --- a/frontend/src/views/knowledge/settings/DataSourceTypeIcon.vue +++ b/frontend/src/views/knowledge/settings/DataSourceTypeIcon.vue @@ -1,20 +1,17 @@