76 lines
2.4 KiB

<div class="media">
<div class="media-content">
<div class="content">
<i18n tag="p" path="You have been invited by {invitedBy} to the following group:">
<b slot="invitedBy">{{ }}</b>
<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="" />
<b-icon v-else size="is-large" icon="account-group" />
<div class="media-content">
<div class="level">
<div class="level-left">
<div class="level-item">
name: RouteName.GROUP,
params: { preferredUsername: usernameWithDomain(member.parent) },
<h3>{{ }}</h3>
<p class="is-6 has-text-grey">
<span v-if="member.parent.domain">
{{ `@${member.parent.preferredUsername}@${member.parent.domain}` }}
<span v-else>{{ `@${member.parent.preferredUsername}` }}</span>
<div class="level-right">
<div class="level-item">
<b-button type="is-success" @click="$emit('accept',">
{{ $t("Accept") }}
<div class="level-item">
<b-button type="is-danger" @click="$emit('reject',">
{{ $t("Decline") }}
<script lang="ts">
import { Component, Prop, Vue } from "vue-property-decorator";
import { IMember, usernameWithDomain } from "@/types/actor";
import RouteName from "../../router/name";
export default class InvitationCard extends Vue {
@Prop({ required: true }) member!: IMember;
RouteName = RouteName;
usernameWithDomain = usernameWithDomain;
<style lang="scss" scoped>
.media:not(.subfield) {
background: lighten($primary, 40%);
padding: 10px;