refactor: Simplify UI styles and remove unused theme management
- Removed theme initialization and management from the UI store. - Cleaned up CSS styles across multiple components, replacing CSS variables with fixed color values for consistency. - Updated background colors and text colors to enhance UI clarity and responsiveness. - Streamlined component styles to improve maintainability and readability.
This commit is contained in:
+1
-108
@@ -1,13 +1,4 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted } from 'vue'
|
||||
import { useUIStore } from '@/stores/ui'
|
||||
|
||||
const uiStore = useUIStore()
|
||||
|
||||
// 在应用启动时初始化主题
|
||||
onMounted(() => {
|
||||
uiStore.initTheme()
|
||||
})
|
||||
</script>
|
||||
<template>
|
||||
<div id="app">
|
||||
@@ -27,104 +18,6 @@ html,
|
||||
Microsoft YaHei, SimSun, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
background: var(--td-bg-color-page);
|
||||
}
|
||||
|
||||
/* 暗色模式下的TDesign组件样式增强 */
|
||||
:root[theme-mode="dark"] {
|
||||
/* 表格表头 */
|
||||
.t-table thead th {
|
||||
color: var(--td-text-color-primary) !important;
|
||||
background-color: var(--td-bg-color-container) !important;
|
||||
font-weight: 600 !important;
|
||||
}
|
||||
|
||||
/* 表格内容 */
|
||||
.t-table tbody td {
|
||||
color: var(--td-text-color-primary) !important;
|
||||
background-color: var(--td-bg-color-container) !important;
|
||||
}
|
||||
|
||||
/* 表格行hover效果 */
|
||||
.t-table tbody tr:hover td {
|
||||
background-color: var(--td-bg-color-container-hover) !important;
|
||||
}
|
||||
|
||||
/* 表格边框 */
|
||||
.t-table,
|
||||
.t-table th,
|
||||
.t-table td {
|
||||
border-color: var(--td-component-border) !important;
|
||||
}
|
||||
|
||||
/* 滑块标记文字 */
|
||||
.t-slider__mark-text {
|
||||
color: var(--td-text-color-primary) !important;
|
||||
font-weight: 500 !important;
|
||||
}
|
||||
|
||||
/* 滑块刻度 */
|
||||
.t-slider__stops .t-slider__stop {
|
||||
background-color: var(--td-text-color-placeholder) !important;
|
||||
}
|
||||
|
||||
/* 对话框 */
|
||||
.t-dialog {
|
||||
background: var(--td-bg-color-container) !important;
|
||||
color: var(--td-text-color-primary) !important;
|
||||
}
|
||||
|
||||
.t-dialog__header {
|
||||
color: var(--td-text-color-primary) !important;
|
||||
border-bottom-color: var(--td-component-border) !important;
|
||||
}
|
||||
|
||||
.t-dialog__body {
|
||||
color: var(--td-text-color-primary) !important;
|
||||
}
|
||||
|
||||
/* 表单标签 */
|
||||
.t-form__label {
|
||||
color: var(--td-text-color-primary) !important;
|
||||
font-weight: 500 !important;
|
||||
}
|
||||
|
||||
/* 输入框 */
|
||||
.t-input,
|
||||
.t-textarea {
|
||||
background-color: var(--td-bg-color-component) !important;
|
||||
color: var(--td-text-color-primary) !important;
|
||||
border-color: var(--td-component-border) !important;
|
||||
}
|
||||
|
||||
.t-input::placeholder,
|
||||
.t-textarea::placeholder {
|
||||
color: var(--td-text-color-placeholder) !important;
|
||||
}
|
||||
|
||||
/* 下拉选择器 */
|
||||
.t-select-input {
|
||||
background-color: var(--td-bg-color-component) !important;
|
||||
color: var(--td-text-color-primary) !important;
|
||||
border-color: var(--td-component-border) !important;
|
||||
}
|
||||
|
||||
.t-select__placeholder {
|
||||
color: var(--td-text-color-placeholder) !important;
|
||||
}
|
||||
|
||||
/* 开关组件 */
|
||||
.t-switch__label {
|
||||
color: var(--td-text-color-primary) !important;
|
||||
}
|
||||
|
||||
/* 标签页 */
|
||||
.t-tabs__nav-item {
|
||||
color: var(--td-text-color-secondary) !important;
|
||||
}
|
||||
|
||||
.t-tabs__nav-item.t-is-active {
|
||||
color: var(--td-brand-color) !important;
|
||||
}
|
||||
background: #f8f9fa;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -219,24 +219,24 @@ const getImgSrc = (url: string) => {
|
||||
max-height: 250px !important;
|
||||
min-height: 112px !important;
|
||||
resize: none;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #000000e6;
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
line-height: 24px;
|
||||
font-family: "PingFang SC";
|
||||
padding: 16px 12px 52px 16px; /* 增加底部padding为控制栏腾出空间 */
|
||||
border-radius: 12px;
|
||||
border: 1px solid var(--td-component-border);
|
||||
border: 1px solid #E7E7E7;
|
||||
box-sizing: border-box;
|
||||
background: var(--td-bg-color-container);
|
||||
box-shadow: var(--td-shadow-1);
|
||||
background: #FFF;
|
||||
box-shadow: 0 6px 6px 0 #0000000a, 0 12px 12px -1px #00000014;
|
||||
|
||||
&:focus {
|
||||
border: 1px solid var(--td-brand-color);
|
||||
border: 1px solid #07C05F;
|
||||
}
|
||||
|
||||
&::placeholder {
|
||||
color: var(--td-text-color-placeholder);
|
||||
color: #00000066;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
@@ -271,14 +271,14 @@ const getImgSrc = (url: string) => {
|
||||
gap: 4px;
|
||||
padding: 6px 10px;
|
||||
border-radius: 6px;
|
||||
background: var(--td-bg-color-component);
|
||||
background: #f5f5f5;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
user-select: none;
|
||||
flex-shrink: 0;
|
||||
|
||||
&:hover {
|
||||
background: var(--td-bg-color-component-hover);
|
||||
background: #e6e6e6;
|
||||
transform: scale(1.02);
|
||||
}
|
||||
|
||||
@@ -291,7 +291,7 @@ const getImgSrc = (url: string) => {
|
||||
cursor: not-allowed;
|
||||
|
||||
&:hover {
|
||||
background: var(--td-bg-color-component);
|
||||
background: #f5f5f5;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
@@ -303,10 +303,10 @@ const getImgSrc = (url: string) => {
|
||||
padding: 0;
|
||||
|
||||
&.active {
|
||||
background: var(--td-brand-color-light);
|
||||
background: rgba(7, 192, 95, 0.1);
|
||||
|
||||
&:hover {
|
||||
background: var(--td-brand-color-focus);
|
||||
background: rgba(7, 192, 95, 0.15);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -323,24 +323,24 @@ const getImgSrc = (url: string) => {
|
||||
min-width: auto;
|
||||
|
||||
&.active {
|
||||
background: var(--td-brand-color-light);
|
||||
color: var(--td-brand-color);
|
||||
background: rgba(7, 192, 95, 0.1);
|
||||
color: #07C05F;
|
||||
|
||||
&:hover {
|
||||
background: var(--td-brand-color-focus);
|
||||
background: rgba(7, 192, 95, 0.15);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.kb-btn-text {
|
||||
font-size: 13px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666;
|
||||
font-weight: 500;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.kb-btn.active .kb-btn-text {
|
||||
color: var(--td-brand-color);
|
||||
color: #07C05F;
|
||||
}
|
||||
|
||||
.dropdown-arrow {
|
||||
@@ -372,16 +372,16 @@ const getImgSrc = (url: string) => {
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 4px 8px;
|
||||
background: var(--td-brand-color-light);
|
||||
border: 1px solid var(--td-brand-color-3);
|
||||
background: rgba(7, 192, 95, 0.1);
|
||||
border: 1px solid rgba(7, 192, 95, 0.3);
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
color: var(--td-brand-color);
|
||||
color: #07C05F;
|
||||
white-space: nowrap;
|
||||
transition: all 0.15s ease;
|
||||
|
||||
&:hover {
|
||||
background: var(--td-brand-color-focus);
|
||||
background: rgba(7, 192, 95, 0.15);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -404,12 +404,12 @@ const getImgSrc = (url: string) => {
|
||||
}
|
||||
|
||||
.more-tag {
|
||||
background: var(--td-bg-color-component);
|
||||
border-color: var(--td-component-border);
|
||||
color: var(--td-text-color-secondary);
|
||||
background: rgba(0, 0, 0, 0.05);
|
||||
border-color: rgba(0, 0, 0, 0.1);
|
||||
color: #666;
|
||||
|
||||
&:hover {
|
||||
background: var(--td-bg-color-component-hover);
|
||||
background: rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -417,15 +417,15 @@ const getImgSrc = (url: string) => {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
padding: 0;
|
||||
background-color: var(--td-brand-color);
|
||||
background-color: #07C05F;
|
||||
|
||||
&:hover:not(.disabled) {
|
||||
background-color: var(--td-brand-color-hover);
|
||||
background-color: #00a651;
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
background-color: var(--td-brand-color-disabled);
|
||||
background-color: #b5eccf;
|
||||
}
|
||||
|
||||
img {
|
||||
|
||||
@@ -161,7 +161,7 @@ onUnmounted(() => {
|
||||
background: transparent;
|
||||
|
||||
&:hover {
|
||||
background: var(--td-bg-color-component-hover);
|
||||
background: #f5f7fa;
|
||||
}
|
||||
|
||||
&:active {
|
||||
@@ -175,7 +175,7 @@ onUnmounted(() => {
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
flex-shrink: 0;
|
||||
background: linear-gradient(135deg, var(--td-brand-color) 0%, var(--td-brand-color-active) 100%);
|
||||
background: linear-gradient(135deg, #07C05F 0%, #05A34E 100%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -187,7 +187,7 @@ onUnmounted(() => {
|
||||
}
|
||||
|
||||
.avatar-placeholder {
|
||||
color: var(--td-text-color-anti);
|
||||
color: #ffffff;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
@@ -201,7 +201,7 @@ onUnmounted(() => {
|
||||
.user-name {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@@ -209,7 +209,7 @@ onUnmounted(() => {
|
||||
|
||||
.user-email {
|
||||
font-size: 12px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@@ -218,7 +218,7 @@ onUnmounted(() => {
|
||||
|
||||
.dropdown-icon {
|
||||
font-size: 16px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
flex-shrink: 0;
|
||||
transition: transform 0.2s;
|
||||
}
|
||||
@@ -229,10 +229,10 @@ onUnmounted(() => {
|
||||
left: 8px;
|
||||
right: 8px;
|
||||
margin-bottom: 8px;
|
||||
background: var(--td-bg-color-container);
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
box-shadow: var(--td-shadow-2);
|
||||
border: 1px solid var(--td-component-border);
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
|
||||
border: 1px solid #e5e7eb;
|
||||
overflow: hidden;
|
||||
z-index: 1000;
|
||||
}
|
||||
@@ -245,33 +245,33 @@ onUnmounted(() => {
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
font-size: 14px;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
|
||||
&:hover {
|
||||
background: var(--td-bg-color-component-hover);
|
||||
background: #f5f7fa;
|
||||
}
|
||||
|
||||
&.danger {
|
||||
color: var(--td-error-color);
|
||||
color: #e34d59;
|
||||
|
||||
&:hover {
|
||||
background: var(--td-error-color-light);
|
||||
background: #fef0f0;
|
||||
}
|
||||
|
||||
.menu-icon {
|
||||
color: var(--td-error-color);
|
||||
color: #e34d59;
|
||||
}
|
||||
}
|
||||
|
||||
.menu-icon {
|
||||
font-size: 16px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.menu-divider {
|
||||
height: 1px;
|
||||
background: var(--td-component-border);
|
||||
background: #e5e7eb;
|
||||
margin: 4px 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -554,14 +554,14 @@ watch(() => route.params.kbId, () => {
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.del_submenu {
|
||||
color: var(--td-error-color);
|
||||
color: #fa5151;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.aside_box {
|
||||
min-width: 260px;
|
||||
padding: 8px;
|
||||
background: var(--td-bg-color-container);
|
||||
background: #fff;
|
||||
box-sizing: border-box;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
@@ -585,19 +585,10 @@ watch(() => route.params.kbId, () => {
|
||||
height: 30px;
|
||||
margin-right: 7.25px;
|
||||
}
|
||||
|
||||
/* 暗色模式下的Logo滤镜 */
|
||||
:root[theme-mode="dark"] .logo {
|
||||
filter: brightness(0) invert(1);
|
||||
}
|
||||
|
||||
:root[theme-mode="dark"] .logo_img {
|
||||
filter: brightness(0) invert(1);
|
||||
}
|
||||
|
||||
.logo_txt {
|
||||
transform: rotate(0.049deg);
|
||||
color: var(--td-text-color-primary);
|
||||
color: #000000;
|
||||
font-family: "TencentSans";
|
||||
font-size: 24.12px;
|
||||
font-style: normal;
|
||||
@@ -639,28 +630,28 @@ watch(() => route.params.kbId, () => {
|
||||
}
|
||||
|
||||
.upload-file-wrap:hover {
|
||||
background-color: var(--td-brand-color-light);
|
||||
color: var(--td-brand-color);
|
||||
background-color: #dbede4;
|
||||
color: #07C05F;
|
||||
|
||||
}
|
||||
|
||||
.upload-file-icon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
.active-upload {
|
||||
color: var(--td-brand-color);
|
||||
color: #07C05F;
|
||||
}
|
||||
|
||||
.menu_item_active {
|
||||
border-radius: 4px;
|
||||
background: var(--td-brand-color-light) !important;
|
||||
background: #07c05f1a !important;
|
||||
|
||||
.menu_icon,
|
||||
.menu_title {
|
||||
color: var(--td-brand-color) !important;
|
||||
color: #07c05f !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -668,7 +659,7 @@ watch(() => route.params.kbId, () => {
|
||||
|
||||
.menu_icon,
|
||||
.menu_title {
|
||||
color: var(--td-text-color-primary);
|
||||
color: #000000e6;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -695,12 +686,12 @@ watch(() => route.params.kbId, () => {
|
||||
|
||||
&:hover {
|
||||
border-radius: 4px;
|
||||
background: var(--td-bg-color-container-hover);
|
||||
color: var(--td-text-color-secondary);
|
||||
background: #30323605;
|
||||
color: #00000099;
|
||||
|
||||
.menu_icon,
|
||||
.menu_title {
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #00000099;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -708,7 +699,7 @@ watch(() => route.params.kbId, () => {
|
||||
.menu_icon {
|
||||
display: flex;
|
||||
margin-right: 10px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #00000099;
|
||||
|
||||
.icon {
|
||||
width: 20px;
|
||||
@@ -719,7 +710,7 @@ watch(() => route.params.kbId, () => {
|
||||
}
|
||||
|
||||
.menu_title {
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #00000099;
|
||||
text-overflow: ellipsis;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 14px;
|
||||
@@ -754,7 +745,7 @@ watch(() => route.params.kbId, () => {
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #00000099;
|
||||
font-weight: 400;
|
||||
line-height: 22px;
|
||||
height: 36px;
|
||||
@@ -775,14 +766,14 @@ watch(() => route.params.kbId, () => {
|
||||
.menu-more {
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
color: var(--td-brand-color);
|
||||
color: #07C05F;
|
||||
}
|
||||
|
||||
.dot {
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
border-radius: 50%;
|
||||
background: var(--td-brand-color);
|
||||
background: #07C05F;
|
||||
}
|
||||
|
||||
.sub_title {
|
||||
@@ -790,12 +781,12 @@ watch(() => route.params.kbId, () => {
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: var(--td-bg-color-container-hover);
|
||||
color: var(--td-text-color-secondary);
|
||||
background: #30323605;
|
||||
color: #00000099;
|
||||
border-radius: 3px;
|
||||
|
||||
.menu-more {
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #00000099;
|
||||
}
|
||||
|
||||
.submenu_title {
|
||||
@@ -806,12 +797,12 @@ watch(() => route.params.kbId, () => {
|
||||
}
|
||||
|
||||
.submenu_item_active {
|
||||
background: var(--td-brand-color-light) !important;
|
||||
color: var(--td-brand-color) !important;
|
||||
background: #07c05f1a !important;
|
||||
color: #07c05f !important;
|
||||
border-radius: 3px;
|
||||
|
||||
.menu-more {
|
||||
color: var(--td-brand-color) !important;
|
||||
color: #07c05f !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -819,7 +810,7 @@ watch(() => route.params.kbId, () => {
|
||||
/* 知识库下拉菜单样式 */
|
||||
.kb-dropdown-icon {
|
||||
margin-left: auto;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666;
|
||||
transition: transform 0.3s ease, color 0.2s ease;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
@@ -833,15 +824,15 @@ watch(() => route.params.kbId, () => {
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: var(--td-brand-color);
|
||||
color: #07c05f;
|
||||
}
|
||||
|
||||
&.active {
|
||||
color: var(--td-brand-color);
|
||||
color: #07c05f;
|
||||
}
|
||||
|
||||
&.active:hover {
|
||||
color: var(--td-brand-color-hover);
|
||||
color: #05a04f;
|
||||
}
|
||||
|
||||
svg {
|
||||
@@ -856,10 +847,10 @@ watch(() => route.params.kbId, () => {
|
||||
top: 100%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: var(--td-bg-color-container);
|
||||
border: 1px solid var(--td-component-border);
|
||||
background: #fff;
|
||||
border: 1px solid #e5e7eb;
|
||||
border-radius: 6px;
|
||||
box-shadow: var(--td-shadow-2);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||||
z-index: 1000;
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
@@ -870,15 +861,15 @@ watch(() => route.params.kbId, () => {
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s ease;
|
||||
font-size: 14px;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--td-bg-color-container-hover);
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background-color: var(--td-brand-color-light);
|
||||
color: var(--td-brand-color);
|
||||
background-color: #07c05f1a;
|
||||
color: #07c05f;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
@@ -904,15 +895,15 @@ watch(() => route.params.kbId, () => {
|
||||
</style>
|
||||
<style lang="less">
|
||||
.upload-popup {
|
||||
background-color: var(--td-gray-color-13);
|
||||
color: var(--td-text-color-anti);
|
||||
border-color: var(--td-gray-color-13) !important;
|
||||
background-color: rgba(0, 0, 0, 0.9);
|
||||
color: #FFFFFF;
|
||||
border-color: rgba(0, 0, 0, 0.9) !important;
|
||||
box-shadow: none;
|
||||
margin-bottom: 10px !important;
|
||||
|
||||
.t-popup__arrow::before {
|
||||
border-color: var(--td-gray-color-13) !important;
|
||||
background-color: var(--td-gray-color-13) !important;
|
||||
border-color: rgba(0, 0, 0, 0.9) !important;
|
||||
background-color: rgba(0, 0, 0, 0.9) !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
}
|
||||
@@ -934,22 +925,22 @@ watch(() => route.params.kbId, () => {
|
||||
// 退出登录确认框样式
|
||||
:deep(.t-popconfirm) {
|
||||
.t-popconfirm__content {
|
||||
background: var(--td-bg-color-container);
|
||||
border: 1px solid var(--td-component-border);
|
||||
background: #fff;
|
||||
border: 1px solid #e7e7e7;
|
||||
border-radius: 6px;
|
||||
box-shadow: var(--td-shadow-2);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||
padding: 12px 16px;
|
||||
font-size: 14px;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333;
|
||||
max-width: 200px;
|
||||
}
|
||||
|
||||
.t-popconfirm__arrow {
|
||||
border-bottom-color: var(--td-component-border);
|
||||
border-bottom-color: #e7e7e7;
|
||||
}
|
||||
|
||||
.t-popconfirm__arrow::after {
|
||||
border-bottom-color: var(--td-bg-color-container);
|
||||
border-bottom-color: #fff;
|
||||
}
|
||||
|
||||
.t-popconfirm__buttons {
|
||||
@@ -960,18 +951,18 @@ watch(() => route.params.kbId, () => {
|
||||
}
|
||||
|
||||
.t-button--variant-outline {
|
||||
border-color: var(--td-component-border);
|
||||
color: var(--td-text-color-secondary);
|
||||
border-color: #d9d9d9;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.t-button--theme-danger {
|
||||
background-color: var(--td-error-color);
|
||||
border-color: var(--td-error-color);
|
||||
background-color: #ff4d4f;
|
||||
border-color: #ff4d4f;
|
||||
}
|
||||
|
||||
.t-button--theme-danger:hover {
|
||||
background-color: var(--td-error-color-hover);
|
||||
border-color: var(--td-error-color-hover);
|
||||
background-color: #ff7875;
|
||||
border-color: #ff7875;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,15 +1,12 @@
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
type Theme = 'light' | 'dark'
|
||||
|
||||
export const useUIStore = defineStore('ui', {
|
||||
state: () => ({
|
||||
showSettingsModal: false,
|
||||
showKBSettingsModal: false,
|
||||
currentKBId: null as string | null,
|
||||
settingsInitialSection: null as string | null,
|
||||
settingsInitialSubSection: null as string | null,
|
||||
theme: 'light' as Theme
|
||||
settingsInitialSubSection: null as string | null
|
||||
}),
|
||||
|
||||
actions: {
|
||||
@@ -37,57 +34,6 @@ export const useUIStore = defineStore('ui', {
|
||||
closeKBSettings() {
|
||||
this.showKBSettingsModal = false
|
||||
this.currentKBId = null
|
||||
},
|
||||
|
||||
// 初始化主题(从localStorage加载)
|
||||
initTheme() {
|
||||
const savedSettings = localStorage.getItem('WeKnora_general_settings')
|
||||
if (savedSettings) {
|
||||
try {
|
||||
const parsed = JSON.parse(savedSettings)
|
||||
this.theme = parsed.theme || 'light'
|
||||
} catch (e) {
|
||||
console.error('加载主题设置失败:', e)
|
||||
this.theme = 'light'
|
||||
}
|
||||
}
|
||||
this.applyTheme()
|
||||
},
|
||||
|
||||
// 设置主题
|
||||
setTheme(theme: Theme) {
|
||||
this.theme = theme
|
||||
this.applyTheme()
|
||||
this.saveThemeToStorage()
|
||||
},
|
||||
|
||||
// 切换主题
|
||||
toggleTheme() {
|
||||
this.theme = this.theme === 'light' ? 'dark' : 'light'
|
||||
this.applyTheme()
|
||||
this.saveThemeToStorage()
|
||||
},
|
||||
|
||||
// 应用主题到DOM
|
||||
applyTheme() {
|
||||
document.documentElement.setAttribute('theme-mode', this.theme)
|
||||
},
|
||||
|
||||
// 保存主题到localStorage
|
||||
saveThemeToStorage() {
|
||||
const savedSettings = localStorage.getItem('WeKnora_general_settings')
|
||||
let settings = { language: 'zh-CN', theme: this.theme }
|
||||
|
||||
if (savedSettings) {
|
||||
try {
|
||||
const parsed = JSON.parse(savedSettings)
|
||||
settings = { ...parsed, theme: this.theme }
|
||||
} catch (e) {
|
||||
console.error('解析现有设置失败:', e)
|
||||
}
|
||||
}
|
||||
|
||||
localStorage.setItem('WeKnora_general_settings', JSON.stringify(settings))
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -480,7 +480,7 @@ const formatJSON = (obj: any): string => {
|
||||
|
||||
.collapse-text {
|
||||
font-size: 13px;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
font-weight: 500;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
@@ -495,15 +495,15 @@ const formatJSON = (obj: any): string => {
|
||||
animation: fadeInUp 0.3s ease-out;
|
||||
|
||||
.thinking-phase {
|
||||
background: var(--td-bg-color-container);
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
padding: 1px 14px;
|
||||
border-left: 3px solid var(--td-component-border);
|
||||
box-shadow: var(--td-shadow-1);
|
||||
border-left: 3px solid #d1d5db;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
|
||||
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
|
||||
&.thinking-active {
|
||||
border-left-color: var(--td-brand-color);
|
||||
border-left-color: #07c05f;
|
||||
box-shadow: 0 2px 4px rgba(7, 192, 95, 0.08);
|
||||
animation: pulseBorder 2s ease-in-out infinite;
|
||||
}
|
||||
@@ -511,7 +511,7 @@ const formatJSON = (obj: any): string => {
|
||||
|
||||
.thinking-content {
|
||||
font-size: 14px;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
line-height: 1.6;
|
||||
|
||||
&.markdown-content {
|
||||
@@ -551,16 +551,16 @@ const formatJSON = (obj: any): string => {
|
||||
}
|
||||
|
||||
:deep(blockquote) {
|
||||
border-left: 3px solid var(--td-brand-color);
|
||||
border-left: 3px solid #07c05f;
|
||||
padding-left: 12px;
|
||||
margin: 8px 0;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666;
|
||||
}
|
||||
|
||||
:deep(h1), :deep(h2), :deep(h3), :deep(h4), :deep(h5), :deep(h6) {
|
||||
margin: 12px 0 8px 0;
|
||||
font-weight: 600;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333;
|
||||
}
|
||||
|
||||
:deep(a) {
|
||||
@@ -623,9 +623,9 @@ const formatJSON = (obj: any): string => {
|
||||
.tool-summary {
|
||||
padding: 8px 14px;
|
||||
font-size: 13px;
|
||||
color: var(--td-text-color-primary);
|
||||
background: var(--td-bg-color-container);
|
||||
border-top: 1px solid var(--td-component-border);
|
||||
color: #333333;
|
||||
background: #ffffff;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
line-height: 1.6;
|
||||
font-weight: 500;
|
||||
animation: slideIn 0.25s ease-out;
|
||||
@@ -633,11 +633,11 @@ const formatJSON = (obj: any): string => {
|
||||
.tool-summary-markdown {
|
||||
font-weight: 400;
|
||||
line-height: 1.6;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
|
||||
:deep(p) {
|
||||
margin: 4px 0;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
:deep(ul), :deep(ol) {
|
||||
@@ -646,17 +646,17 @@ const formatJSON = (obj: any): string => {
|
||||
}
|
||||
|
||||
:deep(code) {
|
||||
background: var(--td-bg-color-component);
|
||||
background: #f5f5f5;
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
color: var(--td-brand-color);
|
||||
color: #07c05f;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
:deep(strong) {
|
||||
font-weight: 600;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -708,8 +708,8 @@ const formatJSON = (obj: any): string => {
|
||||
}
|
||||
|
||||
&.pending {
|
||||
color: var(--td-text-color-secondary);
|
||||
background: var(--td-bg-color-component);
|
||||
color: #666666;
|
||||
background: rgba(102, 102, 102, 0.1);
|
||||
animation: pulse 1.5s ease-in-out infinite;
|
||||
}
|
||||
}
|
||||
@@ -782,12 +782,12 @@ const formatJSON = (obj: any): string => {
|
||||
.action-name {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.expand-icon {
|
||||
font-size: 12px;
|
||||
color: var(--td-brand-color);
|
||||
color: #07c05f;
|
||||
transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
|
||||
font-weight: 600;
|
||||
opacity: 0.8;
|
||||
@@ -804,8 +804,8 @@ const formatJSON = (obj: any): string => {
|
||||
|
||||
.action-details {
|
||||
padding: 0 12px 12px 12px;
|
||||
border-top: 1px solid var(--td-component-border);
|
||||
background: var(--td-bg-color-container);
|
||||
border-top: 1px solid #e5e7eb;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.detail-row {
|
||||
@@ -818,15 +818,15 @@ const formatJSON = (obj: any): string => {
|
||||
.detail-label {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.detail-value {
|
||||
font-size: 13px;
|
||||
color: var(--td-brand-color);
|
||||
background: var(--td-brand-color-light);
|
||||
color: #07c05f;
|
||||
background: rgba(7, 192, 95, 0.05);
|
||||
padding: 2px 6px;
|
||||
border-radius: 3px;
|
||||
font-family: 'Monaco', 'Courier New', monospace;
|
||||
@@ -835,25 +835,25 @@ const formatJSON = (obj: any): string => {
|
||||
|
||||
.detail-code {
|
||||
font-size: 12px;
|
||||
background: var(--td-bg-color-component);
|
||||
background: #f5f5f5;
|
||||
padding: 8px;
|
||||
border-radius: 4px;
|
||||
font-family: 'Monaco', 'Courier New', monospace;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333;
|
||||
margin: 0;
|
||||
overflow-x: auto;
|
||||
border: 1px solid var(--td-component-border);
|
||||
border: 1px solid #e5e7eb;
|
||||
}
|
||||
|
||||
.detail-output {
|
||||
font-size: 13px;
|
||||
color: var(--td-text-color-primary);
|
||||
background: var(--td-bg-color-component);
|
||||
color: #333;
|
||||
background: #f5f5f5;
|
||||
padding: 8px;
|
||||
border-radius: 4px;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
border: 1px solid var(--td-component-border);
|
||||
border: 1px solid #e5e7eb;
|
||||
}
|
||||
|
||||
.loading-indicator {
|
||||
|
||||
@@ -229,10 +229,10 @@ onMounted(async () => {
|
||||
}
|
||||
|
||||
.img_loading {
|
||||
background: var(--td-bg-color-component);
|
||||
background: #3032360f;
|
||||
height: 230px;
|
||||
width: 230px;
|
||||
color: var(--td-text-color-placeholder);
|
||||
color: #00000042;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
@relevance-low: #757575;
|
||||
@relevance-weak: #bdbdbd;
|
||||
|
||||
// Card colors - use CSS variables for theme support
|
||||
@card-bg: var(--td-bg-color-secondarycontainer);
|
||||
@card-border: var(--td-component-border);
|
||||
@card-hover-border: var(--td-brand-color);
|
||||
// Card colors
|
||||
@card-bg: #f8f9fa;
|
||||
@card-border: #e7e7e7;
|
||||
@card-hover-border: #07c05f;
|
||||
@card-radius: 8px;
|
||||
@card-shadow: var(--td-shadow-1);
|
||||
@card-shadow-hover: var(--td-shadow-2);
|
||||
@card-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
||||
@card-shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||
|
||||
// Animation timing
|
||||
@transition-time: 0.3s;
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
&.weak {
|
||||
background-color: @relevance-weak;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,8 +63,8 @@
|
||||
padding: 2px 6px;
|
||||
border-radius: 3px;
|
||||
font-size: 11px;
|
||||
background-color: var(--td-bg-color-component);
|
||||
color: var(--td-text-color-secondary);
|
||||
background-color: #e7e7e7;
|
||||
color: #666;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
@@ -111,13 +111,13 @@
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 12px;
|
||||
color: var(--td-text-color-placeholder);
|
||||
color: #8b8b8b;
|
||||
}
|
||||
|
||||
.result-content {
|
||||
padding: 0 12px 12px 12px;
|
||||
border-top: 1px solid @card-border;
|
||||
background: var(--td-bg-color-container);
|
||||
background: white;
|
||||
max-height: 0;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
@@ -132,7 +132,7 @@
|
||||
|
||||
.expand-icon {
|
||||
font-size: 12px;
|
||||
color: var(--td-text-color-placeholder);
|
||||
color: #8b8b8b;
|
||||
transition: transform 0.2s ease;
|
||||
|
||||
&.expanded {
|
||||
@@ -152,7 +152,7 @@
|
||||
.info-section-title {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
margin-bottom: 6px;
|
||||
@@ -165,20 +165,20 @@
|
||||
font-size: 13px;
|
||||
|
||||
.field-label {
|
||||
color: var(--td-text-color-placeholder);
|
||||
color: #8b8b8b;
|
||||
min-width: 80px;
|
||||
}
|
||||
|
||||
.field-value {
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Statistics card (for KB counts, etc.)
|
||||
.stats-card {
|
||||
background: var(--td-brand-color-light);
|
||||
border: 1px solid var(--td-brand-color-3);
|
||||
background: #f0f7ff;
|
||||
border: 1px solid #d6e4ff;
|
||||
border-radius: 6px;
|
||||
padding: 10px 12px;
|
||||
margin-bottom: 12px;
|
||||
@@ -187,7 +187,7 @@
|
||||
.stats-title {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
|
||||
.stats-item {
|
||||
font-size: 12px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
@@ -218,7 +218,7 @@
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
padding: 8px 0;
|
||||
border-bottom: 1px solid var(--td-component-border);
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
@@ -228,7 +228,7 @@
|
||||
// Content preview (truncated)
|
||||
.content-preview {
|
||||
font-size: 13px;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333;
|
||||
line-height: 1.5;
|
||||
max-height: 60px;
|
||||
overflow: hidden;
|
||||
@@ -241,12 +241,12 @@
|
||||
// Full content
|
||||
.full-content {
|
||||
font-size: 13px;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333;
|
||||
line-height: 1.6;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
padding: 8px;
|
||||
background: var(--td-bg-color-component);
|
||||
background: #f5f5f5;
|
||||
border-radius: 4px;
|
||||
border: 1px solid @card-border;
|
||||
}
|
||||
@@ -257,8 +257,8 @@
|
||||
font-size: 12px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid @card-border;
|
||||
background: var(--td-bg-color-container);
|
||||
color: var(--td-text-color-secondary);
|
||||
background: white;
|
||||
color: #666;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
|
||||
@@ -272,7 +272,7 @@
|
||||
.empty-state {
|
||||
padding: 24px;
|
||||
text-align: center;
|
||||
color: var(--td-text-color-placeholder);
|
||||
color: #8b8b8b;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@@ -280,7 +280,7 @@
|
||||
.code-block {
|
||||
font-family: 'Monaco', 'Courier New', monospace;
|
||||
font-size: 12px;
|
||||
background: var(--td-bg-color-component);
|
||||
background: #f5f5f5;
|
||||
padding: 8px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid @card-border;
|
||||
|
||||
@@ -26,9 +26,9 @@ const props = defineProps({
|
||||
gap: 4px;
|
||||
flex: 1 0 0;
|
||||
border-radius: 4px;
|
||||
background: var(--td-brand-color-light);
|
||||
background: #8CE97F;
|
||||
margin-left: auto;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #000000e6;
|
||||
font-size: 16px;
|
||||
text-align: justify;
|
||||
word-break: break-all;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="loading"
|
||||
style="height: 41px;display: flex;align-items: center;background: var(--td-bg-color-container);width: 58px;">
|
||||
style="height: 41px;display: flex;align-items: center;background: #fff;width: 58px;">
|
||||
<img class="botanswer_laoding_gif" src="@/assets/img/botanswer_loading.gif" alt="正在等待答案……">
|
||||
</div>
|
||||
</div>
|
||||
@@ -561,8 +561,8 @@ onBeforeRouteUpdate((to, from, next) => {
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 16px;
|
||||
background: var(--td-brand-color-light);
|
||||
border: 1px solid var(--td-brand-color-3);
|
||||
background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
|
||||
border: 1px solid #91d5ff;
|
||||
border-radius: 6px;
|
||||
margin-bottom: 12px;
|
||||
max-width: 800px;
|
||||
@@ -575,7 +575,7 @@ onBeforeRouteUpdate((to, from, next) => {
|
||||
.agent-text {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: var(--td-brand-color);
|
||||
color: #0050b3;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ watch(() => uiStore.showKBSettingsModal, (newVal, oldVal) => {
|
||||
<style scoped lang="less">
|
||||
.kb-list-container {
|
||||
padding: 20px;
|
||||
background: var(--td-bg-color-container);
|
||||
background: #fff;
|
||||
margin: 0 20px 0 20px;
|
||||
height: calc(100vh);
|
||||
overflow-y: auto;
|
||||
@@ -205,7 +205,7 @@ watch(() => uiStore.showKBSettingsModal, (newVal, oldVal) => {
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 16px;
|
||||
h2 { margin: 0; font-size: 20px; font-weight: 600; color: var(--td-text-color-primary); }
|
||||
h2 { margin: 0; font-size: 20px; font-weight: 600; }
|
||||
}
|
||||
|
||||
.warning-banner {
|
||||
@@ -214,14 +214,14 @@ watch(() => uiStore.showKBSettingsModal, (newVal, oldVal) => {
|
||||
gap: 8px;
|
||||
padding: 12px 16px;
|
||||
margin-bottom: 16px;
|
||||
background: var(--td-warning-color-light);
|
||||
border: 1px solid var(--td-warning-color-3);
|
||||
background: #fff7e6;
|
||||
border: 1px solid #ffd591;
|
||||
border-radius: 6px;
|
||||
color: var(--td-warning-color);
|
||||
color: #d46b08;
|
||||
font-size: 14px;
|
||||
|
||||
.t-icon {
|
||||
color: var(--td-warning-color);
|
||||
color: #d46b08;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
@@ -232,21 +232,21 @@ watch(() => uiStore.showKBSettingsModal, (newVal, oldVal) => {
|
||||
gap: 8px;
|
||||
|
||||
.warning-icon {
|
||||
color: var(--td-warning-color);
|
||||
color: #ff8800;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
transition: color 0.2s;
|
||||
|
||||
&:hover {
|
||||
color: var(--td-warning-color-hover);
|
||||
color: #d46b08;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.description-cell {
|
||||
.description-text {
|
||||
color: var(--td-text-color-primary);
|
||||
color: #000000e6;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -464,9 +464,9 @@ onMounted(() => {
|
||||
width: 100%;
|
||||
max-width: 900px;
|
||||
height: 700px;
|
||||
background: var(--td-bg-color-container);
|
||||
background: #ffffff;
|
||||
border-radius: 12px;
|
||||
box-shadow: var(--td-shadow-3);
|
||||
box-shadow: 0 6px 28px rgba(15, 23, 42, 0.08);
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -481,7 +481,7 @@ onMounted(() => {
|
||||
height: 32px;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
cursor: pointer;
|
||||
border-radius: 6px;
|
||||
display: flex;
|
||||
@@ -491,8 +491,8 @@ onMounted(() => {
|
||||
z-index: 10;
|
||||
|
||||
&:hover {
|
||||
background: var(--td-bg-color-container-hover);
|
||||
color: var(--td-text-color-primary);
|
||||
background: #f5f5f5;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -506,8 +506,8 @@ onMounted(() => {
|
||||
/* 左侧导航栏 */
|
||||
.settings-sidebar {
|
||||
width: 220px;
|
||||
background-color: var(--td-bg-color-secondarycontainer);
|
||||
border-right: 1px solid var(--td-component-border);
|
||||
background-color: #f8f9fa;
|
||||
border-right: 1px solid #e5e7eb;
|
||||
flex-shrink: 0;
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
@@ -516,13 +516,13 @@ onMounted(() => {
|
||||
|
||||
.sidebar-header {
|
||||
padding: 24px 16px 16px;
|
||||
border-bottom: 1px solid var(--td-component-border);
|
||||
border-bottom: 1px solid #e5e7eb;
|
||||
}
|
||||
|
||||
.sidebar-title {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@@ -538,19 +538,19 @@ onMounted(() => {
|
||||
margin-bottom: 4px;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
font-size: 14px;
|
||||
transition: all 0.2s ease;
|
||||
user-select: none;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--td-bg-color-container-hover);
|
||||
color: var(--td-text-color-primary);
|
||||
background-color: #e8f5ed;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background-color: var(--td-brand-color-light);
|
||||
color: var(--td-brand-color);
|
||||
background-color: rgba(7, 192, 95, 0.1);
|
||||
color: #07C05F;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
@@ -573,7 +573,7 @@ onMounted(() => {
|
||||
.settings-content {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
background-color: var(--td-bg-color-container);
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
@@ -603,11 +603,11 @@ onMounted(() => {
|
||||
/* 底部保存按钮 */
|
||||
.settings-footer {
|
||||
padding: 16px 48px;
|
||||
border-top: 1px solid var(--td-component-border);
|
||||
border-top: 1px solid #e5e7eb;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 12px;
|
||||
background: var(--td-bg-color-container);
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
/* 弹窗动画 */
|
||||
@@ -640,29 +640,29 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.settings-sidebar::-webkit-scrollbar-track {
|
||||
background: var(--td-bg-color-secondarycontainer);
|
||||
background: #f8f9fa;
|
||||
}
|
||||
|
||||
.settings-sidebar::-webkit-scrollbar-thumb {
|
||||
background: var(--td-bg-color-component);
|
||||
background: #d0d0d0;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.settings-sidebar::-webkit-scrollbar-thumb:hover {
|
||||
background: var(--td-bg-color-component-hover);
|
||||
background: #b0b0b0;
|
||||
}
|
||||
|
||||
.content-wrapper::-webkit-scrollbar-track {
|
||||
background: var(--td-bg-color-container);
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.content-wrapper::-webkit-scrollbar-thumb {
|
||||
background: var(--td-bg-color-component);
|
||||
background: #d0d0d0;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.content-wrapper::-webkit-scrollbar-thumb:hover {
|
||||
background: var(--td-bg-color-component-hover);
|
||||
background: #b0b0b0;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -379,13 +379,13 @@ const handleConfigChange = () => {
|
||||
h2 {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
margin: 0 0 8px 0;
|
||||
}
|
||||
|
||||
.section-description {
|
||||
font-size: 14px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
@@ -402,7 +402,7 @@ const handleConfigChange = () => {
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
padding: 20px 0;
|
||||
border-bottom: 1px solid var(--td-component-border);
|
||||
border-bottom: 1px solid #e5e7eb;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
@@ -417,14 +417,14 @@ const handleConfigChange = () => {
|
||||
label {
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
display: block;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.desc {
|
||||
font-size: 13px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
@@ -441,9 +441,9 @@ const handleConfigChange = () => {
|
||||
.subsection {
|
||||
padding: 16px 20px;
|
||||
margin: 12px 0 0 0;
|
||||
background: var(--td-bg-color-secondarycontainer);
|
||||
background: #f8fafb;
|
||||
border-radius: 8px;
|
||||
border-left: 3px solid var(--td-brand-color);
|
||||
border-left: 3px solid #07C05F;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@@ -457,20 +457,20 @@ const handleConfigChange = () => {
|
||||
h4 {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
margin: 0;
|
||||
padding-left: 8px;
|
||||
border-left: 2px solid var(--td-brand-color);
|
||||
border-left: 2px solid #07C05F;
|
||||
|
||||
.required {
|
||||
color: var(--td-error-color);
|
||||
color: #e34d59;
|
||||
margin-left: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.required {
|
||||
color: var(--td-error-color);
|
||||
color: #e34d59;
|
||||
margin-left: 2px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
@@ -131,13 +131,13 @@ const handleDescriptionChange = () => {
|
||||
h2 {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
margin: 0 0 8px 0;
|
||||
}
|
||||
|
||||
.section-description {
|
||||
font-size: 14px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
@@ -154,7 +154,7 @@ const handleDescriptionChange = () => {
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
padding: 20px 0;
|
||||
border-bottom: 1px solid var(--td-component-border);
|
||||
border-bottom: 1px solid #e5e7eb;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
@@ -169,19 +169,19 @@ const handleDescriptionChange = () => {
|
||||
label {
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
display: block;
|
||||
margin-bottom: 4px;
|
||||
|
||||
.required {
|
||||
color: var(--td-error-color);
|
||||
color: #fa5151;
|
||||
margin-left: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.desc {
|
||||
font-size: 13px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
@@ -149,13 +149,13 @@ const emitUpdate = () => {
|
||||
h2 {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
margin: 0 0 8px 0;
|
||||
}
|
||||
|
||||
.section-description {
|
||||
font-size: 14px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
@@ -172,7 +172,7 @@ const emitUpdate = () => {
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
padding: 20px 0;
|
||||
border-bottom: 1px solid var(--td-component-border);
|
||||
border-bottom: 1px solid #e5e7eb;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
@@ -187,14 +187,14 @@ const emitUpdate = () => {
|
||||
label {
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
display: block;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.desc {
|
||||
font-size: 13px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
@@ -218,7 +218,7 @@ const emitUpdate = () => {
|
||||
|
||||
.value-display {
|
||||
font-size: 14px;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
font-weight: 500;
|
||||
min-width: 80px;
|
||||
text-align: right;
|
||||
|
||||
@@ -150,13 +150,13 @@ const handleAddModel = (subSection: string) => {
|
||||
h2 {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
margin: 0 0 8px 0;
|
||||
}
|
||||
|
||||
.section-description {
|
||||
font-size: 14px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
@@ -173,7 +173,7 @@ const handleAddModel = (subSection: string) => {
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
padding: 20px 0;
|
||||
border-bottom: 1px solid var(--td-component-border);
|
||||
border-bottom: 1px solid #e5e7eb;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
@@ -188,19 +188,19 @@ const handleAddModel = (subSection: string) => {
|
||||
label {
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
display: block;
|
||||
margin-bottom: 4px;
|
||||
|
||||
.required {
|
||||
color: var(--td-error-color);
|
||||
color: #fa5151;
|
||||
margin-left: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.desc {
|
||||
font-size: 13px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
@@ -554,13 +554,13 @@ const handleAllowedToolsChange = async (value: string[]) => {
|
||||
h2 {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
margin: 0 0 8px 0;
|
||||
}
|
||||
|
||||
.section-description {
|
||||
font-size: 14px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
@@ -577,7 +577,7 @@ const handleAllowedToolsChange = async (value: string[]) => {
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
padding: 20px 0;
|
||||
border-bottom: 1px solid var(--td-component-border);
|
||||
border-bottom: 1px solid #e5e7eb;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
@@ -606,14 +606,14 @@ const handleAllowedToolsChange = async (value: string[]) => {
|
||||
label {
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
display: block;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.desc {
|
||||
font-size: 13px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
@@ -637,7 +637,7 @@ const handleAllowedToolsChange = async (value: string[]) => {
|
||||
.value-display {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
min-width: 40px;
|
||||
text-align: right;
|
||||
}
|
||||
@@ -651,12 +651,12 @@ const handleAllowedToolsChange = async (value: string[]) => {
|
||||
|
||||
.model-icon {
|
||||
font-size: 14px;
|
||||
color: var(--td-brand-color);
|
||||
color: #07C05F;
|
||||
}
|
||||
|
||||
.add-icon {
|
||||
font-size: 14px;
|
||||
color: var(--td-brand-color);
|
||||
color: #07C05F;
|
||||
}
|
||||
|
||||
.model-name {
|
||||
@@ -666,7 +666,7 @@ const handleAllowedToolsChange = async (value: string[]) => {
|
||||
|
||||
&.add {
|
||||
.model-name {
|
||||
color: var(--td-brand-color);
|
||||
color: #07C05F;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,11 +48,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, watch } from 'vue'
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { MessagePlugin } from 'tdesign-vue-next'
|
||||
import { useUIStore } from '@/stores/ui'
|
||||
|
||||
const uiStore = useUIStore()
|
||||
|
||||
// 本地状态
|
||||
const localLanguage = ref('zh-CN')
|
||||
@@ -71,13 +68,6 @@ onMounted(() => {
|
||||
console.error('加载常规设置失败:', e)
|
||||
}
|
||||
}
|
||||
// 同步 store 的主题状态
|
||||
localTheme.value = uiStore.theme
|
||||
})
|
||||
|
||||
// 监听 store 的主题变化,同步到本地状态
|
||||
watch(() => uiStore.theme, (newTheme) => {
|
||||
localTheme.value = newTheme
|
||||
})
|
||||
|
||||
// 保存设置到 localStorage
|
||||
@@ -98,8 +88,9 @@ const handleLanguageChange = () => {
|
||||
|
||||
// 处理主题变化
|
||||
const handleThemeChange = () => {
|
||||
uiStore.setTheme(localTheme.value as 'light' | 'dark')
|
||||
saveSettings()
|
||||
MessagePlugin.success('主题设置已保存')
|
||||
// TODO: 实际的主题切换逻辑可后续添加
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -114,13 +105,13 @@ const handleThemeChange = () => {
|
||||
h2 {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
margin: 0 0 8px 0;
|
||||
}
|
||||
|
||||
.section-description {
|
||||
font-size: 14px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
@@ -137,7 +128,7 @@ const handleThemeChange = () => {
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
padding: 20px 0;
|
||||
border-bottom: 1px solid var(--td-component-border);
|
||||
border-bottom: 1px solid #e5e7eb;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
@@ -152,14 +143,14 @@ const handleThemeChange = () => {
|
||||
label {
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
display: block;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.desc {
|
||||
font-size: 13px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
@@ -138,13 +138,13 @@ const handleLanguageDetectionChange = () => {
|
||||
h2 {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
margin: 0 0 8px 0;
|
||||
}
|
||||
|
||||
.section-description {
|
||||
font-size: 14px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
@@ -161,7 +161,7 @@ const handleLanguageDetectionChange = () => {
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
padding: 20px 0;
|
||||
border-bottom: 1px solid var(--td-component-border);
|
||||
border-bottom: 1px solid #e5e7eb;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
@@ -176,14 +176,14 @@ const handleLanguageDetectionChange = () => {
|
||||
label {
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
display: block;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.desc {
|
||||
font-size: 13px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
@@ -207,7 +207,7 @@ const handleLanguageDetectionChange = () => {
|
||||
.value-display {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
min-width: 40px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@@ -466,13 +466,13 @@ onMounted(() => {
|
||||
h2 {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
margin: 0 0 8px 0;
|
||||
}
|
||||
|
||||
.section-description {
|
||||
font-size: 14px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
@@ -480,10 +480,10 @@ onMounted(() => {
|
||||
|
||||
.model-category-section {
|
||||
margin-bottom: 24px;
|
||||
border: 1px solid var(--td-component-border);
|
||||
border: 1px solid #e5e7eb;
|
||||
border-radius: 8px;
|
||||
padding: 24px;
|
||||
background: var(--td-bg-color-container);
|
||||
background: #ffffff;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
@@ -502,13 +502,13 @@ onMounted(() => {
|
||||
h3 {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
margin: 0 0 4px 0;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 14px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
@@ -543,16 +543,16 @@ onMounted(() => {
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 10px 12px;
|
||||
border: 1px solid var(--td-component-border);
|
||||
border: 1px solid #e5e7eb;
|
||||
border-radius: 6px;
|
||||
background: var(--td-bg-color-secondarycontainer);
|
||||
background: #fafafa;
|
||||
transition: all 0.2s;
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
|
||||
&:hover {
|
||||
border-color: var(--td-brand-color);
|
||||
background: var(--td-bg-color-container);
|
||||
border-color: #07C05F;
|
||||
background: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -563,7 +563,7 @@ onMounted(() => {
|
||||
.model-name {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
margin-bottom: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -575,22 +575,22 @@ onMounted(() => {
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
font-size: 12px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
|
||||
.source-tag {
|
||||
padding: 1px 6px;
|
||||
background: var(--td-bg-color-component);
|
||||
background: #e5e7eb;
|
||||
border-radius: 3px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.model-id {
|
||||
font-family: monospace;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.dimension {
|
||||
color: var(--td-text-color-placeholder);
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -606,12 +606,12 @@ onMounted(() => {
|
||||
z-index: 1001; // 确保高于设置窗口的z-index (9999)
|
||||
|
||||
.more-btn {
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
padding: 4px;
|
||||
|
||||
&:hover {
|
||||
background: var(--td-bg-color-component-hover);
|
||||
color: var(--td-text-color-primary);
|
||||
background: #f5f7fa;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -626,7 +626,7 @@ onMounted(() => {
|
||||
|
||||
.empty-text {
|
||||
font-size: 14px;
|
||||
color: var(--td-text-color-placeholder);
|
||||
color: #999999;
|
||||
margin: 0 0 16px 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -393,13 +393,13 @@ onMounted(async () => {
|
||||
h2 {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
margin: 0 0 8px 0;
|
||||
}
|
||||
|
||||
.section-description {
|
||||
font-size: 14px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
@@ -416,7 +416,7 @@ onMounted(async () => {
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
padding: 20px 0;
|
||||
border-bottom: 1px solid var(--td-component-border);
|
||||
border-bottom: 1px solid #e5e7eb;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
@@ -431,14 +431,14 @@ onMounted(async () => {
|
||||
label {
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
display: block;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.desc {
|
||||
font-size: 13px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
@@ -467,11 +467,11 @@ onMounted(async () => {
|
||||
font-size: 18px;
|
||||
|
||||
&.success {
|
||||
color: var(--td-success-color);
|
||||
color: #07C05F;
|
||||
}
|
||||
|
||||
&.error {
|
||||
color: var(--td-error-color);
|
||||
color: #e34d59;
|
||||
}
|
||||
|
||||
&.spinning {
|
||||
@@ -483,10 +483,10 @@ onMounted(async () => {
|
||||
|
||||
.model-category-section {
|
||||
margin-bottom: 24px;
|
||||
border: 1px solid var(--td-component-border);
|
||||
border: 1px solid #e5e7eb;
|
||||
border-radius: 8px;
|
||||
padding: 24px;
|
||||
background: var(--td-bg-color-container);
|
||||
background: #ffffff;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
@@ -505,13 +505,13 @@ onMounted(async () => {
|
||||
h3 {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
margin: 0 0 4px 0;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 14px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
@@ -524,7 +524,7 @@ onMounted(async () => {
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
padding: 60px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@@ -543,14 +543,14 @@ onMounted(async () => {
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 10px 12px;
|
||||
border: 1px solid var(--td-component-border);
|
||||
border: 1px solid #e5e7eb;
|
||||
border-radius: 6px;
|
||||
background: var(--td-bg-color-secondarycontainer);
|
||||
background: #fafafa;
|
||||
transition: all 0.2s;
|
||||
|
||||
&:hover {
|
||||
border-color: var(--td-brand-color);
|
||||
background: var(--td-bg-color-container);
|
||||
border-color: #07C05F;
|
||||
background: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -561,7 +561,7 @@ onMounted(async () => {
|
||||
.model-name {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
margin-bottom: 4px;
|
||||
font-family: monospace;
|
||||
}
|
||||
@@ -570,7 +570,7 @@ onMounted(async () => {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
font-size: 12px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -586,7 +586,7 @@ onMounted(async () => {
|
||||
|
||||
.download-progress {
|
||||
padding: 12px;
|
||||
background: var(--td-bg-color-component);
|
||||
background: #f5f7fa;
|
||||
border-radius: 6px;
|
||||
|
||||
.progress-info {
|
||||
@@ -594,14 +594,14 @@ onMounted(async () => {
|
||||
justify-content: space-between;
|
||||
margin-bottom: 8px;
|
||||
font-size: 13px;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.recommended-models {
|
||||
.recommended-label {
|
||||
font-size: 13px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
margin: 0 0 10px 0;
|
||||
font-weight: 500;
|
||||
}
|
||||
@@ -617,9 +617,9 @@ onMounted(async () => {
|
||||
font-size: 12px;
|
||||
|
||||
&:hover {
|
||||
background: var(--td-brand-color);
|
||||
color: var(--td-text-color-anti);
|
||||
border-color: var(--td-brand-color);
|
||||
background: #07C05F;
|
||||
color: #ffffff;
|
||||
border-color: #07C05F;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -632,7 +632,7 @@ onMounted(async () => {
|
||||
|
||||
.empty-text {
|
||||
font-size: 14px;
|
||||
color: var(--td-text-color-placeholder);
|
||||
color: #999999;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,9 +256,9 @@ onUnmounted(() => {
|
||||
width: 100%;
|
||||
max-width: 900px;
|
||||
height: 700px;
|
||||
background: var(--td-bg-color-container);
|
||||
background: #ffffff;
|
||||
border-radius: 12px;
|
||||
box-shadow: var(--td-shadow-3);
|
||||
box-shadow: 0 6px 28px rgba(15, 23, 42, 0.08);
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -273,7 +273,7 @@ onUnmounted(() => {
|
||||
height: 32px;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
cursor: pointer;
|
||||
border-radius: 6px;
|
||||
display: flex;
|
||||
@@ -283,8 +283,8 @@ onUnmounted(() => {
|
||||
z-index: 10;
|
||||
|
||||
&:hover {
|
||||
background: var(--td-bg-color-container-hover);
|
||||
color: var(--td-text-color-primary);
|
||||
background: #f5f5f5;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -298,8 +298,8 @@ onUnmounted(() => {
|
||||
/* 左侧导航栏 */
|
||||
.settings-sidebar {
|
||||
width: 220px;
|
||||
background-color: var(--td-bg-color-secondarycontainer);
|
||||
border-right: 1px solid var(--td-component-border);
|
||||
background-color: #f8f9fa;
|
||||
border-right: 1px solid #e5e7eb;
|
||||
flex-shrink: 0;
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
@@ -308,13 +308,13 @@ onUnmounted(() => {
|
||||
|
||||
.sidebar-header {
|
||||
padding: 24px 16px 16px;
|
||||
border-bottom: 1px solid var(--td-component-border);
|
||||
border-bottom: 1px solid #e5e7eb;
|
||||
}
|
||||
|
||||
.sidebar-title {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@@ -330,19 +330,19 @@ onUnmounted(() => {
|
||||
margin-bottom: 4px;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
font-size: 14px;
|
||||
transition: all 0.2s ease;
|
||||
user-select: none;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--td-bg-color-container-hover);
|
||||
color: var(--td-text-color-primary);
|
||||
background-color: #e8f5ed;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background-color: var(--td-brand-color-light);
|
||||
color: var(--td-brand-color);
|
||||
background-color: rgba(7, 192, 95, 0.1);
|
||||
color: #07C05F;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
@@ -379,19 +379,19 @@ onUnmounted(() => {
|
||||
margin-bottom: 2px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
font-size: 13px;
|
||||
transition: all 0.2s ease;
|
||||
user-select: none;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--td-bg-color-component-hover);
|
||||
color: var(--td-text-color-primary);
|
||||
background-color: #f5f7fa;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background-color: var(--td-brand-color-light);
|
||||
color: var(--td-brand-color);
|
||||
background-color: rgba(7, 192, 95, 0.08);
|
||||
color: #07C05F;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
@@ -430,7 +430,7 @@ onUnmounted(() => {
|
||||
.settings-content {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
background-color: var(--td-bg-color-container);
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.content-wrapper {
|
||||
@@ -482,29 +482,29 @@ onUnmounted(() => {
|
||||
}
|
||||
|
||||
.settings-sidebar::-webkit-scrollbar-track {
|
||||
background: var(--td-bg-color-secondarycontainer);
|
||||
background: #f8f9fa;
|
||||
}
|
||||
|
||||
.settings-sidebar::-webkit-scrollbar-thumb {
|
||||
background: var(--td-bg-color-component);
|
||||
background: #d0d0d0;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.settings-sidebar::-webkit-scrollbar-thumb:hover {
|
||||
background: var(--td-bg-color-component-hover);
|
||||
background: #b0b0b0;
|
||||
}
|
||||
|
||||
.settings-content::-webkit-scrollbar-track {
|
||||
background: var(--td-bg-color-container);
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.settings-content::-webkit-scrollbar-thumb {
|
||||
background: var(--td-bg-color-component);
|
||||
background: #d0d0d0;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.settings-content::-webkit-scrollbar-thumb:hover {
|
||||
background: var(--td-bg-color-component-hover);
|
||||
background: #b0b0b0;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -411,13 +411,13 @@ onMounted(() => {
|
||||
h2 {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
margin: 0 0 8px 0;
|
||||
}
|
||||
|
||||
.section-description {
|
||||
font-size: 14px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
@@ -429,7 +429,7 @@ onMounted(() => {
|
||||
gap: 12px;
|
||||
padding: 40px 0;
|
||||
justify-content: center;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@@ -448,7 +448,7 @@ onMounted(() => {
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
padding: 20px 0;
|
||||
border-bottom: 1px solid var(--td-component-border);
|
||||
border-bottom: 1px solid #e5e7eb;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
@@ -463,14 +463,14 @@ onMounted(() => {
|
||||
label {
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
display: block;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.desc {
|
||||
font-size: 13px;
|
||||
color: var(--td-text-color-secondary);
|
||||
color: #666666;
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
@@ -485,12 +485,12 @@ onMounted(() => {
|
||||
|
||||
.info-value {
|
||||
font-size: 14px;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
text-align: right;
|
||||
word-break: break-word;
|
||||
|
||||
.commit-info {
|
||||
color: var(--td-text-color-placeholder);
|
||||
color: #999999;
|
||||
font-size: 12px;
|
||||
margin-left: 6px;
|
||||
}
|
||||
@@ -512,8 +512,8 @@ onMounted(() => {
|
||||
|
||||
.usage-text {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: var(--td-text-color-primary);
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
min-width: 50px;
|
||||
text-align: right;
|
||||
}
|
||||
@@ -522,7 +522,7 @@ onMounted(() => {
|
||||
.info-section-title {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: var(--td-text-color-primary);
|
||||
color: #333333;
|
||||
margin-top: 24px;
|
||||
margin-bottom: 12px;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user