Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kamyabnazari committed May 28, 2023
1 parent d9388d1 commit 3c2a176
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 29 deletions.
4 changes: 2 additions & 2 deletions frontend/src/lib/components/ActionCards.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import IconCreate from '~icons/solar/clipboard-add-outline';
</script>

<div class="card bg-base-100 w-96 flex-1 shadow-md">
<div class="card bg-base-100 w-96 flex-1 shadow-lg">
<div class="card-body">
<h2 class="card-title">Read a new file</h2>
<p>Upload a new file and ask it your questions!</p>
Expand All @@ -17,7 +17,7 @@
</div>
</div>
</div>
<div class="card bg-base-100 w-96 flex-1 shadow-md">
<div class="card bg-base-100 w-96 flex-1 shadow-lg">
<div class="card-body">
<h2 class="card-title">Create a new file</h2>
<p>Tell us what you want and create your file!</p>
Expand Down
41 changes: 19 additions & 22 deletions frontend/src/lib/components/FileTable.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
Expand All @@ -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}'`
Expand All @@ -36,9 +27,13 @@
console.error('Fetch error:', error);
}
}
const downloadPdf = () => {
window.open(urlPDF);
};
</script>

<div class="w-full overflow-x-auto">
<div class="w-full overflow-x-auto rounded-lg shadow-lg">
<table class="table w-full">
<!-- head -->
<thead>
Expand Down Expand Up @@ -74,18 +69,20 @@
<span class="badge badge-ghost badge-sm">PDF</span>
</td>
<td>13.05.2023</td>
<th>
<a href="/dashboard/file-read"
><button class="btn btn-square btn-primary"
><IconRead style="font-size: x-large;" /></button
></a
>
<button class="btn btn-square btn-info" on:click={downloadPdf}
><IconDownload style="font-size: x-large;" />
</button>
<button class="btn btn-square btn-warning"
><IconBin style="font-size: x-large;" /></button
>
<th
><div class="flex flex-row gap-4">
<a href="/dashboard/file-read"
><button class="btn btn-square btn-primary"
><IconRead style="font-size: x-large;" /></button
></a
>
<button class="btn btn-square btn-info" on:click={downloadPdf}
><IconDownload style="font-size: x-large;" />
</button>
<button class="btn btn-square btn-warning"
><IconBin style="font-size: x-large;" /></button
>
</div>
</th>
</tr>
{/each}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/components/Navbar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/components/Stats.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import IconPage from '~icons/solar/documents-outline';
</script>

<div class="stats flex-auto flex-nowrap shadow-md">
<div class="stats flex-auto flex-nowrap shadow-lg">
<div class="stat">
<div class="stat-figure text-secondary">
<IconFile style="font-size: x-large;" class="text-primary" />
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<p class="py-6 text-xl">
Unleash the Power of AI: Creating Beautiful, Structured PDFs Has Never Been Easier!
</p>
<div class="stats shadow-md">
<div class="stats shadow-lg">
<div class="stat">
<div class="stat-title">Total documents analysed</div>
<div class="stat-value">389,400</div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/dashboard/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<ActionCards />
</div>
<div class="flex">
<div class="card bg-base-100 w-96 flex-1 shadow-md">
<div class="card bg-base-100 w-96 flex-1 shadow-lg">
<div class="card-body">
<h2 class="card-title">Generate a joke!</h2>
{#if joke}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/dashboard/file-read/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<div class="mb-4 flex-1 rounded-lg bg-white p-8 shadow-lg md:mb-0">
<PdfViewer />
</div>
<div class="flex-1 rounded-lg bg-white p-8 shadow-md">
<div class="flex-1 rounded-lg bg-white p-8 shadow-lg">
<div class="flex h-full flex-col justify-between">
<div class="form-control flex-grow">
<textarea
Expand Down

0 comments on commit 3c2a176

Please sign in to comment.