Skip to content

Commit

Permalink
🔥 Remove image generation button
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Aug 14, 2024
1 parent 9d12057 commit 4514109
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 40 deletions.
17 changes: 0 additions & 17 deletions components/NFTMint/Preview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,6 @@
<IconEdit />
</Button>
<template v-else>
<Button
v-if="!isGenerated"
class="absolute right-12 top-3"
preset="secondary"
size="mini"
:circle="true"
@click="onGenerateImage"
>
<IconDice />
</Button>
<Button
class="absolute right-3 top-3"
preset="secondary"
Expand Down Expand Up @@ -182,7 +172,6 @@ export default class NFTMintPreview extends Vue {
isEditingDescription = false
isShowEditImageToolbar = false
isImageEdited = false
isGenerated = false
get defaultDescription() {
return this.$t('NFTPortal.label.defaultDescription');
Expand Down Expand Up @@ -238,11 +227,5 @@ export default class NFTMintPreview extends Vue {
this.isImageEdited = true;
}
}
onGenerateImage() {
this.isGenerated = true;
this.isImageEdited = true;
this.$emit('generate-image');
}
}
</script>
1 change: 0 additions & 1 deletion constant/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export const API_POST_ARWEAVE_V2_ESTIMATE = `${LIKE_CO_API_ROOT}/arweave/v2/esti
export const API_POST_ARWEAVE_V2_SIGN = `${LIKE_CO_API_ROOT}/arweave/v2/sign_payment_data`;
export const API_POST_ARWEAVE_V2_REGISTER = `${LIKE_CO_API_ROOT}/arweave/v2/register`;
export const API_LIKER_NFT_MINT = `${LIKE_CO_API_ROOT}/likernft/mint`;
export const API_LIKER_NFT_MINT_IMAGE = `${LIKE_CO_API_ROOT}/likernft/mint/image`;
export const API_LIKER_NFT_PURCHASE = `${LIKE_CO_API_ROOT}/likernft/purchase`;
export const API_LIKER_NFT_HISTORY = `${LIKE_CO_API_ROOT}/likernft/history`;
export const API_LIKER_NFT_METADATA = `${LIKE_CO_API_ROOT}/likernft/metadata`;
Expand Down
22 changes: 0 additions & 22 deletions pages/nft/iscn/_iscnId.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
@edit-name="onEditNftName"
@edit-description="onEditNftDescription"
@edit-image="onEditOgImage"
@generate-image="onGenerateImage"
@reset-image="onResetImage"
/>

Expand Down Expand Up @@ -135,7 +134,6 @@ import Hash from 'ipfs-only-hash'
import {
LIKER_NFT_TARGET_ADDRESS,
API_LIKER_NFT_MINT,
API_LIKER_NFT_MINT_IMAGE,
getNftClassImage,
getNftClassUriViaIscnId,
getNftUriViaNftId,
Expand Down Expand Up @@ -834,26 +832,6 @@ export default class NFTMintPage extends Vue {
this.isCustomOgimage = false;
}
async onGenerateImage() {
this.isLoadingPreviewOG = true
logTrackerEvent(this, 'IscnMintNFT', 'GenerationRandomImage', this.iscnId, 1);
const res = await this.$axios.post(
API_LIKER_NFT_MINT_IMAGE,
{},
{
params: {
iscn_id: this.iscnId,
platform: this.platform,
from: this.address,
},
paramsSerializer: (params) => qs.stringify(params),
responseType: 'arraybuffer',
},
);
this.onEditOgImage(new Blob([res.data], {type: res.headers['content-type']}));
this.isLoadingPreviewOG = false
}
async postMintInfo() {
try {
logTrackerEvent(this, 'IscnMintNFT', 'PostMintInfo', this.classId, 1);
Expand Down

0 comments on commit 4514109

Please sign in to comment.