fix: empty session page
This commit is contained in:
@@ -265,6 +265,12 @@ onMounted(() => {
|
||||
<!-- ClientOnly avoids hydrate exception -->
|
||||
<ClientOnly>
|
||||
<TransitionGroup name="chat-item">
|
||||
<div v-if="chatSessions.length === 0">
|
||||
<div class="text-center text-neutral-400 dark:text-neutral-500 py-4 flex flex-col items-center gap-2">
|
||||
<Icon name="i-tabler-messages" class="text-2xl" />
|
||||
<span>没有会话</span>
|
||||
</div>
|
||||
</div>
|
||||
<ChatItem
|
||||
v-for="session in chatSessions"
|
||||
:chat-session="session" :key="session.id"
|
||||
@@ -297,7 +303,8 @@ onMounted(() => {
|
||||
|
||||
<Transition name="message" mode="out-in">
|
||||
<NewSessionScreen
|
||||
v-if="modals.newSessionScreen"
|
||||
v-if="modals.newSessionScreen || getSessionCopyById(currentSessionId!) === undefined"
|
||||
:non-back="getSessionCopyById(currentSessionId!) === undefined"
|
||||
@select="createSession"
|
||||
@cancel="modals.newSessionScreen = false"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user