Skip to content

Commit

Permalink
Merge pull request #308 from DecentralCardGame/262-remove-rulestext-f…
Browse files Browse the repository at this point in the history
…rom-card-model

262 remove rulestext from card model
  • Loading branch information
lxgr-linux authored Jul 8, 2024
2 parents e3f4fe7 + 1e92a3d commit 8e513d5
Show file tree
Hide file tree
Showing 21 changed files with 6,516 additions and 3,754 deletions.
22 changes: 3 additions & 19 deletions .env.development
Original file line number Diff line number Diff line change
@@ -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"
55 changes: 4 additions & 51 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
6 changes: 4 additions & 2 deletions src/components/elements/AbilityComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
id="AbilityComponentInside"
class="flex flex-row"
>
<div v-if="ability"
class="flex flex-row">
<div
v-if="ability"
class="flex flex-row"
>
<div
v-for="(entry, index) in ability.interaction"
id="interaction"
Expand Down
5 changes: 4 additions & 1 deletion src/components/elements/CCButton/BaseCCButton.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<template>
<div>
<button
class="rounded shadow-xl shadow-black/25 text-center text-base font-bold font-[roboto] uppercase active:bg-[#552026] active:text-white active:border-0 hover:text-black hover:bg-white hover:border-black hover:border-4"
:disabled="diabled"
class="rounded shadow-xl shadow-black/25 text-center text-base font-bold font-[roboto] uppercase active:bg-[#552026] active:text-white active:border-0 hover:text-black hover:bg-white hover:border-black hover:border-4 disabled:bg-gray-500"
:class="[getTextColor(type), getBgColor(type), ...sizeClass]"
@click="emit('click')"
>
Expand All @@ -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,
},
Expand Down
19 changes: 0 additions & 19 deletions src/components/elements/CCInput.vue

This file was deleted.

21 changes: 21 additions & 0 deletions src/components/elements/CCInput/CCAddressInput.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<template>
<CCInput
v-model="inputModel"
:max-length="41"
placeholder="cc1.."
:error-text="!validated && inputModel.length != 0 ? 'Invalid address': undefined"
/>
</template>
<script setup lang="ts">
import CCInput from "@/components/elements/CCInput/CCInput.vue";
import {ref, watch} from "vue";
import {validAddress} from "@/utils/validation";
const validated = defineModel<boolean>("validated", {default: false})
const inputModel = defineModel<string>({required: true})
watch(inputModel, () => {
validated.value = validAddress(inputModel.value)
})
</script>
35 changes: 35 additions & 0 deletions src/components/elements/CCInput/CCInput.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<template>
<div
class="flex flex-col text-left"
:class="props.class"
>
<input
v-model="model"
class="bg-zinc-300 bg-opacity-20 shadow-inner p-2 bg-transparent text-opacity-100 border-0 focus:outline-none focus:ring-0 placeholder-opacity-50"
:placeholder="placeholder"
:maxlength="maxLength"
>
<div class="text-sm pl-2">
<p class="text-gray-400">
{{ infoText }}
</p>
<p class="text-cc-red font-bold">
{{ errorText }}
</p>
</div>
</div>
</template>
<script lang="ts" setup>
const model = defineModel<string>();
const props = withDefaults(
defineProps<{ class?: string | string[], placeholder: string; maxLength?: number, infoText?: string, errorText?: string}>(),
{
class: "text-white placeholder-white",
placeholder: "lorem",
maxLength: 25,
infoText: undefined,
errorText: undefined,
}
);
</script>
Loading

0 comments on commit 8e513d5

Please sign in to comment.