diff --git a/.env.development b/.env.development index 35e06cf9..93ce2a5a 100644 --- a/.env.development +++ b/.env.development @@ -1,21 +1,5 @@ -#VITE_API_COSMOS="https://cardchain.crowdcontrol.network/cosmos/" -#VITE_WS_TENDERMINT="https://cardchain.crowdcontrol.network/tendermint/" -#VITE_APP_FAUCET="https://cardchain.crowdcontrol.network/faucet/claimTokens" - -VITE_APP_FAUCET_SITEKEY="ea68532a-a9e6-4f99-9361-db90a3071b72" -VITE_APP_ADDRESS_PREFIX=cc VITE_APP_CHAIN_ID="carddevnet-2" -VITE_APP_CHAIN_NAME="Cardchain" -VITE_APP_CARDIMG_MAXKB=500 -VITE_APP_CARDIMG_SIZE_X=840 -VITE_APP_CARDIMG_SIZE_Y=1300 -VITE_APP_UCREDITS_FACTOR=1000000 -NODE_VERSION=v18.17.1 - -#VITE_API_COSMOS_FALLBACK=https://cardchain2.crowdcontrol.network/cosmos/ -#VITE_WS_TENDERMINT_FALLBACK=https://cardchain2.crowdcontrol.network/tendermint/ -#VITE_APP_FAUCET_FALLBACK=https://cardchain2.crowdcontrol.network/faucet/claimTokens -#VITE_API_COSMOS="http://lxgr.xyz:1317" -#VITE_WS_TENDERMINT="http://lxgr.xyz:26657" -#VITE_APP_FAUCET="http://lxgr.xyz:4500/claimTokens" +VITE_API_COSMOS="http://lxgr.xyz:1317" +VITE_WS_TENDERMINT="http://lxgr.xyz:26657" +VITE_APP_FAUCET="http://lxgr.xyz:4500/claimTokens" diff --git a/package-lock.json b/package-lock.json index edba94ac..3ec35f15 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,14 +26,13 @@ "axios": "0.21.4", "bignumber.js": "^9.1.2", "crypto-js": "^4.2.0", - "decentralcardgame-cardchain-client-ts": "^0.0.27", + "decentralcardgame-cardchain-client-ts": "^0.0.29", "discord-oauth2": "^2.12.1", "long": "^5.2.3", "merge-images": "^2.0.0", "pinia": "^2.1.7", "process": "^0.11.10", "qrcode": "^1.5.3", - "query-string": "^9.0.0", "ramda": "^0.29.1", "vue": "^3.4.21", "vue-advanced-cropper": "^2.8.8", @@ -2723,9 +2722,9 @@ } }, "node_modules/decentralcardgame-cardchain-client-ts": { - "version": "0.0.27", - "resolved": "https://registry.npmjs.org/decentralcardgame-cardchain-client-ts/-/decentralcardgame-cardchain-client-ts-0.0.27.tgz", - "integrity": "sha512-AJrKVncqOhh0Lpe21dVifUlvIXo7dd5ODeC3p5PjjW1RzEnlT5IYikT6bg2wSpCItAdhaTwXT6jzX1NAWyeMkw==", + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/decentralcardgame-cardchain-client-ts/-/decentralcardgame-cardchain-client-ts-0.0.29.tgz", + "integrity": "sha512-D2DPkGbmb1LBrHLTPkFs6Q0MjjCqDh+qMY9fa89u/BwgFCPVXSPNgZNyWHGTBMKYPcxAi9QP9LRq/Q06KcIMGQ==", "dependencies": { "@cosmjs/amino": "0.29.5", "@cosmjs/proto-signing": "0.27.1", @@ -2789,14 +2788,6 @@ "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.29.5.tgz", "integrity": "sha512-m7h+RXDUxOzEOGt4P+3OVPX7PuakZT3GBmaM/Y2u+abN3xZkziykD/NvedYFvvCCdQo714XcGl33bwifS9FZPQ==" }, - "node_modules/decode-uri-component": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.4.1.tgz", - "integrity": "sha512-+8VxcR21HhTy8nOt6jf20w0c9CADrw1O8d+VZ/YzzCt4bJ3uBjw+D1q2osAB8RnpwwaeYBxy0HyKQxD5JBMuuQ==", - "engines": { - "node": ">=14.16" - } - }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -3429,17 +3420,6 @@ "node": ">=8" } }, - "node_modules/filter-obj": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-5.1.0.tgz", - "integrity": "sha512-qWeTREPoT7I0bifpPUXtxkZJ1XJzxWtfoWWkdVGqa+eCr3SHW/Ocp89o8vLvbUuQnadybJpjOKu4V+RwO6sGng==", - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -5324,22 +5304,6 @@ "node": ">=10.13.0" } }, - "node_modules/query-string": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-9.0.0.tgz", - "integrity": "sha512-4EWwcRGsO2H+yzq6ddHcVqkCQ2EFUSfDMEjF8ryp8ReymyZhIuaFRGLomeOQLkrzacMHoyky2HW0Qe30UbzkKw==", - "dependencies": { - "decode-uri-component": "^0.4.1", - "filter-obj": "^5.1.0", - "split-on-first": "^3.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -5829,17 +5793,6 @@ "integrity": "sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==", "dev": true }, - "node_modules/split-on-first": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-3.0.0.tgz", - "integrity": "sha512-qxQJTx2ryR0Dw0ITYyekNQWpz6f8dGd7vffGNflQQ3Iqj9NJ6qiZ7ELpZsJ/QBhIVAiDfXdag3+Gp8RvWa62AA==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", diff --git a/package.json b/package.json index f010bfc6..5d3688d7 100644 --- a/package.json +++ b/package.json @@ -17,14 +17,13 @@ "axios": "0.21.4", "bignumber.js": "^9.1.2", "crypto-js": "^4.2.0", - "decentralcardgame-cardchain-client-ts": "^0.0.27", + "decentralcardgame-cardchain-client-ts": "^0.0.29", "discord-oauth2": "^2.12.1", "long": "^5.2.3", "merge-images": "^2.0.0", "pinia": "^2.1.7", "process": "^0.11.10", "qrcode": "^1.5.3", - "query-string": "^9.0.0", "ramda": "^0.29.1", "vue": "^3.4.21", "vue-advanced-cropper": "^2.8.8", @@ -61,8 +60,8 @@ }, "name": "@decentralcardgame/frontend", "scripts": { - "build": "run-p type-check build-only", - "build-only": "vite build", + "build": "run-p type-check && vite build", + "build:dev": "run-p type-check && vite --mode development build", "dev": "vite", "local": "vite --mode localhost", "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", diff --git a/src/components/elements/AbilityComponent.vue b/src/components/elements/AbilityComponent.vue index 62fbb3ed..ccf68f5c 100644 --- a/src/components/elements/AbilityComponent.vue +++ b/src/components/elements/AbilityComponent.vue @@ -4,8 +4,10 @@ id="AbilityComponentInside" class="flex flex-row" > -
+
diff --git a/src/views/CardCreatorPage.vue b/src/views/CardCreatorPage.vue index 666fb882..fc1a8bac 100644 --- a/src/views/CardCreatorPage.vue +++ b/src/views/CardCreatorPage.vue @@ -15,13 +15,13 @@
You successfully minted your card!
- - Create another Card - + + Create another Card +
-
ARTWORK
@@ -275,7 +274,7 @@ class="p-3 border-red-600 text-red-600" type="radio" :value="true" - @change="cropImage=''; this.model.image=''" + @change="cropImage=''; model.image=''" >
Instead add another artist as a collaborator. @@ -293,7 +292,6 @@
-
@@ -330,10 +328,24 @@ xmlns="http://www.w3.org/2000/svg" > - + - - + +
@@ -353,10 +365,10 @@ height: cardBounds.y * 1.2, }" :default-size="{ - width: cardBounds.x * 1.2, - height: cardBounds.y * 1.2, + width: cardBounds.x * 1.2, + height: cardBounds.y * 1.2, }" - imageRestriction="none" + image-restriction="none" @change="changeCrop" />
@@ -365,7 +377,6 @@
- @@ -567,8 +578,8 @@ >
ABILITIES AND EFFECTS
-
+
Remove all abilities
-
+
Click to add abilities or effects to your card.
@@ -723,12 +737,16 @@
SUMMARY
-
"{{ model.FlavourText }}"
-
+
@@ -762,7 +780,6 @@ Update your Card
-
@@ -795,9 +812,9 @@
-
@@ -807,7 +824,6 @@ Market price: {{ cardFramePrice }} credits
Your credit balance: {{ availableCredits }} credits
-
Review and mint your card.
diff --git a/src/views/Discord.vue b/src/views/Discord.vue index eaf02c9c..cb5ca7c2 100644 --- a/src/views/Discord.vue +++ b/src/views/Discord.vue @@ -2,8 +2,10 @@
-
+
Unfortunately you have entered this page without Discord code.
Please identify with your Discord account with the button below: @@ -14,8 +16,10 @@ Discord Identification
-
+
We are very sorry.
The user {{ state.discordUser }} does not have any Zealy rewards.
@@ -23,16 +27,22 @@ or are logged in with another account.
-
+
You do not have a CrowdControl Address!
All rewards will be credited to a CC Address.
You might have an address, but you did not enter it on Zealy.
- If you want to receive rewards, you should enter your CC Address.
+ If you want to receive rewards, you should enter your CC Address. +
If you don't own a CC Address click on Login on the top right.
-
+

