feat: shorten DID in public note URLs by stripping did:plc: prefix

URLs are now /pub/<base32id>/rkey instead of /pub/did:plc:<base32id>/rkey.
Non-plc DIDs keep their method prefix (e.g. web:example.com).
This commit is contained in:
Julien Calixte
2026-03-17 01:33:51 +01:00
parent 5d145dd7ff
commit 163e3ee756
7 changed files with 26 additions and 15 deletions

View File

@@ -1,5 +1,6 @@
<script setup lang="ts">
import { PublicNoteListItem } from "@/modules/note/models/Note"
import { toShortDid } from "@/modules/atproto/shortDid"
import { slugify } from "@/utils/slugify"
import { vInfiniteScroll } from "@vueuse/components"
@@ -25,7 +26,7 @@ defineSlots<{
:to="{
name: 'PublicNoteView',
params: {
did: note.did,
shortDid: toShortDid(note.did),
rkey: note.rkey,
slug: slugify(note.title),
},