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"
>
-
+
@@ -17,10 +18,12 @@ const emit = defineEmits(["click"]);
const props = withDefaults(
defineProps<{
+ diabled?: boolean
sizeClass?: string[];
type?: Color;
}>(),
{
+ diabled: false,
sizeClass: () => ["w-72", "h-12"],
type: Color.YELLOW,
},
diff --git a/src/components/elements/CCInput.vue b/src/components/elements/CCInput.vue
deleted file mode 100644
index b0be34df..00000000
--- a/src/components/elements/CCInput.vue
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
diff --git a/src/components/elements/CCInput/CCAddressInput.vue b/src/components/elements/CCInput/CCAddressInput.vue
new file mode 100644
index 00000000..6858498f
--- /dev/null
+++ b/src/components/elements/CCInput/CCAddressInput.vue
@@ -0,0 +1,21 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/components/elements/CCInput/CCInput.vue b/src/components/elements/CCInput/CCInput.vue
new file mode 100644
index 00000000..f61a3006
--- /dev/null
+++ b/src/components/elements/CCInput/CCInput.vue
@@ -0,0 +1,35 @@
+
+
+
+
+
+ {{ infoText }}
+
+
+ {{ errorText }}
+
+
+
+
+
diff --git a/src/def-composables/useTx.ts b/src/def-composables/useTx.ts
index 391481fe..6b9e9c82 100644
--- a/src/def-composables/useTx.ts
+++ b/src/def-composables/useTx.ts
@@ -4,9 +4,7 @@ import type { ChainCard } from "@/model/Card";
import { Coin, type CompatCoin } from "@/model/Coin";
import type { StdFee } from "@cosmjs/launchpad";
import type { DeliverTxResponse } from "@cosmjs/stargate/build/stargateclient";
-import {
- GenericAuthorization,
-} from "decentralcardgame-cardchain-client-ts/cosmos.authz.v1beta1/types/cosmos/authz/v1beta1/authz";
+import { GenericAuthorization } from "decentralcardgame-cardchain-client-ts/cosmos.authz.v1beta1/types/cosmos/authz/v1beta1/authz";
import { Coin as CosmosCoin } from "decentralcardgame-cardchain-client-ts/cosmos.bank.v1beta1/types/cosmos/base/v1beta1/coin";
import { useNotifications } from "@/def-composables/useNotifications";
import { ref, watch, type Ref } from "vue";
@@ -23,7 +21,7 @@ import { MsgSend } from "decentralcardgame-cardchain-client-ts/cosmos.bank.v1bet
import { MsgGrant } from "decentralcardgame-cardchain-client-ts/cosmos.authz.v1beta1/module";
export const registry: Registry = new Registry(
- CCMsgTypes.concat(BankMsgTypes).concat(AuthzMsgTypes)
+ CCMsgTypes.concat(BankMsgTypes).concat(AuthzMsgTypes),
);
const FEE: StdFee = {
@@ -44,7 +42,7 @@ class UnEvaledMessage {
message: (content: Content) => Promise,
content: Content,
then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
) {
this.message = message;
this.content = content;
@@ -98,10 +96,10 @@ class MessageScheduler {
message: (content: Content) => Promise,
content: Content,
then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
) {
this.messageList.value.push(
- new UnEvaledMessage(message, content, then, err)
+ new UnEvaledMessage(message, content, then, err),
);
}
}
@@ -117,7 +115,7 @@ class Content {
fromAddress: address.value,
creator: address.value,
},
- value
+ value,
);
this.fee = FEE;
this.memo = "";
@@ -129,7 +127,7 @@ const stdHandler = (res: DeliverTxResponse) => {
if (res.code) {
notifyFail(
"Failed to broadcast message",
- res.rawLog ? res.rawLog : "General Error"
+ res.rawLog ? res.rawLog : "General Error",
);
throw new Error("Message Failed: " + res.rawLog);
}
@@ -144,84 +142,94 @@ const stdHandler = (res: DeliverTxResponse) => {
};
export const useTxInstance: () => {
- registerForCouncil: (
- then: (res: any) => void,
- err: (res: any) => void
- ) => void;
voteCard: (
cardId: number,
voteType: string,
then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
) => void;
- rewokeCouncilRegistration: (
+ inviteEarlyAccess: (
+ invitee: string,
then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
) => void;
buyCardScheme: (
coin: CompatCoin,
then: (res: any) => void,
- err: (res: any) => void
- ) => void;
- multiVoteCard: (
- votes: SingleVote[],
- then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
) => void;
- setProfileCard: (
- cardId: number,
+ disinviteEarlyAccess: (
+ invitee: string,
then: (res: any) => void,
- err: (res: any) => void
- ) => void;
- send: (
- coins: CompatCoin[],
- to: string,
- then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
) => void;
saveCardContent: (
cardId: number,
card: ChainCard,
then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
) => void;
addArtwork: (
cardId: number,
image: string,
fullArt: boolean,
then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
) => void;
transferCard: (
cardId: number,
receiver: string,
then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
) => void;
- grantAuthz: (
+ revokeAuthz: (
granter: string,
grantee: string,
- grant: string,
+ msgTypeUrl: string,
then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
) => void;
- revokeAuthz: (
+ authzGameclient: (
+ gameclientAddr: string,
+ then: (res: any) => void,
+ err: (res: any) => void,
+ ) => void;
+ registerForCouncil: (
+ then: (res: any) => void,
+ err: (res: any) => void,
+ ) => void;
+ grantAuthz: (
granter: string,
grantee: string,
- msgTypeUrl: string,
+ grant: string,
then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
+ ) => void;
+ rewokeCouncilRegistration: (
+ then: (res: any) => void,
+ err: (res: any) => void,
) => void;
createUser: (
newUser: string,
alias: string,
then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
) => void;
- authzGameclient: (
- gameclientAddr: string,
+ multiVoteCard: (
+ votes: SingleVote[],
then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
+ ) => void;
+ setProfileCard: (
+ cardId: number,
+ then: (res: any) => void,
+ err: (res: any) => void,
+ ) => void;
+ send: (
+ coins: CompatCoin[],
+ to: string,
+ then: (res: any) => void,
+ err: (res: any) => void,
) => void;
} = () => {
const client = useClient();
@@ -230,12 +238,12 @@ export const useTxInstance: () => {
const multiBroadCast = async (
msgs: EncodeObject[],
then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
) => {
const b = async (): Promise => {
if (!client.signer) {
throw new Error(
- "MultiBroadCast: Unable to sign Tx. Signer is not present."
+ "MultiBroadCast: Unable to sign Tx. Signer is not present.",
);
}
try {
@@ -243,13 +251,11 @@ export const useTxInstance: () => {
const signingClient = await SigningStargateClient.connectWithSigner(
env.rpcURL,
client.signer,
- { registry, prefix: env.prefix }
+ { registry, prefix: env.prefix },
);
return await signingClient.signAndBroadcast(address, msgs, FEE, "");
} catch (e: any) {
- throw new Error(
- "MultiBroadCast: Could not broadcast Tx: " + e.message
- );
+ throw new Error("MultiBroadCast: Could not broadcast Tx: " + e.message);
}
};
@@ -259,7 +265,7 @@ export const useTxInstance: () => {
const authzGameclient = (
gameclientAddr: string,
then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
) => {
let date = new Date();
date.setMonth(date.getMonth() + 12);
@@ -289,14 +295,14 @@ export const useTxInstance: () => {
value: GenericAuthorization.encode(
GenericAuthorization.fromPartial({
msg: msgPath,
- })
+ }),
).finish(),
},
expiration: date,
},
}),
});
- })
+ }),
);
multiBroadCast(msgs, then, err);
};
@@ -305,7 +311,7 @@ export const useTxInstance: () => {
coins: CompatCoin[],
to: string,
then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
) => {
messageScheduler.schedule(
client.CosmosBankV1Beta1.tx.sendMsgSend,
@@ -314,7 +320,7 @@ export const useTxInstance: () => {
toAddress: to,
}),
then,
- err
+ err,
);
};
@@ -323,7 +329,7 @@ export const useTxInstance: () => {
grantee: string,
msgTypeUrl: string,
then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
) => {
messageScheduler.schedule(
client.CosmosAuthzV1Beta1.tx.sendMsgRevoke,
@@ -333,7 +339,7 @@ export const useTxInstance: () => {
msgTypeUrl: msgTypeUrl,
}),
then,
- err
+ err,
);
};
@@ -342,7 +348,7 @@ export const useTxInstance: () => {
grantee: string,
grant: string,
then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
) => {
let date = new Date();
date.setMonth(date.getMonth() + 1);
@@ -358,46 +364,46 @@ export const useTxInstance: () => {
value: GenericAuthorization.encode(
GenericAuthorization.fromPartial({
msg: grant,
- })
+ }),
).finish(),
},
expiration: date,
},
}),
then,
- err
+ err,
);
};
const registerForCouncil = (
then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
) => {
messageScheduler.schedule(
client.DecentralCardGameCardchainCardchain.tx.sendMsgRegisterForCouncil,
new Content(),
then,
- err
+ err,
);
};
const rewokeCouncilRegistration = (
then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
) => {
messageScheduler.schedule(
client.DecentralCardGameCardchainCardchain.tx
.sendMsgRewokeCouncilRegistration,
new Content(),
then,
- err
+ err,
);
};
const buyCardScheme = (
coin: CompatCoin,
then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
) => {
messageScheduler.schedule(
client.DecentralCardGameCardchainCardchain.tx.sendMsgBuyCardScheme,
@@ -405,7 +411,7 @@ export const useTxInstance: () => {
bid: CosmosCoin.fromJSON(coin),
}),
then,
- err
+ err,
);
};
@@ -413,7 +419,7 @@ export const useTxInstance: () => {
cardId: number,
card: ChainCard,
then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
) => {
messageScheduler.schedule(
client.DecentralCardGameCardchainCardchain.tx.sendMsgSaveCardContent,
@@ -425,7 +431,7 @@ export const useTxInstance: () => {
balanceAnchor: card.balanceAnchor,
}),
then,
- err
+ err,
);
};
@@ -434,7 +440,7 @@ export const useTxInstance: () => {
image: string,
fullArt: boolean,
then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
) => {
messageScheduler.schedule(
client.DecentralCardGameCardchainCardchain.tx.sendMsgAddArtwork,
@@ -444,7 +450,7 @@ export const useTxInstance: () => {
fullArt,
}),
then,
- err
+ err,
);
};
@@ -452,7 +458,7 @@ export const useTxInstance: () => {
cardId: number,
voteType: string,
then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
) => {
messageScheduler.schedule(
client.DecentralCardGameCardchainCardchain.tx.sendMsgVoteCard,
@@ -461,7 +467,7 @@ export const useTxInstance: () => {
voteType,
}),
then,
- err
+ err,
);
};
@@ -469,7 +475,7 @@ export const useTxInstance: () => {
cardId: number,
receiver: string,
then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
) => {
messageScheduler.schedule(
client.DecentralCardGameCardchainCardchain.tx.sendMsgTransferCard,
@@ -478,14 +484,14 @@ export const useTxInstance: () => {
receiver,
}),
then,
- err
+ err,
);
};
const setProfileCard = (
cardId: number,
then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
) => {
messageScheduler.schedule(
client.DecentralCardGameCardchainCardchain.tx.sendMsgSetProfileCard,
@@ -493,14 +499,14 @@ export const useTxInstance: () => {
cardId,
}),
then,
- err
+ err,
);
};
const multiVoteCard = (
votes: SingleVote[],
then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
) => {
messageScheduler.schedule(
client.DecentralCardGameCardchainCardchain.tx.sendMsgMultiVoteCard,
@@ -508,7 +514,7 @@ export const useTxInstance: () => {
votes,
}),
then,
- err
+ err,
);
};
@@ -516,7 +522,7 @@ export const useTxInstance: () => {
newUser: string,
alias: string,
then: (res: any) => void,
- err: (res: any) => void
+ err: (res: any) => void,
) => {
messageScheduler.schedule(
client.DecentralCardGameCardchainCardchain.tx.sendMsgCreateuser,
@@ -525,7 +531,37 @@ export const useTxInstance: () => {
alias,
}),
then,
- err
+ err,
+ );
+ };
+
+ const inviteEarlyAccess = (
+ invitee: string,
+ then: (res: any) => void,
+ err: (res: any) => void,
+ ) => {
+ messageScheduler.schedule(
+ client.DecentralCardGameCardchainCardchain.tx.sendMsgInviteEarlyAccess,
+ new Content({
+ user: invitee,
+ }),
+ then,
+ err,
+ );
+ };
+
+ const disinviteEarlyAccess = (
+ invitee: string,
+ then: (res: any) => void,
+ err: (res: any) => void,
+ ) => {
+ messageScheduler.schedule(
+ client.DecentralCardGameCardchainCardchain.tx.sendMsgDisinviteEarlyAccess,
+ new Content({
+ user: invitee,
+ }),
+ then,
+ err,
);
};
@@ -544,6 +580,8 @@ export const useTxInstance: () => {
revokeAuthz,
createUser,
authzGameclient,
+ inviteEarlyAccess,
+ disinviteEarlyAccess,
};
};
diff --git a/src/views/About/CommunityPage.vue b/src/views/About/CommunityPage.vue
index ff56eb3b..7c226eb4 100644
--- a/src/views/About/CommunityPage.vue
+++ b/src/views/About/CommunityPage.vue
@@ -12,7 +12,10 @@
Our Community Contributors
-
+
{{ name }}
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
-
+
-
+
{{ item }}
-
- ✓
-
-
+ ✓
+
{{ value }}
-
@@ -85,18 +103,43 @@
Address {{ state.addr }}
Alias {{ state.user.alias }}
Zealy ID {{ state.rewards.ZealyID }}
-
Discord Username {{ state.discordUser }}
-
-
-
-
-
-
-
-
+
Discord Username {{ state.discordUser
+ }}
+
+
+
+
+
+
+
+
-
@@ -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 @@
-
+
Play the Game!
-
- Our alpha version is currently in development
- and not publicly released :(
- We only do closed playtests at the moment.
- The button below will do nothing.
-
-
-
- Download Gameclient
-
+ Check out our alpha version and be part of the early development.
+
+
+
+ Download Gameclient
+
+
+ Early Access for a Friend
+
+
+
+ For Early Access join our Discord
+
+ Join Discord
+
+
+
+
+
+
+
+ Early access for a friend
+
+
+ Insert the wallet address of your friend that you want to play with.
+
+
+
+ Download Gameclient
+
+
+ Invite
+
+
@@ -25,4 +76,29 @@ import BaseCCButton from "@/components/elements/CCButton/BaseCCButton.vue";
import FadeTeaserSmall from "@/components/elements/Teaser/FadeTeaserSmall.vue";
import TeaserHeader from "@/components/elements/Teaser/TeaserHeader.vue";
import { Color } from "@/components/utils/color";
+import { useUser } from "@/def-composables/useUser";
+import LinkCCButton from "@/components/elements/CCButton/LinkCCButton.vue";
+import { ref } from "vue";
+import CCAddressInput from "@/components/elements/CCInput/CCAddressInput.vue";
+import { useTx } from "@/def-composables/useTx";
+
+const { inviteEarlyAccess } = useTx();
+const { user } = useUser();
+const addressValid = ref(false);
+const inviteAddress = ref("");
+const inviteMode = ref(false);
+
+const downloadLatest = () => {
+ console.log("download ");
+};
+
+const inviteUser = () => {
+ inviteEarlyAccess(
+ inviteAddress.value,
+ () => {
+ inviteMode.value = false;
+ },
+ console.log,
+ );
+};
diff --git a/src/views/GalleryPage.vue b/src/views/GalleryPage.vue
index e86f595f..6702f8be 100644
--- a/src/views/GalleryPage.vue
+++ b/src/views/GalleryPage.vue
@@ -154,7 +154,7 @@ import { Color } from "@/components/utils/color";
import Checkbox from "@/components/elements/Checkbox.vue";
import { useGallery } from "@/def-composables/useGallery";
import { normalizeQuery } from "@/utils/utils";
-import CCInput from "@/components/elements/CCInput.vue";
+import CCInput from "@/components/elements/CCInput/CCInput.vue";
import {
CardRarity,
Status,
diff --git a/src/views/UserView/UserView.vue b/src/views/UserView/UserView.vue
index ab870f9c..2557f8d0 100644
--- a/src/views/UserView/UserView.vue
+++ b/src/views/UserView/UserView.vue
@@ -75,7 +75,34 @@
Address {{ state.addr }}
- Alias {{ state.user.alias }}
+ Alias {{ state.user.alias }}
+
+
+ Early Access
+
+
+ No Early Access
+
+
+
+ Inviter:
+
+
+
+ Invited:
+
+
+
@@ -190,6 +217,7 @@ import editImg from "@/assets/figma/edit.png";
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 CompactAddressComponent from "@/components/elements/CompactAddressComponent.vue";
const { queryQUser, queryAllBalances, queryQMatches } = useQuery();
const { registerForCouncil, rewokeCouncilRegistration } = useTx();
@@ -248,13 +276,14 @@ const init = () => {
router.push({ name: "NotFound" });
}
- router.push({ name: "UserView", params: { id: state.addr } });
getUser();
getCoins();
getMatches();
- console.log(state.user)
+ console.log(state.user);
};
+watch(() => route.params.id, init);
+
onMounted(init);
const getUser = () => {