From d383d0ecffafd73c3fcaa6a8a65064e35c4eddf3 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 29 Jun 2021 10:26:31 +0200 Subject: [PATCH] Add Whatsapp and Telegram sharing providers Signed-off-by: Thomas Citharel --- js/src/components/Event/ShareEventModal.vue | 16 ++++++++++++++++ js/src/components/Group/ShareGroupModal.vue | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/js/src/components/Event/ShareEventModal.vue b/js/src/components/Event/ShareEventModal.vue index d21f3ce34..82319ef76 100644 --- a/js/src/components/Event/ShareEventModal.vue +++ b/js/src/components/Event/ShareEventModal.vue @@ -64,6 +64,12 @@ + + @@ -129,6 +135,16 @@ export default class ShareEventModal extends Vue { )}&title=${this.event.title}`; } + get whatsAppShareUrl(): string { + return `https://wa.me/?text=${encodeURIComponent(this.basicTextToEncode)}`; + } + + get telegramShareUrl(): string { + return `https://t.me/share/url?url=${encodeURIComponent( + this.event.url + )}&text=${encodeURIComponent(this.event.title)}`; + } + get emailShareUrl(): string { return `mailto:?to=&body=${this.event.url}&subject=${this.event.title}`; } diff --git a/js/src/components/Group/ShareGroupModal.vue b/js/src/components/Group/ShareGroupModal.vue index bb4b43ac9..5dc5527aa 100644 --- a/js/src/components/Group/ShareGroupModal.vue +++ b/js/src/components/Group/ShareGroupModal.vue @@ -57,6 +57,12 @@ + +