-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
💄 Add ISCN edit bar to the /new page
- Loading branch information
1 parent
8bec8cb
commit 8981e2c
Showing
3 changed files
with
140 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
<template> | ||
<div | ||
:class="[ | ||
'flex', | ||
'justify-end', | ||
'items-center', | ||
'w-full', | ||
'pt-[24px]', | ||
'gap-[8px]', | ||
'lg:pt-0', | ||
]" | ||
> | ||
<div | ||
v-if="isIscnOwner" | ||
class="flex justify-center items-center gap-[4px] mr-[8px]" | ||
> | ||
<Button preset="plain" text="Edit ISCN" @click="handleEdit"> | ||
<template #prepend> | ||
<IconEdit /> | ||
</template> | ||
</Button> | ||
<div class="h-[20px] w-[2px] bg-medium-gray" /> | ||
</div> | ||
<Button | ||
preset="tertiary" | ||
:text="$t('NFTPortal.button.download.iscn')" | ||
@click="handleClickDownload" | ||
> | ||
<template #prepend> | ||
<IconDownload /> | ||
</template> | ||
</Button> | ||
<Button | ||
v-if="isShowMintButton && isNftBook" | ||
preset="secondary" | ||
class="w-full lg:w-auto" | ||
:text="$t('NFTPortal.button.mint.book')" | ||
@click="clickMintNFTBook" | ||
/> | ||
<Button | ||
v-if="isShowMintButton && !isNftBook" | ||
preset="secondary" | ||
class="w-full lg:w-auto" | ||
:to=" | ||
localeLocation({ | ||
name: 'nft-iscn-iscnId', | ||
params: { iscnId: iscnId }, | ||
query: mintQueries, | ||
}) | ||
" | ||
:text="$t('NFTPortal.button.mint')" | ||
/> | ||
<div | ||
v-if="!!classId" | ||
class="flex justify-center items-center p-[4px] rounded-[12px] border-like-cyan-light border-[2px]" | ||
> | ||
<Button | ||
preset="tertiary" | ||
:text="$t('NFTPortal.button.check.nft')" | ||
:href="likerlandNftUrl" | ||
target="_blank" | ||
> | ||
<template #append> | ||
<IconArrowRight /> | ||
</template> | ||
</Button> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { Vue, Component, Prop } from 'vue-property-decorator' | ||
@Component | ||
export default class IscnEditBar extends Vue { | ||
@Prop({ default: false }) readonly isIscnOwner!: boolean | ||
@Prop({ default: false }) readonly isShowMintButton!: boolean | ||
@Prop({ default: false }) readonly isNftBook!: boolean | ||
@Prop(String) readonly iscnId: string | undefined | ||
@Prop({ default: null }) readonly mintQueries!: any | null | ||
@Prop(String) readonly classId!: string | ||
@Prop(String) readonly likerlandNftUrl!: string | ||
handleClickDownload() { | ||
this.$emit('click-download', this.iscnId) | ||
} | ||
handleEdit() { | ||
this.$emit('click-edit', this.iscnId) | ||
} | ||
handleClickMintNFTBook() { | ||
this.$emit('click-mint-book', this.iscnId) | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters