Use spaces, run prettier on project

This commit is contained in:
ZXY101
2023-09-22 11:06:16 +02:00
parent 4731884d2b
commit d20b49a2d3
42 changed files with 1071 additions and 1796 deletions

View File

@@ -1,32 +1,32 @@
<script lang="ts">
import { catalog } from '$lib/catalog';
import { Button } from 'flowbite-svelte';
import CatalogItem from './CatalogItem.svelte';
import { promptConfirmation } from '$lib/util';
import { db } from '$lib/catalog/db';
import { catalog } from '$lib/catalog';
import { Button } from 'flowbite-svelte';
import CatalogItem from './CatalogItem.svelte';
import { promptConfirmation } from '$lib/util';
import { db } from '$lib/catalog/db';
function onClear() {
promptConfirmation('Are you sure you want to clear your catalog?', () => db.catalog.clear());
}
function onClear() {
promptConfirmation('Are you sure you want to clear your catalog?', () => db.catalog.clear());
}
</script>
{#if $catalog}
{#if $catalog.length > 0}
<div class="flex flex-col gap-5">
<div class="sm:block flex-col flex">
<Button outline color="red" class="float-right" on:click={onClear}>Clear catalog</Button>
</div>
<div class="flex flex-row gap-5 flex-wrap">
{#each $catalog as { id, manga } (id)}
<CatalogItem {manga} />
{/each}
</div>
</div>
{:else}
<div class="text-center p-20">
<p>Your catalog is currently empty.</p>
</div>
{/if}
{#if $catalog.length > 0}
<div class="flex flex-col gap-5">
<div class="sm:block flex-col flex">
<Button outline color="red" class="float-right" on:click={onClear}>Clear catalog</Button>
</div>
<div class="flex flex-row gap-5 flex-wrap">
{#each $catalog as { id, manga } (id)}
<CatalogItem {manga} />
{/each}
</div>
</div>
{:else}
<div class="text-center p-20">
<p>Your catalog is currently empty.</p>
</div>
{/if}
{:else}
<p>Loading...</p>
<p>Loading...</p>
{/if}