fix style

This commit is contained in:
AceDataCloud committed 2023-12-29 23:53:47 +08:00
1 parent f39e155301
commit f1d9fc3778
4 files changed
+27 -5

No files matched your search

+16 -3
View File
@@ -1,8 +1,15 @@
<template>
<div class="sidebar">
<el-skeleton v-if="loading && conversations === undefined" />
<div v-else-if="conversations?.length === 0">
<p class="p-5 description">{{ $t('chat.message.noConversations') }}</p>
<div v-else-if="conversations?.length === 0" class="conversations">
<div class="conversation" @click="onNewConversation">
<div class="icons">
<font-awesome-icon icon="fa-solid fa-plus" class="icon" />
</div>
<div class="title">
{{ $t('chat.message.startNewChat') }}
</div>
</div>
</div>
<div v-else class="conversations">
<div
@@ -63,7 +70,7 @@
import { defineComponent } from 'vue';
import { ElSkeleton, ElInput } from 'element-plus';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
import { ROUTE_CHAT_CONVERSATION } from '@/router/constants';
import { ROUTE_CHAT_CONVERSATION, ROUTE_CHAT_CONVERSATION_NEW } from '@/router/constants';
import { apiUsageOperator, IApplication, chatOperator, applicationOperator } from '@/operators';
import { IChatConversation } from '@/operators/chat/models';
import {
@@ -110,6 +117,11 @@ export default defineComponent({
await this.onFetchConversations();
},
methods: {
async onNewConversation() {
this.$router.push({
name: ROUTE_CHAT_CONVERSATION_NEW
});
},
async onFetchApplications() {
this.initializing = true;
const { data: applications } = await applicationOperator.getAll({
@@ -207,6 +219,7 @@ export default defineComponent({
.title {
flex: 1;
font-size: 14px;
line-height: 32px;
overflow: hidden;
text-overflow: ellipsis;
padding-right: 8px;
+9 -1
View File
@@ -2,7 +2,13 @@
<div class="sidebar">
<div class="top">
<div v-for="(link, linkIndex) in links" :key="linkIndex" class="link">
<el-button class="button" @click="$router.push(link.route)">
<el-button
:class="{
button: true,
active: $route.name === link.route.name
}"
@click="$router.push(link.route)"
>
<font-awesome-icon :icon="link.icon" />
</el-button>
</div>
@@ -79,9 +85,11 @@ export default defineComponent({
border-radius: 10px;
border: none;
background-color: var(--el-bg-color-page);
&.active,
&:hover,
&:focus {
background-color: var(--el-button-hover-bg-color);
color: var(--el-button-active-text-color);
}
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
export default {
startNewChat: '开始新的聊天',
startNewChat: '开始新的会话',
noToken: '请先申请对应服务',
newMessagePlaceholder: '请输入你的问题...',
noInput: '问题不能为空',
+1
View File
@@ -48,6 +48,7 @@ export default defineComponent({
width: 300px;
height: 100%;
border-right: 1px solid #eee;
overflow-y: scroll;
}
}
}