From 503f2f9282c213a29d0aaeaf3ccd731707ba1338 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Oct 2023 22:42:28 +0000 Subject: [PATCH 01/32] Bump crypto-js from 4.1.1 to 4.2.0 Bumps [crypto-js](https://github.com/brix/crypto-js) from 4.1.1 to 4.2.0. - [Commits](https://github.com/brix/crypto-js/compare/4.1.1...4.2.0) --- updated-dependencies: - dependency-name: crypto-js dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0f770c58..2acd2b3d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "@tanstack/vue-query": "^4.13.5", "axios": "^1.5.1", "bignumber.js": "^9.1.0", - "crypto-js": "^4.1.1", + "crypto-js": "^4.2.0", "decentralcardgame-cardchain-client-ts": "^0.0.17", "long": "^5.2.0", "merge-images": "^2.0.0", @@ -2435,9 +2435,9 @@ } }, "node_modules/crypto-js": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz", - "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", + "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==" }, "node_modules/cssesc": { "version": "3.0.0", diff --git a/package.json b/package.json index d0b29c72..733475d7 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "@tanstack/vue-query": "^4.13.5", "axios": "^1.5.1", "bignumber.js": "^9.1.0", - "crypto-js": "^4.1.1", + "crypto-js": "^4.2.0", "decentralcardgame-cardchain-client-ts": "^0.0.17", "long": "^5.2.0", "merge-images": "^2.0.0", From 705f3485d4f73a40f5e8fbc5f6c4fd8b68689d83 Mon Sep 17 00:00:00 2001 From: lxgr-linux Date: Thu, 26 Oct 2023 13:38:29 +0200 Subject: [PATCH 02/32] removed user model --- package-lock.json | 8 ++--- package.json | 4 +-- src/components/modals/AirdropsModal.vue | 5 ++- src/def-composables/useProfilePic.ts | 2 +- src/def-composables/useQuery.ts | 4 +-- src/def-composables/useUser.ts | 4 +-- src/model/User.ts | 45 ------------------------- src/views/UserView.vue | 39 +++++++++++++-------- 8 files changed, 38 insertions(+), 73 deletions(-) delete mode 100644 src/model/User.ts diff --git a/package-lock.json b/package-lock.json index 0f770c58..4408c47a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "axios": "^1.5.1", "bignumber.js": "^9.1.0", "crypto-js": "^4.1.1", - "decentralcardgame-cardchain-client-ts": "^0.0.17", + "decentralcardgame-cardchain-client-ts": "^0.0.18", "long": "^5.2.0", "merge-images": "^2.0.0", "pinia": "^2.0.23", @@ -2498,9 +2498,9 @@ } }, "node_modules/decentralcardgame-cardchain-client-ts": { - "version": "0.0.17", - "resolved": "https://registry.npmjs.org/decentralcardgame-cardchain-client-ts/-/decentralcardgame-cardchain-client-ts-0.0.17.tgz", - "integrity": "sha512-Bn1WcdiDeC3fTNvmIWcGlWhSIafZHPwZiIkeUzYJYKqqtoZzU58m01bmUhphZJJ9YZ/mlNBKg+XZhUEOo7r9NQ==", + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/decentralcardgame-cardchain-client-ts/-/decentralcardgame-cardchain-client-ts-0.0.18.tgz", + "integrity": "sha512-xn07t2aw+ftFpu1P8L7ZZxhxJ2zmypWQmJAfhEVhM/fMuo7U/G7/CdZ5lMw/5oPqyAo0Uoih/u/wmd+RgKvlKQ==", "dependencies": { "@cosmjs/amino": "0.29.5", "@cosmjs/proto-signing": "0.27.0", diff --git a/package.json b/package.json index d0b29c72..a4335291 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,8 @@ "dependencies": { "@cosmjs/encoding": "^0.29.3", "@cosmjs/launchpad": "^0.27.0", - "@cosmjs/stargate": "^0.27.0", "@cosmjs/proto-signing": "^0.27.0", + "@cosmjs/stargate": "^0.27.0", "@hcaptcha/vue3-hcaptcha": "^1.0.1", "@headlessui/tailwindcss": "^0.2.0", "@headlessui/vue": "^1.7.16", @@ -14,7 +14,7 @@ "axios": "^1.5.1", "bignumber.js": "^9.1.0", "crypto-js": "^4.1.1", - "decentralcardgame-cardchain-client-ts": "^0.0.17", + "decentralcardgame-cardchain-client-ts": "^0.0.18", "long": "^5.2.0", "merge-images": "^2.0.0", "pinia": "^2.0.23", diff --git a/src/components/modals/AirdropsModal.vue b/src/components/modals/AirdropsModal.vue index 2eece77d..38627ee9 100644 --- a/src/components/modals/AirdropsModal.vue +++ b/src/components/modals/AirdropsModal.vue @@ -9,7 +9,6 @@ aria-labelledby="modalTitle" class="modal" role="dialog" - @click.stop="doNothing" >
{ queryParams().then(res => { - this.isValid = (+data.result.sync_info.latest_block_height < +res.data.params.airDropMaxBlockHeight) + this.isValid = (+data.result.sync_info.latest_block_height < +res.params.airDropMaxBlockHeight) }) }) .catch(error => console.log(error)) diff --git a/src/def-composables/useProfilePic.ts b/src/def-composables/useProfilePic.ts index fbd68f21..67b3f849 100644 --- a/src/def-composables/useProfilePic.ts +++ b/src/def-composables/useProfilePic.ts @@ -1,9 +1,9 @@ -import type { User } from "@/model/User" import { ref, watch, type Ref } from "vue"; import { useQuery } from "./useQuery" import type { Card } from "@/model/Card" import { useAddress } from "./useAddress" import { useUser } from "./useUser"; +import type { User } from "decentralcardgame-cardchain-client-ts/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/user"; const useProfilePicInstance = () => { const { queryQCard } = useQuery() diff --git a/src/def-composables/useQuery.ts b/src/def-composables/useQuery.ts index a10473cd..e31ac0c3 100644 --- a/src/def-composables/useQuery.ts +++ b/src/def-composables/useQuery.ts @@ -1,8 +1,8 @@ import { useClient } from "@/composables/useClient"; import type { AxiosResponse } from "axios"; import { ChainCard, Card } from "@/model/Card"; -import { User } from "@/model/User"; import { Coin } from "@/model/Coin"; +import type { User } from "decentralcardgame-cardchain-client-ts/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/user"; const handlers: { [key: string]: (res: AxiosResponse) => any } = { @@ -13,7 +13,7 @@ const handlers: { [key: string]: (res: AxiosResponse) => any } = { return ChainCard.from(res.data).toCard(); }, queryQUser: (res): User => { - return User.from(res.data); + return res.data; }, queryAllBalances: (res) => { let coins: Coin[] = []; diff --git a/src/def-composables/useUser.ts b/src/def-composables/useUser.ts index 564b4420..f6155aca 100644 --- a/src/def-composables/useUser.ts +++ b/src/def-composables/useUser.ts @@ -1,15 +1,15 @@ -import { User } from "@/model/User" import { ref, type Ref, watch } from "vue"; import { useQuery } from "./useQuery" import { useAddress } from "./useAddress" import { useLoggedIn } from "@/def-composables/useLoggedIn"; import type { Coin } from "@/model/Coin"; +import { User } from "decentralcardgame-cardchain-client-ts/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/user"; const useUserInstance = () => { const { queryQUser, queryAllBalances } = useQuery() const { address } = useAddress() const { loggedIn } = useLoggedIn() - const user: Ref = ref(new User()) + const user: Ref = ref(User.fromPartial({})) const coins: Ref> = ref([]) watch(loggedIn, (val) => { diff --git a/src/model/User.ts b/src/model/User.ts deleted file mode 100644 index 01da7317..00000000 --- a/src/model/User.ts +++ /dev/null @@ -1,45 +0,0 @@ -export class User { - ReportMatches: boolean = false - airDrops: AirDrops = new AirDrops() - alias: string = "" - biography: string = "" - boosterPacks: Array = [] - cards: Array = [] - councilParticipation: CouncilParticipation = new CouncilParticipation() - ownedCardSchemes: Array = [] - CouncilStatus: string = "" - ownedPrototypes: Array = [] - profileCard: number = 0 - voteRights: Array = [] - website: string = "" - - static from(json: any) { - let user: User = Object.assign(new User(), json); - user.airDrops = AirDrops.from(json.airDrops) - //user.councilParticipation = CouncilParticipation.from(json.councilParticipation) - return user - } -} - -class AirDrops { - vote: boolean = false - create: boolean = false - buy: boolean = false - play: boolean = false - user: boolean = false - - static from(json: any) { - return Object.assign(new AirDrops(), json); - } -} - -class CouncilParticipation { - council: number = 0 - status: string = "" - - static from(json: any) { - let cp = Object.assign(new CouncilParticipation(), json); - cp.council = parseInt(json.council) - return cp - } -} \ No newline at end of file diff --git a/src/views/UserView.vue b/src/views/UserView.vue index b136dc5c..55cc8f80 100644 --- a/src/views/UserView.vue +++ b/src/views/UserView.vue @@ -3,7 +3,7 @@
- +
@@ -76,7 +76,12 @@

- @@ -118,13 +123,19 @@ import { useLoggedIn } from "@/def-composables/useLoggedIn"; import { useQuery } from "@/def-composables/useQuery"; import { validAddress } from "@/utils/validation"; import { useTx } from "@/def-composables/useTx"; -import { User } from "@/model/User"; import { useProfilePic } from "@/def-composables/useProfilePic"; import type { Coin } from "@/model/Coin"; import { normalizeCoins } from "@/utils/utils"; -import { computed, type ComputedRef, onMounted, reactive, type Ref, ref, watch } from "vue"; +import { + computed, + type ComputedRef, + onMounted, + reactive, + watch, +} from "vue"; import { useRoute, useRouter } from "vue-router"; import { useUser } from "@/def-composables/useUser"; +import { User } from "decentralcardgame-cardchain-client-ts/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/user"; const { queryQUser, queryAllBalances } = useQuery(); const { registerForCouncil, rewokeCouncilRegistration } = useTx(); @@ -132,7 +143,7 @@ const { address } = useAddress(); const { loggedIn } = useLoggedIn(); const { getImg } = useProfilePic(); const { user, coins, queryCoins, queryUser } = useUser(); -const { loggedInProfilePic } = useProfilePic() +const { loggedInProfilePic } = useProfilePic(); const route = useRoute(); const router = useRouter(); @@ -144,15 +155,15 @@ const initialState: { addr: string; user: User; coins: Array; - userIsUser: ComputedRef - img: string + userIsUser: ComputedRef; + img: string; } = { isChooseModalVisible: false, isAirdropsModalVisible: false, isModalVisible: false, isGrantModalVisible: false, addr: "", - user: new User(), + user: User.fromPartial({}), coins: new Array(), userIsUser: computed(() => loggedIn.value && state.addr == address.value), img: "jaja", @@ -168,7 +179,7 @@ watch(coins, (val) => { }); watch(loggedInProfilePic, (val) => { if (state.userIsUser) state.img = val; -}) +}); const init = () => { let id = route.params.id.toString(); @@ -186,7 +197,7 @@ const init = () => { if (state.userIsUser) { state.user = user.value; state.coins = normalizeCoins(coins.value); - state.img = loggedInProfilePic.value + state.img = loggedInProfilePic.value; } if (!validAddress(state.addr)) { @@ -198,7 +209,7 @@ const init = () => { getCoins(); }; -onMounted(init) +onMounted(init); const getUser = () => { if (state.userIsUser) { @@ -206,8 +217,8 @@ const getUser = () => { } else { queryQUser(state.addr).then((user) => { state.user = user; - getImg(state.user, state.addr).then(img => { - state.img = img + getImg(state.user, state.addr).then((img) => { + state.img = img; }); }); } From bbfe2ea5190e5daad05bb367c8aa292e8ce97f26 Mon Sep 17 00:00:00 2001 From: lxgr-linux Date: Thu, 26 Oct 2023 18:34:36 +0200 Subject: [PATCH 03/32] Fixed EncouterVoting --- .../elements/EncounterVotingComponent.vue | 280 +++++------------- src/def-composables/useVoting.ts | 105 +++---- 2 files changed, 120 insertions(+), 265 deletions(-) diff --git a/src/components/elements/EncounterVotingComponent.vue b/src/components/elements/EncounterVotingComponent.vue index 3e2aafd8..7c42c424 100644 --- a/src/components/elements/EncounterVotingComponent.vue +++ b/src/components/elements/EncounterVotingComponent.vue @@ -1,69 +1,60 @@ - diff --git a/src/def-composables/useVoting.ts b/src/def-composables/useVoting.ts index d9d56876..d1041acc 100644 --- a/src/def-composables/useVoting.ts +++ b/src/def-composables/useVoting.ts @@ -1,70 +1,57 @@ import { useTx } from "@/def-composables/useTx"; -import { ref, watch, type Ref } from "vue"; -import * as R from 'ramda' +import { ref, watch, type Ref, computed } from "vue"; +import * as R from "ramda"; import type { SingleVote } from "decentralcardgame-cardchain-client-ts/DecentralCardGame.cardchain.cardchain"; -import type { CardchainVoteRight } from "decentralcardgame-cardchain-client-ts/DecentralCardGame.cardchain.cardchain/rest"; +import type { VoteType } from "decentralcardgame-cardchain-client-ts/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/voting"; +import { useUser } from "./useUser"; const KEY = "votingList"; - -const useVotingInstance = () => { - const { multiVoteCard } = useTx(); - - let stored = window.localStorage.getItem(KEY); - const votes: Ref = ref( - stored ? Object.assign([], JSON.parse(stored)) : [] - ); - - watch( - () => R.clone(votes.value), - (currentValue) => { - console.log(currentValue); - window.localStorage.setItem(KEY, JSON.stringify(currentValue)); - } - ); - - const send = (then: (res: any) => void, err: (res: any) => void) => { - console.log("send", votes.value) - multiVoteCard( - votes.value, - (res: any) => { +const { multiVoteCard } = useTx(); +const { user, queryUser } = useUser(); + +let stored = window.localStorage.getItem(KEY); +const votes: Ref = ref( + stored ? Object.assign([], JSON.parse(stored)) : [] +); +const votableCards = computed(() => user.value.votableCards); +const cardsLeft = computed(() => { + let taken = votes.value.map((v) => v.cardId); + return votableCards.value.filter((v) => !taken.includes(v)); +}); +const current = computed(() => cardsLeft.value.at(0)); + +watch( + () => R.clone(votes.value), + (currentValue) => { + console.log("Saving current votes: ", currentValue); + window.localStorage.setItem(KEY, JSON.stringify(currentValue)); + } +); + +const send = (then: (res: any) => void, err: (res: any) => void) => { + console.log("send", votes.value); + multiVoteCard( + votes.value, + (res: any) => { + queryUser().then(() => { votes.value = []; - then(res); - }, - err - ); - votes.value = [] - }; - - const add = (cardId: number, voteType: string) => { - votes.value.push({ - cardId, - voteType, - }); - }; - - const isEmpty = () => { - return votes.value.length == 0; - }; - - const filterCards = (voteRights: CardchainVoteRight[]) => { - return voteRights.filter((right: CardchainVoteRight) => { - for (const vote of votes.value) { - if (right.cardId == vote.cardId.toString()) { - return false; - } - } - return true; - }); - }; + }); + then(res); + }, + err + ); +}; - return { add, send, isEmpty, filterCards }; +const add = (cardId: number, voteType: VoteType) => { + console.log("vote ", voteType, " for ", cardId); + votes.value.push({ + cardId, + voteType, + }); }; -let instance: ReturnType; +const isEmpty = computed(() => votes.value.length == 0); export const useVoting = () => { - if (!instance) { - instance = useVotingInstance(); - } - return instance; + return { add, send, isEmpty, current, cardsLeft }; }; From 44ec9cbf52cb8c4031017aaa0512c558dff735b9 Mon Sep 17 00:00:00 2001 From: lxgr-linux Date: Fri, 27 Oct 2023 01:06:40 +0200 Subject: [PATCH 04/32] Refactored gallery --- src/components/modals/GalleryModal.vue | 58 +- src/def-composables/useQuery.ts | 4 +- src/views/GalleryPage.vue | 701 +++++++++++-------------- 3 files changed, 346 insertions(+), 417 deletions(-) diff --git a/src/components/modals/GalleryModal.vue b/src/components/modals/GalleryModal.vue index 2f26738c..08fb97e1 100644 --- a/src/components/modals/GalleryModal.vue +++ b/src/components/modals/GalleryModal.vue @@ -95,10 +95,7 @@ aria-label="Close modal" class="choice-grid__button" type="button" - @click=" - voteUP(); - close(); - " + @click="vote(VoteType.underpowered)" > Vote Underpowered @@ -108,10 +105,7 @@ aria-label="Close modal" class="choice-grid__button" type="button" - @click=" - voteOP(); - close(); - " + @click="vote(VoteType.overpowered)" > Vote Overpowered @@ -121,10 +115,7 @@ aria-label="Close modal" class="choice-grid__button" type="button" - @click=" - voteFair(); - close(); - " + @click="vote(VoteType.fairEnough)" > Vote Fair Enough @@ -134,10 +125,7 @@ aria-label="Close modal" class="choice-grid__button" type="button" - @click=" - voteInappropriate(); - close(); - " + @click="vote(VoteType.inappropriate)" > Vote Inappropriate @@ -173,33 +161,25 @@ import { useLastInputEvent } from "@/def-composables/useLastInputEvent"; import TransferCardModal from "./TransferCardModal.vue"; import { useUser } from "@/def-composables/useUser"; import { Card } from "@/model/Card"; -import { reactive, watch } from "vue"; +import { computed, reactive, watch } from "vue"; +import { useVoting } from "@/def-composables/useVoting"; +import type { VoteType } from "decentralcardgame-cardchain-client-ts/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/voting"; +const { add, send, isEmpty, cardsLeft, current } = useVoting(); const { lastInputEvent } = useLastInputEvent(); const { queryCoins, queryUser } = useUser(); -const emit = defineEmits([ - "close", - "download", - "cardview", - "edit", - "voteOP", - "voteUP", - "voteFair", - "voteInappropriate", -]); +const emit = defineEmits(["close", "cardview", "edit"]); const props = withDefaults( defineProps<{ - canVote: boolean; isOwner: boolean; isArtist: boolean; - keywordDescriptions: Array; + keywordDescriptions: Array>; model: Card; imageURL: string; }>(), { - canVote: false, isOwner: false, isArtist: false, keywordDescriptions: () => [], @@ -214,6 +194,8 @@ const initialState: { isModalVisible: false, }; +const canVote = computed(() => cardsLeft.value.includes(props.model.id)) + const state = reactive(initialState); watch(lastInputEvent, (event) => { @@ -223,13 +205,19 @@ watch(lastInputEvent, (event) => { }); const close = () => emit("close"); -const download = () => emit("download"); const cardview = () => emit("cardview"); const edit = () => emit("edit"); -const voteOP = () => emit("voteOP"); -const voteUP = () => emit("voteUP"); -const voteFair = () => emit("voteFair"); -const voteInappropriate = () => emit("voteInappropriate"); + +const vote = (type: VoteType) => { + add(current.value!, type); + send( + () => {}, + (err) => { + console.log(err); + } + ); + close(); +}; const showModal = () => { state.isModalVisible = true; }; diff --git a/src/def-composables/useQuery.ts b/src/def-composables/useQuery.ts index e31ac0c3..f5029e18 100644 --- a/src/def-composables/useQuery.ts +++ b/src/def-composables/useQuery.ts @@ -47,10 +47,10 @@ const useQueryInstance = () => { const unified = Object.assign(client.CosmosBankV1Beta1.query, client.DecentralCardGameCardchainCardchain.query, client.CosmosAuthzV1Beta1.query); const keys = Object.keys(unified); - let queries: { [id: string]: (args: any) => Promise } = {}; + let queries: { [id: string]: (...args: any[]) => Promise } = {}; keys.forEach(key => { - queries[key] = (...args: any) => { + queries[key] = (...args: any[]) => { return new Promise((myResolve, _) => { myResolve((unified as any)[key](...args).then(handlers.hasOwnProperty(key) ? handlers[key] : handlers.defaultHandler)); }); diff --git a/src/views/GalleryPage.vue b/src/views/GalleryPage.vue index 4370e14c..69ea1875 100644 --- a/src/views/GalleryPage.vue +++ b/src/views/GalleryPage.vue @@ -1,21 +1,14 @@ - @@ -629,6 +567,7 @@ export default { .button-container--bottom { margin-top: 2rem; } + .container-modal { position: fixed; z-index: 4; @@ -639,18 +578,21 @@ export default { background-color: rgba(0, 0, 0, 0.5); transition: opacity 0.3s ease; @media (max-width: 480px) { - bottom:0; + bottom: 0; overflow-y: scroll; } } + .gallery-checkbox { position: absolute; display: inline-block; margin-left: -25px; } + .gallery-checkbox__label { -margin-left: 25px; + margin-left: 25px; } + .ability-modal-container { margin: auto; margin-top: 5vh; @@ -658,12 +600,11 @@ margin-left: 25px; max-height: 95vh; @media (max-width: 480px) { margin-top: 0; - max-height:300vh; - height:auto; + max-height: 300vh; + height: auto; } //OLD: // position: relative; - z-index: 3; + z-index: 3; } - From 64c3dbbf6cc9283e057f5cb081c761a7d379388d Mon Sep 17 00:00:00 2001 From: lxgr-linux Date: Fri, 27 Oct 2023 01:11:47 +0200 Subject: [PATCH 05/32] Fixed gallery modal --- src/components/modals/GalleryModal.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/modals/GalleryModal.vue b/src/components/modals/GalleryModal.vue index 08fb97e1..08cec897 100644 --- a/src/components/modals/GalleryModal.vue +++ b/src/components/modals/GalleryModal.vue @@ -163,7 +163,7 @@ import { useUser } from "@/def-composables/useUser"; import { Card } from "@/model/Card"; import { computed, reactive, watch } from "vue"; import { useVoting } from "@/def-composables/useVoting"; -import type { VoteType } from "decentralcardgame-cardchain-client-ts/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/voting"; +import { VoteType } from "decentralcardgame-cardchain-client-ts/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/voting"; const { add, send, isEmpty, cardsLeft, current } = useVoting(); const { lastInputEvent } = useLastInputEvent(); @@ -209,9 +209,10 @@ const cardview = () => emit("cardview"); const edit = () => emit("edit"); const vote = (type: VoteType) => { - add(current.value!, type); + add(props.model.id, type); send( - () => {}, + () => { + }, (err) => { console.log(err); } From 3b122981c75b6588ecc34bc448f7c67f8cad007a Mon Sep 17 00:00:00 2001 From: lxgr-linux Date: Fri, 27 Oct 2023 01:51:40 +0200 Subject: [PATCH 06/32] Fixed Advanced cardview --- src/components/modals/GalleryModal.vue | 2 +- src/def-composables/useVoting.ts | 2 +- src/views/AdvancedCardViewPage.vue | 267 ++++++++++--------------- 3 files changed, 104 insertions(+), 167 deletions(-) diff --git a/src/components/modals/GalleryModal.vue b/src/components/modals/GalleryModal.vue index 08cec897..145d75a9 100644 --- a/src/components/modals/GalleryModal.vue +++ b/src/components/modals/GalleryModal.vue @@ -194,7 +194,7 @@ const initialState: { isModalVisible: false, }; -const canVote = computed(() => cardsLeft.value.includes(props.model.id)) +const canVote = computed(() => cardsLeft.value.includes(Number(props.model.id))) const state = reactive(initialState); diff --git a/src/def-composables/useVoting.ts b/src/def-composables/useVoting.ts index d1041acc..925f7fb9 100644 --- a/src/def-composables/useVoting.ts +++ b/src/def-composables/useVoting.ts @@ -13,7 +13,7 @@ let stored = window.localStorage.getItem(KEY); const votes: Ref = ref( stored ? Object.assign([], JSON.parse(stored)) : [] ); -const votableCards = computed(() => user.value.votableCards); +const votableCards = computed(() => user.value.votableCards.map(v => Number(v))); const cardsLeft = computed(() => { let taken = votes.value.map((v) => v.cardId); return votableCards.value.filter((v) => !taken.includes(v)); diff --git a/src/views/AdvancedCardViewPage.vue b/src/views/AdvancedCardViewPage.vue index 5d5f82b6..8447ba6a 100644 --- a/src/views/AdvancedCardViewPage.vue +++ b/src/views/AdvancedCardViewPage.vue @@ -1,121 +1,90 @@ - @@ -266,5 +204,4 @@ h3 { color: white; } } - - + \ No newline at end of file From b195e4a6d03d0e15536fc4046596fee1179c24d1 Mon Sep 17 00:00:00 2001 From: lxgr-linux Date: Fri, 27 Oct 2023 01:54:18 +0200 Subject: [PATCH 07/32] small encountervoting fix --- .../elements/EncounterVotingComponent.vue | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/components/elements/EncounterVotingComponent.vue b/src/components/elements/EncounterVotingComponent.vue index 7c42c424..10db21ec 100644 --- a/src/components/elements/EncounterVotingComponent.vue +++ b/src/components/elements/EncounterVotingComponent.vue @@ -94,13 +94,15 @@ const votePool = computed(() => state.currentCard.votePool.normalize().pretty()) const vote = (type: VoteType) => add(current.value!, type); const getCard = () => { - queryQCard(current.value!).then((parsedCard: Card) => { - if (parsedCard) { - state.currentCard = parsedCard; - } else { - console.error("card could not be parsed", parsedCard); - } - }); + if (current.value) { + queryQCard(current.value!).then((parsedCard: Card) => { + if (parsedCard) { + state.currentCard = parsedCard; + } else { + console.error("card could not be parsed", parsedCard); + } + }); + } }; onMounted(() => { From 9531378f7d467d5571633390f47e5247a8d040e5 Mon Sep 17 00:00:00 2001 From: lxgr-linux Date: Sat, 28 Oct 2023 18:13:32 +0200 Subject: [PATCH 08/32] Added useCards to centralize cardstate --- .../elements/EncounterVotingComponent.vue | 17 ++- src/components/modals/ChoosePBModal.vue | 134 ++++++++---------- src/def-composables/useCards.ts | 25 ++++ src/def-composables/useProfilePic.ts | 30 ++-- src/def-composables/useVoting.ts | 3 +- src/views/AdvancedCardViewPage.vue | 17 +-- src/views/GalleryPage.vue | 38 +++-- src/views/UserView.vue | 2 +- 8 files changed, 134 insertions(+), 132 deletions(-) create mode 100644 src/def-composables/useCards.ts diff --git a/src/components/elements/EncounterVotingComponent.vue b/src/components/elements/EncounterVotingComponent.vue index 10db21ec..2c5b5de2 100644 --- a/src/components/elements/EncounterVotingComponent.vue +++ b/src/components/elements/EncounterVotingComponent.vue @@ -75,12 +75,14 @@ import { useQuery } from "@/def-composables/useQuery"; import { useVoting } from "@/def-composables/useVoting"; import { computed, onMounted, reactive, watch } from "vue"; import { VoteType } from "decentralcardgame-cardchain-client-ts/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/voting"; +import { useCards } from "@/def-composables/useCards"; const { loggedIn } = useLoggedIn(); const { address } = useAddress(); const { queryQCard } = useQuery(); -const { notifyInfo, notifySuccess } = useNotifications(); -const { add, send, isEmpty, cardsLeft, current } = useVoting(); +const { notifySuccess } = useNotifications(); +const { getCard } = useCards() +const { add, send, isEmpty, cardsLeft, current, next } = useVoting(); const initialState: { currentCard: Card; @@ -93,9 +95,9 @@ const votePool = computed(() => state.currentCard.votePool.normalize().pretty()) const vote = (type: VoteType) => add(current.value!, type); -const getCard = () => { +const loadCard = () => { if (current.value) { - queryQCard(current.value!).then((parsedCard: Card) => { + getCard(current.value!).then((parsedCard: Card) => { if (parsedCard) { state.currentCard = parsedCard; } else { @@ -103,15 +105,18 @@ const getCard = () => { } }); } + if (next.value) { + getCard(next.value!) + } }; onMounted(() => { if (loggedIn.value) { - getCard(); + loadCard(); } }); -watch(current, getCard); +watch(current, loadCard); const sendToChain = () => { send( diff --git a/src/components/modals/ChoosePBModal.vue b/src/components/modals/ChoosePBModal.vue index c28e8bb1..2168b50b 100644 --- a/src/components/modals/ChoosePBModal.vue +++ b/src/components/modals/ChoosePBModal.vue @@ -1,22 +1,14 @@ - + \ No newline at end of file diff --git a/src/views/UserView.vue b/src/views/UserView.vue index 55cc8f80..4c365929 100644 --- a/src/views/UserView.vue +++ b/src/views/UserView.vue @@ -101,7 +101,7 @@ Date: Sat, 28 Oct 2023 19:00:50 +0200 Subject: [PATCH 09/32] Updated vite to 4.5.0 --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4408c47a..75ac5469 100644 --- a/package-lock.json +++ b/package-lock.json @@ -59,7 +59,7 @@ "sass": "^1.55.0", "tailwindcss": "^3.3.3", "typescript": "~4.8.4", - "vite": "^4.4.9", + "vite": "^4.5.0", "vue-tsc": "^1.0.9" }, "engines": { @@ -6189,9 +6189,9 @@ } }, "node_modules/vite": { - "version": "4.4.9", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.9.tgz", - "integrity": "sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.0.tgz", + "integrity": "sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==", "dev": true, "dependencies": { "esbuild": "^0.18.10", diff --git a/package.json b/package.json index a4335291..d9d0068a 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "sass": "^1.55.0", "tailwindcss": "^3.3.3", "typescript": "~4.8.4", - "vite": "^4.4.9", + "vite": "^4.5.0", "vue-tsc": "^1.0.9" }, "name": "@decentralcardgame/frontend", From 2ea15b5a84157a5f3ded28d3b788d6b1a82106ca Mon Sep 17 00:00:00 2001 From: lxgr-linux Date: Wed, 1 Nov 2023 20:48:11 +0100 Subject: [PATCH 10/32] extracted gallery component --- src/components/elements/GalleryComponent.vue | 186 +++++++++++++++++ src/components/modals/GalleryModal.vue | 9 +- src/views/GalleryPage.vue | 198 ++----------------- 3 files changed, 201 insertions(+), 192 deletions(-) create mode 100644 src/components/elements/GalleryComponent.vue diff --git a/src/components/elements/GalleryComponent.vue b/src/components/elements/GalleryComponent.vue new file mode 100644 index 00000000..f1b8c856 --- /dev/null +++ b/src/components/elements/GalleryComponent.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/components/modals/GalleryModal.vue b/src/components/modals/GalleryModal.vue index 145d75a9..6f5d77e6 100644 --- a/src/components/modals/GalleryModal.vue +++ b/src/components/modals/GalleryModal.vue @@ -164,24 +164,22 @@ import { Card } from "@/model/Card"; import { computed, reactive, watch } from "vue"; import { useVoting } from "@/def-composables/useVoting"; import { VoteType } from "decentralcardgame-cardchain-client-ts/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/voting"; +import { useAddress } from "@/def-composables/useAddress"; const { add, send, isEmpty, cardsLeft, current } = useVoting(); const { lastInputEvent } = useLastInputEvent(); const { queryCoins, queryUser } = useUser(); +const { address } = useAddress() const emit = defineEmits(["close", "cardview", "edit"]); const props = withDefaults( defineProps<{ - isOwner: boolean; - isArtist: boolean; keywordDescriptions: Array>; model: Card; imageURL: string; }>(), { - isOwner: false, - isArtist: false, keywordDescriptions: () => [], model: () => new Card(), imageURL: "", @@ -195,7 +193,8 @@ const initialState: { }; const canVote = computed(() => cardsLeft.value.includes(Number(props.model.id))) - +const isOwner = computed(() => props.model.owner == address.value) +const isArtist = computed(() => props.model.artist == address.value) const state = reactive(initialState); watch(lastInputEvent, (event) => { diff --git a/src/views/GalleryPage.vue b/src/views/GalleryPage.vue index 6b83d39b..ab2db5f0 100644 --- a/src/views/GalleryPage.vue +++ b/src/views/GalleryPage.vue @@ -143,7 +143,7 @@
- + - -
- -
- - -
-
-
- -
+
+ - - + \ No newline at end of file From 9454ce6cc5414848bf90e6658e57ce184a779335 Mon Sep 17 00:00:00 2001 From: lxgr-linux Date: Wed, 1 Nov 2023 23:04:26 +0100 Subject: [PATCH 13/32] Fixed hosts for devnet --- .env.development | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.env.development b/.env.development index 54114a74..abf872a8 100644 --- a/.env.development +++ b/.env.development @@ -16,6 +16,6 @@ NODE_VERSION=v18.17.1 #VITE_WS_TENDERMINT_FALLBACK=https://cardchain2.crowdcontrol.network/tendermint/ #VITE_APP_FAUCET_FALLBACK=https://cardchain2.crowdcontrol.network/faucet/claimTokens -VITE_API_COSMOS="http://localhost:1317" -VITE_WS_TENDERMINT="http://localhost:26657" -VITE_APP_FAUCET="http://localhost:4500/claimTokens" +VITE_API_COSMOS="http://lxgr.xyz:1317" +VITE_WS_TENDERMINT="http://lxgr.xyz:26657" +VITE_APP_FAUCET="http://lxgr.xyz:4500/claimTokens" From 4e0b0a3208e8bd267b9a83c803c9fccc9ee069c3 Mon Sep 17 00:00:00 2001 From: lxgr-linux Date: Thu, 2 Nov 2023 22:15:35 +0100 Subject: [PATCH 14/32] Updated dependecie versions --- .fleet/settings.json | 2 +- package-lock.json | 8 ++++---- package.json | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.fleet/settings.json b/.fleet/settings.json index 0c004c80..5f57065e 100644 --- a/.fleet/settings.json +++ b/.fleet/settings.json @@ -1,3 +1,3 @@ { - "backend.maxHeapSizeMb": 896 + "backend.maxHeapSizeMb": 1568 } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 02b73357..55a69da7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "axios": "^1.5.1", "bignumber.js": "^9.1.0", "crypto-js": "^4.2.0", - "decentralcardgame-cardchain-client-ts": "^0.0.18", + "decentralcardgame-cardchain-client-ts": "^0.0.20", "long": "^5.2.0", "merge-images": "^2.0.0", "pinia": "^2.0.23", @@ -2498,9 +2498,9 @@ } }, "node_modules/decentralcardgame-cardchain-client-ts": { - "version": "0.0.18", - "resolved": "https://registry.npmjs.org/decentralcardgame-cardchain-client-ts/-/decentralcardgame-cardchain-client-ts-0.0.18.tgz", - "integrity": "sha512-xn07t2aw+ftFpu1P8L7ZZxhxJ2zmypWQmJAfhEVhM/fMuo7U/G7/CdZ5lMw/5oPqyAo0Uoih/u/wmd+RgKvlKQ==", + "version": "0.0.20", + "resolved": "https://registry.npmjs.org/decentralcardgame-cardchain-client-ts/-/decentralcardgame-cardchain-client-ts-0.0.20.tgz", + "integrity": "sha512-2OV4VlHZKTB919a9vb7fBvHD1ll39Op33J+ncmeCX9So6e0xAsqxB8rxQ39GakjARzS6xySv8ZfmXRdhoO4BxA==", "dependencies": { "@cosmjs/amino": "0.29.5", "@cosmjs/proto-signing": "0.27.0", diff --git a/package.json b/package.json index 51c37b41..b42b0131 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "@cosmjs/encoding": "^0.29.3", "@cosmjs/launchpad": "^0.27.0", "@cosmjs/proto-signing": "^0.27.0", - "@cosmjs/stargate": "^0.27.0", + "@cosmjs/stargate": "^0.27.1", "@hcaptcha/vue3-hcaptcha": "^1.0.1", "@headlessui/tailwindcss": "^0.2.0", "@headlessui/vue": "^1.7.16", @@ -14,7 +14,7 @@ "axios": "^1.5.1", "bignumber.js": "^9.1.0", "crypto-js": "^4.2.0", - "decentralcardgame-cardchain-client-ts": "^0.0.18", + "decentralcardgame-cardchain-client-ts": "^0.0.20", "long": "^5.2.0", "merge-images": "^2.0.0", "pinia": "^2.0.23", From 6e81acb573f98e53ca93b22f142dde11968f5482 Mon Sep 17 00:00:00 2001 From: lxgr-linux Date: Thu, 2 Nov 2023 22:29:57 +0100 Subject: [PATCH 15/32] Updated versions --- package-lock.json | 213 +++------------------------------------------- package.json | 4 +- 2 files changed, 12 insertions(+), 205 deletions(-) diff --git a/package-lock.json b/package-lock.json index 55a69da7..1aecdd8b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,8 +11,8 @@ "dependencies": { "@cosmjs/encoding": "^0.29.3", "@cosmjs/launchpad": "^0.27.0", - "@cosmjs/proto-signing": "^0.27.0", - "@cosmjs/stargate": "^0.27.0", + "@cosmjs/proto-signing": "^0.27.1", + "@cosmjs/stargate": "^0.27.1", "@hcaptcha/vue3-hcaptcha": "^1.0.1", "@headlessui/tailwindcss": "^0.2.0", "@headlessui/vue": "^1.7.16", @@ -23,7 +23,7 @@ "axios": "^1.5.1", "bignumber.js": "^9.1.0", "crypto-js": "^4.2.0", - "decentralcardgame-cardchain-client-ts": "^0.0.20", + "decentralcardgame-cardchain-client-ts": "^0.0.21", "long": "^5.2.0", "merge-images": "^2.0.0", "pinia": "^2.0.23", @@ -2498,13 +2498,13 @@ } }, "node_modules/decentralcardgame-cardchain-client-ts": { - "version": "0.0.20", - "resolved": "https://registry.npmjs.org/decentralcardgame-cardchain-client-ts/-/decentralcardgame-cardchain-client-ts-0.0.20.tgz", - "integrity": "sha512-2OV4VlHZKTB919a9vb7fBvHD1ll39Op33J+ncmeCX9So6e0xAsqxB8rxQ39GakjARzS6xySv8ZfmXRdhoO4BxA==", + "version": "0.0.21", + "resolved": "https://registry.npmjs.org/decentralcardgame-cardchain-client-ts/-/decentralcardgame-cardchain-client-ts-0.0.21.tgz", + "integrity": "sha512-6Wb/qdC61kpqtB15mQSHqyCw8Vi2YiXUKogfVXXlJdUr9HdDo+mAqxVg3T5d+6fTzJ+zpoYH/hnjyeAAZ/hztg==", "dependencies": { "@cosmjs/amino": "0.29.5", - "@cosmjs/proto-signing": "0.27.0", - "@cosmjs/stargate": "0.27.0", + "@cosmjs/proto-signing": "0.27.1", + "@cosmjs/stargate": "0.27.1", "@keplr-wallet/types": "^0.12.28", "axios": "0.21.4", "buffer": "^6.0.3", @@ -2512,8 +2512,8 @@ }, "peerDependencies": { "@cosmjs/amino": "0.29.5", - "@cosmjs/proto-signing": "0.27.0", - "@cosmjs/stargate": "0.27.0" + "@cosmjs/proto-signing": "0.27.1", + "@cosmjs/stargate": "0.27.1" } }, "node_modules/decentralcardgame-cardchain-client-ts/node_modules/@cosmjs/amino": { @@ -2564,194 +2564,6 @@ "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.29.5.tgz", "integrity": "sha512-m7h+RXDUxOzEOGt4P+3OVPX7PuakZT3GBmaM/Y2u+abN3xZkziykD/NvedYFvvCCdQo714XcGl33bwifS9FZPQ==" }, - "node_modules/decentralcardgame-cardchain-client-ts/node_modules/@cosmjs/crypto": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.27.0.tgz", - "integrity": "sha512-JTPHINCYZ+mnsxrfv8ZBHsFWgB7EGooa5SD0lQFhkCVX/FC3sqxuFNv6TZU5bVVU71DUSqXTMXF5m9kAMzPUkw==", - "dependencies": { - "@cosmjs/encoding": "0.27.0", - "@cosmjs/math": "0.27.0", - "@cosmjs/utils": "0.27.0", - "bip39": "^3.0.2", - "bn.js": "^5.2.0", - "elliptic": "^6.5.3", - "js-sha3": "^0.8.0", - "libsodium-wrappers": "^0.7.6", - "ripemd160": "^2.0.2", - "sha.js": "^2.4.11" - } - }, - "node_modules/decentralcardgame-cardchain-client-ts/node_modules/@cosmjs/encoding": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.27.0.tgz", - "integrity": "sha512-cCT8X/NUAGXOe14F/k2GE6N9btjrOqALBilUPIn5CL4OEGxvRTPD59nWSACu0iafCGz10Tw3LPcouuYPtZmkbg==", - "dependencies": { - "base64-js": "^1.3.0", - "bech32": "^1.1.4", - "readonly-date": "^1.0.0" - } - }, - "node_modules/decentralcardgame-cardchain-client-ts/node_modules/@cosmjs/json-rpc": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@cosmjs/json-rpc/-/json-rpc-0.27.0.tgz", - "integrity": "sha512-Q6na5KPYDD90QhlPZTInquwBycDjvhZvWwpV1TppDd2Em8S1FfN3ePiV2YCf4XzXREU5YPFSHzh5MHK/WhQY3w==", - "dependencies": { - "@cosmjs/stream": "0.27.0", - "xstream": "^11.14.0" - } - }, - "node_modules/decentralcardgame-cardchain-client-ts/node_modules/@cosmjs/math": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.27.0.tgz", - "integrity": "sha512-+WsrdXojqpUL6l2LKOWYgiAJIDD0faONNtnjb1kpS1btSzZe1Ns+RdygG6QZLLvZuxMfkEzE54ZXDKPD5MhVPA==", - "dependencies": { - "bn.js": "^5.2.0" - } - }, - "node_modules/decentralcardgame-cardchain-client-ts/node_modules/@cosmjs/proto-signing": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@cosmjs/proto-signing/-/proto-signing-0.27.0.tgz", - "integrity": "sha512-ODqnmY/ElmcEYu6HbDmeGce4KacgzSVGQzvGodZidC1RR9EYociuweBPNwSHqBPolC6PQPI/QGc83m/mbih2xw==", - "dependencies": { - "@cosmjs/amino": "0.27.0", - "@cosmjs/crypto": "0.27.0", - "@cosmjs/math": "0.27.0", - "cosmjs-types": "^0.4.0", - "long": "^4.0.0", - "protobufjs": "~6.10.2" - } - }, - "node_modules/decentralcardgame-cardchain-client-ts/node_modules/@cosmjs/proto-signing/node_modules/@cosmjs/amino": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.27.0.tgz", - "integrity": "sha512-ybyzRkGrRija1bjGjGP7sAp2ulPA2/S2wMY2pehB7b6ZR8dpwveCjz/IqFWC5KBxz6KZf5MuaONOY+t1kkjsfw==", - "dependencies": { - "@cosmjs/crypto": "0.27.0", - "@cosmjs/encoding": "0.27.0", - "@cosmjs/math": "0.27.0", - "@cosmjs/utils": "0.27.0" - } - }, - "node_modules/decentralcardgame-cardchain-client-ts/node_modules/@cosmjs/proto-signing/node_modules/protobufjs": { - "version": "6.10.3", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.10.3.tgz", - "integrity": "sha512-yvAslS0hNdBhlSKckI4R1l7wunVilX66uvrjzE4MimiAt7/qw1nLpMhZrn/ObuUTM/c3Xnfl01LYMdcSJe6dwg==", - "hasInstallScript": true, - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.1", - "@types/node": "^13.7.0", - "long": "^4.0.0" - }, - "bin": { - "pbjs": "bin/pbjs", - "pbts": "bin/pbts" - } - }, - "node_modules/decentralcardgame-cardchain-client-ts/node_modules/@cosmjs/socket": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@cosmjs/socket/-/socket-0.27.0.tgz", - "integrity": "sha512-lOd0s6gLyjdjcs8xnYuS2IXRqBLUrI76Bek5wsia+m5CyUvHjRbbd7+nZiznbtVjApBlIwHGkiklLg3/byxkAA==", - "dependencies": { - "@cosmjs/stream": "0.27.0", - "isomorphic-ws": "^4.0.1", - "ws": "^7", - "xstream": "^11.14.0" - } - }, - "node_modules/decentralcardgame-cardchain-client-ts/node_modules/@cosmjs/stargate": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@cosmjs/stargate/-/stargate-0.27.0.tgz", - "integrity": "sha512-Fiqk8rIpB4emzC/P7/+ZPPJV9aG6KJhVuOF4D8c1j1Bv8fVs1XqC6NgsY6elTLXl38pgXt7REn6VYzAdZwrHXQ==", - "dependencies": { - "@confio/ics23": "^0.6.3", - "@cosmjs/amino": "0.27.0", - "@cosmjs/encoding": "0.27.0", - "@cosmjs/math": "0.27.0", - "@cosmjs/proto-signing": "0.27.0", - "@cosmjs/stream": "0.27.0", - "@cosmjs/tendermint-rpc": "0.27.0", - "@cosmjs/utils": "0.27.0", - "cosmjs-types": "^0.4.0", - "long": "^4.0.0", - "protobufjs": "~6.10.2", - "xstream": "^11.14.0" - } - }, - "node_modules/decentralcardgame-cardchain-client-ts/node_modules/@cosmjs/stargate/node_modules/@cosmjs/amino": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.27.0.tgz", - "integrity": "sha512-ybyzRkGrRija1bjGjGP7sAp2ulPA2/S2wMY2pehB7b6ZR8dpwveCjz/IqFWC5KBxz6KZf5MuaONOY+t1kkjsfw==", - "dependencies": { - "@cosmjs/crypto": "0.27.0", - "@cosmjs/encoding": "0.27.0", - "@cosmjs/math": "0.27.0", - "@cosmjs/utils": "0.27.0" - } - }, - "node_modules/decentralcardgame-cardchain-client-ts/node_modules/@cosmjs/stargate/node_modules/protobufjs": { - "version": "6.10.3", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.10.3.tgz", - "integrity": "sha512-yvAslS0hNdBhlSKckI4R1l7wunVilX66uvrjzE4MimiAt7/qw1nLpMhZrn/ObuUTM/c3Xnfl01LYMdcSJe6dwg==", - "hasInstallScript": true, - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.1", - "@types/node": "^13.7.0", - "long": "^4.0.0" - }, - "bin": { - "pbjs": "bin/pbjs", - "pbts": "bin/pbts" - } - }, - "node_modules/decentralcardgame-cardchain-client-ts/node_modules/@cosmjs/stream": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@cosmjs/stream/-/stream-0.27.0.tgz", - "integrity": "sha512-D9mXHqS6y7xrThhUg5SCvMjiVQ8ph9f7gAuWlrXhqVJ5FqrP6OyTGRbVyGGM91d5Jj7N7oidQ+hOfc34vKFgeg==", - "dependencies": { - "xstream": "^11.14.0" - } - }, - "node_modules/decentralcardgame-cardchain-client-ts/node_modules/@cosmjs/tendermint-rpc": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@cosmjs/tendermint-rpc/-/tendermint-rpc-0.27.0.tgz", - "integrity": "sha512-WFcJ2/UF76fBBVzPRiHJoC/GCKvgt0mb7+ewgpwKBeEcYwfj5qb1QreGBbHn/UZx9QSsF9jhI5k7SmNdglC3cA==", - "dependencies": { - "@cosmjs/crypto": "0.27.0", - "@cosmjs/encoding": "0.27.0", - "@cosmjs/json-rpc": "0.27.0", - "@cosmjs/math": "0.27.0", - "@cosmjs/socket": "0.27.0", - "@cosmjs/stream": "0.27.0", - "axios": "^0.21.2", - "readonly-date": "^1.0.0", - "xstream": "^11.14.0" - } - }, - "node_modules/decentralcardgame-cardchain-client-ts/node_modules/@cosmjs/utils": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.27.0.tgz", - "integrity": "sha512-UC1eWY9isDQm6POy6GaTmYtbPVY5dkywdjW8Qzj+JNMhbhMM0KHuI4pHwjv5TPXSO/Ba2z10MTnD9nUlZtDwtA==" - }, "node_modules/decentralcardgame-cardchain-client-ts/node_modules/@keplr-wallet/types": { "version": "0.12.35", "resolved": "https://registry.npmjs.org/@keplr-wallet/types/-/types-0.12.35.tgz", @@ -2760,11 +2572,6 @@ "long": "^4.0.0" } }, - "node_modules/decentralcardgame-cardchain-client-ts/node_modules/@types/node": { - "version": "13.13.52", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.52.tgz", - "integrity": "sha512-s3nugnZumCC//n4moGGe6tkNMyYEdaDBitVjwPxXmR5lnMG5dHePinH2EdxkG3Rh1ghFHHixAG4NJhpJW1rthQ==" - }, "node_modules/decentralcardgame-cardchain-client-ts/node_modules/axios": { "version": "0.21.4", "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", diff --git a/package.json b/package.json index b42b0131..60955edc 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "dependencies": { "@cosmjs/encoding": "^0.29.3", "@cosmjs/launchpad": "^0.27.0", - "@cosmjs/proto-signing": "^0.27.0", + "@cosmjs/proto-signing": "^0.27.1", "@cosmjs/stargate": "^0.27.1", "@hcaptcha/vue3-hcaptcha": "^1.0.1", "@headlessui/tailwindcss": "^0.2.0", @@ -14,7 +14,7 @@ "axios": "^1.5.1", "bignumber.js": "^9.1.0", "crypto-js": "^4.2.0", - "decentralcardgame-cardchain-client-ts": "^0.0.20", + "decentralcardgame-cardchain-client-ts": "^0.0.21", "long": "^5.2.0", "merge-images": "^2.0.0", "pinia": "^2.0.23", From 7d5e807c2d5d085d023862feffc5e5e48cc2154a Mon Sep 17 00:00:00 2001 From: lxgr-linux Date: Thu, 2 Nov 2023 22:59:23 +0100 Subject: [PATCH 16/32] Updated versions --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1aecdd8b..99939e69 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "axios": "^1.5.1", "bignumber.js": "^9.1.0", "crypto-js": "^4.2.0", - "decentralcardgame-cardchain-client-ts": "^0.0.21", + "decentralcardgame-cardchain-client-ts": "^0.0.22", "long": "^5.2.0", "merge-images": "^2.0.0", "pinia": "^2.0.23", @@ -2498,9 +2498,9 @@ } }, "node_modules/decentralcardgame-cardchain-client-ts": { - "version": "0.0.21", - "resolved": "https://registry.npmjs.org/decentralcardgame-cardchain-client-ts/-/decentralcardgame-cardchain-client-ts-0.0.21.tgz", - "integrity": "sha512-6Wb/qdC61kpqtB15mQSHqyCw8Vi2YiXUKogfVXXlJdUr9HdDo+mAqxVg3T5d+6fTzJ+zpoYH/hnjyeAAZ/hztg==", + "version": "0.0.22", + "resolved": "https://registry.npmjs.org/decentralcardgame-cardchain-client-ts/-/decentralcardgame-cardchain-client-ts-0.0.22.tgz", + "integrity": "sha512-VjItfVAuw6SCM9Cr/PwdXtnOv133bUDj/cmNlhkiqSS5LHbLg35otUiCxaykek0BV59d7bpmTcLxPRqWJR2eZg==", "dependencies": { "@cosmjs/amino": "0.29.5", "@cosmjs/proto-signing": "0.27.1", diff --git a/package.json b/package.json index 60955edc..c3d0b668 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "axios": "^1.5.1", "bignumber.js": "^9.1.0", "crypto-js": "^4.2.0", - "decentralcardgame-cardchain-client-ts": "^0.0.21", + "decentralcardgame-cardchain-client-ts": "^0.0.22", "long": "^5.2.0", "merge-images": "^2.0.0", "pinia": "^2.0.23", From 86d013c27636681bff7b5c95f86a598d21720bab Mon Sep 17 00:00:00 2001 From: lxgr-linux Date: Thu, 2 Nov 2023 23:06:54 +0100 Subject: [PATCH 17/32] Updated chainid --- .env.development | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.development b/.env.development index abf872a8..b54247c6 100644 --- a/.env.development +++ b/.env.development @@ -4,7 +4,7 @@ VITE_APP_FAUCET_SITEKEY="ea68532a-a9e6-4f99-9361-db90a3071b72" VITE_APP_ADDRESS_PREFIX=cc -VITE_APP_CHAIN_ID="cardtestnet-5" +VITE_APP_CHAIN_ID="carddevnet-2" VITE_APP_CHAIN_NAME="Cardchain" VITE_APP_CARDIMG_MAXKB=500 VITE_APP_CARDIMG_SIZE_X=840 From 6a9c8f66a8e3a77eed49c4fcc8ae79ac3d181ea4 Mon Sep 17 00:00:00 2001 From: lxgr-linux Date: Thu, 2 Nov 2023 23:16:27 +0100 Subject: [PATCH 18/32] Once again updated client --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c3d0b668..8fbb34b9 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "axios": "^1.5.1", "bignumber.js": "^9.1.0", "crypto-js": "^4.2.0", - "decentralcardgame-cardchain-client-ts": "^0.0.22", + "decentralcardgame-cardchain-client-ts": "^0.0.23", "long": "^5.2.0", "merge-images": "^2.0.0", "pinia": "^2.0.23", From 602def5da44a82d3f6af3a0445d009fc3930e72a Mon Sep 17 00:00:00 2001 From: lxgr-linux Date: Thu, 2 Nov 2023 23:23:29 +0100 Subject: [PATCH 19/32] 0.0.24 --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 99939e69..5f33a08f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "axios": "^1.5.1", "bignumber.js": "^9.1.0", "crypto-js": "^4.2.0", - "decentralcardgame-cardchain-client-ts": "^0.0.22", + "decentralcardgame-cardchain-client-ts": "^0.0.24", "long": "^5.2.0", "merge-images": "^2.0.0", "pinia": "^2.0.23", @@ -2498,9 +2498,9 @@ } }, "node_modules/decentralcardgame-cardchain-client-ts": { - "version": "0.0.22", - "resolved": "https://registry.npmjs.org/decentralcardgame-cardchain-client-ts/-/decentralcardgame-cardchain-client-ts-0.0.22.tgz", - "integrity": "sha512-VjItfVAuw6SCM9Cr/PwdXtnOv133bUDj/cmNlhkiqSS5LHbLg35otUiCxaykek0BV59d7bpmTcLxPRqWJR2eZg==", + "version": "0.0.24", + "resolved": "https://registry.npmjs.org/decentralcardgame-cardchain-client-ts/-/decentralcardgame-cardchain-client-ts-0.0.24.tgz", + "integrity": "sha512-z5Y3WftNfYE7qKBojTiCgYZI4gSJA6YDh4L6hIvI08qIRFenDhBy1GlQy8ns67mNsW/O3qWhQwplLYFoVXVyfA==", "dependencies": { "@cosmjs/amino": "0.29.5", "@cosmjs/proto-signing": "0.27.1", diff --git a/package.json b/package.json index 8fbb34b9..d6143fd3 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "axios": "^1.5.1", "bignumber.js": "^9.1.0", "crypto-js": "^4.2.0", - "decentralcardgame-cardchain-client-ts": "^0.0.23", + "decentralcardgame-cardchain-client-ts": "^0.0.24", "long": "^5.2.0", "merge-images": "^2.0.0", "pinia": "^2.0.23", From 2531b603dce6e4830cb69b73232589c3cd785c5c Mon Sep 17 00:00:00 2001 From: lxgr-linux Date: Thu, 2 Nov 2023 23:39:53 +0100 Subject: [PATCH 20/32] updated versions once again --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5f33a08f..f97f1ef5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "axios": "^1.5.1", "bignumber.js": "^9.1.0", "crypto-js": "^4.2.0", - "decentralcardgame-cardchain-client-ts": "^0.0.24", + "decentralcardgame-cardchain-client-ts": "^0.0.25", "long": "^5.2.0", "merge-images": "^2.0.0", "pinia": "^2.0.23", @@ -2498,9 +2498,9 @@ } }, "node_modules/decentralcardgame-cardchain-client-ts": { - "version": "0.0.24", - "resolved": "https://registry.npmjs.org/decentralcardgame-cardchain-client-ts/-/decentralcardgame-cardchain-client-ts-0.0.24.tgz", - "integrity": "sha512-z5Y3WftNfYE7qKBojTiCgYZI4gSJA6YDh4L6hIvI08qIRFenDhBy1GlQy8ns67mNsW/O3qWhQwplLYFoVXVyfA==", + "version": "0.0.25", + "resolved": "https://registry.npmjs.org/decentralcardgame-cardchain-client-ts/-/decentralcardgame-cardchain-client-ts-0.0.25.tgz", + "integrity": "sha512-ahZOiz03yeuQdLNW6pCpf+7ga7OrWBmJexYcFEA6pBcyN8LdpWzpTIbwLbTuewRRfWy6RpL55Jyb6U3nwvc1lQ==", "dependencies": { "@cosmjs/amino": "0.29.5", "@cosmjs/proto-signing": "0.27.1", diff --git a/package.json b/package.json index d6143fd3..4355e100 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "axios": "^1.5.1", "bignumber.js": "^9.1.0", "crypto-js": "^4.2.0", - "decentralcardgame-cardchain-client-ts": "^0.0.24", + "decentralcardgame-cardchain-client-ts": "^0.0.25", "long": "^5.2.0", "merge-images": "^2.0.0", "pinia": "^2.0.23", From ac7b155a61b5411f55fa0745904d5329cd497a21 Mon Sep 17 00:00:00 2001 From: Patrick Wieth Date: Wed, 15 Nov 2023 14:45:19 +0100 Subject: [PATCH 21/32] add avatar.svg and powerstone.svg --- public/icon/abilities/avatar.svg | 12 ++++++++++++ public/icon/abilities/powerstone.svg | 13 +++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 public/icon/abilities/avatar.svg create mode 100644 public/icon/abilities/powerstone.svg diff --git a/public/icon/abilities/avatar.svg b/public/icon/abilities/avatar.svg new file mode 100644 index 00000000..0ddc20e9 --- /dev/null +++ b/public/icon/abilities/avatar.svg @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/public/icon/abilities/powerstone.svg b/public/icon/abilities/powerstone.svg new file mode 100644 index 00000000..8c11cbf9 --- /dev/null +++ b/public/icon/abilities/powerstone.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + From a5116c7329178417a2a0ed08ed17c787b829f174 Mon Sep 17 00:00:00 2001 From: lxgr-linux <64218491+lxgr-linux@users.noreply.github.com> Date: Wed, 29 Nov 2023 12:50:31 +0100 Subject: [PATCH 22/32] Update main.yml --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 40f47e9f..0ad8855e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,15 +4,15 @@ on: workflow_dispatch: env: # Setting an environment variable with the value of a configuration variable - tag_name: ${{ + LABEL: ${{ contains(github.event.pull_request.labels.*.name, 'deploy_5173') && 'deploy_5173' || - (contains(github.event.pull_request.labels.*.name, 'deploy_5174') && 'deploy_5175' || "") + (contains(github.event.pull_request.labels.*.name, 'deploy_5174') && 'deploy_5175' || 'none') }} jobs: run_pull: - if: ${{ env.tag_name != "" }} + if: ${{ env.LABEL != 'none' }} name: run pull runs-on: ubuntu-latest @@ -26,6 +26,6 @@ jobs: echo "${{ secrets.LXGR_DEPLOY_PRIV }}" > ~/.ssh/id_rsa ssh-keyscan -H ${{ secrets.LXGR_HOST }} > ~/.ssh/known_hosts - name: connect and pull - run: ssh ${{ secrets.LXGR_USER }}@${{ secrets.LXGR_HOST }} "cd ~/$tag_name && git fetch && git checkout ${{ github.event.pull_request.base.ref }} && git pull && npm i && exit" + run: ssh ${{ secrets.LXGR_USER }}@${{ secrets.LXGR_HOST }} "cd ~/$LABEL && git fetch && git checkout ${{ github.event.pull_request.base.ref }} && git pull && npm i && exit" - name: cleanup run: rm -rf ~/.ssh From 0e12f401b3bd80b51a5bbc1fde2f51c15b437c2e Mon Sep 17 00:00:00 2001 From: lxgr-linux <64218491+lxgr-linux@users.noreply.github.com> Date: Wed, 29 Nov 2023 12:56:55 +0100 Subject: [PATCH 23/32] Update main.yml --- .github/workflows/main.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d975221c..7eb55005 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,21 +2,25 @@ on: pull_request: types: [opened, labeled, unlabeled, synchronize] workflow_dispatch: -env: - # Setting an environment variable with the value of a configuration variable - LABEL: ${{ - contains(github.event.pull_request.labels.*.name, 'deploy_5173') && 'deploy_5173' || - (contains(github.event.pull_request.labels.*.name, 'deploy_5174') && 'deploy_5174' || 'none') - }} + jobs: run_pull: - if: ${{ env.LABEL != 'none' }} name: run pull runs-on: ubuntu-latest + env: + # Setting an environment variable with the value of a configuration variable + LABEL: ${{ + contains(github.event.pull_request.labels.*.name, 'deploy_5173') && 'deploy_5173' || + (contains(github.event.pull_request.labels.*.name, 'deploy_5174') && 'deploy_5174' || 'none') + }} steps: + - name: exit + if: ${{ env.LABEL == 'none' }} + run: | + exit 1 - name: install ssh keys # check this thread to understand why its needed: # https://stackoverflow.com/a/70447517 From 8592509952c21effd1a3f954a1074b31b107f236 Mon Sep 17 00:00:00 2001 From: lxgr-linux <64218491+lxgr-linux@users.noreply.github.com> Date: Wed, 29 Nov 2023 13:21:58 +0100 Subject: [PATCH 24/32] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7eb55005..73368db0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,6 +30,6 @@ jobs: echo "${{ secrets.LXGR_DEPLOY_PRIV }}" > ~/.ssh/id_rsa ssh-keyscan -H ${{ secrets.LXGR_HOST }} > ~/.ssh/known_hosts - name: connect and pull - run: ssh ${{ secrets.LXGR_USER }}@${{ secrets.LXGR_HOST }} "cd ~/$LABEL && git fetch && git checkout ${{ github.event.pull_request.base.ref }} && git pull && npm i && exit" + run: ssh ${{ secrets.LXGR_USER }}@${{ secrets.LXGR_HOST }} "cd ~/$LABEL && git fetch && git checkout ${{ github.event.pull_request.head.ref }} && git pull && npm i && exit" - name: cleanup run: rm -rf ~/.ssh From d894145ecf57b7f464e845c62cd737e19a5df50b Mon Sep 17 00:00:00 2001 From: lxgr-linux <64218491+lxgr-linux@users.noreply.github.com> Date: Wed, 29 Nov 2023 13:32:09 +0100 Subject: [PATCH 25/32] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 73368db0..634cdf49 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,6 +30,6 @@ jobs: echo "${{ secrets.LXGR_DEPLOY_PRIV }}" > ~/.ssh/id_rsa ssh-keyscan -H ${{ secrets.LXGR_HOST }} > ~/.ssh/known_hosts - name: connect and pull - run: ssh ${{ secrets.LXGR_USER }}@${{ secrets.LXGR_HOST }} "cd ~/$LABEL && git fetch && git checkout ${{ github.event.pull_request.head.ref }} && git pull && npm i && exit" + run: ssh ${{ secrets.LXGR_USER }}@${{ secrets.LXGR_HOST }} "cd ~/$LABEL && git fetch && git checkout ${{ github.event.pull_request.head.ref }} && git pull && npm i && npm run build && exit" - name: cleanup run: rm -rf ~/.ssh From b8ebf21d65f560213c2686ff635c6781b2dd5eaf Mon Sep 17 00:00:00 2001 From: lxgr-linux <64218491+lxgr-linux@users.noreply.github.com> Date: Thu, 30 Nov 2023 10:00:55 +0100 Subject: [PATCH 26/32] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 634cdf49..e99eb7e8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,6 +30,6 @@ jobs: echo "${{ secrets.LXGR_DEPLOY_PRIV }}" > ~/.ssh/id_rsa ssh-keyscan -H ${{ secrets.LXGR_HOST }} > ~/.ssh/known_hosts - name: connect and pull - run: ssh ${{ secrets.LXGR_USER }}@${{ secrets.LXGR_HOST }} "cd ~/$LABEL && git fetch && git checkout ${{ github.event.pull_request.head.ref }} && git pull && npm i && npm run build && exit" + run: ssh ${{ secrets.LXGR_USER }}@${{ secrets.LXGR_HOST }} "cd ~/$LABEL && git fetch && git checkout ${{ github.event.pull_request.head.ref }} && git pull && npm i && npm run build && chgrp -R www-data ~/$LABEL && exit" - name: cleanup run: rm -rf ~/.ssh From d980e4586d93b4422c594981f233231cfbf40648 Mon Sep 17 00:00:00 2001 From: lxgr-linux Date: Fri, 8 Dec 2023 14:07:40 +0100 Subject: [PATCH 27/32] Updated env --- .env | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.env b/.env index 222554ad..145589b1 100644 --- a/.env +++ b/.env @@ -1,6 +1,10 @@ -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_API_COSMOS="http://lxgr.xyz:1317" +VITE_WS_TENDERMINT="http://lxgr.xyz:26657" +VITE_APP_FAUCET="http://lxgr.xyz:4500/claimTokens" + +#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 From c28961c86c60a6623d31252fc1a8389e47afb1c2 Mon Sep 17 00:00:00 2001 From: lxgr-linux Date: Thu, 14 Dec 2023 15:55:47 +0100 Subject: [PATCH 28/32] chainId --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index 145589b1..7cd26809 100644 --- a/.env +++ b/.env @@ -8,7 +8,7 @@ VITE_APP_FAUCET="http://lxgr.xyz:4500/claimTokens" VITE_APP_FAUCET_SITEKEY="ea68532a-a9e6-4f99-9361-db90a3071b72" VITE_APP_ADDRESS_PREFIX=cc -VITE_APP_CHAIN_ID="cardtestnet-5" +VITE_APP_CHAIN_ID="carddevnet-2" VITE_APP_CHAIN_NAME="Cardchain" VITE_APP_CARDIMG_MAXKB=500 VITE_APP_CARDIMG_SIZE_X=840 From 23b8f1efa2e31f0e3185181acdb7f1eeee266857 Mon Sep 17 00:00:00 2001 From: lxgr-linux Date: Thu, 14 Dec 2023 16:16:02 +0100 Subject: [PATCH 29/32] fixed transactions --- package-lock.json | 2 +- package.json | 2 +- src/views/CardCreatorPage.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index f97f1ef5..06910303 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "axios": "^1.5.1", "bignumber.js": "^9.1.0", "crypto-js": "^4.2.0", - "decentralcardgame-cardchain-client-ts": "^0.0.25", + "decentralcardgame-cardchain-client-ts": "0.0.25", "long": "^5.2.0", "merge-images": "^2.0.0", "pinia": "^2.0.23", diff --git a/package.json b/package.json index 4355e100..1cdf9c95 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "axios": "^1.5.1", "bignumber.js": "^9.1.0", "crypto-js": "^4.2.0", - "decentralcardgame-cardchain-client-ts": "^0.0.25", + "decentralcardgame-cardchain-client-ts": "0.0.25", "long": "^5.2.0", "merge-images": "^2.0.0", "pinia": "^2.0.23", diff --git a/src/views/CardCreatorPage.vue b/src/views/CardCreatorPage.vue index 9509dea3..ccab6235 100644 --- a/src/views/CardCreatorPage.vue +++ b/src/views/CardCreatorPage.vue @@ -1083,7 +1083,7 @@ export default { ) return } - if (this.designateArtist && !this.$cardChain.validAddress(this.artistAddress)) { + if (this.designateArtist && !validAddress(this.artistAddress)) { this.notifyFail( "Invalid Address", "The address given for designated artist is invalid." From 8d327bb89792ac5cc8ff26fca1984a29187bf509 Mon Sep 17 00:00:00 2001 From: Patrick Wieth Date: Thu, 14 Dec 2023 23:31:30 +0100 Subject: [PATCH 30/32] fix broken card editing: action cards no ability --- src/views/CardCreatorPage.vue | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/views/CardCreatorPage.vue b/src/views/CardCreatorPage.vue index ccab6235..8cf8bb8f 100644 --- a/src/views/CardCreatorPage.vue +++ b/src/views/CardCreatorPage.vue @@ -1167,6 +1167,20 @@ export default { this.abilities ); } + // if an ability was created, but it has no effect, then this should be fixed + if (newModel.Abilities.length > 0) { + let effectsList = R.flatten(R.map( + x => R.values(R.pluck("Effects", x)), + newModel.Abilities)) + + if (R.any(y => y === undefined, effectsList)) { + this.notifyFail( + "Useless Ability", + "Card has an Ability, which does not do anything. Please add an Effect to the Ability." + ); + return; + } + } } else if (this.model.type === "Action") { // check if the old effects should be restored if (this.mode == Mode.EDIT && !this.clearAbilities && R.isEmpty(this.abilities)) { @@ -1183,20 +1197,15 @@ export default { this.abilities ); } - } - - // if an ability was created, but it has no effect, then this should be fixed - if (newModel.Abilities.length > 0) { - let effectsList = R.flatten(R.map( - x => R.values(R.pluck("Effects", x)), - newModel.Abilities)) - - if (R.any(y => y === undefined, effectsList)) { + // if an ability was created, but it has no effect, then this should be fixed + if (newModel.Effects.length == 0) { + console.log("newmodel", newModel) this.notifyFail( - "Useless Ability", - "Card has an Ability, which does not do anything. Please add an Effect to the Ability." + "No Effects", + "Card has no effect. Maybe you forgot to add an effect?" ); return; + } } From daafd0523e7f433b388574e257f4edd8ecf870d7 Mon Sep 17 00:00:00 2001 From: lxgr-linux Date: Sat, 16 Dec 2023 12:21:41 +0100 Subject: [PATCH 31/32] fixed modal css --- src/components/modals/_modal.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/modals/_modal.scss b/src/components/modals/_modal.scss index 4deffbac..2f3796d1 100644 --- a/src/components/modals/_modal.scss +++ b/src/components/modals/_modal.scss @@ -10,6 +10,7 @@ display: flex; justify-content: center; align-items: center; + z-index: 10; @media (max-width: 480px) { position: static; From 103a07c22e83298014f457146a3485af8997bb48 Mon Sep 17 00:00:00 2001 From: lxgr-linux Date: Sat, 16 Dec 2023 23:50:15 +0100 Subject: [PATCH 32/32] fixed chainid and nodes --- .env | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.env b/.env index 7cd26809..45bac475 100644 --- a/.env +++ b/.env @@ -1,14 +1,14 @@ -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" -#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_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_ID="cardtestnet-6" VITE_APP_CHAIN_NAME="Cardchain" VITE_APP_CARDIMG_MAXKB=500 VITE_APP_CARDIMG_SIZE_X=840