Skip to content

Commit

Permalink
Fix Format
Browse files Browse the repository at this point in the history
  • Loading branch information
prokawsar committed May 24, 2024
1 parent cd99b30 commit f51f4c7
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 38 deletions.
3 changes: 1 addition & 2 deletions src/lib/components/Actions.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
<Button
slot="tip-trigger"
variant={'outline'}
disabled={false}

disabled={false}
on:click={() => dispatch('deleteImage')}
class="rounded-lg bg-gray-200 px-3 {!hasImages ? 'hidden' : ''}"
>
Expand Down
37 changes: 17 additions & 20 deletions src/lib/components/DeleteModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,25 @@
}
</script>




{#if show}
<div
id="modal"
tabindex="-1"
class="fixed z-50 flex h-screen w-screen items-center justify-center overflow-y-auto overflow-x-hidden bg-black bg-opacity-40 backdrop-blur-sm"
>
<div class="flex min-w-96 flex-col rounded-xl border bg-white px-5 pb-5 shadow-sm">
<div class="mt-2 flex flex-row justify-end">
<button on:click={() => handleAbort()}>
<Fa icon={faMultiply} />
</button>
</div>
<div class="p-2">
<p class="text py-4 text-center">Are you sure you want to delete this image</p>
</div>
<div class="flex flex-row justify-center gap-5 py-2">
<Button on:click={() => handleAbort()} variant={'outline'} class="w-32">No</Button>
<Button class="w-32" on:click={() => handleSoftDelete()}>Yes</Button>
id="modal"
tabindex="-1"
class="fixed z-50 flex h-screen w-screen items-center justify-center overflow-y-auto overflow-x-hidden bg-black bg-opacity-40 backdrop-blur-sm"
>
<div class="flex min-w-96 flex-col rounded-xl border bg-white px-5 pb-5 shadow-sm">
<div class="mt-2 flex flex-row justify-end">
<button on:click={() => handleAbort()}>
<Fa icon={faMultiply} />
</button>
</div>
<div class="p-2">
<p class="text py-4 text-center">Are you sure you want to delete this image</p>
</div>
<div class="flex flex-row justify-center gap-5 py-2">
<Button on:click={() => handleAbort()} variant={'outline'} class="w-32">No</Button>
<Button class="w-32" on:click={() => handleSoftDelete()}>Yes</Button>
</div>
</div>
</div>
</div>
{/if}
1 change: 0 additions & 1 deletion src/lib/components/Filter.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
{ value: 'size', label: 'size' },
{ value: 'tag', label: 'tag' }
]
</script>

<div class="flex w-full flex-row items-center rounded-full bg-white px-10 py-3 shadow-lg">
Expand Down
3 changes: 1 addition & 2 deletions src/lib/components/Gallery.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
export let images: ImageType[] = []
const dispatch = createEventDispatcher();
const dispatch = createEventDispatcher()
</script>

<div
Expand All @@ -33,7 +33,6 @@
on:deleteTag={(e) => {
dispatch('deleteTag', { id: image.id, tag: e.detail })
}}

on:click={() => (selectedImage = image)}
{image}
isSelected={selectedImage?.id == image.id}
Expand Down
3 changes: 1 addition & 2 deletions src/lib/components/Image.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
export let image: ImageType
let hasHover = false
let newTag = ''
const dispatch = createEventDispatcher()
Expand All @@ -35,7 +34,7 @@
alt="image {image.name}"
/>
{#if hasHover}
<div class="absolute bottom-0 left-0 right-0 z-10 translate-y-full flex gap-[0.5px] flex-col">
<div class="absolute bottom-0 left-0 right-0 z-10 flex translate-y-full flex-col gap-[0.5px]">
<div
class="flex w-full items-center justify-start gap-1 bg-white px-2 text-black last:rounded-b-md"
>
Expand Down
17 changes: 7 additions & 10 deletions src/lib/components/TagsList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,18 @@
})
return acc
}, [])
</script>

<div class="flex flex-row flex-wrap items-center gap-3">
<button
on:click={() => {
selectedTags.length == 0
? (selectedTags = tags)
: (selectedTags = [])
}}
class="flex h-9 items-center rounded border border-[#94A3B8] px-3
on:click={() => {
selectedTags.length == 0 ? (selectedTags = tags) : (selectedTags = [])
}}
class="flex h-9 items-center rounded border border-[#94A3B8] px-3
{selectedTags.length > 0 ? 'bg-blue-400 text-white' : ''}"
>
<Fa icon={selectedTags.length > 0 ? faMinus: faCheck} />
</button>
>
<Fa icon={selectedTags.length > 0 ? faMinus : faCheck} />
</button>
{#each tags as tag}
<button
on:click={() => {
Expand Down
1 change: 0 additions & 1 deletion src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@
break
}
}
</script>

<svelte:head>
Expand Down

0 comments on commit f51f4c7

Please sign in to comment.