feat: empty state

This commit is contained in:
Arman
2024-10-28 15:11:54 +01:00
parent 8e996b1fe1
commit 2a77a4c0d1
4 changed files with 14 additions and 2 deletions
+1
View File
@@ -25,6 +25,7 @@
{#if single}
<Card.Base padding="none">
<slot name="media" />
<Empty
title={`Create your first ${target}`}
description="Need a hand? Learn more in our documentation.">
@@ -8,7 +8,7 @@
import { wizard } from '$lib/stores/wizard';
import { onMount } from 'svelte';
import { canWriteSites } from '$lib/stores/roles.js';
import { Icon, Popover } from '@appwrite.io/pink-svelte';
import { Icon, Popover, Image } from '@appwrite.io/pink-svelte';
import { Button } from '$lib/elements/forms';
import { IconDotsHorizontal } from '@appwrite.io/pink-icons-svelte';
import { Card } from '@appwrite.io/pink-svelte';
@@ -17,6 +17,9 @@
import CreateSiteModal from './createSiteModal.svelte';
import { calculateTime } from '$lib/helpers/timeConversion';
import { timeFromNow } from '$lib/helpers/date';
import EmptyLight from './empty-light.png';
import { app } from '$lib/stores/app';
import EmptyDark from './empty-dark.png';
export let data;
let show = false;
@@ -114,7 +117,15 @@
allowCreate={TMPSITEROLES}
href="https://appwrite.io/docs/products/sites"
target="site"
on:click={() => (show = true)} />
on:click={() => (show = true)}>
<svelte:fragment slot="media">
{#if $app.themeInUse === 'dark'}
<Image src={EmptyDark} alt="Empty state" height={235} width={1079} />
{:else}
<Image src={EmptyLight} alt="Empty state" height={235} width={1079} />
{/if}
</svelte:fragment>
</Empty>
{/if}
</Container>
Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB