Add Whatsapp and Telegram sharing providers
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
c5b9a98334
commit
d383d0ecff
|
@ -64,6 +64,12 @@
|
||||||
<a :href="facebookShareUrl" target="_blank" rel="nofollow noopener"
|
<a :href="facebookShareUrl" target="_blank" rel="nofollow noopener"
|
||||||
><b-icon icon="facebook" size="is-large" type="is-primary"
|
><b-icon icon="facebook" size="is-large" type="is-primary"
|
||||||
/></a>
|
/></a>
|
||||||
|
<a :href="whatsAppShareUrl" target="_blank" rel="nofollow noopener"
|
||||||
|
><b-icon icon="whatsapp" size="is-large" type="is-primary"
|
||||||
|
/></a>
|
||||||
|
<a :href="telegramShareUrl" target="_blank" rel="nofollow noopener"
|
||||||
|
><b-icon icon="telegram" size="is-large" type="is-primary"
|
||||||
|
/></a>
|
||||||
<a :href="linkedInShareUrl" target="_blank" rel="nofollow noopener"
|
<a :href="linkedInShareUrl" target="_blank" rel="nofollow noopener"
|
||||||
><b-icon icon="linkedin" size="is-large" type="is-primary"
|
><b-icon icon="linkedin" size="is-large" type="is-primary"
|
||||||
/></a>
|
/></a>
|
||||||
|
@ -129,6 +135,16 @@ export default class ShareEventModal extends Vue {
|
||||||
)}&title=${this.event.title}`;
|
)}&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 {
|
get emailShareUrl(): string {
|
||||||
return `mailto:?to=&body=${this.event.url}&subject=${this.event.title}`;
|
return `mailto:?to=&body=${this.event.url}&subject=${this.event.title}`;
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,6 +57,12 @@
|
||||||
<a :href="linkedInShareUrl" target="_blank" rel="nofollow noopener"
|
<a :href="linkedInShareUrl" target="_blank" rel="nofollow noopener"
|
||||||
><b-icon icon="linkedin" size="is-large" type="is-primary"
|
><b-icon icon="linkedin" size="is-large" type="is-primary"
|
||||||
/></a>
|
/></a>
|
||||||
|
<a :href="whatsAppShareUrl" target="_blank" rel="nofollow noopener"
|
||||||
|
><b-icon icon="whatsapp" size="is-large" type="is-primary"
|
||||||
|
/></a>
|
||||||
|
<a :href="telegramShareUrl" target="_blank" rel="nofollow noopener"
|
||||||
|
><b-icon icon="telegram" size="is-large" type="is-primary"
|
||||||
|
/></a>
|
||||||
<a
|
<a
|
||||||
:href="diasporaShareUrl"
|
:href="diasporaShareUrl"
|
||||||
class="diaspora"
|
class="diaspora"
|
||||||
|
@ -114,6 +120,16 @@ export default class ShareGroupModal extends Vue {
|
||||||
)}&title=${displayName(this.group)}`;
|
)}&title=${displayName(this.group)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get whatsAppShareUrl(): string {
|
||||||
|
return `https://wa.me/?text=${encodeURIComponent(this.basicTextToEncode)}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
get telegramShareUrl(): string {
|
||||||
|
return `https://t.me/share/url?url=${encodeURIComponent(
|
||||||
|
this.group.url
|
||||||
|
)}&text=${encodeURIComponent(displayName(this.group))}`;
|
||||||
|
}
|
||||||
|
|
||||||
get emailShareUrl(): string {
|
get emailShareUrl(): string {
|
||||||
return `mailto:?to=&body=${this.group.url}&subject=${displayName(
|
return `mailto:?to=&body=${this.group.url}&subject=${displayName(
|
||||||
this.group
|
this.group
|
||||||
|
|
Loading…
Reference in a new issue