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

beta update #7918

Merged
merged 90 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
ff34e80
#7685 replace placeholders
prachi00 Oct 17, 2023
4bc59de
using webp
prachi00 Oct 18, 2023
4f31f8b
Merge branch 'main' into feat-replace-placeholders
prachi00 Oct 18, 2023
8699422
changing image
prachi00 Oct 19, 2023
6161311
Merge branch 'main' into feat-replace-placeholders
prachi00 Oct 19, 2023
be2ea40
Merge branch 'main' into feat-replace-placeholders
prachi00 Oct 21, 2023
e0a1960
image changes
prachi00 Oct 22, 2023
5c37130
Merge branch 'main' into feat-replace-placeholders
prachi00 Oct 26, 2023
9699e67
Merge branch 'main' into feat-replace-placeholders
prachi00 Oct 27, 2023
4b82a16
fix: Drops page model close button #7857
shengxinjing Oct 28, 2023
1e2694d
Update _price-chart.scss
daiagi Oct 28, 2023
2b09d77
fix: real full screen for nft img #7846
shengxinjing Oct 28, 2023
af98ea8
fix: Current generative drops are not unlockable
Jarsen136 Oct 28, 2023
85319e0
Merge branch 'main' into issue-7843
Jarsen136 Oct 28, 2023
4846251
fix: show full image
shengxinjing Oct 28, 2023
8c2f61d
fix: remote unused code
shengxinjing Oct 28, 2023
e0efaf0
fix: fullscreen background
shengxinjing Oct 28, 2023
0a1d1fa
fix: dark theme
shengxinjing Oct 29, 2023
9e172e2
fix: Show image as fallback when video is loading or fails
shengxinjing Oct 29, 2023
6469f9b
fix: remove console
shengxinjing Oct 29, 2023
0099f90
fix: Generative mints at mobile
Jarsen136 Oct 29, 2023
e965f0c
update paraspell -> v3.0.4
dudo50 Oct 29, 2023
e1cf64a
fix: unify switch rounded button
Jarsen136 Oct 29, 2023
ed9375b
Merge branch 'main' into feat-replace-placeholders
prachi00 Oct 29, 2023
f5d5c43
💄 lign'em up
daiagi Oct 30, 2023
f4ae95c
Merge branch 'main' of https://github.com/kodadot/nft-gallery into Al…
daiagi Oct 30, 2023
967c84f
Merge pull request #7876 from dudo50/main
roiLeo Oct 30, 2023
40bb2e1
Merge branch 'main' into issue-7865
roiLeo Oct 30, 2023
1e85f35
Merge pull request #7877 from Jarsen136/issue-7865
roiLeo Oct 30, 2023
18d34f1
Merge branch 'main' into issue-7869
roiLeo Oct 30, 2023
0f166cc
Merge pull request #7874 from Jarsen136/issue-7869
Jarsen136 Oct 30, 2023
5d34326
fix: subscribe form missing on route navigation
thnaylor Oct 30, 2023
88a8b5e
Merge branch 'main' into fix-7857
roiLeo Oct 30, 2023
4fa5d9a
Merge pull request #7858 from shengxinjing/fix-7857
roiLeo Oct 30, 2023
cc57758
Merge branch 'main' into Align-chart-and-holders-section-in-one-line
daiagi Oct 30, 2023
dfd2ead
fix: cleanup / remove unused code
thnaylor Oct 30, 2023
78eca98
move `mt-2`
daiagi Oct 30, 2023
4882988
Merge branch 'Align-chart-and-holders-section-in-one-line' of https:/…
daiagi Oct 30, 2023
80924c3
Merge pull request #7859 from kodadot/Align-chart-and-holders-section…
daiagi Oct 30, 2023
f66ef9b
🔧 onboarding Markdown text
roiLeo Oct 30, 2023
8a03d6b
🔧 revert change
roiLeo Oct 30, 2023
5517edd
Merge branch 'main' into fix/Markdown/onboarding
roiLeo Oct 30, 2023
e78b752
🔧 dompurify markdown
roiLeo Oct 30, 2023
e3488b5
feat: hide hover action on touch device
newraina Oct 30, 2023
1811572
Merge pull request #7887 from roiLeo/fix/Markdown/onboarding
roiLeo Oct 30, 2023
eb179f0
:memo: :bug: bug template does not have AH*
vikiival Oct 30, 2023
e411f78
:memo: :bug: AH bug template does not have Nova Wallet
vikiival Oct 30, 2023
f00ccf9
text improvement
prury Oct 30, 2023
d84a669
Merge pull request #7891 from kodadot/docs/1088-ops-templates
roiLeo Oct 30, 2023
e6d7dae
Merge branch 'kodadot:main' into typo-bug
prury Oct 30, 2023
07780f7
typo 2
prury Oct 30, 2023
17aa084
Merge branch 'typo-bug' of https://github.com/prury/nft-gallery into …
prury Oct 30, 2023
340d575
footer regex change
prury Oct 30, 2023
70914f6
Merge branch 'footer-regex' of https://github.com/prury/nft-gallery i…
prury Oct 30, 2023
8589573
Merge pull request #7892 from prury/typo-bug
roiLeo Oct 30, 2023
e4b57c8
feat: Create picture for Generative art collection
Jarsen136 Oct 30, 2023
0277fff
fix: correct keywise naming
Jarsen136 Oct 30, 2023
657c0ca
Merge branch 'issue-7843' of github.com:Jarsen136/nft-gallery into is…
Jarsen136 Oct 30, 2023
8700ec2
Merge branch 'main' into issue-7843
Jarsen136 Oct 30, 2023
b507d57
fix: return empty string when mediaUrl is blocked
shengxinjing Oct 30, 2023
e581394
Merge branch 'main' into feat-replace-placeholders
prachi00 Oct 30, 2023
274898b
Update components/gallery/GalleryItem.vue
shengxinjing Oct 30, 2023
67c2604
fix: remote border in fullscreen mode
shengxinjing Oct 30, 2023
aace59e
Merge branch 'fix-7846' of https://github.com/shengxinjing/nft-galler…
shengxinjing Oct 30, 2023
1797bfe
fix: Not possible to play with generative art drop page when not conn…
Jarsen136 Oct 30, 2023
e280038
#7897 text change
prachi00 Oct 31, 2023
5c6ed3e
changing ipfs hash
prachi00 Oct 31, 2023
018488c
Merge pull request #7894 from Jarsen136/issue-7844
vikiival Oct 31, 2023
339ef89
fix: unlocable item update
Jarsen136 Oct 31, 2023
067c411
fix: unlocable tag
Jarsen136 Oct 31, 2023
1e5b87c
delete Loader
daiagi Oct 31, 2023
c464504
Merge pull request #7902 from kodadot/fix/massmint-minting-modal
daiagi Oct 31, 2023
dfcb479
Merge branch 'main' into footer-regex
roiLeo Oct 31, 2023
b4e7f5e
Merge branch 'main' into fix/7724
roiLeo Oct 31, 2023
bc14df8
fix: padding drop
Jarsen136 Oct 31, 2023
1e5dff4
Merge pull request #7893 from prury/footer-regex
roiLeo Oct 31, 2023
47b3428
Merge branch 'main' into feat-text-change
prachi00 Oct 31, 2023
b978174
mobile text
prachi00 Nov 1, 2023
4041b34
Merge pull request #7895 from Jarsen136/issue-7888
yangwao Nov 1, 2023
6fe7371
Merge pull request #7862 from Jarsen136/issue-7843
yangwao Nov 1, 2023
0d8cffa
Merge pull request #7860 from shengxinjing/fix-7846
yangwao Nov 1, 2023
a77c68f
Merge pull request #7900 from prachi00/feat-text-change
yangwao Nov 1, 2023
c332601
Merge pull request #7886 from thnaylor/fix/7724
yangwao Nov 1, 2023
6e258cd
Merge pull request #7889 from newraina/7870
yangwao Nov 1, 2023
d99dce2
Merge pull request #7868 from shengxinjing/fix-7741
yangwao Nov 1, 2023
b879dad
Merge pull request #7698 from prachi00/feat-replace-placeholders
yangwao Nov 1, 2023
5a13671
fix: Remove "beta" from Chain selection menu options + reorder
Jarsen136 Nov 1, 2023
82705f6
fix: Mint phase time is off for generative drop
Jarsen136 Nov 1, 2023
6299e71
Merge pull request #7915 from Jarsen136/issue-7911
yangwao Nov 1, 2023
4f9698c
Merge pull request #7916 from Jarsen136/issue-7884
yangwao Nov 1, 2023
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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ body:
multiple: true
options:
- Basilisk
- MoonSama
- Asset Hub
- Kusama
- type: textarea
id: Screenshots
Expand Down
5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_assetshub.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 🐞₷ Bug Report Polkadot Assests Hub & Kusama Assets Hub (known as Statemint & Statemine)
description: Create a report to help us improve KodaDot on Assets Hub
name: 🐞₷ Bug Report Polkadot & Kusama Asset Hubs (known as Statemint & Statemine)
description: Create a report to help us improve KodaDot on Asset Hubs
title: 'Be descriptive and short'
labels: ['A-statemine', 'bug', 'p2']
body:
Expand Down Expand Up @@ -70,6 +70,7 @@ body:
- PolkadotJS
- Talisman
- SubWallet
- Nova Wallet
- type: textarea
id: Screenshots
attributes:
Expand Down
14 changes: 11 additions & 3 deletions components/CustomSubstackEmbed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
</template>

