The next-generation file converter. Open source, fully local* and free forever.
fix: eslint errors
JovannMCc81f69987a1a
diff --git a/src/lib/components/functional/FancyMenu.svelte b/src/lib/components/functional/FancyMenu.svelteindex 240f43d..cf8632b 100644--- a/src/lib/components/functional/FancyMenu.svelte+++ b/src/lib/components/functional/FancyMenu.svelte@@ -1,6 +1,8 @@<script lang="ts">+ /* eslint-disable svelte/no-navigation-without-resolve */import { browser } from "$app/env";import { page } from "$app/state";+ import type { ResolvedPathname } from "$app/types";import { duration, fly } from "#lib/util/animation";import clsx from "clsx";import { onMount, tick } from "svelte";@@ -10,7 +12,7 @@interface Props {links: {name: string;- url: string;+ url: ResolvedPathname;activeMatch: (pathname: string) => boolean;}[];shouldGoBack: Writable<boolean> | null;diff --git a/src/lib/components/functional/Uploader.svelte b/src/lib/components/functional/Uploader.svelteindex f3ea744..c167c24 100644--- a/src/lib/components/functional/Uploader.svelte+++ b/src/lib/components/functional/Uploader.svelte@@ -5,6 +5,7 @@import { onMount } from "svelte";import { effects, files } from "#lib/store/index.svelte";import { goto } from "$app/navigation";+ import { resolve } from "$app/paths";import { m } from "#lib/paraglide/messages";type Props = {@@ -25,7 +26,7 @@if (!fileInput) return;const oldLength = files.files.length;await files.addAsync(fileInput.files);- if (files.files.length !== oldLength) goto("/convert");+ if (files.files.length !== oldLength) goto(resolve("/convert"));};onMount(() => {diff --git a/src/lib/components/layout/Footer.svelte b/src/lib/components/layout/Footer.svelteindex 1179c9e..ff8584b 100644--- a/src/lib/components/layout/Footer.svelte+++ b/src/lib/components/layout/Footer.svelte@@ -1,4 +1,5 @@<script lang="ts" context="module">+ import { resolve } from "$app/paths";import { GITHUB_URL_VERT, DISCORD_URL } from "#lib/util/consts";import { m } from "#lib/paraglide/messages";@@ -27,6 +28,7 @@class="font-normal hover:underline"href={GITHUB_URL_VERT}target="_blank"+ rel="external">{m["footer.source_code"]()}</a>@@ -35,11 +37,12 @@class="font-normal hover:underline"href={DISCORD_URL}target="_blank"+ rel="external">{m["footer.discord_server"]()}</a><p>•</p>- <a class="font-normal hover:underline" href="/privacy/">+ <a class="font-normal hover:underline" href={resolve("/privacy")}>{m["footer.privacy_policy"]()}</a>{#if commitHash}@@ -48,6 +51,7 @@class="font-normal hover:underline"href="{GITHUB_URL_VERT}/commit/{commitHash}"target="_blank"+ rel="external">{commitHash}</a>diff --git a/src/lib/components/layout/MobileLogo.svelte b/src/lib/components/layout/MobileLogo.svelteindex 5b38d23..957d534 100644--- a/src/lib/components/layout/MobileLogo.svelte+++ b/src/lib/components/layout/MobileLogo.svelte@@ -1,11 +1,12 @@<script>import Logo from "#lib/components/visual/svg/Logo.svelte";+ import { resolve } from "$app/paths";</script><div class="flex items-center justify-center pb-8 pt-4 md:hidden"><aclass="flex items-center justify-center rounded-[20px] bg-panel p-2 shadow-panel"- href="/"+ href={resolve("/")}><divclass="flex h-14 items-center justify-center rounded-[14px] bg-accent"diff --git a/src/lib/components/layout/Navbar/Base.svelte b/src/lib/components/layout/Navbar/Base.svelteindex cb4ea5d..588bcff 100644--- a/src/lib/components/layout/Navbar/Base.svelte+++ b/src/lib/components/layout/Navbar/Base.svelte@@ -1,4 +1,5 @@<script lang="ts">+ /* eslint-disable svelte/no-navigation-without-resolve */import { browser } from "$app/env";import { page } from "$app/state";import { duration, fade } from "#lib/util/animation";@@ -21,6 +22,7 @@import Panel from "../../visual/Panel.svelte";import Logo from "../../visual/svg/Logo.svelte";import { beforeNavigate } from "$app/navigation";+ import { resolve } from "$app/paths";import Tooltip from "#lib/components/visual/Tooltip.svelte";import { m } from "#lib/paraglide/messages";@@ -41,7 +43,7 @@},{name: m["navbar.convert"](),- url: "/convert/",+ url: "/convert",activeMatch: (pathname) =>pathname === "/convert/" || pathname === "/convert",icon: RefreshCwIcon,@@ -49,13 +51,13 @@},{name: m["navbar.settings"](),- url: "/settings/",+ url: "/settings",activeMatch: (pathname) => pathname.startsWith("/settings"),icon: SettingsIcon,},{name: m["navbar.about"](),- url: "/about/",+ url: "/about",activeMatch: (pathname) => pathname.startsWith("/about"),icon: InfoIcon,},@@ -185,7 +187,7 @@{/if}<aclass="hidden h-full w-28 items-center justify-center rounded-xl bg-accent md:flex"- href="/"+ href={resolve("/")}><div class="h-5 w-full"><Logo />diff --git a/src/lib/sections/about/Credits.svelte b/src/lib/sections/about/Credits.svelteindex cf60532..65a7a4b 100644--- a/src/lib/sections/about/Credits.svelte+++ b/src/lib/sections/about/Credits.svelte@@ -23,7 +23,7 @@<ahref={github}target="_blank"- rel="noopener noreferrer"+ rel="external noopener noreferrer"class="flex-shrink-0"><imgdiff --git a/src/lib/sections/about/Donate.svelte b/src/lib/sections/about/Donate.svelteindex 6b92ea4..bb596b4 100644--- a/src/lib/sections/about/Donate.svelte+++ b/src/lib/sections/about/Donate.svelte@@ -8,6 +8,7 @@<script lang="ts">import { goto } from "$app/navigation";+ import { resolve } from "$app/paths";import { page } from "$app/state";import { PUB_DONATION_URL, PUB_STRIPE_KEY } from "$app/env/public";// please do not change these!@@ -177,7 +178,7 @@});}- goto("/about");+ goto(resolve("/about"));}});</script>diff --git a/src/lib/sections/about/Resources.svelte b/src/lib/sections/about/Resources.svelteindex f882a30..ca6bdbc 100644--- a/src/lib/sections/about/Resources.svelte+++ b/src/lib/sections/about/Resources.svelte@@ -29,7 +29,7 @@<ahref={DISCORD_URL}target="_blank"- rel="noopener noreferrer"+ rel="external noopener noreferrer"class={clsx("btn flex flex-1 items-center justify-center gap-2 rounded-full bg-button p-4 text-black dynadark:text-white",!$effects && "!scale-100",@@ -41,7 +41,7 @@<ahref={GITHUB_URL_VERT}target="_blank"- rel="noopener noreferrer"+ rel="external noopener noreferrer"class={clsx("btn flex flex-1 items-center justify-center gap-2 rounded-full bg-button p-4 text-black dynadark:text-white",!$effects && "!scale-100",diff --git a/src/lib/sections/settings/Privacy.svelte b/src/lib/sections/settings/Privacy.svelteindex fe5ec0c..06b98f7 100644--- a/src/lib/sections/settings/Privacy.svelte+++ b/src/lib/sections/settings/Privacy.svelte@@ -19,6 +19,7 @@import { DISABLE_ALL_EXTERNAL_REQUESTS } from "#lib/util/consts";import { addDialog } from "#lib/store/DialogProvider";import { PUB_PLAUSIBLE_URL } from "$app/env/public";+ import { resolve } from "$app/paths";import clsx from "clsx";const { settings = $bindable() }: { settings: ISettings } = $props();@@ -342,7 +343,7 @@<div class="flex justify-center"><a- href="/debug"+ href={resolve("/debug")}class="flex items-center gap-1 text-xs text-muted transition-colors hover:text-foreground"><BugIcon size="14" />diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelteindex 93b2ffe..e0cde84 100644--- a/src/routes/+layout.svelte+++ b/src/routes/+layout.svelte@@ -1,6 +1,7 @@<script lang="ts">import { onMount } from "svelte";import { goto, beforeNavigate, afterNavigate } from "$app/navigation";+ import { resolve } from "$app/paths";import { PUB_PLAUSIBLE_URL, PUB_HOSTNAME } from "$app/env/public";import { DISABLE_ALL_EXTERNAL_REQUESTS, VERT_NAME } from "#lib/util/consts";@@ -55,7 +56,7 @@dropping.set(false);const oldLength = files.files.length;await files.addAsync(e.dataTransfer?.files);- if (files.files.length !== oldLength) goto("/convert");+ if (files.files.length !== oldLength) goto(resolve("/convert"));};const handleDrag = (e: DragEvent, drag: boolean) => {@@ -69,7 +70,7 @@e.preventDefault();const oldLength = files.files.length;await files.addAsync(clipboardData.files);- if (files.files.length !== oldLength) goto("/convert");+ if (files.files.length !== oldLength) goto(resolve("/convert"));};onMount(() => {