2020-02-18 08:57:00 +01:00
|
|
|
<template>
|
2022-10-26 18:19:05 +02:00
|
|
|
<div class="border rounded p-2 bg-mbz-yellow-alt-50 dark:bg-zinc-700">
|
|
|
|
<div class="prose dark:prose-invert">
|
|
|
|
<i18n-t
|
|
|
|
tag="p"
|
|
|
|
keypath="You have been invited by {invitedBy} to the following group:"
|
|
|
|
>
|
|
|
|
<template #invitedBy>
|
|
|
|
<b>{{ member?.invitedBy?.name }}</b>
|
|
|
|
</template>
|
|
|
|
</i18n-t>
|
|
|
|
</div>
|
|
|
|
<div class="flex justify-between gap-2">
|
|
|
|
<div class="flex gap-2">
|
|
|
|
<div class="">
|
|
|
|
<figure v-if="member.parent.avatar">
|
|
|
|
<img
|
|
|
|
class="rounded-full"
|
|
|
|
:src="member.parent.avatar.url"
|
|
|
|
alt=""
|
|
|
|
height="48"
|
|
|
|
width="48"
|
|
|
|
/>
|
|
|
|
</figure>
|
|
|
|
<AccountGroup :size="48" v-else />
|
|
|
|
</div>
|
|
|
|
<div class="mr-3">
|
|
|
|
<router-link
|
|
|
|
:to="{
|
|
|
|
name: RouteName.GROUP,
|
|
|
|
params: {
|
|
|
|
preferredUsername: usernameWithDomain(member.parent),
|
|
|
|
},
|
|
|
|
}"
|
2021-11-12 15:42:52 +01:00
|
|
|
>
|
2022-10-26 18:19:05 +02:00
|
|
|
<p class="">{{ member.parent.name }}</p>
|
|
|
|
<p class="text-sm">@{{ usernameWithDomain(member.parent) }}</p>
|
|
|
|
</router-link>
|
2020-02-18 08:57:00 +01:00
|
|
|
</div>
|
2022-10-26 18:19:05 +02:00
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<div class="flex gap-2">
|
2022-08-26 16:08:58 +02:00
|
|
|
<div class="">
|
2022-10-26 18:19:05 +02:00
|
|
|
<o-button variant="success" @click="$emit('accept', member.id)">
|
|
|
|
{{ t("Accept") }}
|
|
|
|
</o-button>
|
2021-11-12 15:42:52 +01:00
|
|
|
</div>
|
2022-10-26 18:19:05 +02:00
|
|
|
<div class="">
|
|
|
|
<o-button variant="danger" @click="$emit('reject', member.id)">
|
|
|
|
{{ t("Decline") }}
|
|
|
|
</o-button>
|
2020-02-18 08:57:00 +01:00
|
|
|
</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-08-26 16:08:58 +02:00
|
|
|
import AccountGroup from "vue-material-design-icons/AccountGroup.vue";
|
2022-10-26 18:19:05 +02:00
|
|
|
import { useI18n } from "vue-i18n";
|
|
|
|
|
|
|
|
const { t } = useI18n({ useScope: "global" });
|
2020-02-18 08:57:00 +01:00
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
defineProps<{
|
|
|
|
member: IMember;
|
|
|
|
}>();
|
2020-02-18 08:57:00 +01:00
|
|
|
</script>
|