Add breadcrumb trail on Post view
And lint Closes #466 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
30eb37e31b
commit
3ddf360e11
@ -1,5 +1,21 @@
|
||||
<template>
|
||||
<article class="container mx-auto post" v-if="post">
|
||||
<breadcrumbs-nav
|
||||
v-if="post.attributedTo"
|
||||
:links="[
|
||||
{ name: RouteName.MY_GROUPS, text: t('My groups') },
|
||||
{
|
||||
name: RouteName.GROUP,
|
||||
params: { preferredUsername: usernameWithDomain(post.attributedTo) },
|
||||
text: displayName(post.attributedTo),
|
||||
},
|
||||
{
|
||||
name: RouteName.POST,
|
||||
params: { slug: post.slug },
|
||||
text: post.title,
|
||||
},
|
||||
]"
|
||||
/>
|
||||
<header>
|
||||
<div class="flex justify-center">
|
||||
<lazy-image-wrapper :picture="post.picture" />
|
||||
@ -94,7 +110,8 @@
|
||||
isCurrentActorAGroupModerator
|
||||
"
|
||||
>
|
||||
<router-link class="flex gap-1 whitespace-nowrap"
|
||||
<router-link
|
||||
class="flex gap-1 whitespace-nowrap"
|
||||
:to="{
|
||||
name: RouteName.POST_EDIT,
|
||||
params: { slug: post.slug },
|
||||
@ -112,7 +129,10 @@
|
||||
"
|
||||
tabIndex="-1"
|
||||
>
|
||||
<button @click="openDeletePostModal" class="flex gap-1 whitespace-nowrap">
|
||||
<button
|
||||
@click="openDeletePostModal"
|
||||
class="flex gap-1 whitespace-nowrap"
|
||||
>
|
||||
<Delete />
|
||||
{{ t("Delete") }}
|
||||
</button>
|
||||
@ -132,7 +152,10 @@
|
||||
v-if="!post.draft"
|
||||
tabIndex="-1"
|
||||
>
|
||||
<button @click="triggerShare()" class="flex gap-1 whitespace-nowrap">
|
||||
<button
|
||||
@click="triggerShare()"
|
||||
class="flex gap-1 whitespace-nowrap"
|
||||
>
|
||||
<Share />
|
||||
{{ t("Share this event") }}
|
||||
</button>
|
||||
@ -143,7 +166,10 @@
|
||||
v-if="ableToReport"
|
||||
tabIndex="-1"
|
||||
>
|
||||
<button @click="isReportModalActive = true" class="flex gap-1 whitespace-nowrap">
|
||||
<button
|
||||
@click="isReportModalActive = true"
|
||||
class="flex gap-1 whitespace-nowrap"
|
||||
>
|
||||
<Flag />
|
||||
{{ t("Report") }}
|
||||
</button>
|
||||
|
Loading…
Reference in New Issue
Block a user