Merge pull request #19 from sijinhui/dev

修正清除数据按钮
This commit is contained in:
sijinhui
2024-02-16 17:48:46 +08:00
committed by GitHub
2 changed files with 11 additions and 10 deletions

View File

@@ -347,4 +347,5 @@
border-radius: 0;
padding: 0;
height: 20px;
margin-top: 15px;
}

View File

@@ -230,6 +230,16 @@ export function SideBar(props: { className?: string }) {
<IconButton icon={<SettingsIcon />} shadow />
</Link>
</div>
<IconButton
text={Locale.Settings.Danger.Clear.Title}
onClick={async () => {
if (await showConfirm(Locale.Settings.Danger.Clear.Confirm)) {
chatStore.clearAllData();
}
}}
type="danger"
className={styles["custom-sidebar-clear-button"]}
/>
</div>
<div>
<IconButton
@@ -247,16 +257,6 @@ export function SideBar(props: { className?: string }) {
/>
</div>
</div>
<IconButton
text={Locale.Settings.Danger.Clear.Title}
onClick={async () => {
if (await showConfirm(Locale.Settings.Danger.Clear.Confirm)) {
chatStore.clearAllData();
}
}}
type="danger"
className={styles["custom-sidebar-clear-button"]}
/>
<div
className={styles["sidebar-drag"]}