Federation (#327)
* initial commit federation * more federation * more federation * more federation * completes follow, accept, undo * add trail create activity * process trail create activity * more trail create activity * adds missing endpoints * adds update and delete activity * adds comment activities * adds activities back * adds summit logs activities * deletes follow counts table * fixes migrations * fixes migrations * fixes migrations * fixes migrations * adds remote profiles * ctd * ctd * we are getting closer... * adds public summit logs * fixes federated trails in lists * adds remote lists * adds list activites * fixes lists * adds notifications * adds iri redirect * fixes comments and summitlogs * fixes follows and profiles * adds asynchronous send * fixes list search * adds encryption key * bug fixes * fixes activity signing * removes custon activity object types * adds html editor * fixes html editor * fixes display issues on mastodon * adds federated sharing * finishes announcements * fixes small summit log issues * adds trail likes * finalizes likes * fixes images for komoot * add disable federation option * adds private profiles * updates docs * adds federated comments * adds trail and comments actvitiypub routes * adds mentions to editor * adds mentions to trails, comments, summit logs * updates theme * updates theme * update docs * update docs * updates docs * fixes various frontend problems * fixes activitypub follows api * updates docs * updates docs --------- Co-authored-by: Christian Beutel <>
This commit is contained in:
21
web/src/routes/trail/view/[handle]/[id]/+page.svelte
Normal file
21
web/src/routes/trail/view/[handle]/[id]/+page.svelte
Normal file
@@ -0,0 +1,21 @@
|
||||
<script lang="ts">
|
||||
import { page } from "$app/state";
|
||||
import TrailInfoPanel from "$lib/components/trail/trail_info_panel.svelte";
|
||||
import { trail } from "$lib/stores/trail_store";
|
||||
import { _ } from "svelte-i18n";
|
||||
|
||||
let { data } = $props();
|
||||
</script>
|
||||
|
||||
{#if data.trail}
|
||||
<TrailInfoPanel
|
||||
activeTab={parseInt(page.url.searchParams.get("t") ?? "0")}
|
||||
initTrail={data.trail}
|
||||
mode="overview"
|
||||
handle={page.params.handle}
|
||||
></TrailInfoPanel>
|
||||
{/if}
|
||||
<svelte:head>
|
||||
<title>{$trail.name} | {$_("trail", { values: { n: 1 } })} | wanderer</title
|
||||
>
|
||||
</svelte:head>
|
||||
19
web/src/routes/trail/view/[handle]/[id]/+page.ts
Normal file
19
web/src/routes/trail/view/[handle]/[id]/+page.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { trails_show } from "$lib/stores/trail_store";
|
||||
import { APIError } from "$lib/util/api_util";
|
||||
import { error, type Load, type NumericRange } from "@sveltejs/kit";
|
||||
|
||||
export const load: Load = async ({ params, fetch }) => {
|
||||
try {
|
||||
const trail = await trails_show(params.id!, params.handle, true, fetch)
|
||||
|
||||
return { trail }
|
||||
} catch (e) {
|
||||
if (e instanceof APIError) {
|
||||
error(e.status as NumericRange<400, 599>, {
|
||||
message: e.status == 404 ? 'Not found' : e.message
|
||||
});
|
||||
}
|
||||
console.error(e);
|
||||
}
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user