Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hyperlink is added on participant side issues/499 is fixed #537

Merged
merged 1 commit into from
Oct 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions frontend/src/assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,10 @@ ul.social-links li:hover {
text-align: center;
}
.metamask{

display: flex;

}
.extlink{
display: flex;
}
.subscription-section {
margin: 0px 90px;
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/components/participant/Action.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import Loading from "vue-loading-overlay";
import "vue-loading-overlay/dist/vue-loading.css";
import Profile from "./ActionInputs/Profile.vue";
import HyperlinkUrl from "./ActionInputs/HyperlinkUrl.vue"
import TwitterFollow from "./ActionInputs/TwitterFollow.vue";
import TwitterRetweet from "./ActionInputs/TwitterRetweet.vue";
import DiscordJoin from "./ActionInputs/DiscordJoin.vue";
Expand Down Expand Up @@ -62,6 +63,7 @@ export default {
BinanceErc20,
Loading,
DiscordJoin,
HyperlinkUrl,
InputHyperlink,
RecaptchaToken: ""
},
Expand Down
89 changes: 89 additions & 0 deletions frontend/src/components/participant/ActionInputs/HyperlinkUrl.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<template>
<b-card no-body class="action-wrap">
<b-card-header :class="visible ? null : 'collapsed'" :aria-expanded="visible ? 'true' : 'false'" :aria-controls="`collapse-${idValue}`" @click="visible = !visible">
<b-row>
<b-col cols="1" sm="1" md="1">
<img src="../../../assets/question-circle-fill.svg" height="25px">
</b-col>
<b-col cols="9" sm="9" class="text-left" md="9">
<div class="text text-capitalize">{{data.title}}</div>
</b-col>
<b-col cols="2" sm="2" md="2">
<b-badge class="btn-score" @click="update()" v-if="!done">
<img src="../../../assets/plus.svg">
{{data.score}}
</b-badge>
<img class="check-mark" src="../../../assets/check-circle-fill.svg" height="25px" v-if="done">
</b-col>
</b-row>
</b-card-header>
<b-collapse :id="`collapse-${idValue}`" v-model="visible">
<b-card-body class="user-details">
<b-row>
<b-col cols="12" sm="12" md="12">
<div class="extlink">
<b-form-input type="text"
:placeholder="data.value"
v-model="data.value"
:disabled="true"
:required="data.isManadatory"
></b-form-input>
<button class="btn text-black" @click="isClicked()">
<a :href=data.value target="_blank">
<img
src="../../../assets/external-link.svg"
height="25px"
width="25px"
:href="data.value" target="_blank"

/></a>
</button>
</div>
</b-col>
</b-row>
</b-card-body>
</b-collapse>
</b-card>
</template>
<script>
import eventBus from "../../../eventBus.js";
import notificationMixins from "../../../mixins/notificationMixins";
import Messages from "../../../utils/messages/participants/en"
export default {
name: 'HyperlinkUrl',
props: {
idValue: {
required: true
},
data: {
required: true
}
},
data() {
return {
visible: false,
done: this.data.isDone,
click: 0
}
},
mounted() {
eventBus.$on(`disableInput${this.data._id}`, this.disableInput)
},
methods: {
update() {
if (!this.click>=1) {
return this.notifyErr(Messages.EVENT_ACTIONS.URL_NOT_VISITED);
} else {
this.$emit('input', this.data.value)
}
},
isClicked(){
this.click=this.click+1;
},
disableInput(data) {
this.done = data
}
},
mixins:[notificationMixins]
}
</script>
1 change: 1 addition & 0 deletions frontend/src/utils/messages/participants/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const ACTIONS = {
}
const EVENT_ACTIONS = {
INVALID_INPUT: "Error: Field value is invalid",
URL_NOT_VISITED: "Error: Please Visite the link",
WENT_WRONG: "Error: Something Went Wrong",
ERROR: "Error occurred: ",
INPUT_DATE: {
Expand Down