{{ state.user.alias }}

@@ -44,15 +54,15 @@ alt="Profile pic" /> - +
- +

Rewards @@ -63,20 +73,28 @@ Wallet -

@@ -127,10 +170,8 @@ import ChoosePBModal from "@/components/modals/ChoosePBModal.vue"; import { Color } from "@/components/utils/color"; import { CouncilStatus } from "decentralcardgame-cardchain-client-ts/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/user"; import axios from "axios"; -import { useUrlSearchParams } from '@vueuse/core' -import { createReusableTemplate } from '@vueuse/core' -import queryString from 'query-string'; - +import { useUrlSearchParams } from "@vueuse/core"; +import { createReusableTemplate } from "@vueuse/core"; const [DefineRewardItem, RewardItem] = createReusableTemplate(); @@ -159,42 +200,53 @@ const initialState: { discordUser: "", invalidCode: false, noUserFound: false, - noCCAddress: false + noCCAddress: false, }; const state = reactive(initialState); const init = () => { - const code = useUrlSearchParams('history').code + const code = useUrlSearchParams("history").code; if (!code) { - state.invalidCode = true - return + state.invalidCode = true; + return; } - axios.get('https://cardchain.crowdcontrol.network/goat?code='+code) - .then(discordUser => { - state.discordUser = discordUser.data.global_name - console.log("discordUser", discordUser) + axios + .get("https://cardchain.crowdcontrol.network/goat?code=" + code) + .then((discordUser) => { + state.discordUser = discordUser.data.global_name; + console.log("discordUser", discordUser); // get the reward list from the server - axios.get('https://cardchain.crowdcontrol.network/files/rewards.csv') + axios + .get("https://cardchain.crowdcontrol.network/files/rewards.csv") .then((response) => { - console.log(response) - var lines=response.data.split("\n"); + console.log(response); + var lines = response.data.split("\n"); var result = null; - var headers=lines[0].split(","); - for(var i=1; i { } console.log("matching entry:", result); - if (!result) - state.noUserFound = true - else if (!result.CCAddress) - state.noCCAddress = true + if (!result) state.noUserFound = true; + else if (!result.CCAddress) state.noCCAddress = true; else { - state.addr = result.CCAddress - console.log("state.addr", state.addr) + state.addr = result.CCAddress; + console.log("state.addr", state.addr); getUser(); } - }) - }) + }); + }); router.push({ name: "Discord" }); - }; onMounted(init); const getUser = () => { - console.log("getuser", state.addr) + console.log("getuser", state.addr); queryQUser(state.addr).then((user) => { - console.log("user", user) + console.log("user", user); state.user = user; getImg(state.user, state.addr).then((img) => { state.img = img; }); }); - }; - diff --git a/src/views/DownloadPage.vue b/src/views/DownloadPage.vue index 5ef501a7..d244244e 100644 --- a/src/views/DownloadPage.vue +++ b/src/views/DownloadPage.vue @@ -1,20 +1,71 @@