feat: move old root routes to /v1 routes

This commit is contained in:
2026-09-10 19:28:22 +05:00
parent b36a865a0c
commit b6318f03ab
6 changed files with 3 additions and 10 deletions
+23
View File
@@ -0,0 +1,23 @@
<script lang="ts">
import ToolPage from "$lib/old/components/ToolPage.svelte";
import { getTool } from "$lib/old/registry";
import { t } from "$lib/i18n/t";
import { toolDescription, toolTitle } from "$lib/i18n/tool-strings";
let { data } = $props();
const tool = $derived(getTool(data.id));
</script>
<svelte:head>
<title
>{tool ? toolTitle(tool) : t("toolPage.fallbackTitle")} — easy-png-tools</title
>
{#if tool}
<meta name="description" content={toolDescription(tool)} />
{/if}
</svelte:head>
{#if tool}
<ToolPage {tool} />
{/if}
+15
View File
@@ -0,0 +1,15 @@
import { error } from "@sveltejs/kit";
import { getTool, TOOLS } from "$lib/old/registry";
import { t } from "$lib/i18n/t";
import type { EntryGenerator, PageLoad } from "./$types";
export const entries: EntryGenerator = () =>
TOOLS.map((tool) => ({ id: tool.id }));
export const load: PageLoad = ({ params }) => {
const tool = getTool(params.id);
if (!tool) {
error(404, t("errors.notFound"));
}
return { id: tool.id };
};