Skip to content

Commit

Permalink
Merge pull request #908 from hypersign-protocol/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Pratap2018 authored Feb 9, 2022
2 parents 7d04f93 + c9ae8cb commit 96ac9f8
Show file tree
Hide file tree
Showing 5 changed files with 321 additions and 88 deletions.
109 changes: 57 additions & 52 deletions src/components/admin/createProjectSlider/CreateProjectSlide.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
background-color: rgba(241, 179, 25, 0.24);
border: 0;
}
</style>
<template>
<div>
Expand All @@ -32,9 +31,9 @@
no-close-on-backdrop
backdrop-variant="dark"
>
<div class=" px-3 py-2">
<div class="px-3 py-2">
<div class="accordion" role="tablist">
<b-card no-body class="mb-1 ">
<b-card no-body class="mb-1">
<b-card-header
header-tag="header"
class="p-1 border-0 accordin-header accordion-header-theme"
Expand All @@ -44,7 +43,7 @@
block
v-b-toggle.accordion-1
class="bg-transparent border-0 text-left text-primary"
><i class="fas fa-cog"></i> General Configurations</b-button
><i class="fas fa-cog"></i> General Configurations</b-button
>
</b-card-header>
<b-collapse
Expand Down Expand Up @@ -86,10 +85,7 @@
role="tabpanel"
>
<b-card-body>
<referral-config
v-on="$listeners"
:project="project"
/>
<referral-config v-on="$listeners" :project="project" />
<!-- <eventAction-congif
v-on="$listeners"
:eventActionList="smartContractlist"
Expand All @@ -99,8 +95,8 @@
</b-card-body>
</b-collapse>
</b-card>
<!--Prize -->
<b-card no-body class="mb-1 ">
<!--Prize -->
<b-card no-body class="mb-1">
<b-card-header
header-tag="header"
class="p-1 border-0 accordin-header accordion-header-theme"
Expand All @@ -110,8 +106,8 @@
block
v-b-toggle.accordion-3
class="bg-transparent border-0 text-left text-primary"
><i class="fas fa-gift"></i> Prize Configurations </b-button
>
><i class="fas fa-gift"></i> Prize Configurations
</b-button>
</b-card-header>
<b-collapse
id="accordion-3"
Expand All @@ -129,7 +125,7 @@
</b-card-body>
</b-collapse>
</b-card>
<!--End Prize -->
<!--End Prize -->
<b-card no-body class="mb-1">
<b-card-header
header-tag="header"
Expand All @@ -141,7 +137,7 @@
v-b-toggle.accordion-4
variant="info"
class="bg-transparent border-0 text-left text-primary"
><i class="fab fa-intercom"></i> Custom Inputs Configurations
><i class="fab fa-intercom"></i> Custom Inputs Configurations
</b-button>
</b-card-header>
<b-collapse
Expand Down Expand Up @@ -171,7 +167,7 @@
v-b-toggle.accordion-5
variant="info"
class="bg-transparent border-0 text-left text-primary"
><i class="fas fa-share-alt"></i> Social Configurations
><i class="fas fa-share-alt"></i> Social Configurations
</b-button>
</b-card-header>
<b-collapse
Expand Down Expand Up @@ -201,7 +197,7 @@
v-b-toggle.accordion-6
variant="info"
class="bg-transparent border-0 text-left text-primary"
><i class="fab fa-bitcoin"></i> Wallet Configurations
><i class="fab fa-bitcoin"></i> Wallet Configurations
</b-button>
</b-card-header>
<b-collapse
Expand Down Expand Up @@ -232,7 +228,8 @@
v-b-toggle.accordion-7
variant="info"
class="bg-transparent border-0 text-left text-primary"
><i class="fas fa-file-contract"></i> Smart Contract Configurations
><i class="fas fa-file-contract"></i> Smart Contract
Configurations
</b-button>
</b-card-header>
<b-collapse
Expand Down Expand Up @@ -273,7 +270,7 @@ export default {
components: {
GeneralConfig,
EventActionConfig,
ReferralConfig
ReferralConfig,
},
props: {
Expand All @@ -295,8 +292,8 @@ export default {
blockChainType: {
type: String,
},
contractType:{
type: String
contractType: {
type: String,
},
saveProject: {
type: Function,
Expand All @@ -320,29 +317,33 @@ export default {
computed: {
// a computed getter
customList: function() {
customList: function () {
if (this.actionList && this.actionList.length > 0) {
return this.actionList.filter(
(x) =>
x.type.indexOf("INPUT_") > -1 || x.type.indexOf("HYPERLINK_URL") > -1 || x.type.indexOf("INFO_TEXT") > -1
(x) =>
x.type.indexOf("INPUT_") > -1 ||
x.type.indexOf("HYPERLINK_URL") > -1 ||
x.type.indexOf("INFO_TEXT") > -1
);
} else {
return [];
}
},
socialList: function() {
socialList: function () {
if (this.actionList && this.actionList.length > 0) {
return this.actionList.filter(
(x) =>
x.type.indexOf("TWITTER_") > -1 || x.type.indexOf("TELEGRAM_") > -1 || x.type.indexOf("DISCORD_") > -1
x.type.indexOf("TWITTER_") > -1 ||
x.type.indexOf("TELEGRAM_") > -1 ||
x.type.indexOf("DISCORD_") > -1
);
} else {
return [];
}
},
blockchainList: function() {
blockchainList: function () {
if (this.actionList && this.actionList.length > 0) {
return this.actionList.filter(
(x) => x.type.indexOf("BLOCKCHAIN_") > -1
Expand All @@ -351,35 +352,36 @@ export default {
return [];
}
},
smartContractlist: function(){
if (this.actionList && this.actionList.length >0){
smartContractlist: function () {
if (this.actionList && this.actionList.length > 0) {
return this.actionList.filter(
(x)=> x.type.indexOf("ETHEREUM_") > -1
|| x.type.indexOf("MATIC_") > -1
|| x.type.indexOf("BINANCE_") > -1
|| x.type.indexOf("REEF_") > -1
(x) =>
x.type.indexOf("ETHEREUM_") > -1 ||
x.type.indexOf("MATIC_") > -1 ||
x.type.indexOf("BINANCE_") > -1 ||
x.type.indexOf("REEF_") > -1 ||
x.type.indexOf("MOONBEAM_") > -1 ||
x.type.indexOf("MOONRIVER_") > -1 ||
x.type.indexOf("MOON_") > -1
);
}
else{
} else {
return [];
}
},
prizeList: function() {
prizeList: function () {
if (this.actionList && this.actionList.length > 0) {
return this.actionList.filter(
(x) => x.type.indexOf("PRIZE_") > -1
);
return this.actionList.filter((x) => x.type.indexOf("PRIZE_") > -1);
} else {
return [];
}
},
},
data() {
return {
/// TODO: Need to do it in a neat way
// Use api https://localhost:6006/api/v1/actions
// it returns:
// it returns:
// {"actionTypes":["INPUT_TEXT","INPUT_NUMBER","TWITTER_FOLLOW","TWITTER_RETWEET","TELEGRAM_JOIN","DISCORD_JOIN","BLOCKCHAIN_ETH","BLOCKCHAIN_TEZ","HYPERSIGN_AUTH"],"length":9}
options: {
customAction: [
Expand All @@ -388,8 +390,8 @@ export default {
{ text: "NUMBER", value: "INPUT_NUMBER" },
{ text: "DATE", value: "INPUT_DATE" },
{ text: "LINK", value: "INPUT_HYPERLINK" },
{ text: "HYPERLINK", value: "HYPERLINK_URL"},
{ text: "INFO", value: "INFO_TEXT"}
{ text: "HYPERLINK", value: "HYPERLINK_URL" },
{ text: "INFO", value: "INFO_TEXT" },
],
socialAction: [
{ text: "Select Social Action type", value: null },
Expand All @@ -408,17 +410,20 @@ export default {
{ text: "Reef", value: "BLOCKCHAIN_REEF" },
{ text: "Tezos", value: "BLOCKCHAIN_TEZ" },
],
smartContractAction:[
{ text: "Select Contract Type", value:null},
{ text: "Ethereum ERC20", value:"ETHEREUM_ERC20"},
{ text: "Polygon ERC20", value:"MATIC_ERC20"},
{ text: "Binance ERC20", value:"BINANCE_ERC20"},
{ text: "Reef ERC20", value:"REEF_ERC20"},
smartContractAction: [
{ text: "Select Contract Type", value: null },
{ text: "Ethereum ERC20", value: "ETHEREUM_ERC20" },
{ text: "Polygon ERC20", value: "MATIC_ERC20" },
{ text: "Binance ERC20", value: "BINANCE_ERC20" },
{ text: "Moon Beam ERC20", value: "MOONBEAM_ERC20" },
{ text: "Moon River ERC20", value: "MOONRIVER_ERC20" },
{ text: "Moon Alpha(testnet) ERC20", value: "MOON_ERC20" },
{ text: "Reef ERC20", value: "REEF_ERC20" },
],
prizeDetails: [
{ text: "Select Prize Type", value: null },
{ text: "Prize Card", value: "PRIZE_CARD" },
],
prizeDetails:[
{ text: "Select Prize Type", value:null},
{ text: "Prize Card", value:"PRIZE_CARD"},
]
},
};
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<img style="padding-right: 5px;" src="../../../../assets/matic-logo.svg" v-if="eventAction.type.includes('MATIC_ERC20')" height="20px" />
<img style="padding-right: 5px;" src="../../../../assets/binance-logo.svg" v-if="eventAction.type.includes('BINANCE_ERC20')" height="20px" />
<img style="padding-right: 5px;" src="../../../../assets/Reef.svg" v-if="eventAction.type.includes('REEF_ERC20')" height="20px" />
<img style="padding-right: 5px;" src="../../../../assets/moonbeam.png" v-if="eventAction.type.includes('MOON_ERC20')" height="20px" />
<img style="padding-right: 5px" src="../../../../assets/tezos.png" v-if="eventAction.type.includes('BLOCKCHAIN_TEZ')" height="22px" />
<img style="padding-right: 5px" src="../../../../assets/binance-logo.svg" v-if="eventAction.type.includes('BLOCKCHAIN_BSC')" height="22px" />
<img style="padding-right: 5px;" src="../../../../assets/matic-logo.svg" v-if="eventAction.type.includes('BLOCKCHAIN_MATIC')" height="20px" />
Expand Down
3 changes: 3 additions & 0 deletions src/components/participant/Action.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import BlockchainOne from "./ActionInputs/BlockchainOne.vue";
import BlockchainReef from "./ActionInputs/BlockchainReef.vue";
import EthereumErc20 from "./ActionInputs/EthereumErc20.vue";
import MaticErc20 from "./ActionInputs/MaticErc20.vue";
import MoonErc20 from "./ActionInputs/MoonErc20.vue"
import BinanceErc20 from "./ActionInputs/BinanceErc20.vue";
import ReefErc20 from "./ActionInputs/ReefErc20.vue";
import InputDate from "./ActionInputs/InputDate.vue";
Expand Down Expand Up @@ -86,6 +87,7 @@ export default {
InputHyperlink,
InfoText,
PrizeCard,
MoonErc20,
RecaptchaToken: ""
},
mounted(){
Expand All @@ -112,6 +114,7 @@ export default {
};
},
computed:{
// eslint-disable-next-line vue/return-in-computed-property
isPrizedata(){
if(this.prizeData.length>0){
return true;
Expand Down
Loading

0 comments on commit 96ac9f8

Please sign in to comment.