<script lang="ts" setup>
useHead({
script: [{ src: 'https://substackapi.com/widget.js', async: true }],
})
const substackScript = document.createElement('script')

window.CustomSubstackWidget = {
substackUrl: 'kodadot.substack.com',
Expand All @@ -18,4 +16,14 @@ window.CustomSubstackWidget = {
text: '#000000',
},
}

onMounted(() => {
substackScript.src = 'https://substackapi.com/widget.js'
substackScript.async = true
document.head.append(substackScript)
})

onUnmounted(() => {
substackScript?.remove()
})
</script>
4 changes: 3 additions & 1 deletion components/carousel/CarouselTypeLatestMints.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
:to="urlOf({ id: item.id, url: 'gallery', chain: item.chain })"
:title="item.name"
class="has-text-weight-bold carousel-info-name">
<span class="is-ellipsis">{{ item.name || '--' }}</span>
<span class="is-ellipsis"
>{{ item.name || '--' }}#{{ item.id }}</span
>
</nuxt-link>

<div class="is-flex is-flex-direction-column is-align-items-start">
Expand Down
2 changes: 2 additions & 0 deletions components/collection/CollectionHeader/CollectionBanner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ useSeoMeta({
width: 5.5rem;
height: 5.5rem;
border: 1px solid;
padding: 1rem;
object-fit: contain;
}
}

