2019-01-21 15:08:22 +01:00
|
|
|
<template>
|
2021-11-06 10:08:20 +01:00
|
|
|
<router-link
|
|
|
|
:to="{
|
|
|
|
name: RouteName.GROUP,
|
|
|
|
params: { preferredUsername: usernameWithDomain(group) },
|
|
|
|
}"
|
2022-08-12 16:46:44 +02:00
|
|
|
class="card flex flex-col max-w-md bg-white dark:bg-mbz-purple dark:text-white rounded-lg shadow-lg"
|
2021-11-06 10:08:20 +01:00
|
|
|
>
|
2022-07-12 10:55:28 +02:00
|
|
|
<figure class="rounded-t-lg flex justify-center h-1/4">
|
|
|
|
<lazy-image-wrapper :picture="group.banner" :rounded="true" />
|
|
|
|
</figure>
|
|
|
|
<div class="py-2 pl-2">
|
|
|
|
<div class="flex gap-1 mb-2">
|
|
|
|
<div class="">
|
|
|
|
<figure class="" v-if="group.avatar">
|
|
|
|
<img class="rounded-xl" :src="group.avatar.url" alt="" />
|
2020-02-18 08:57:00 +01:00
|
|
|
</figure>
|
2022-07-12 10:55:28 +02:00
|
|
|
<AccountGroup v-else :size="48" />
|
2020-02-18 08:57:00 +01:00
|
|
|
</div>
|
2022-07-12 10:55:28 +02:00
|
|
|
<div class="">
|
|
|
|
<h3 class="text-2xl" dir="auto">
|
2021-11-07 14:59:20 +01:00
|
|
|
{{ displayName(group) }}
|
|
|
|
</h3>
|
2021-11-06 14:37:02 +01:00
|
|
|
<span class="is-6 has-text-grey-dark group-federated-username">
|
2021-11-06 10:08:20 +01:00
|
|
|
{{ `@${usernameWithDomain(group)}` }}
|
|
|
|
</span>
|
2020-02-18 08:57:00 +01:00
|
|
|
</div>
|
2019-01-21 15:08:22 +01:00
|
|
|
</div>
|
2022-04-21 11:53:16 +02:00
|
|
|
<div class="mb-2 line-clamp-3" dir="auto" v-html="group.summary" />
|
2022-03-24 14:41:49 +01:00
|
|
|
<div>
|
2021-11-06 11:15:16 +01:00
|
|
|
<inline-address
|
2022-04-21 11:53:42 +02:00
|
|
|
v-if="group.physicalAddress && addressFullName(group.physicalAddress)"
|
2021-11-06 11:15:16 +01:00
|
|
|
:physicalAddress="group.physicalAddress"
|
|
|
|
/>
|
2022-07-12 10:55:28 +02:00
|
|
|
<p class="flex">
|
|
|
|
<Account />
|
2021-11-06 10:08:20 +01:00
|
|
|
{{
|
2022-07-12 10:55:28 +02:00
|
|
|
t(
|
2021-11-06 10:08:20 +01:00
|
|
|
"{count} members or followers",
|
|
|
|
{
|
|
|
|
count: group.members.total + group.followers.total,
|
2022-07-12 10:55:28 +02:00
|
|
|
},
|
|
|
|
group.members.total + group.followers.total
|
2021-11-06 10:08:20 +01:00
|
|
|
)
|
|
|
|
}}
|
2021-11-06 11:15:16 +01:00
|
|
|
</p>
|
2019-01-21 15:08:22 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-11-06 10:08:20 +01:00
|
|
|
</router-link>
|
2019-01-21 15:08:22 +01:00
|
|
|
</template>
|
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
<script lang="ts" setup>
|
2021-11-06 10:08:20 +01:00
|
|
|
import { displayName, IGroup, usernameWithDomain } from "@/types/actor";
|
|
|
|
import LazyImageWrapper from "@/components/Image/LazyImageWrapper.vue";
|
2020-02-18 08:57:00 +01:00
|
|
|
import RouteName from "../../router/name";
|
2021-11-06 11:15:16 +01:00
|
|
|
import InlineAddress from "@/components/Address/InlineAddress.vue";
|
2022-04-21 11:53:42 +02:00
|
|
|
import { addressFullName } from "@/types/address.model";
|
2022-07-12 10:55:28 +02:00
|
|
|
import { useI18n } from "vue-i18n";
|
|
|
|
import AccountGroup from "vue-material-design-icons/AccountGroup.vue";
|
|
|
|
import Account from "vue-material-design-icons/Account.vue";
|
2019-01-21 15:08:22 +01:00
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
defineProps<{
|
|
|
|
group: IGroup;
|
|
|
|
}>();
|
2020-02-18 08:57:00 +01:00
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
const { t } = useI18n({ useScope: "global" });
|
2019-01-21 15:08:22 +01:00
|
|
|
</script>
|