Migrate to svelte 5
This commit is contained in:
@@ -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]}
|
||||
|
||||
Reference in New Issue
Block a user