|
|
|
@ -161,12 +161,18 @@
|
|
|
|
<AddShortenerDialog {dialogOpen} projects={data.projects} />
|
|
|
|
<AddShortenerDialog {dialogOpen} projects={data.projects} />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
{#if data.shorteners.length > 0}
|
|
|
|
{#await data.shorteners}
|
|
|
|
|
|
|
|
<div class="flex h-full w-full items-center justify-center">
|
|
|
|
|
|
|
|
<Loader2 class="animate-spin" />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{:then shorteners}
|
|
|
|
|
|
|
|
{#if shorteners.length > 0}
|
|
|
|
<div class="flex flex-wrap gap-4 overflow-scroll p-4">
|
|
|
|
<div class="flex flex-wrap gap-4 overflow-scroll p-4">
|
|
|
|
{#each data.shorteners as shortener}
|
|
|
|
{#each shorteners as shortener}
|
|
|
|
<Card.Root class="w-full max-w-[500px]">
|
|
|
|
<Card.Root class="w-full max-w-[500px]">
|
|
|
|
<Card.Header>
|
|
|
|
<Card.Header>
|
|
|
|
<Card.Title class="flex items-center justify-between gap-2">
|
|
|
|
<Card.Title
|
|
|
|
|
|
|
|
class="flex items-center justify-between gap-2">
|
|
|
|
<div class="flex items-center gap-2">
|
|
|
|
<div class="flex items-center gap-2">
|
|
|
|
<a
|
|
|
|
<a
|
|
|
|
href={'https://' +
|
|
|
|
href={'https://' +
|
|
|
|
@ -236,7 +242,8 @@
|
|
|
|
Edit
|
|
|
|
Edit
|
|
|
|
</DropdownMenu.Item>
|
|
|
|
</DropdownMenu.Item>
|
|
|
|
<DropdownMenu.Item
|
|
|
|
<DropdownMenu.Item
|
|
|
|
on:click={() => openDeleteDialog(shortener.code)}
|
|
|
|
on:click={() =>
|
|
|
|
|
|
|
|
openDeleteDialog(shortener.code)}
|
|
|
|
class="text-destructive data-[highlighted]:bg-destructive">
|
|
|
|
class="text-destructive data-[highlighted]:bg-destructive">
|
|
|
|
Delete
|
|
|
|
Delete
|
|
|
|
</DropdownMenu.Item>
|
|
|
|
</DropdownMenu.Item>
|
|
|
|
@ -248,9 +255,10 @@
|
|
|
|
</Card.Root>
|
|
|
|
</Card.Root>
|
|
|
|
{/each}
|
|
|
|
{/each}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{:else}
|
|
|
|
{:else}
|
|
|
|
<div>No Data</div>
|
|
|
|
<div>No Data</div>
|
|
|
|
{/if}
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
{/await}
|
|
|
|
|
|
|
|
|
|
|
|
<Dialog.Root bind:open={editDialogOpen}>
|
|
|
|
<Dialog.Root bind:open={editDialogOpen}>
|
|
|
|
<Dialog.Content class="sm:max-w-[425px]">
|
|
|
|
<Dialog.Content class="sm:max-w-[425px]">
|
|
|
|
|