From 27798466717aefd3e5dc1a95477dc75dd9d50aec Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 16 Jun 2021 11:26:19 +0200 Subject: [PATCH] Add metainfo to JoinGroupWithAccount form Signed-off-by: Thomas Citharel --- js/src/components/Group/JoinGroupWithAccount.vue | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/js/src/components/Group/JoinGroupWithAccount.vue b/js/src/components/Group/JoinGroupWithAccount.vue index 85b51bae4..33dfe696f 100644 --- a/js/src/components/Group/JoinGroupWithAccount.vue +++ b/js/src/components/Group/JoinGroupWithAccount.vue @@ -30,6 +30,17 @@ import { IGroup } from "@/types/actor"; }, }, }, + metaInfo() { + return { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + title: this.$t("Join group {group}", { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + group: this.groupTitle, + }) as string, + }; + }, }) export default class JoinGroupWithAccount extends Vue { @Prop({ type: String, required: true }) preferredUsername!: string; @@ -40,6 +51,10 @@ export default class JoinGroupWithAccount extends Vue { return this.group?.url; } + get groupTitle(): undefined | string { + return this.group?.name || this.group?.preferredUsername; + } + sentence = this.$t( "We will redirect you to your instance in order to interact with this group" );