Expand Down
4 changes: 2 additions & 2 deletions components/collection/activity/Activity.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<template>
<div class="is-flex">
<SidebarFilter />
<div ref="wrapper" class="w-full mt-5">
<div ref="wrapper" class="w-full mt-4">
<div v-if="tablet">
<div class="columns">
<div class="column is-two-thirds">
<ActivityChart :events="events" />
<ActivityChart :events="events" class="mt-2" />
</div>
<div class="column">
<OwnerInsights :owners="owners" :flippers="flippers" />
Expand Down
45 changes: 2 additions & 43 deletions components/collection/drop/DropContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div>Total available items</div>
<div>{{ totalAvailableMintCount }} / {{ totalCount }}</div>
</div>
<UnlockableTag />
<UnlockableTag :collection-id="collectionId" />

<div>
<div
Expand Down Expand Up @@ -77,48 +77,7 @@
<ImageSlider v-if="imageList.length" :image-list="imageList" />
</div>
</div>
<hr class="text-color my-4" />
<div class="columns is-desktop">
<div
class="column is-half-desktop is-flex is-flex-direction-column is-justify-content-center order-1">
<div
class="is-flex is-align-items-center has-text-weight-bold is-size-6 mb-2">
<svg
class="mr-2"
width="20"
height="21"
viewBox="0 0 20 21"
fill="none"
xmlns="http://www.w3.org/2000/svg">
<path
d="M7.5 6.65137V8.65137H15.5H17V10.1514V17.1514V18.6514H15.5H4.5H3V17.1514V10.1514V8.65137H4.5H6V6.65137C6 4.46387 7.78125 2.65137 10 2.65137C11.7812 2.65137 13.2812 3.83887 13.7812 5.43262L12.375 5.90137C12.0312 4.90137 11.0938 4.15137 10 4.15137C8.59375 4.15137 7.5 5.27637 7.5 6.65137ZM4.5 17.1514H15.5V10.1514H4.5V17.1514Z"
fill="currentColor" />
</svg>
How unlockable item works
</div>
<div>
Experience the excitement of unlocking hidden rewards! Get your
hands on exclusive merchandise (and an NFT!) linked to unlockable
content. For the next ten hours, the fastest ten individuals can
mint their very own anime waifu character NFT for free. Simply log
in with your wallet, click on the "Mint" button, and sign the
transaction. Afterward, check your profile to find the NFT and click
"Unlockable Content" to reveal the surprise. Follow the schedule so
you don't miss this!
</div>
<NeoButton
tag="a"
href="https://hello.kodadot.xyz/fandom-toolbox/audience-growth/unlockables"
target="_blank"
variant="secondary"
class="mt-2">
Learn More
</NeoButton>
</div>
<div class="column">
<img src="/unlockable-introduce.svg" alt="Unlockable" />
</div>
</div>
<CollectionUnlockableItemInfo :collection-id="collectionId" />
<div class="my-4">
<CarouselTypeLatestMints
:collection-id="collectionId"
Expand Down
83 changes: 32 additions & 51 deletions components/collection/drop/Generative.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<template>
<div class="unlockable-container">
<CollectionUnlockableLoader v-model="isLoading" :minted="justMinted" />
<CountdownTimer />
<div class="container is-fluid">
<div class="container is-fluid border-top">
<div class="columns is-desktop">
<div class="column is-half-desktop mobile-padding">
<UnlockableCollectionInfo
Expand All @@ -15,7 +14,7 @@
<div>{{ $t('mint.unlockable.totalAvailableItem') }}</div>
<div>{{ totalAvailableMintCount }} / {{ totalCount }}</div>
</div>
<UnlockableTag />
<UnlockableTag :collection-id="collectionId" />

