2020-02-18 08:57:00 +01:00
|
|
|
<template>
|
2021-11-12 15:42:52 +01:00
|
|
|
<div class="card">
|
|
|
|
<div class="card-content media">
|
|
|
|
<div class="media-content">
|
2022-07-12 10:55:28 +02:00
|
|
|
<div class="prose dark:prose-invert">
|
|
|
|
<i18n-t
|
2021-11-12 15:42:52 +01:00
|
|
|
tag="p"
|
2022-07-12 10:55:28 +02:00
|
|
|
keypath="You have been invited by {invitedBy} to the following group:"
|
2021-11-12 15:42:52 +01:00
|
|
|
>
|
2022-08-12 16:42:40 +02:00
|
|
|
<template #invitedBy>
|
2022-07-12 10:55:28 +02:00
|
|
|
<b>{{ member?.invitedBy?.name }}</b>
|
|
|
|
</template>
|
|
|
|
</i18n-t>
|
2020-02-18 08:57:00 +01:00
|
|
|
</div>
|
2021-11-12 15:42:52 +01:00
|
|
|
<div class="media subfield">
|
|
|
|
<div class="media-left">
|
|
|
|
<figure class="image is-48x48" v-if="member.parent.avatar">
|
|
|
|
<img class="is-rounded" :src="member.parent.avatar.url" alt="" />
|
|
|
|
</figure>
|
2022-07-12 10:55:28 +02:00
|
|
|
<o-icon v-else size="large" icon="account-group" />
|
2021-11-12 15:42:52 +01:00
|
|
|
</div>
|
|
|
|
<div class="media-content">
|
|
|
|
<div class="level">
|
|
|
|
<div class="level-left">
|
|
|
|
<div class="level-item mr-3">
|
|
|
|
<router-link
|
|
|
|
:to="{
|
|
|
|
name: RouteName.GROUP,
|
|
|
|
params: {
|
|
|
|
preferredUsername: usernameWithDomain(member.parent),
|
|
|
|
},
|
|
|
|
}"
|
|
|
|
>
|
|
|
|
<h3 class="is-size-5">{{ member.parent.name }}</h3>
|
|
|
|
<p class="is-size-7 has-text-grey-dark">
|
|
|
|
<span v-if="member.parent.domain">
|
|
|
|
{{
|
|
|
|
`@${member.parent.preferredUsername}@${member.parent.domain}`
|
|
|
|
}}
|
|
|
|
</span>
|
|
|
|
<span v-else>{{
|
|
|
|
`@${member.parent.preferredUsername}`
|
|
|
|
}}</span>
|
|
|
|
</p>
|
|
|
|
</router-link>
|
|
|
|
</div>
|
2020-02-18 08:57:00 +01:00
|
|
|
</div>
|
2021-11-12 15:42:52 +01:00
|
|
|
<div class="level-right">
|
|
|
|
<div class="level-item">
|
2022-07-12 10:55:28 +02:00
|
|
|
<o-button
|
|
|
|
variant="success"
|
2021-11-12 15:42:52 +01:00
|
|
|
@click="$emit('accept', member.id)"
|
|
|
|
>
|
|
|
|
{{ $t("Accept") }}
|
2022-07-12 10:55:28 +02:00
|
|
|
</o-button>
|
2021-11-12 15:42:52 +01:00
|
|
|
</div>
|
|
|
|
<div class="level-item">
|
2022-07-12 10:55:28 +02:00
|
|
|
<o-button
|
|
|
|
variant="danger"
|
2021-11-12 15:42:52 +01:00
|
|
|
@click="$emit('reject', member.id)"
|
|
|
|
>
|
|
|
|
{{ $t("Decline") }}
|
2022-07-12 10:55:28 +02:00
|
|
|
</o-button>
|
2021-11-12 15:42:52 +01:00
|
|
|
</div>
|
2020-02-18 08:57:00 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
<script lang="ts" setup>
|
2020-11-27 19:27:44 +01:00
|
|
|
import { usernameWithDomain } from "@/types/actor";
|
|
|
|
import { IMember } from "@/types/actor/member.model";
|
2020-02-18 08:57:00 +01:00
|
|
|
import RouteName from "../../router/name";
|
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
defineProps<{
|
|
|
|
member: IMember;
|
|
|
|
}>();
|
2020-02-18 08:57:00 +01:00
|
|
|
</script>
|