Updated to Svelte 5
This commit is contained in:
@@ -5,6 +5,8 @@ SPDX-License-Identifier: MPL-2.0
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import { preventDefault } from 'svelte/legacy';
|
||||
|
||||
import type { PageData } from './$types';
|
||||
import { fade } from 'svelte/transition';
|
||||
// import MediaComponent from '$lib/editor/MediaComponent.svelte';
|
||||
@@ -15,8 +17,12 @@ SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
const { t } = getLocalization();
|
||||
|
||||
export let data: PageData;
|
||||
let edit_popup = null;
|
||||
interface Props {
|
||||
data: PageData;
|
||||
}
|
||||
|
||||
let { data }: Props = $props();
|
||||
let edit_popup = $state(null);
|
||||
const images = data.images;
|
||||
|
||||
const close_popup_handler = (e: Event) => {
|
||||
@@ -121,11 +127,11 @@ SPDX-License-Identifier: MPL-2.0
|
||||
<div
|
||||
transition:fade={{ duration: 100 }}
|
||||
class="fixed top-0 left-0 h-screen w-screen z-40 flex bg-black/50"
|
||||
on:click={close_popup_handler}
|
||||
onclick={close_popup_handler}
|
||||
>
|
||||
<div class="w-auto h-auto m-auto rounded-sm bg-white dark:bg-gray-700 p-4">
|
||||
<h1 class="text-2xl text-center">{$t('file_dashboard.edit_the_image')}</h1>
|
||||
<form class="flex flex-col" on:submit|preventDefault={save_image_metadata}>
|
||||
<form class="flex flex-col" onsubmit={preventDefault(save_image_metadata)}>
|
||||
<div class="flex flex-row">
|
||||
<div class="flex flex-col mr-4">
|
||||
<label for="name" class="m-auto">{$t('file_dashboard.filename_word')}</label
|
||||
|
||||
Reference in New Issue
Block a user