lovely. got a couple of partial implementations....

update git ignore

kaas

remove large file

syncy sync
This commit is contained in:
Chris Kruining 2025-04-03 17:27:35 +02:00 committed by Chris Kruining
parent 89f526e9d9
commit 98cd4d630c
Signed by: chris
SSH key fingerprint: SHA256:nG82MUfuVdRVyCKKWqhY+pCrbz9nbX6uzUns4RKa1Pg
24 changed files with 586 additions and 76 deletions

View file

@ -1,10 +1,17 @@
import { json, Params, query, redirect, RouteDefinition, useParams } from "@solidjs/router";
import {
json,
Params,
query,
redirect,
RouteDefinition,
useParams,
} from "@solidjs/router";
import { createSlug, getEntry } from "~/features/content";
import { Player } from "~/features/player";
import { toSlug } from "~/utilities";
const healUrl = query(async (slug: string) => {
const entry = await getEntry(slug.slice(slug.lastIndexOf('-') + 1));
const entry = await getEntry(slug.slice(slug.lastIndexOf("-") + 1));
if (entry === undefined) {
return json(null, { status: 404 });
@ -17,11 +24,10 @@ const healUrl = query(async (slug: string) => {
}
throw redirect(`/watch/${actualSlug}`);
}, 'watch.heal');
}, "watch.heal");
interface ItemParams extends Params {
title: string;
id: string;
slug: string;
}
export const route = {
@ -31,11 +37,12 @@ export const route = {
} satisfies RouteDefinition;
export default function Item() {
const params = useParams<ItemParams>();
const { slug } = useParams<ItemParams>();
const id = slug.slice(slug.lastIndexOf("-") + 1);
return (
<>
<Player id={params.id} />
<Player id={id} />
</>
);
}