mirror of
https://github.com/open-webui/open-webui
synced 2025-03-04 11:29:59 +00:00
Update ManageModal.svelte
no confirmation when no memories exist
This commit is contained in:
parent
7cfbf6489a
commit
8097b6a3ff
@ -35,7 +35,7 @@
|
||||
return null;
|
||||
});
|
||||
|
||||
if (res) {
|
||||
if (res && memories.length > 0) {
|
||||
toast.success($i18n.t('Memory cleared successfully'));
|
||||
memories = [];
|
||||
}
|
||||
@ -192,7 +192,11 @@
|
||||
<button
|
||||
class=" px-3.5 py-1.5 font-medium text-red-500 hover:bg-black/5 dark:hover:bg-white/5 outline outline-1 outline-red-300 dark:outline-red-800 rounded-3xl"
|
||||
on:click={() => {
|
||||
if (memories.length > 0) {
|
||||
showClearConfirmDialog = true;
|
||||
} else {
|
||||
toast.error($i18n.t('No memories to clear'));
|
||||
}
|
||||
}}>{$i18n.t('Clear memory')}</button
|
||||
>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user