Skip to content

Commit 67cc229

Browse files
committed
fix(Embedded Management): Floating window mode hover sidebar supplementary interaction
1 parent baa7f93 commit 67cc229

File tree

3 files changed

+64
-4
lines changed

3 files changed

+64
-4
lines changed

frontend/src/views/chat/ChatListContainer.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,9 @@ function onChatRenamed(chat: Chat) {
317317
.search {
318318
height: 32px;
319319
width: 100%;
320+
:deep(.ed-input__wrapper) {
321+
background-color: #f5f6f7;
322+
}
320323
}
321324
}
322325

frontend/src/views/chat/index.vue

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,30 @@
11
<template>
2+
<el-popover
3+
:width="280"
4+
v-if="assistantStore.assistant && !assistantStore.pageEmbedded && assistantStore.type != 4"
5+
placement="bottom-start"
6+
popper-class="popover-chat_history popover-chat_history_small"
7+
>
8+
<template #reference>
9+
<el-icon class="show-history_icon" style="" size="20" @click="showFloatPopover">
10+
<icon_sidebar_outlined></icon_sidebar_outlined>
11+
</el-icon>
12+
</template>
13+
<ChatListContainer
14+
ref="floatPopoverRef"
15+
v-model:chat-list="chatList"
16+
v-model:current-chat-id="currentChatId"
17+
v-model:current-chat="currentChat"
18+
v-model:loading="loading"
19+
:in-popover="!chatListSideBarShow"
20+
@go-empty="goEmpty"
21+
@on-chat-created="onChatCreated"
22+
@on-click-history="onClickHistory"
23+
@on-chat-deleted="onChatDeleted"
24+
@on-chat-renamed="onChatRenamed"
25+
@on-click-side-bar-btn="hideSideBar"
26+
/>
27+
</el-popover>
228
<el-container class="chat-container no-padding">
329
<el-aside
430
v-if="(isCompletePage || pageEmbedded) && chatListSideBarShow"
@@ -18,6 +44,7 @@
1844
@on-click-side-bar-btn="hideSideBar"
1945
/>
2046
</el-aside>
47+
2148
<div
2249
v-if="(!isCompletePage && !pageEmbedded) || !chatListSideBarShow"
2350
class="hidden-sidebar-btn"
@@ -1265,4 +1292,37 @@ onMounted(() => {
12651292
border-radius: 12px !important;
12661293
overflow: hidden;
12671294
}
1295+
1296+
.popover-chat_history_small {
1297+
height: calc(100% - 54px);
1298+
padding: 0 !important;
1299+
border: 1px solid rgba(222, 224, 227, 1);
1300+
border-radius: 6px;
1301+
}
1302+
1303+
.show-history_icon {
1304+
cursor: pointer;
1305+
position: absolute;
1306+
top: 18px;
1307+
left: 16px;
1308+
z-index: 199;
1309+
&::after {
1310+
content: '';
1311+
background-color: #1f23291a;
1312+
position: absolute;
1313+
border-radius: 6px;
1314+
width: 28px;
1315+
height: 28px;
1316+
transform: translate(-50%, -50%);
1317+
top: 50%;
1318+
left: 50%;
1319+
display: none;
1320+
}
1321+
1322+
&:hover {
1323+
&::after {
1324+
display: block;
1325+
}
1326+
}
1327+
}
12681328
</style>

frontend/src/views/embedded/index.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<template>
22
<div class="sqlbot-assistant-container">
33
<div class="header" :style="{ color: customSet.header_font_color }">
4-
<el-icon size="20" @click="openHistory">
5-
<icon_sidebar_outlined></icon_sidebar_outlined>
6-
</el-icon>
4+
<el-icon size="20"> </el-icon>
75
<el-icon v-if="!logo" class="logo" size="30">
86
<LOGO></LOGO>
97
</el-icon>
@@ -37,7 +35,6 @@ import { onBeforeMount, nextTick, onBeforeUnmount, ref, onMounted, reactive } fr
3735
import ChatComponent from '@/views/chat/index.vue'
3836
import { request } from '@/utils/request'
3937
import LOGO from '@/assets/svg/logo-custom_small.svg'
40-
import icon_sidebar_outlined from '@/assets/embedded/icon_sidebar_outlined_nofill.svg'
4138
import icon_new_chat_outlined from '@/assets/svg/icon_new_chat_outlined.svg'
4239
import { useAppearanceStoreWithOut } from '@/stores/appearance'
4340
import { useRoute } from 'vue-router'

0 commit comments

Comments
 (0)