feat(front): make profile members link to profile on group admin view and the reverse

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2023-05-24 15:29:26 +02:00
parent 60185e80e3
commit 96129d2339
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773
2 changed files with 76 additions and 30 deletions

View file

@ -114,6 +114,13 @@
>
<article class="flex gap-1">
<div class="flex-none">
<router-link
class="no-underline"
:to="{
name: RouteName.ADMIN_PROFILE,
params: { id: props.row.actor.id },
}"
>
<figure v-if="props.row.actor.avatar">
<img
class="rounded"
@ -124,16 +131,35 @@
/>
</figure>
<AccountCircle :size="48" v-else />
</router-link>
</div>
<div>
<div class="prose dark:prose-invert">
<span v-if="props.row.actor.name">{{
props.row.actor.name
}}</span
><span v-else>@{{ usernameWithDomain(props.row.actor) }}</span
<router-link
class="no-underline"
:to="{
name: RouteName.ADMIN_PROFILE,
params: { id: props.row.actor.id },
}"
v-if="props.row.actor.name"
>{{ props.row.actor.name }}</router-link
><router-link
class="no-underline"
:to="{
name: RouteName.ADMIN_PROFILE,
params: { id: props.row.actor.id },
}"
v-else
>@{{ usernameWithDomain(props.row.actor) }}</router-link
><br />
<span v-if="props.row.actor.name"
>@{{ usernameWithDomain(props.row.actor) }}</span
<router-link
class="no-underline"
:to="{
name: RouteName.ADMIN_PROFILE,
params: { id: props.row.actor.id },
}"
v-if="props.row.actor.name"
>@{{ usernameWithDomain(props.row.actor) }}</router-link
>
</div>
</div>

View file

@ -199,6 +199,13 @@
v-slot="props"
>
<article class="flex gap-2">
<router-link
class="no-underline"
:to="{
name: RouteName.ADMIN_GROUP_PROFILE,
params: { id: props.row.parent.id },
}"
>
<figure class="" v-if="props.row.parent.avatar">
<img
class="rounded-full"
@ -209,13 +216,26 @@
/>
</figure>
<AccountCircle v-else :size="48" />
</router-link>
<div class="">
<div class="prose dark:prose-invert">
<span v-if="props.row.parent.name">{{
props.row.parent.name
}}</span
<router-link
class="no-underline"
:to="{
name: RouteName.ADMIN_GROUP_PROFILE,
params: { id: props.row.parent.id },
}"
v-if="props.row.parent.name"
>{{ props.row.parent.name }}</router-link
><br />
<span>@{{ usernameWithDomain(props.row.parent) }}</span>
<router-link
class="no-underline"
:to="{
name: RouteName.ADMIN_GROUP_PROFILE,
params: { id: props.row.parent.id },
}"
>@{{ usernameWithDomain(props.row.parent) }}</router-link
>
</div>
</div>
</article>