From 3c2a1761fddc087654e94e079da6378ee1f38744 Mon Sep 17 00:00:00 2001 From: Kamyab Nazari Date: Sun, 28 May 2023 20:30:19 +0200 Subject: [PATCH] Cleanup --- .../src/lib/components/ActionCards.svelte | 4 +- frontend/src/lib/components/FileTable.svelte | 41 +++++++++---------- frontend/src/lib/components/Navbar.svelte | 2 +- frontend/src/lib/components/Stats.svelte | 2 +- frontend/src/routes/+page.svelte | 2 +- frontend/src/routes/dashboard/+page.svelte | 2 +- .../routes/dashboard/file-read/+page.svelte | 2 +- 7 files changed, 26 insertions(+), 29 deletions(-) diff --git a/frontend/src/lib/components/ActionCards.svelte b/frontend/src/lib/components/ActionCards.svelte index 120e516..53f11bb 100644 --- a/frontend/src/lib/components/ActionCards.svelte +++ b/frontend/src/lib/components/ActionCards.svelte @@ -3,7 +3,7 @@ import IconCreate from '~icons/solar/clipboard-add-outline'; -
+

Read a new file

Upload a new file and ask it your questions!

@@ -17,7 +17,7 @@
-
+

Create a new file

Tell us what you want and create your file!

diff --git a/frontend/src/lib/components/FileTable.svelte b/frontend/src/lib/components/FileTable.svelte index 0054c17..71fd579 100644 --- a/frontend/src/lib/components/FileTable.svelte +++ b/frontend/src/lib/components/FileTable.svelte @@ -9,10 +9,6 @@ const urlPDF = 'https://raw.githubusercontent.com/vinodnimbalkar/svelte-pdf/369db2f9edbf5ab8c87184193e1404340729bb3a/public/sample.pdf'; - const downloadPdf = () => { - window.open(urlPDF); - }; - onMount(async () => { await fetchDocuments(); }); @@ -21,11 +17,6 @@ async function fetchDocuments() { try { - /* - const response = await pb.collection('documents').getFullList({ - filter: `owner=${$currentUser?.id}` - }); - */ const response = await pb.collection('documents').getFullList({ sort: '-created', filter: `owner='${$currentUser?.id}'` @@ -36,9 +27,13 @@ console.error('Fetch error:', error); } } + + const downloadPdf = () => { + window.open(urlPDF); + }; -
+
@@ -74,18 +69,20 @@ PDF - {/each} diff --git a/frontend/src/lib/components/Navbar.svelte b/frontend/src/lib/components/Navbar.svelte index c9f81ae..3632b71 100644 --- a/frontend/src/lib/components/Navbar.svelte +++ b/frontend/src/lib/components/Navbar.svelte @@ -5,7 +5,7 @@ import IconMoon from '~icons/solar/moon-outline'; import IconSun from '~icons/solar/sun-2-outline'; import { onMount, onDestroy } from 'svelte'; - import { get, writable } from 'svelte/store'; + import { writable } from 'svelte/store'; import { getImageURL } from '$lib/utils'; const theme = writable('lofi'); diff --git a/frontend/src/lib/components/Stats.svelte b/frontend/src/lib/components/Stats.svelte index 5f5d7ec..0c39513 100644 --- a/frontend/src/lib/components/Stats.svelte +++ b/frontend/src/lib/components/Stats.svelte @@ -7,7 +7,7 @@ import IconPage from '~icons/solar/documents-outline'; -
+
diff --git a/frontend/src/routes/+page.svelte b/frontend/src/routes/+page.svelte index e82cc94..dc34935 100644 --- a/frontend/src/routes/+page.svelte +++ b/frontend/src/routes/+page.svelte @@ -6,7 +6,7 @@

Unleash the Power of AI: Creating Beautiful, Structured PDFs Has Never Been Easier!

-
+
Total documents analysed
389,400
diff --git a/frontend/src/routes/dashboard/+page.svelte b/frontend/src/routes/dashboard/+page.svelte index 6091156..d1709af 100644 --- a/frontend/src/routes/dashboard/+page.svelte +++ b/frontend/src/routes/dashboard/+page.svelte @@ -32,7 +32,7 @@
-
+

Generate a joke!

{#if joke} diff --git a/frontend/src/routes/dashboard/file-read/+page.svelte b/frontend/src/routes/dashboard/file-read/+page.svelte index 7d93626..45cd808 100644 --- a/frontend/src/routes/dashboard/file-read/+page.svelte +++ b/frontend/src/routes/dashboard/file-read/+page.svelte @@ -19,7 +19,7 @@
-
+
13.05.2023 - - - +
+ + + +