Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

238 fix transfer card #329

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 21 additions & 20 deletions src/components/modals/CardviewModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
/>
</div>
</div>
<div>

<div v-show="!state.isTransferModalVisible">
<p class="font-bold text-2xl">
Advanced Card Information
</p>
Expand Down Expand Up @@ -51,9 +52,18 @@
</p>
<br>
</div>
<div>

<div v-show="!state.isTransferModalVisible">
<KeywordComponent :card="state.card" />
</div>

<TransferCardModal
v-show="state.isTransferModalVisible"
:card="String(props.id)"
@close="closeModal"
/>


</div>
<div
class="flex flex-col lg:flex-row justify-center lg:justify-end space-y-6 lg:space-x-6 lg:space-y-0"
Expand All @@ -66,14 +76,7 @@
</BaseCCButton>
</router-link>
<BaseCCButton
v-if="isArtist"
:type="Color.RED"
@click="edit()"
>
Edit artwork
</BaseCCButton>
<BaseCCButton
v-if="isOwner"
v-if="isOwner || isArtist"
:type="Color.RED"
@click="edit()"
>
Expand All @@ -82,17 +85,12 @@
<BaseCCButton
v-if="isOwner"
:type="Color.RED"
@click="showModal()"
@click="showTransferModal()"
>
Transfer card
</BaseCCButton>
</div>
</ModalFrame>
<TransferCardModal
v-show="state.isModalVisible"
:card="String(props.id)"
@close="closeModal"
/>
</template>

<script setup lang="ts">
Expand All @@ -119,10 +117,10 @@ const router = useRouter();
const emit = defineEmits(["close"]);

const initialState: {
isModalVisible: boolean;
isTransferModalVisible: boolean;
card: Card;
} = {
isModalVisible: false,
isTransferModalVisible: false,
card: new Card(),
};

Expand Down Expand Up @@ -155,9 +153,12 @@ const edit = () => {
editCard.card.value = state.card;
router.push("/cardCreator");
};
const showModal = () => (state.isModalVisible = true);
const showTransferModal = () => {
state.isTransferModalVisible = true;
console.log("modal?", state.isTransferModalVisible)
}
const closeModal = () => {
state.isModalVisible = false;
state.isTransferModalVisible = false;
loadCard();
};
</script>
238 changes: 0 additions & 238 deletions src/components/modals/GalleryModal.vue

This file was deleted.

Loading