<div>
<div
Expand Down Expand Up @@ -65,6 +64,7 @@
ref="root"
class="my-2 mint-button"
variant="k-accent"
:loading="isImageFetching"
:disabled="mintButtonDisabled"
:label="$t('mint.unlockable.mintThisNft')"
@click="handleSubmitMint" />
Expand All @@ -79,38 +79,7 @@
@select="handleSelectImage" />
</div>
</div>
<hr class="text-color my-4" />
<div class="columns is-desktop">
<div
class="column is-half-desktop is-flex is-flex-direction-column is-justify-content-center order-1">
<div
class="is-flex is-align-items-center has-text-weight-bold is-size-6 mb-2">
<NeoIcon icon="unlock" class="mr-2" />
{{ $t('mint.unlockable.howItemWork') }}
</div>
<div>
Experience the excitement of unlocking hidden rewards! Get your
hands on exclusive merchandise (and an NFT!) linked to unlockable
content. For the next ten hours, the fastest ten individuals can
mint their very own anime waifu character NFT for free. Simply log
in with your wallet, click on the "Mint" button, and sign the
transaction. Afterward, check your profile to find the NFT and click
"Unlockable Content" to reveal the surprise. Follow the schedule so
you don't miss this!
</div>
<NeoButton
tag="a"
href="https://hello.kodadot.xyz/fandom-toolbox/audience-growth/unlockables"
target="_blank"
variant="secondary"
class="mt-2">
{{ $t('helper.learnMore') }}
</NeoButton>
</div>
<div class="column">
<img src="/unlockable-introduce.svg" alt="Unlockable" />
</div>
</div>
<CollectionUnlockableItemInfo :collection-id="collectionId" />
<div class="my-4">
<CarouselTypeLatestMints
:collection-id="collectionId"
Expand All @@ -121,17 +90,20 @@
</template>

<script setup lang="ts">
import CountdownTimer from '@/components/collection/unlockable/CountdownTimer.vue'
import UnlockableCollectionInfo from '@/components/collection/unlockable/UnlockableCollectionInfo.vue'
import UnlockableSlider from '@/components/collection/unlockable/UnlockableSlider.vue'
import UnlockableTag from '@/components/collection/unlockable/UnlockableTag.vue'
import { ConnectWalletModalConfig } from '@/components/common/ConnectWallet/useConnectWallet'
import CarouselTypeLatestMints from '@/components/carousel/CarouselTypeLatestMints.vue'
import { NeoButton, NeoIcon } from '@kodadot1/brick'
import { NeoButton } from '@kodadot1/brick'
import { createUnlockableMetadata } from '../unlockable/utils'
import GenerativePreview from '@/components/collection/drop/GenerativePreview.vue'
import { DropItem } from '@/params/types'
import { doWaifu } from '@/services/waifu'
import { makeScreenshot } from '@/services/capture'
import { pinFileToIPFS } from '@/services/nftStorage'
import { sanitizeIpfsUrl } from '@/utils/ipfs'

