Skip to content

Commit fd5dc2f

Browse files
wangdan-fit2cloudliuruibin
authored andcommitted
perf: Homepage style optimization
1 parent 99329a4 commit fd5dc2f

14 files changed

Lines changed: 280 additions & 230 deletions

File tree

ui/src/components/app-icon/KnowledgeIcon.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</el-avatar>
1414
<el-avatar
1515
v-else-if="type == 4"
16-
class="avatar-orange"
16+
class="avatar-purple"
1717
shape="square"
1818
:size="size"
1919
>

ui/src/layout/layout-header/top-menu/MenuItem.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@
1010
style="font-size: 16px"
1111
class="mr-4"
1212
/>
13-
<span> {{ $t(menu.meta?.title as string) }}</span>
13+
<span class="title-text"> {{ $t(menu.meta?.title as string) }}</span>
1414
</div>
1515
</div>
1616
</template>
1717
<script setup lang="ts">
1818
import { useRouter, useRoute, type RouteRecordRaw } from 'vue-router'
1919
import { computed } from 'vue'
20+
2021
const router = useRouter()
2122
const route = useRoute()
2223
@@ -54,5 +55,10 @@ const isActive = computed(() => {
5455
color: var(--el-color-primary) !important;
5556
}
5657
}
58+
.title-text {
59+
@media (max-width: 1200px) {
60+
display: none;
61+
}
62+
}
5763
}
5864
</style>

ui/src/layout/layout-template/SimpleLayout.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ const {
1616
} = route as any
1717
1818
const isShared = computed(() => {
19-
console.log(route)
2019
return (
2120
(folderId === 'shared' ||
2221
from === 'systemShare' ||

ui/src/views/application/ApplicationSetting.vue

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@
354354
:type="relatedObject(knowledgeList, item, 'id')?.type"
355355
class="mr-8"
356356
:size="20"
357+
style="--el-avatar-border-radius: 6px"
357358
/>
358359

359360
<span
@@ -439,7 +440,13 @@
439440
alt=""
440441
/>
441442
</el-avatar>
442-
<ToolIcon v-else type="MCP" class="mr-8" :size="20" />
443+
<ToolIcon
444+
v-else
445+
type="MCP"
446+
class="mr-8"
447+
:size="20"
448+
style="--el-avatar-border-radius: 6px"
449+
/>
443450

444451
<div
445452
class="ellipsis-1"
@@ -471,7 +478,12 @@
471478
style="padding: 5px 8px"
472479
>
473480
<div class="flex align-center" style="line-height: 20px">
474-
<ToolIcon type="MCP" class="mr-8" :size="20" />
481+
<ToolIcon
482+
type="MCP"
483+
class="mr-8"
484+
:size="20"
485+
style="--el-avatar-border-radius: 6px"
486+
/>
475487
<div class="ellipsis">
476488
{{ $t('common.custom') + ' MCP' }}
477489
</div>
@@ -624,7 +636,13 @@
624636
alt=""
625637
/>
626638
</el-avatar>
627-
<ToolIcon v-else class="mr-8" :size="20" type="SKILL" />
639+
<ToolIcon
640+
v-else
641+
class="mr-8"
642+
:size="20"
643+
type="SKILL"
644+
style="--el-avatar-border-radius: 6px"
645+
/>
628646

629647
<div
630648
class="ellipsis-1"

ui/src/views/application/component/McpServersDialog.vue

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,22 @@
5555
>
5656
<img :src="resetUrl(mcpTool?.icon)" alt="" />
5757
</el-avatar>
58-
<el-avatar v-else shape="square" :size="20" class="mr-8">
58+
<el-avatar
59+
v-else
60+
shape="square"
61+
:size="20"
62+
class="mr-8"
63+
style="--el-avatar-border-radius: 6px"
64+
>
5965
<img src="@/assets/tool/icon_mcp.svg" style="width: 75%" alt="" />
6066
</el-avatar>
6167
<span>{{ mcpTool.name }}</span>
62-
<el-tag v-if="mcpTool.scope === 'SHARED'" size="small" type="info" class="info-tag ml-8 mt-4">
68+
<el-tag
69+
v-if="mcpTool.scope === 'SHARED'"
70+
size="small"
71+
type="info"
72+
class="info-tag ml-8 mt-4"
73+
>
6374
{{ $t('views.shared.title') }}
6475
</el-tag>
6576
</div>

ui/src/views/application/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
</el-dropdown-item>
116116
<el-dropdown-item @click="openCreateDialog('WORK_FLOW')">
117117
<div class="flex">
118-
<el-avatar shape="square" class="avatar-purple mt-4" :size="32">
118+
<el-avatar shape="square" class="avatar-orange mt-4" :size="32">
119119
<img
120120
src="@/assets/application/icon_workflow_application.svg"
121121
style="width: 65%"
@@ -143,7 +143,7 @@
143143
>
144144
<el-dropdown-item>
145145
<div class="flex align-center w-full">
146-
<el-avatar shape="square" class="mt-4" :size="32" style="background: none">
146+
<el-avatar shape="square" :size="32" style="background: none">
147147
<img src="@/assets/icon_import.svg" alt="" />
148148
</el-avatar>
149149
<div class="pre-wrap ml-8">

ui/src/views/chat/pc/index.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,6 @@ import { getFileUrl } from '@/utils/common'
263263
import PdfExport from '@/components/pdf-export/index.vue'
264264
import JSEncrypt from 'jsencrypt'
265265
266-
const { user } = useStore()
267266
useResize()
268267
269268
provide('scrollData', loadInfiniteScroll)

ui/src/views/home/component/QuickCreate.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
</el-dropdown-item>
5656
<el-dropdown-item @click="openCreateApplicationDialog('WORK_FLOW')">
5757
<div class="flex">
58-
<el-avatar shape="square" class="avatar-purple mt-4" :size="32">
58+
<el-avatar shape="square" class="avatar-orange mt-4" :size="32">
5959
<img
6060
src="@/assets/application/icon_workflow_application.svg"
6161
style="width: 65%"
@@ -83,7 +83,7 @@
8383
>
8484
<el-dropdown-item>
8585
<div class="flex align-center w-full">
86-
<el-avatar shape="square" class="mt-4" :size="32" style="background: none">
86+
<el-avatar shape="square" :size="32" style="background: none">
8787
<img src="@/assets/icon_import.svg" alt="" />
8888
</el-avatar>
8989
<div class="pre-wrap ml-8">
@@ -185,7 +185,7 @@
185185
</el-dropdown-item>
186186
<el-dropdown-item @click="openCreateKnowledgeDialog(CreateWorkflowKnowledgeDialog)">
187187
<div class="flex">
188-
<el-avatar class="avatar-orange mt-4" shape="square" :size="32">
188+
<el-avatar class="avatar-purple mt-4" shape="square" :size="32">
189189
<img src="@/assets/workflow/logo_workflow.svg" style="width: 60%" alt="" />
190190
</el-avatar>
191191
<div class="pre-wrap ml-8">

0 commit comments

Comments
 (0)