fix: #1130 #1131 delete right session

This commit is contained in:
Yidadaa
2023-05-01 23:21:28 +08:00
parent 0209ace221
commit c37885e743
4 changed files with 58 additions and 58 deletions

View File

@@ -138,7 +138,11 @@ export function SideBar(props: { className?: string }) {
<div className={styles["sidebar-action"] + " " + styles.mobile}>
<IconButton
icon={<CloseIcon />}
onClick={chatStore.deleteSession}
onClick={() => {
if (confirm(Locale.Home.DeleteChat)) {
chatStore.deleteSession(chatStore.currentSessionIndex);
}
}}
/>
</div>
<div className={styles["sidebar-action"]}>