feat: Improve SD list data and API integration

This commit is contained in:
licoy
2024-07-03 15:37:34 +08:00
parent 54401162bd
commit a16725ac17
14 changed files with 508 additions and 33 deletions

View File

@@ -155,6 +155,7 @@ export function SideBar(props: { className?: string }) {
let isChat: boolean = false;
switch (location.pathname) {
case Path.Sd:
case Path.SdPanel:
bodyComponent = <SdPanel />;
break;
default:
@@ -220,16 +221,18 @@ export function SideBar(props: { className?: string }) {
<div className={styles["sidebar-tail"]}>
<div className={styles["sidebar-actions"]}>
<div className={styles["sidebar-action"] + " " + styles.mobile}>
<IconButton
icon={<DeleteIcon />}
onClick={async () => {
if (await showConfirm(Locale.Home.DeleteChat)) {
chatStore.deleteSession(chatStore.currentSessionIndex);
}
}}
/>
</div>
{isChat && (
<div className={styles["sidebar-action"] + " " + styles.mobile}>
<IconButton
icon={<DeleteIcon />}
onClick={async () => {
if (await showConfirm(Locale.Home.DeleteChat)) {
chatStore.deleteSession(chatStore.currentSessionIndex);
}
}}
/>
</div>
)}
<div className={styles["sidebar-action"]}>
<Link to={Path.Settings}>
<IconButton icon={<SettingsIcon />} shadow />