Skip to content

Commit

Permalink
Merge pull request #1929 from hypersign-protocol/twitter-bug
Browse files Browse the repository at this point in the history
twitter-bug => master
  • Loading branch information
Raj6939 authored Oct 18, 2023
2 parents 1fa8c70 + 819ff24 commit ba0748b
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 23 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hyperfye-frontend",
"version": "v5.13.0",
"version": "v5.13.1",
"private": true,
"scripts": {
"serve": "vue-cli-service serve --mode production",
Expand Down
1 change: 1 addition & 0 deletions src/assets/x-twitter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -624,8 +624,8 @@ export default {
],
socialAction: [
{ text: "Select Social Action type", value: null },
{ text: "Twitter Follow", value: "TWITTER_FOLLOW" },
{ text: "Twitter Retweet", value: "TWITTER_RETWEET" },
{ text: "X (Previously Twitter) Follow", value: "TWITTER_FOLLOW" },
{ text: "X (Previously Twitter) Repost", value: "TWITTER_RETWEET" },
{ text: "Telegram Join", value: "TELEGRAM_JOIN" },
{ text: "Discord Join", value: "DISCORD_JOIN" },
{ text: "Github PR", value: "GITHUB_PR" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@
style="min-width: 120px"
>
<span>
<i
style="color: gray"
v-if="eventAction.type.includes('TWITTER')"
class="fab fa-twitter"
></i>

<span v-if="eventAction.type.includes('TWITTER')">
<img src="../../../../assets/x-twitter.svg" height="15px" />
</span>
<i
style="color: gray"
v-if="eventAction.type.includes('TELEGRAM')"
Expand Down Expand Up @@ -121,15 +120,15 @@
<div class="row g-3 align-items-center w-100 mt-4" v-if="showRetweet">
<div class="text-left col-lg-3 col-md-3 text-left">
<label for="value" class="col-form-label"
>Retweet URL<span style="color: red">*</span>:
>Repost URL<span style="color: red">*</span>:
</label>
</div>
<div class="col-lg-9 col-md-9 px-0">
<input
v-model="selected.value"
type="text"
:placeholder="
selected.type === null ? '' : 'Please Enter Your Retweet URL'
selected.type === null ? '' : 'Please Enter Your Repost URL'
"
id="value"
class="form-control w-100"
Expand Down Expand Up @@ -514,6 +513,10 @@ export default {
// Code to Add an Action
let isvalid = this.handleEventActionValidation();
if (isvalid) {
if(this.selected.type === 'TWITTER_RETWEET' && this.selected.value.includes('x.com')){
const modifiedUrl = this.selected.value.replace('x.com', "twitter.com");
this.selected.value = modifiedUrl
}
this.selected["id"] =
this.eventActionType + "_" + this.eventActionList.length;
this.eventActionList.push(this.selected);
Expand Down
4 changes: 2 additions & 2 deletions src/components/participant/ActionInputs/TwitterFollow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
>
<b-row>
<b-col cols="1" sm="1" md="1">
<img src="../../../assets/twitter-4.svg" height="25px" />
<img src="../../../assets/x-twitter.svg" height="25px" />
</b-col>
<b-col cols="9" sm="9" class="text-left" md="9">
<div class="text text-capitalize">{{ data.title }}</div>
Expand Down Expand Up @@ -48,7 +48,7 @@
"
class="btn btn-outline-twitter text-black"
>
<img src="../../../assets/twitter.svg" />
<img src="../../../assets/x-twitter.svg" height="25px" />
Follow @{{ twitter.sourceScreenName }}
</button>
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/components/participant/ActionInputs/TwitterRetweet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
>
<b-row>
<b-col cols="1" sm="1" md="1">
<img src="../../../assets/twitter-4.svg" height="25px" />
<img src="../../../assets/x-twitter.svg" height="25px" />
</b-col>
<b-col cols="9" sm="9" class="text-left" md="9">
<div class="text text-capitalize">{{ data.title }}</div>
Expand Down Expand Up @@ -46,12 +46,12 @@
"
class="btn btn-outline-twitter text-black mb-2"
>
<img src="../../../assets/twitter.svg" />
Retweet
<img src="../../../assets/x-twitter.svg" height="25px"/>
Repost
</button>
<b-form-input
type="text"
placeholder="Please provide your retweet URL here."
placeholder="Please provide your repost URL here."
v-model="social.url"
:disabled="data.isDone"
:required="data.isManadatory"
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/fieldValidationMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export function isNum(str) {
}
}
export function isretweetUrl(str) {
if (!str.match(/https:\/\/twitter\.com\/.*\/status\/[0-9]+/)) {
if (!(str.match(/https:\/\/x\.com\/.*\/status\/[0-9]+/))&&!(str.match(/https:\/\/twitter\.com\/.*\/status\/[0-9]+/))) {
return true
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/utils/messages/admin/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ const EVENTS = {

SOCIAL: {
SOCIAL_TYPE: "Please choose Social Action Type",
RETWEET_NOT_EMPTY: "Retweet Url Should not be empty",
RETWEET_NOT_EMPTY: "Repost Url Should not be empty",
INVITE_NOT_EMPTY: "Invite Link Should not be empty",
SOCIAL_HANDLE_EMPTY: "Social Handle Should not be empty",
URL_IN_SOCIAL_HANDLE: "Do not put url in Social Handle",
RETWEET_VALID_URL: "Please Enter valid retweet url",
RETWEET_VALID_URL: "Please Enter valid repost url",
INVALID_INVITE_LINK: "Invalid Invite Link",
INVALID_TWITTER_USERNAME: "Invalid Twitter Username",
INVALID_TWITTER_USERNAME: "Invalid X Username",
INVALID_TELEGRAM_USERNAME: "Invalid Telegram Username",
GITHUB_REPONAME_EMPTY: "GitHub Repo URL should not be empty",
INVALID_GITHUB_URL: "Invalid GitHub repo URL"
Expand Down
6 changes: 3 additions & 3 deletions src/utils/messages/participants/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ const EVENT_ACTIONS = {
TWITTER_SCREENS_BLANK: "Source or target twitter screen name is blank",
},
TWITTER_RETWEET: {
INVALID_RETWEET: "Invalid retweet",
TWITTER_RETWEET_AUTH: "Please authorize and give Retweet URL",
ENTER_RETWEET_URL: "Please enter Retweet URL"
INVALID_RETWEET: "Invalid repost",
TWITTER_RETWEET_AUTH: "Please authorize and give Repost URL",
ENTER_RETWEET_URL: "Please enter Repost URL"
},
GITHUB_PR:{
GITHUB_AUTH:"Please authorize and give GitHub PR URL",
Expand Down

0 comments on commit ba0748b

Please sign in to comment.