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;
|
return null;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (res) {
|
if (res && memories.length > 0) {
|
||||||
toast.success($i18n.t('Memory cleared successfully'));
|
toast.success($i18n.t('Memory cleared successfully'));
|
||||||
memories = [];
|
memories = [];
|
||||||
}
|
}
|
||||||
@ -192,7 +192,11 @@
|
|||||||
<button
|
<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"
|
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={() => {
|
on:click={() => {
|
||||||
|
if (memories.length > 0) {
|
||||||
showClearConfirmDialog = true;
|
showClearConfirmDialog = true;
|
||||||
|
} else {
|
||||||
|
toast.error($i18n.t('No memories to clear'));
|
||||||
|
}
|
||||||
}}>{$i18n.t('Clear memory')}</button
|
}}>{$i18n.t('Clear memory')}</button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user