Skip to content

Commit e12dc6e

Browse files
committed
fix(Dashboard): icon is not vertically centered
1 parent cefa0bb commit e12dc6e

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

frontend/src/views/chat/ChatListContainer.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@ const props = withDefaults(
1919
currentChatId?: number
2020
currentChat?: ChatInfo
2121
loading?: boolean
22+
appName?: string
2223
}>(),
2324
{
2425
chatList: () => [],
2526
currentChatId: undefined,
2627
currentChat: () => new ChatInfo(),
2728
loading: false,
2829
inPopover: false,
30+
appName: '',
2931
}
3032
)
3133
@@ -214,7 +216,7 @@ function onChatRenamed(chat: Chat) {
214216
<el-container class="chat-container-right-container">
215217
<el-header class="chat-list-header" :class="{ 'in-popover': inPopover }">
216218
<div v-if="!inPopover" class="title">
217-
<div>{{ t('qa.title') }}</div>
219+
<div>{{ appName || t('qa.title') }}</div>
218220
<el-button link type="primary" class="icon-btn" @click="onClickSideBarBtn">
219221
<el-icon>
220222
<icon_sidebar_outlined />

frontend/src/views/chat/index.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
v-model:current-chat="currentChat"
1818
v-model:loading="loading"
1919
:in-popover="!chatListSideBarShow"
20+
:appName="customName"
2021
@go-empty="goEmpty"
2122
@on-chat-created="onChatCreated"
2223
@on-click-history="onClickHistory"
@@ -36,6 +37,7 @@
3637
v-model:current-chat="currentChat"
3738
v-model:loading="loading"
3839
:in-popover="!chatListSideBarShow"
40+
:appName="customName"
3941
@go-empty="goEmpty"
4042
@on-chat-created="onChatCreated"
4143
@on-click-history="onClickHistory"
@@ -70,6 +72,7 @@
7072
v-model:current-chat="currentChat"
7173
v-model:loading="loading"
7274
:in-popover="!chatListSideBarShow"
75+
:appName="customName"
7376
@go-empty="goEmpty"
7477
@on-chat-created="onChatCreated"
7578
@on-click-history="onClickHistory"
@@ -94,6 +97,7 @@
9497
v-model:current-chat-id="currentChatId"
9598
v-model:current-chat="currentChat"
9699
v-model:loading="loading"
100+
:appName="customName"
97101
:in-popover="false"
98102
@go-empty="goEmpty"
99103
@on-chat-created="onChatCreated"
@@ -424,6 +428,7 @@ const props = defineProps<{
424428
welcomeDesc?: string
425429
logoAssistant?: string
426430
welcome?: string
431+
appName?: string
427432
pageEmbedded?: boolean
428433
}>()
429434
const floatPopoverRef = ref()
@@ -437,7 +442,10 @@ const defaultFloatPopoverStyle = ref({
437442
})
438443
439444
const isCompletePage = computed(() => !assistantStore.getAssistant || assistantStore.getEmbedded)
440-
445+
const customName = computed(() => {
446+
if (props.pageEmbedded) return props.appName
447+
return ''
448+
})
441449
const { t } = useI18n()
442450
443451
const inputMessage = ref('')

frontend/src/views/dashboard/editor/Toolbar.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,6 @@ const previewInner = () => {
337337
}
338338
339339
.back-icon {
340-
margin-top: 8px;
341340
width: 20px;
342341
height: 20px;
343342
}

frontend/src/views/embedded/index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
:welcome="customSet.welcome"
2626
:welcome-desc="customSet.welcome_desc"
2727
:logo-assistant="logo"
28+
:app-name="appName"
2829
/>
2930
</div>
3031
<div class="drawer-assistant" @click="openHistory"></div>

0 commit comments

Comments
 (0)