forked from BRETT/BRETT
Shorten thread route from /thread to /t
All internal links (tiles, prev/next nav, comments, notifications, breadcrumb, dropzone route check) point to /t/<id>. A global route middleware permanently redirects old /thread/<id> URLs including query string and comment anchor. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
@@ -598,7 +598,7 @@ async function deleteComment(commentId: number) {
|
||||
class="absolute left-2 top-1/2 -translate-y-1/2 shadow opacity-80 hover:opacity-100"
|
||||
as-child
|
||||
>
|
||||
<NuxtLink :to="`/thread/${data.newerId}`" :aria-label="$t('thread.newer')">
|
||||
<NuxtLink :to="`/t/${data.newerId}`" :aria-label="$t('thread.newer')">
|
||||
<Icon name="ph:caret-left-fill" class="size-5" />
|
||||
</NuxtLink>
|
||||
</Button>
|
||||
@@ -609,7 +609,7 @@ async function deleteComment(commentId: number) {
|
||||
class="absolute right-2 top-1/2 -translate-y-1/2 shadow opacity-80 hover:opacity-100"
|
||||
as-child
|
||||
>
|
||||
<NuxtLink :to="`/thread/${data.olderId}`" :aria-label="$t('thread.older')">
|
||||
<NuxtLink :to="`/t/${data.olderId}`" :aria-label="$t('thread.older')">
|
||||
<Icon name="ph:caret-right-fill" class="size-5" />
|
||||
</NuxtLink>
|
||||
</Button>
|
||||
@@ -313,7 +313,7 @@ const timeAgo = useTimeAgo()
|
||||
<NuxtLink
|
||||
v-for="comment in comments.items"
|
||||
:key="comment.id"
|
||||
:to="`/thread/${comment.uploadId}#comment-${comment.id}`"
|
||||
:to="`/t/${comment.uploadId}#comment-${comment.id}`"
|
||||
class="flex items-center gap-3 px-3 py-2.5 text-sm transition-colors hover:bg-accent"
|
||||
>
|
||||
<NuxtImg
|
||||
|
||||
Reference in New Issue
Block a user