From 79d0932a3ab12ccacf7e4c82c3fc658544364008 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sat, 17 Feb 2024 21:14:42 -0800 Subject: [PATCH] refac: styling --- .../documents/Settings/General.svelte | 46 +++++++++++++++++-- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/src/lib/components/documents/Settings/General.svelte b/src/lib/components/documents/Settings/General.svelte index 19a6493b..c3c7df5b 100644 --- a/src/lib/components/documents/Settings/General.svelte +++ b/src/lib/components/documents/Settings/General.svelte @@ -3,13 +3,20 @@ import { scanDocs } from '$lib/apis/rag'; import { documents } from '$lib/stores'; import { onMount } from 'svelte'; + import toast from 'svelte-french-toast'; export let saveHandler: Function; + + let loading = false; + const scanHandler = async () => { + loading = true; const res = await scanDocs(localStorage.token); + loading = false; if (res) { await documents.set(await getDocs(localStorage.token)); + toast.success('Scan complete!'); } }; @@ -31,16 +38,19 @@
Scan for documents from '/data/docs'