Skip to content

Commit

Permalink
feat: insta and matrix (#1072)
Browse files Browse the repository at this point in the history
* feat: insta and matrix

* hotfix: instagram link url

---------

Co-authored-by: Andrew Tavis McAllister <[email protected]>
  • Loading branch information
UnknownSean8 and andrewtavis authored Jan 15, 2025
1 parent 06fff93 commit a24b3e8
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
7 changes: 4 additions & 3 deletions frontend/components/btn/BtnShareIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@
:iconSize="iconSize"
/>
</component>
<component
<div
v-else-if="type == 'redirect'"
@click="copyToClipboardThenOpenUrl(name, urlLink, redirectLink)"
@keypress.space="copyToClipboardThenOpenUrl(name, urlLink, redirectLink)"
@keypress.enter="copyToClipboardThenOpenUrl(name, urlLink, redirectLink)"
:is="vueSocials[socialComponent]"
class="focus-brand"
tabindex="0"
role="button"
Expand All @@ -44,7 +43,7 @@
:text="$t('components.btn_share_icon.url_copied')"
:iconSize="iconSize"
/>
</component>
</div>
</template>

<script setup lang="ts">
Expand Down Expand Up @@ -111,6 +110,8 @@ const contentCopied = ref(false);

const getCurrentI18n: { [key: string]: string } = {
signal: "components.btn_share_icon.opening_signal",
matrix: "components.btn_share_icon.opening_matrix",
instagram: "components.btn_share_icon.opening_instagram",
};

const copyToClipboardThenOpenUrl = async (
Expand Down
26 changes: 26 additions & 0 deletions frontend/components/modal/ModalSharePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,32 @@
:use-native-behavior="useNativeBehavior"
:native-behavior-options="nativeBehaviorOptions"
/>
<BtnShareIcon
type="redirect"
:iconName="IconMap.INSTAGRAM"
:text="$t('components._global.instagram')"
iconSize="1.5em"
:window-features="windowFeatures"
:share-options="shareOptions"
:use-native-behavior="useNativeBehavior"
:native-behavior-options="nativeBehaviorOptions"
:urlLink="getCurrentUrl()"
:name="getCurrentName()"
redirect-link="https://instagram.com"
/>
<BtnShareIcon
type="redirect"
:iconName="IconMap.MATRIX"
:text="$t('components._global.matrix')"
iconSize="1.5em"
:window-features="windowFeatures"
:share-options="shareOptions"
:use-native-behavior="useNativeBehavior"
:native-behavior-options="nativeBehaviorOptions"
:urlLink="getCurrentUrl()"
:name="getCurrentName()"
redirect-link="https://matrix.to/#/#activist_community:matrix.org"
/>
<BtnShareIcon
type="redirect"
:iconName="IconMap.LINK"
Expand Down
2 changes: 2 additions & 0 deletions frontend/i18n/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
"components._global.upvote_application_aria_label": "Vote to support the organization joining activist",
"components._global.working_groups_subtext": "The following are working groups within {entity_name}",
"components.btn_road_map.aria_label": "Learn about the activist roadmap",
"components.btn_share_icon.opening_instagram": "Opening Instagram",
"components.btn_share_icon.opening_matrix": "Opening Matrix",
"components.btn_share_icon.opening_signal": "Opening Signal",
"components.btn_share_icon.url_copied": "URL copied",
"components.card.about._global.full_text": "Click for full text",
Expand Down

0 comments on commit a24b3e8

Please sign in to comment.