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

View file

@ -199,6 +199,13 @@
v-slot="props" v-slot="props"
> >
<article class="flex gap-2"> <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"> <figure class="" v-if="props.row.parent.avatar">
<img <img
class="rounded-full" class="rounded-full"
@ -209,13 +216,26 @@
/> />
</figure> </figure>
<AccountCircle v-else :size="48" /> <AccountCircle v-else :size="48" />
</router-link>
<div class=""> <div class="">
<div class="prose dark:prose-invert"> <div class="prose dark:prose-invert">
<span v-if="props.row.parent.name">{{ <router-link
props.row.parent.name class="no-underline"
}}</span :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 /> ><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>
</div> </div>
</article> </article>