diff --git a/js/src/assets/diaspora-icon.svg b/js/src/assets/diaspora-icon.svg deleted file mode 100644 index 7a5b5cf3a..000000000 --- a/js/src/assets/diaspora-icon.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/js/src/assets/logo.png b/js/src/assets/logo.png deleted file mode 100644 index f3d2503fc..000000000 Binary files a/js/src/assets/logo.png and /dev/null differ diff --git a/js/src/components/Event/ShareEventModal.vue b/js/src/components/Event/ShareEventModal.vue index f4055f2da..83ddf3b92 100644 --- a/js/src/components/Event/ShareEventModal.vue +++ b/js/src/components/Event/ShareEventModal.vue @@ -27,8 +27,13 @@ {{ $t("All the places have already been taken") }} - - + +

- - - - + + + - + + - - - + -
@@ -82,13 +124,13 @@ import { Component, Prop, Vue, Ref } from "vue-property-decorator"; import { EventStatus, EventVisibility } from "@/types/enums"; import { IEvent } from "../../types/event.model"; -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore -import DiasporaLogo from "../../assets/diaspora-icon.svg?inline"; +import DiasporaLogo from "../Share/DiasporaLogo.vue"; +import MastodonLogo from "../Share/MastodonLogo.vue"; @Component({ components: { DiasporaLogo, + MastodonLogo, }, }) export default class ShareEventModal extends Vue { @@ -123,6 +165,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}`; } @@ -133,6 +185,16 @@ export default class ShareEventModal extends Vue { )}&url=${encodeURIComponent(this.event.url)}`; } + get mastodonShareUrl(): string { + return `https://toot.karamoff.dev/?text=${encodeURIComponent( + this.basicTextToEncode + )}`; + } + + get basicTextToEncode(): string { + return `${this.event.title}\r\n${this.event.url}`; + } + copyURL(): void { this.eventURLInput.$refs.input.select(); document.execCommand("copy"); @@ -144,8 +206,10 @@ export default class ShareEventModal extends Vue { } diff --git a/js/src/components/Group/ShareGroupModal.vue b/js/src/components/Group/ShareGroupModal.vue index 132f4a050..257b666e5 100644 --- a/js/src/components/Group/ShareGroupModal.vue +++ b/js/src/components/Group/ShareGroupModal.vue @@ -17,8 +17,13 @@ ) }} - - + +

- - - - + + + - + + - - - + -
@@ -71,14 +113,14 @@ diff --git a/js/src/components/Share/DiasporaLogo.vue b/js/src/components/Share/DiasporaLogo.vue new file mode 100644 index 000000000..a2ce06903 --- /dev/null +++ b/js/src/components/Share/DiasporaLogo.vue @@ -0,0 +1,26 @@ + + diff --git a/js/src/components/Share/MastodonLogo.vue b/js/src/components/Share/MastodonLogo.vue new file mode 100644 index 000000000..c35ace269 --- /dev/null +++ b/js/src/components/Share/MastodonLogo.vue @@ -0,0 +1,25 @@ + + diff --git a/js/src/i18n/en_US.json b/js/src/i18n/en_US.json index 445eece79..6b1574987 100644 --- a/js/src/i18n/en_US.json +++ b/js/src/i18n/en_US.json @@ -1060,5 +1060,8 @@ "We couldn't save your participation inside this browser. Not to worry, you have successfully confirmed your participation, we just couldn't save it's status in this browser because of a technical issue.": "We couldn't save your participation inside this browser. Not to worry, you have successfully confirmed your participation, we just couldn't save it's status in this browser because of a technical issue.", "This instance hasn't got push notifications enabled.": "This instance hasn't got push notifications enabled.", "enable the feature": "enable the feature", - "Ask your instance admin to {enable_feature}.": "Ask your instance admin to {enable_feature}." + "Ask your instance admin to {enable_feature}.": "Ask your instance admin to {enable_feature}.", + "Event URL": "Event URL", + "Copy URL to clipboard": "Copy URL to clipboard", + "Group URL": "Group URL" } diff --git a/js/src/i18n/fr_FR.json b/js/src/i18n/fr_FR.json index 584fd7839..7b635272c 100644 --- a/js/src/i18n/fr_FR.json +++ b/js/src/i18n/fr_FR.json @@ -1151,5 +1151,8 @@ "We couldn't save your participation inside this browser. Not to worry, you have successfully confirmed your participation, we just couldn't save it's status in this browser because of a technical issue.": "Nous n'avons pas pu sauvegarder votre participation dans ce navigateur. Aucune inquiétude, vous avez bien confirmé votre participation, nous n'avons juste pas pu enregistrer son statut dans ce navigateur à cause d'un souci technique.", "This instance hasn't got push notifications enabled.": "Cette instance n'a pas activé la fonctionnalité de notification push.", "enable the feature": "activer la fonctionnalité", - "Ask your instance admin to {enable_feature}.": "Demandez à l'administrateur⋅ice de votre instance d'{enable_feature}." + "Ask your instance admin to {enable_feature}.": "Demandez à l'administrateur⋅ice de votre instance d'{enable_feature}.", + "Event URL": "URL de l'événement", + "Copy URL to clipboard": "Copier l'URL dans le presse-papiers", + "Group URL": "URL du groupe" } diff --git a/test/tasks/users_test.exs b/test/tasks/users_test.exs index 6c0463a39..7400be48b 100644 --- a/test/tasks/users_test.exs +++ b/test/tasks/users_test.exs @@ -160,7 +160,7 @@ defmodule Mix.Tasks.Mobilizon.UsersTest do test "enable and disable at the same time" do Modify.run([@email, "--disable", "--enable"]) assert_received {:mix_shell, :error, [message]} - assert message =~ "Can't use both --enabled and --disable options at the same time." + assert message =~ "Can't use both --enable and --disable options at the same time." end @modified_email "modified@email.tld"