const NuxtLink = resolveComponent('NuxtLink')

const props = defineProps({
Expand All @@ -156,6 +128,7 @@ const selectedImage = ref<string>('')
const { isLogIn } = useAuth()
const justMinted = ref('')
const isLoading = ref(false)
const isImageFetching = ref(false)

const handleSelectImage = (image: string) => {
selectedImage.value = image
Expand Down Expand Up @@ -222,7 +195,8 @@ const mintButtonDisabled = computed(() =>
Boolean(
currentMintedLoading.value ||
!mintCountAvailable.value ||
!selectedImage.value,
!selectedImage.value ||
!accountId.value,
),
)

Expand All @@ -247,36 +221,42 @@ const handleSubmitMint = async () => {
})
return
}
if (isLoading.value) {
if (isLoading.value || isImageFetching.value) {
return false
}

const hash = await createUnlockableMetadata(
props.drop.image,
description.value,
collectionName.value,
'text/html',
selectedImage.value,
)
try {
isImageFetching.value = true

const { accountId } = useAuth()
const imgFile = await makeScreenshot(sanitizeIpfsUrl(selectedImage.value))
const imageHash = await pinFileToIPFS(imgFile)

isLoading.value = true
const hash = await createUnlockableMetadata(
imageHash,
description.value,
collectionName.value,
'text/html',
selectedImage.value,
)

isImageFetching.value = false

const { accountId } = useAuth()
isLoading.value = true

try {
const id = await doWaifu(
{
address: accountId.value,
metadata: hash,
image: props.drop.image,
image: imageHash,
},
props.drop.id,
).then((res) => {
toast('mint success', { duration: 20000 })
scrollToTop()
return `${collectionId.value}-${res.result.sn}`
})
// 44s timeout

setTimeout(() => {
isLoading.value = false
justMinted.value = id
Expand All @@ -286,6 +266,7 @@ const handleSubmitMint = async () => {
} catch (error) {
toast($i18n.t('drops.mintPerAddress'))
isLoading.value = false
isImageFetching.value = false
}
}
</script>
Expand Down
19 changes: 12 additions & 7 deletions components/collection/drop/GenerativePreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
:loading="isLoading"
no-shadow
loading-with-label
:disabled="!accountId"
@click="generateNft">
@click="generateNft()">
{{
$t(
isLoading
Expand Down Expand Up @@ -64,7 +63,10 @@ const getHash = (isDefault?: boolean) => {
? chainProperties.value?.ss58Format
: getRandomInt(15000)
// https://github.com/paritytech/ss58-registry/blob/30889d6c9d332953a6e3333b30513eef89003f64/ss58-registry.json#L1292C17-L1292C22
return stringToHex(encodeAddress(accountId.value, ss58Format))
return accountId.value
? stringToHex(encodeAddress(accountId.value, ss58Format))
: // random value
ss58Format
}

const generativeImageUrl = ref(
Expand All @@ -73,15 +75,15 @@ const generativeImageUrl = ref(

const isLoading = ref(false)

onMounted(() => {
generativeImageUrl.value && emit('select', generativeImageUrl.value)
watch([accountId], () => {
generateNft(true)
})
const displayUrl = computed(() => {
return generativeImageUrl.value || props.image
})
const generateNft = async () => {
const generateNft = (isDefault: boolean = false) => {
isLoading.value = true
const metadata = `${props.content}/?hash=${getHash()}`
const metadata = `${props.content}/?hash=${getHash(isDefault)}`
generativeImageUrl.value = metadata
emit('select', generativeImageUrl.value)

Expand Down Expand Up @@ -133,6 +135,9 @@ const generateNft = async () => {
.fixed-right {
position: absolute;
right: 2rem;
@include mobile {
right: 1rem;
}
}

.fixed-width {
Expand Down
Loading