mirror of
https://github.com/open-webui/open-webui
synced 2025-06-23 02:16:52 +00:00
fix: don't show export button if nothing to export
This commit is contained in:
parent
be20e6dec0
commit
2b0d9c26eb
@ -92,6 +92,11 @@
|
||||
};
|
||||
|
||||
const exportHandler = async () => {
|
||||
if (feedbacks.length === 0) {
|
||||
toast.info($i18n.t('No feedback available to export.'));
|
||||
return;
|
||||
}
|
||||
|
||||
const _feedbacks = await exportAllFeedbacks(localStorage.token).catch((err) => {
|
||||
toast.error(err);
|
||||
return null;
|
||||
@ -115,7 +120,7 @@
|
||||
<span class="text-lg font-medium text-gray-500 dark:text-gray-300">{feedbacks.length}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{#if feedbacks.length > 0}
|
||||
<div>
|
||||
<Tooltip content={$i18n.t('Export')}>
|
||||
<button
|
||||
@ -128,7 +133,7 @@
|
||||
</button>
|
||||
</Tooltip>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div
|
||||
|
Loading…
Reference in New Issue
Block a user