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

🔥 Remove image generation button #470

Merged
merged 1 commit into from
Aug 14, 2024
Merged
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
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 {
LIKER_NFT_TARGET_ADDRESS,
API_LIKER_NFT_MINT,
API_LIKER_NFT_MINT_IMAGE,
getNftClassImage,
getNftClassUriViaIscnId,
getNftUriViaNftId,
Expand Down Expand Up @@ -735,7 +733,7 @@
this.isCustomOgimage = true;
logTrackerEvent(this, 'IscnMintNFT', 'GetOgImageExists', arweaveID, 1);
} catch (err) {
console.error(err)

Check warning on line 736 in pages/nft/iscn/_iscnId.vue

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, 18)

Unexpected console statement
}
}
if (!this.ogImageBlob && !this.ogImageArweaveId) {
Expand Down Expand Up @@ -834,26 +832,6 @@
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
Loading