Skip to content

Commit

Permalink
Opens twitter share in a new tab and ensures trust-bonus always opens…
Browse files Browse the repository at this point in the history
… (on thanks-modal close) (#8566)
  • Loading branch information
gdixon authored Mar 15, 2021
1 parent b9fd520 commit 49d2bd9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/assets/v2/js/grants/contribution-trust-bonus.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Vue.component('contribution-trust-bonus', {
close() {
this.$bvModal.hide(this.modalId);
},
goToTrustBonus() {
openProfileTrustBonus() {
document.location = '/profile/trust';
}
}
Expand Down
5 changes: 4 additions & 1 deletion app/assets/v2/js/grants/grant-thanks-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,16 @@ Vue.component('contribution-thanks-modal', {
methods: {
close() {
this.$bvModal.hide(this.modalId);
this.$bvModal.show('trust-bonus');
},
handleHide() {
CartData.clearCheckedOut();
this.$bvModal.show('trust-bonus');
},
showSaveAsCollection() {
this.$bvModal.show('create-collection');
},
shareOnTwitter() {
window.open(this.tweetUrl, '_blank');
}
}
});
2 changes: 1 addition & 1 deletion app/retail/templates/shared/contribution_trust_bonus.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ <h3 class="mb-0 mb-md-5 d-flex-inline">Increase your QF matching by up to 25%</h
<b-button
class="mt-2 col-md-4 col-sm-12 btn-primary"
variant="primary"
@click="goToTrustBonus()"
@click="openProfileTrustBonus()"
>
Verify Profile
</b-button>
Expand Down
2 changes: 1 addition & 1 deletion app/retail/templates/shared/grant_thanks_modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ <h3 class="mb-0 mb-md-5 d-flex-inline">Thank you for your contribution!</h3>
<b-button
class="mt-2 mx-2 col-md-4 col-sm-12"
variant="primary"
:href="tweetUrl"
@click="shareOnTwitter()"
>
<i class="fab fa-twitter" aria-hidden="true"></i>
Share on Twitter
Expand Down

0 comments on commit 49d2bd9

Please sign in to comment.