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

@@ -3,11 +3,12 @@ import HomeButton from "@/components/HomeButton.vue"
import PublicNoteList from "@/components/PublicNoteList.vue"
import { usePublicNoteList } from "@/hooks/usePublicNoteList.hook"
import { getAuthor } from "@/modules/atproto/getAuthor"
import { fromShortDid } from "@/modules/atproto/shortDid"
import { computedAsync } from "@vueuse/core"
import { computed } from "vue"
const props = defineProps<{ did: string }>()
const did = computed(() => props.did)
const props = defineProps<{ shortDid: string }>()
const did = computed(() => fromShortDid(props.shortDid))
const { notes, isLoading, canLoadMore, onLoadMore } = usePublicNoteList({ did })