Merge pull request #30 from appwrite/feat-empty-bucket

feat: create empty bucket
This commit is contained in:
Torsten Dittmann authored and GitHub committed 2022-08-01 16:42:52 +02:00
commit 0f28635a8f
3 files changed
+18 -14

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
<button on:click class="card is-border-dashed u-grid u-cross-center">
<div class="bucket">
<div class="u-flex u-flex-vertical u-cross-center">
<slot />
</div>
</div>
</button>
+1
View File
@@ -26,3 +26,4 @@ export { default as Alert } from './alert.svelte';
export { default as Box } from './box.svelte';
export { default as Search } from './search.svelte';
export { default as Bucket } from './bucket.svelte';
export { default as EmptyBucket } from './emptyBucket.svelte';
@@ -2,7 +2,7 @@
import { page } from '$app/stores';
import { goto } from '$app/navigation';
import { Button } from '$lib/elements/forms';
import { Empty, Pagination, Tooltip, Copy, Bucket } from '$lib/components';
import { Empty, Pagination, Tooltip, Copy, Bucket, EmptyBucket } from '$lib/components';
import { Pill } from '$lib/elements';
import type { Models } from '@aw-labs/appwrite-console';
import Create from './_create.svelte';
@@ -81,20 +81,16 @@
</Bucket>
{/each}
{#if $bucketList.total % 2 !== 0}
<article class="card is-border-dashed">
<div class="bucket">
<div class="u-flex u-flex-vertical u-cross-center">
<div class="common-section">
<Button secondary round on:click={() => (showCreate = true)}>
<i class="icon-plus" />
</Button>
</div>
<div class="common-section">
<p>Add a new bucket</p>
</div>
</div>
<EmptyBucket on:click={() => (showCreate = true)}>
<div class="common-section">
<Button secondary round>
<i class="icon-plus" />
</Button>
</div>
</article>
<div class="common-section">
<p>Add a new bucket</p>
</div>
</EmptyBucket>
{/if}
</ul>