Migrate to svelte 5

This commit is contained in:
kwaroran
2024-10-23 02:31:37 +09:00
parent e434c7ab96
commit c7330719ad
120 changed files with 2398 additions and 2033 deletions

View File

@@ -1,17 +1,23 @@
<script lang="ts">
import { stopPropagation } from 'svelte/legacy';
import { CCLicenseData } from "src/ts/creation/license";
import { tooltip } from "src/ts/gui/tooltip";
import { openURL } from "src/ts/storage/globalApi";
export let license = ""
interface Props {
license?: string;
}
let { license = "" }: Props = $props();
</script>
{#if Object.keys(CCLicenseData).includes(license)}
<div class="w-full flex flex-row">
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div class="flex flex-wrap flex-row gap-1 mt-2 items-center cursor-pointer" use:tooltip={CCLicenseData[license][1] + ". The License only applys to the text."} on:click|stopPropagation={() => {
<!-- svelte-ignore a11y_click_events_have_key_events -->
<div class="flex flex-wrap flex-row gap-1 mt-2 items-center cursor-pointer" use:tooltip={CCLicenseData[license][1] + ". The License only applys to the text."} onclick={stopPropagation(() => {
openURL(`https://creativecommons.org/licenses/${CCLicenseData[license][0]}/4.0/`)
}}>
})}>
<img alt="creative commons" class="cc" src="https://i.creativecommons.org/l/{CCLicenseData[license][0]}/4.0/88x31.png" />
<span class="text-textcolor2">
Licensed with {CCLicenseData[license][2]}