From 0cd9148e18e70dd303ec2c9b2a6a9735997cc5f4 Mon Sep 17 00:00:00 2001 From: work Date: Wed, 17 Apr 2024 02:44:18 +0200 Subject: [PATCH] update image design --- src/lib/components/task-form/TaskForm.svelte | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/lib/components/task-form/TaskForm.svelte b/src/lib/components/task-form/TaskForm.svelte index b43886a8..de650182 100644 --- a/src/lib/components/task-form/TaskForm.svelte +++ b/src/lib/components/task-form/TaskForm.svelte @@ -32,6 +32,7 @@ import { Icon } from '@steeze-ui/svelte-icon'; import 'flatpickr/dist/themes/airbnb.css'; import { createEventDispatcher } from 'svelte'; // TODO check later how I should import a precompiled component https://github.com/sveltejs/svelte/issues/604 + import Modal from '$lib/components/modal/Modal.svelte'; import { storage } from '$lib/firebase'; import { FirebaseError } from 'firebase/app'; import { getDownloadURL, ref } from 'firebase/storage'; @@ -64,6 +65,8 @@ let image: null | string = null; + let isImageOpen = false; + $: isEditing = !!task.id; $: formName = `${isEditing ? 'Edit' : 'Add'} ${'startTime' in task ? 'Event' : 'Task'}`; @@ -174,11 +177,16 @@ >
-
+
{#if image} - + (isImageOpen = false)} show={isImageOpen}> +
+ event description +
+
{:else} {/if} @@ -194,7 +202,7 @@ on:change={handleChange} type="file" /> - Add image + {#if image}Change image{:else}Add image{/if}