update links dashboard and projects layout

pull/3/head
TZGyn 2 years ago
parent 48aa85b284
commit 0e92aafd66
Signed by: TZGyn
GPG Key ID: 122EAF77AE81FD4A

@ -13,11 +13,11 @@
<Separator class="" /> <Separator class="" />
</div> </div>
<div class="flex w-full flex-col items-stretch gap-2 px-6"> <div class="flex w-full flex-wrap items-stretch gap-2 px-6">
{#each data.projects as project} {#each data.projects as project}
<a href={'/links?project=' + project.uuid}> <a href={'/links?project=' + project.uuid}>
<Card.Root <Card.Root
class="w-full max-w-[500px] hover:cursor-pointer hover:bg-secondary"> class="w-[500px] hover:cursor-pointer hover:bg-secondary">
<Card.Header> <Card.Header>
<Card.Title class="flex items-center gap-2"> <Card.Title class="flex items-center gap-2">
{project.name} {project.name}

@ -113,7 +113,7 @@
<title>Shorteners</title> <title>Shorteners</title>
</svelte:head> </svelte:head>
<div class="flex items-center justify-between p-4"> <div class="flex items-center justify-start gap-4 p-4">
<Popover.Root bind:open> <Popover.Root bind:open>
<Popover.Trigger asChild let:builder> <Popover.Trigger asChild let:builder>
<Button <Button

@ -1,18 +1,11 @@
<script lang="ts"> <script lang="ts">
import type { PageData } from './$types' import type { PageData } from './$types'
import { Separator } from '$lib/components/ui/separator'
import { Button, buttonVariants } from '$lib/components/ui/button' import { Button, buttonVariants } from '$lib/components/ui/button'
import * as Dialog from '$lib/components/ui/dialog' import * as Dialog from '$lib/components/ui/dialog'
import * as Card from '$lib/components/ui/card' import * as Card from '$lib/components/ui/card'
import * as DropdownMenu from '$lib/components/ui/dropdown-menu'
import { Input } from '$lib/components/ui/input' import { Input } from '$lib/components/ui/input'
import { Label } from '$lib/components/ui/label' import { Label } from '$lib/components/ui/label'
import { import { ExternalLink, Loader2, PlusCircle } from 'lucide-svelte'
ExternalLink,
Loader2,
MoreVertical,
PlusCircle,
} from 'lucide-svelte'
import { invalidateAll } from '$app/navigation' import { invalidateAll } from '$app/navigation'
@ -42,8 +35,7 @@
} }
</script> </script>
<div class="flex min-h-[80px] items-center justify-between p-4"> <div class="flex items-center justify-start p-4">
<div class="text-3xl font-bold">Projects</div>
<Dialog.Root bind:open={dialogOpen}> <Dialog.Root bind:open={dialogOpen}>
<Dialog.Trigger <Dialog.Trigger
class={buttonVariants({ variant: 'default' }) + 'flex gap-2'}> class={buttonVariants({ variant: 'default' }) + 'flex gap-2'}>
@ -77,14 +69,13 @@
</Dialog.Content> </Dialog.Content>
</Dialog.Root> </Dialog.Root>
</div> </div>
<Separator />
{#if data.projects.length > 0} {#if data.projects.length > 0}
<div class="flex flex-col gap-4 overflow-scroll p-4"> <div class="flex flex-wrap gap-4 overflow-scroll p-4">
{#each data.projects as project} {#each data.projects as project}
<a href={'/links?project=' + project.uuid}> <a href={'/links?project=' + project.uuid}>
<Card.Root <Card.Root
class="hover:bg-secondary w-full max-w-[500px] hover:cursor-pointer"> class="w-[500px] hover:cursor-pointer hover:bg-secondary">
<Card.Header> <Card.Header>
<Card.Title class="flex items-center gap-2"> <Card.Title class="flex items-center gap-2">
{project.name} {project.name}
@ -93,7 +84,7 @@
<Card.Content> <Card.Content>
<div class="flex w-full justify-between"> <div class="flex w-full justify-between">
<Button <Button
class="bg-secondary flex h-8 items-center justify-center gap-1 rounded text-sm"> class="flex h-8 items-center justify-center gap-1 rounded bg-secondary text-sm">
<ExternalLink size={20} /> <ExternalLink size={20} />
{project.shortener.length} {project.shortener.length}
Shorteners Shorteners

Loading…
Cancel
Save