feat(ui): enhance styling and layout across various components

- Updated button and icon colors in ListSpaceSidebar and OrganizationList for improved visual consistency.
- Adjusted font sizes, line heights, and letter spacing in AgentList, KnowledgeBase, KnowledgeBaseList, and OrganizationList to enhance readability.
- Modified card styles in KnowledgeBase to improve layout and responsiveness, including grid adjustments and hover effects.
- Replaced organization icons with updated SVGs for better visual representation in OrganizationList.

This update improves the overall user interface by ensuring consistent styling and enhancing the readability of text elements across components.
This commit is contained in:
wizardchen
2026-02-05 18:35:52 +08:00
committed by lyingbug
parent ab1f15c97d
commit c88cf5fc63
5 changed files with 99 additions and 104 deletions
+12 -8
View File
@@ -196,16 +196,20 @@ onMounted(() => {
align-items: center;
justify-content: center;
}
:deep(.t-button .t-icon),
:deep(.t-button .btn-icon-wrapper) {
color: #07c05f;
}
:deep(.t-button:hover .t-icon),
:deep(.t-button:hover .btn-icon-wrapper) {
color: #07c05f;
}
:deep(.t-button .t-icon + .t-button__text:not(:empty)) {
margin-left: 0;
}
:deep(.sidebar-org-icon) {
width: 16px;
height: 16px;
filter: brightness(0) saturate(100%) invert(55%);
}
:deep(.t-button:hover .sidebar-org-icon) {
filter: brightness(0) saturate(100%) invert(40%);
}
}
@@ -228,7 +232,7 @@ onMounted(() => {
color: #4e5969;
cursor: pointer;
transition: all 0.2s ease;
font-size: 12px;
font-size: 13px;
.item-left {
display: flex;
@@ -286,16 +290,16 @@ onMounted(() => {
&.active {
background: #e6f7ec;
color: #00a870;
color: #07c05f;
font-weight: 500;
.item-icon {
color: #00a870;
color: #07c05f;
}
.item-count {
background: #b8f0d3;
color: #00a870;
color: #07c05f;
font-weight: 600;
}
+5 -4
View File
@@ -1176,11 +1176,12 @@ defineExpose({
}
.card-title {
color: #1a1a1a;
font-family: "PingFang SC";
font-size: 14px;
color: #1d2129;
font-family: "PingFang SC", -apple-system, sans-serif;
font-size: 15px;
font-weight: 600;
line-height: 20px;
line-height: 22px;
letter-spacing: 0.01em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
+36 -58
View File
@@ -164,7 +164,7 @@ const editingTagName = ref('');
const editingTagSubmitting = ref(false);
const getPageSize = () => {
const viewportHeight = window.innerHeight || document.documentElement.clientHeight;
const itemHeight = 174;
const itemHeight = 152;
let itemsInView = Math.floor(viewportHeight / itemHeight) * 5;
pageSize = Math.max(35, itemsInView);
}
@@ -1406,7 +1406,7 @@ async function createNewSession(value: string): Promise<void> {
>
<div class="card-content">
<div class="card-content-nav">
<span class="card-content-title">{{ item.file_name }}</span>
<span class="card-content-title" :title="item.file_name">{{ item.file_name }}</span>
<t-popup
v-if="canEdit"
v-model="item.isMore"
@@ -2380,6 +2380,7 @@ async function createNewSession(value: string): Promise<void> {
.doc-card-list {
box-sizing: border-box;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
gap: 12px;
align-content: flex-start;
width: 100%;
@@ -2511,18 +2512,20 @@ async function createNewSession(value: string): Promise<void> {
}
.knowledge-card {
border: 2px solid #fbfbfb;
height: 132px;
border-radius: 6px;
min-width: 240px;
border: 1px solid #e7e9eb;
height: 140px;
border-radius: 8px;
overflow: hidden;
box-sizing: border-box;
box-shadow: 0 0 8px 0 #00000005;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
background: #fff;
position: relative;
cursor: pointer;
transition: border-color 0.2s ease, box-shadow 0.2s ease;
.card-content {
padding: 10px 14px 12px;
padding: 14px 16px 12px;
}
.card-analyze {
@@ -2551,30 +2554,35 @@ async function createNewSession(value: string): Promise<void> {
.card-content-nav {
display: flex;
justify-content: space-between;
margin-bottom: 8px;
align-items: flex-start;
margin-bottom: 10px;
gap: 8px;
}
.card-content-title {
width: 200px;
flex: 1;
min-width: 0;
height: 28px;
line-height: 28px;
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #000000e6;
font-family: "PingFang SC";
font-size: 13px;
font-weight: 400;
color: #1d2129;
font-family: "PingFang SC", -apple-system, sans-serif;
font-size: 15px;
font-weight: 600;
letter-spacing: 0.01em;
}
.more-wrap {
flex-shrink: 0;
display: flex;
width: 24px;
height: 24px;
justify-content: center;
align-items: center;
border-radius: 3px;
border-radius: 4px;
cursor: pointer;
}
@@ -2597,7 +2605,7 @@ async function createNewSession(value: string): Promise<void> {
-webkit-line-clamp: 2;
line-clamp: 2;
overflow: hidden;
color: #00000066;
color: #86909c;
font-family: "PingFang SC";
font-size: 12px;
font-weight: 400;
@@ -2607,36 +2615,38 @@ async function createNewSession(value: string): Promise<void> {
.card-bottom {
position: absolute;
bottom: 0;
padding: 0 14px;
padding: 0 16px;
box-sizing: border-box;
height: 28px;
height: 32px;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
background: rgba(48, 50, 54, 0.02);
background: linear-gradient(to top, #f7f8fa 0%, #fafbfc 100%);
border-top: 1px solid #f0f1f3;
}
.card-time {
color: #00000066;
color: #86909c;
font-family: "PingFang SC";
font-size: 11px;
font-size: 12px;
font-weight: 400;
}
.card-type {
color: #00000066;
color: #4e5969;
font-family: "PingFang SC";
font-size: 12px;
font-weight: 400;
padding: 2px 4px;
background: #3032360f;
font-size: 11px;
font-weight: 500;
padding: 3px 8px;
background: #e8e9eb;
border-radius: 4px;
}
}
.knowledge-card:hover {
border: 2px solid #07c05f;
border-color: #07c05f;
box-shadow: 0 2px 8px rgba(7, 192, 95, 0.12);
}
.url-import-form {
@@ -2691,39 +2701,7 @@ async function createNewSession(value: string): Promise<void> {
margin: 0 auto;
}
.doc-card-list {
grid-template-columns: 1fr;
}
.del-card {
vertical-align: middle;
}
/* 小屏幕平板 - 3列,卡片更窄 */
@media (min-width: 900px) {
.doc-card-list {
grid-template-columns: repeat(3, 1fr);
}
}
/* 中等屏幕 - 4列 */
@media (min-width: 1250px) {
.doc-card-list {
grid-template-columns: repeat(4, 1fr);
}
}
/* 宽屏 - 5列 */
@media (min-width: 1600px) {
.doc-card-list {
grid-template-columns: repeat(5, 1fr);
}
}
/* 大屏幕 - 6列 */
@media (min-width: 2000px) {
.doc-card-list {
grid-template-columns: repeat(6, 1fr);
}
}
</style>
@@ -1466,9 +1466,10 @@ const handleUploadFinishedEvent = (event: Event) => {
.card-title {
flex: 1;
font-size: 14px;
font-size: 15px;
font-weight: 600;
color: #1a1a1a;
color: #1d2129;
letter-spacing: 0.01em;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@@ -1501,11 +1502,12 @@ const handleUploadFinishedEvent = (event: Event) => {
}
.card-title {
color: #1a1a1a;
font-family: "PingFang SC";
font-size: 14px;
color: #1d2129;
font-family: "PingFang SC", -apple-system, sans-serif;
font-size: 15px;
font-weight: 600;
line-height: 20px;
line-height: 22px;
letter-spacing: 0.01em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@@ -39,7 +39,7 @@
:aria-label="$t('organization.createOrg')"
@click="handleCreateOrganization"
>
<template #icon><img src="@/assets/img/organization.svg" class="org-create-icon sidebar-org-icon" alt="" aria-hidden="true" /></template>
<template #icon><img src="@/assets/img/organization-green.svg" class="org-create-icon sidebar-org-icon" alt="" aria-hidden="true" /></template>
</t-button>
</t-tooltip>
</template>
@@ -165,7 +165,7 @@
{{ $t('organization.joinOrg') }}
</t-button>
<t-button class="org-create-btn" @click="handleCreateOrganization">
<template #icon><img src="@/assets/img/organization.svg" class="org-create-icon" alt="" aria-hidden="true" /></template>
<template #icon><img src="@/assets/img/organization-green.svg" class="org-create-icon" alt="" aria-hidden="true" /></template>
{{ $t('organization.createOrg') }}
</t-button>
</div>
@@ -1253,19 +1253,27 @@ onUnmounted(() => {
.org-join-btn {
border-color: rgba(7, 192, 95, 0.5);
color: #059669;
color: #07c05f;
font-weight: 500;
transition: all 0.2s ease;
.t-icon {
color: #07c05f;
}
&:hover {
background: linear-gradient(135deg, rgba(7, 192, 95, 0.06) 0%, rgba(0, 166, 126, 0.06) 100%);
background: rgba(7, 192, 95, 0.08);
border-color: #07c05f;
color: #047857;
color: #07c05f;
.t-icon {
color: #07c05f;
}
}
}
.org-create-btn {
background: linear-gradient(135deg, #07c05f 0%, #059669 50%, #047857 100%);
background: #07c05f;
border: none;
color: #fff;
font-weight: 500;
@@ -1273,7 +1281,7 @@ onUnmounted(() => {
transition: all 0.25s ease;
&:hover {
background: linear-gradient(135deg, #059669 0%, #047857 100%);
background: #05a650;
box-shadow: 0 4px 14px rgba(7, 192, 95, 0.35);
}
@@ -1317,7 +1325,7 @@ onUnmounted(() => {
}
&.active {
color: #059669;
color: #07c05f;
font-weight: 500;
&::after {
@@ -1327,7 +1335,7 @@ onUnmounted(() => {
left: 0;
right: 0;
height: 2px;
background: linear-gradient(90deg, #07c05f, #059669);
background: #07c05f;
border-radius: 1px;
}
}
@@ -1452,11 +1460,12 @@ onUnmounted(() => {
}
.card-title {
color: #1f2937;
font-family: "PingFang SC";
font-size: 14px;
font-weight: 500;
line-height: 1.4;
color: #1d2129;
font-family: "PingFang SC", -apple-system, sans-serif;
font-size: 15px;
font-weight: 600;
line-height: 22px;
letter-spacing: 0.01em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@@ -1568,8 +1577,8 @@ onUnmounted(() => {
&.stat-kb {
background: rgba(7, 192, 95, 0.08);
color: #059669;
.t-icon { color: #059669; }
color: #07c05f;
.t-icon { color: #07c05f; }
&:hover { background: rgba(7, 192, 95, 0.12); }
}
@@ -1640,8 +1649,8 @@ onUnmounted(() => {
&.editor {
background: rgba(7, 192, 95, 0.08);
color: #059669;
.t-icon { color: #059669; }
color: #07c05f;
.t-icon { color: #07c05f; }
}
&.viewer {
@@ -1937,7 +1946,7 @@ onUnmounted(() => {
&:hover {
background: #f1f5f9;
color: #059669;
color: #07c05f;
}
}
@@ -2215,11 +2224,12 @@ onUnmounted(() => {
}
.searchable-card-title {
color: #1f2937;
font-family: "PingFang SC", system-ui, sans-serif;
font-size: 14px;
font-weight: 500;
line-height: 1.4;
color: #1d2129;
font-family: "PingFang SC", -apple-system, sans-serif;
font-size: 15px;
font-weight: 600;
line-height: 22px;
letter-spacing: 0.01em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@@ -2293,7 +2303,7 @@ onUnmounted(() => {
&.searchable-badge-agent {
background: rgba(7, 192, 95, 0.08);
color: #059669;
color: #07c05f;
.searchable-badge-agent-icon {
width: 12px;
height: 12px;
@@ -2555,7 +2565,7 @@ onUnmounted(() => {
&.preview-badge-agent {
background: rgba(7, 192, 95, 0.08);
color: #059669;
color: #07c05f;
.preview-badge-agent-icon {
width: 14px;
height: 14px;
@@ -2594,7 +2604,7 @@ onUnmounted(() => {
font-weight: 500;
&.value-success {
color: #059669;
color: #07c05f;
}
&.value-warning {
@@ -2625,7 +2635,7 @@ onUnmounted(() => {
gap: 8px;
background: #f0fdf4;
border-color: #bbf7d0;
color: #059669;
color: #07c05f;
.t-icon {
flex-shrink: 0;