This commit is contained in:
Timothy Jaeryang Baek
2026-05-20 01:46:59 +04:00
parent 8f2d346e10
commit 1527eb6e01
4 changed files with 47 additions and 5 deletions
@@ -81,6 +81,7 @@
let pendingSyncFiles: Array<{ path: string; filename: string; file: File }> | null = null;
let syncing: string | null = null;
let showAccessControlModal = false;
let showResetConfirm = false;
let minSize = 0;
type Knowledge = {
@@ -1292,8 +1293,11 @@
if (pendingSyncFiles?.length) {
showSyncConfirmModal = true;
}
}}
/>
}}
onReset={() => {
showResetConfirm = true;
}}
/>
</div>
{/if}
</div>
@@ -1528,3 +1532,17 @@
</div>
</div>
</ConfirmDialog>
<ConfirmDialog
bind:show={showResetConfirm}
title={$i18n.t('Reset knowledge base?')}
on:confirm={async () => {
await resetKnowledgeById(localStorage.token, id);
toast.success($i18n.t('Knowledge base has been reset'));
init();
}}
>
<div class="text-sm text-gray-700 dark:text-gray-300 flex-1 line-clamp-3">
{$i18n.t('This will remove all files and directories from this knowledge base. This action cannot be undone.')}
</div>
</ConfirmDialog>