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

release update #8313

Merged
merged 162 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
162 commits
Select commit Hold shift + click to select a range
d3c236d
add: basic working modal skeleton
hassnian Nov 17, 2023
3c4f394
Merge branch 'main' into issue-8061
hassnian Nov 20, 2023
00a6cae
ref: paddings and added translations
hassnian Nov 20, 2023
05eb9c9
add: mint modals
hassnian Nov 20, 2023
ce0490a
add: loading modal to list
hassnian Nov 20, 2023
7e9a357
add: border radius and light color
hassnian Nov 20, 2023
3527ab4
ref: skeleton variant
hassnian Nov 20, 2023
a62283b
add: neo modal body
hassnian Nov 20, 2023
4ee8c67
ref: slot one tag
hassnian Nov 20, 2023
5846caa
ref: increase max modal height
hassnian Nov 21, 2023
a718a04
add: buy Statemine support fee
hassnian Nov 23, 2023
b9d8707
Merge branch 'main' into issue-5130
hassnian Nov 23, 2023
2c9a6e7
add: collection mint support fee
hassnian Nov 23, 2023
7b8fbc9
Merge branch 'main' into issue-5130
hassnian Nov 23, 2023
a1eb738
ref: can support variable
hassnian Nov 23, 2023
1d2b963
Merge branch 'issue-5130' of https://github.com/hassnian/nft-gallery …
hassnian Nov 23, 2023
fa0c730
fixed onerror func in NeoAvatar
shashkovdanil Nov 24, 2023
5bceda3
Merge branch 'main' into fixed-neo-avatar-on-error
shashkovdanil Nov 24, 2023
0c3ed09
Merge pull request #8239 from shashkovdanil/fixed-neo-avatar-on-error
yangwao Nov 24, 2023
c1732f8
fix: chunk paraspell sdk
preschian Nov 25, 2023
946a75c
totalHoldingsBoughtValues_chainsymbol_correction
AshutoshSingh00001 Nov 25, 2023
10d717e
fix: fallback nuxt image
preschian Nov 26, 2023
6045661
fix: statemine mint collection mint
hassnian Nov 26, 2023
1819d8f
Merge branch 'main' into issue-5130
hassnian Nov 26, 2023
00461e5
fix-NeoDropdown position prop
daiagi Nov 26, 2023
74bbdff
hide outliers drop down
daiagi Nov 26, 2023
5fad341
fix: Modals width broken
Jarsen136 Nov 26, 2023
bb750cf
fix: Text not aligned
Jarsen136 Nov 26, 2023
76467ad
show sale price
daiagi Nov 26, 2023
6ed1bc5
remove explicit color
daiagi Nov 26, 2023
377e55c
add: default token values
hassnian Nov 26, 2023
8524f26
Merge branch 'issue-5130' of https://github.com/hassnian/nft-gallery …
hassnian Nov 26, 2023
831a675
don;t show sold in generative carousel
daiagi Nov 26, 2023
665e723
sold label
daiagi Nov 26, 2023
8c9bd44
fix: floor price dose not load on profile page
Jarsen136 Nov 26, 2023
d629a3b
Merge pull request #8242 from kodadot/fix/chunk-paraspell
preschian Nov 27, 2023
b506f99
[skip netlify] Update Bumped minor version of packages
renovate[bot] Nov 27, 2023
7caf896
fix: buy now wallet spinner
hassnian Nov 27, 2023
34c5133
styling
daiagi Nov 27, 2023
65ad5a1
Merge branch 'main' into collection-activity-toggle-hide-outliers
daiagi Nov 27, 2023
8ff4d91
fix: pr review
hassnian Nov 27, 2023
0725f80
remove useless keep alive
daiagi Nov 27, 2023
4aa7966
fix: class navbar fixed top padding
hassnian Nov 27, 2023
624d587
scope page updates to their intended path
daiagi Nov 27, 2023
80d2ef4
Merge branch 'main' into fix/-unitended-naviagtions-from-useListInfin…
daiagi Nov 27, 2023
dcf0594
Merge pull request #8261 from kodadot/renovate/bumped-minor-version-o…
roiLeo Nov 27, 2023
57b0aad
Merge branch 'main' into issue-8246
roiLeo Nov 27, 2023
b9425a6
Merge pull request #8256 from Jarsen136/issue-8246
roiLeo Nov 27, 2023
d57c9ea
prepare for ssr
daiagi Nov 27, 2023
485ab7a
Merge branch 'fix/-unitended-naviagtions-from-useListInfinteScroll' o…
daiagi Nov 27, 2023
0b1b92f
Merge branch 'main' of https://github.com/kodadot/nft-gallery into fi…
daiagi Nov 27, 2023
37a51e7
Merge branch 'main' into main
roiLeo Nov 27, 2023
45016cc
Merge pull request #8249 from AshutoshSingh00001/main
roiLeo Nov 27, 2023
2efc5e9
Merge branch 'main' into issue-8247
roiLeo Nov 27, 2023
78afbaf
Merge pull request #8255 from Jarsen136/issue-8247
roiLeo Nov 27, 2023
3745320
add: max balance teleport
hassnian Nov 27, 2023
d4d5d77
🔧 libs/ui build error
roiLeo Nov 27, 2023
4e8dc28
🧑‍💻 update code owner libs/ui
roiLeo Nov 27, 2023
e6f5e08
feat/ massmint-mobile-disclaimer
daiagi Nov 27, 2023
2b95be7
Merge branch 'main' of https://github.com/kodadot/nft-gallery into co…
daiagi Nov 27, 2023
d0f3da7
add smoothing drop down item
daiagi Nov 27, 2023
d791e8c
Update .github/CODEOWNERS
vikiival Nov 27, 2023
f9a77f3
Update locales/en.json
daiagi Nov 27, 2023
b92b79d
Merge pull request #8259 from Jarsen136/issue-8245
yangwao Nov 27, 2023
d434df6
Merge pull request #8269 from kodadot/massmint-mobile-disclaimer
yangwao Nov 27, 2023
0af7338
Merge pull request #8264 from kodadot/fix/-unitended-naviagtions-from…
yangwao Nov 27, 2023
3393302
Merge pull request #8257 from kodadot/latestSales---show-sale-price
yangwao Nov 27, 2023
e1bdbdf
Merge pull request #8262 from hassnian/issue-8258
yangwao Nov 27, 2023
998f9b6
Merge pull request #8252 from kodadot/fix/fallback-nuxtimg-to-image-w…
yangwao Nov 27, 2023
d986719
🔧 libs/ui MediaItem
roiLeo Nov 27, 2023
63cd18f
Added trick to save iframe with good quality
shashkovdanil Nov 27, 2023
dfba1e7
🔧 libs/ui NeoModelMedia
roiLeo Nov 27, 2023
ddda210
Merge branch 'main' into iframe-tricky-hack
shashkovdanil Nov 27, 2023
d31503f
Merge branch 'main' into fix/ui/build
roiLeo Nov 27, 2023
2b34f40
Merge pull request #8267 from roiLeo/fix/ui/build
roiLeo Nov 27, 2023
3a9d770
Merge branch 'main' into iframe-tricky-hack
shashkovdanil Nov 27, 2023
2acd0b6
Merge branch 'main' into fix/ui/MediaItem
roiLeo Nov 27, 2023
55119d6
🔧 MediaItem default placeholder
roiLeo Nov 27, 2023
ceb6575
🔧 prefix MediaItem
roiLeo Nov 27, 2023
3aca042
Added import of watchEffect
shashkovdanil Nov 27, 2023
fbc7ca0
fix collection test
prury Nov 27, 2023
f79de20
explore flakiness attempt
prury Nov 27, 2023
75239b1
remove old cypress tests
prury Nov 27, 2023
c906f95
Merge branch 'main' into fix/pw-tests
prury Nov 27, 2023
6ecc459
Merge pull request #8277 from kodadot/test/removecypress
yangwao Nov 27, 2023
91204ef
Merge branch 'main' into iframe-tricky-hack
shashkovdanil Nov 27, 2023
815b2dd
add: teleport fee buffer
hassnian Nov 28, 2023
6f86226
ref: reduce buffer
hassnian Nov 28, 2023
28f2df5
Merge branch 'main' into issue-8146
hassnian Nov 28, 2023
7e8c559
fix: mint support token statemine
hassnian Nov 28, 2023
66d9511
fix: mobile padding
hassnian Nov 28, 2023
c775052
ref: removed i18n
hassnian Nov 28, 2023
dc96533
ref: use $skeleton-border-radius
hassnian Nov 28, 2023
18845b3
Merge branch 'main' into collection-activity-togge-smoothing
daiagi Nov 28, 2023
7fa3616
🔧 auto imported defineProps
roiLeo Nov 28, 2023
8a9be62
Merge branch 'main' into fix/ui/MediaItem
roiLeo Nov 28, 2023
dab10c8
add: content class
hassnian Nov 28, 2023
6faa439
Merge branch 'main' into issue-8061
hassnian Nov 28, 2023
c678611
ref: move modal body from brick
hassnian Nov 28, 2023
280c4a4
Merge branch 'main' into issue-8061
hassnian Nov 28, 2023
0388c96
ref: remove changing padding
hassnian Nov 28, 2023
146741e
ref: pr changes
hassnian Nov 28, 2023
83cd9a6
fix: no negative value insufficientAmountAfterFees
hassnian Nov 28, 2023
8b3498e
:coffin: not available routes on waifu service
vikiival Nov 28, 2023
fc45802
fix: min input value
hassnian Nov 28, 2023
539c3ca
:coffin: remove claim
vikiival Nov 28, 2023
8ddf82c
Merge pull request #8263 from hassnian/issue-8225
yangwao Nov 28, 2023
bef4c70
Merge pull request #8276 from kodadot/fix/pw-tests
yangwao Nov 28, 2023
802d8d4
Merge branch 'main' into iframe-tricky-hack
shashkovdanil Nov 28, 2023
ccc0c3c
Merge pull request #8253 from kodadot/collection-activity-toggle-hide…
yangwao Nov 28, 2023
e207af6
Merge branch 'main' into iframe-tricky-hack
shashkovdanil Nov 28, 2023
1c9dc5f
Merge branch 'main' into collection-activity-togge-smoothing
daiagi Nov 28, 2023
3b3ce2d
Update components/collection/activity/ActivityChart.vue
daiagi Nov 28, 2023
c6d74ba
Merge pull request #8270 from kodadot/collection-activity-togge-smoot…
daiagi Nov 28, 2023
bab5742
Merge branch 'main' into issue-5130
prury Nov 28, 2023
45aeb59
Merge pull request #8124 from hassnian/issue-8061
yangwao Nov 28, 2023
a78ecfd
Merge branch 'main' into fix/ui/MediaItem
roiLeo Nov 28, 2023
6db05a9
Update libs/ui/src/components/MediaItem/type/VideoMedia.vue
roiLeo Nov 28, 2023
8db80f7
Update libs/ui/src/components/MediaItem/type/ImageMedia.vue
roiLeo Nov 28, 2023
07e6f33
Merge pull request #8274 from roiLeo/fix/ui/MediaItem
yangwao Nov 28, 2023
b7f80e9
Merge pull request #8284 from kodadot/old-waifus
vikiival Nov 28, 2023
a923299
feat: Lazy Drops
Jarsen136 Nov 29, 2023
f2c1e08
fix: complexity function
Jarsen136 Nov 29, 2023
84308e0
fix: encrease buffer fee
hassnian Nov 29, 2023
b11d01d
Merge branch 'main' into issue-5130
hassnian Nov 29, 2023
60a8f02
Merge branch 'issue-5130' of https://github.com/hassnian/nft-gallery …
hassnian Nov 29, 2023
07c697a
fix: Search: Hard to read (adjust colours)
Jarsen136 Nov 29, 2023
3602bed
fix: Chart tooltip is in background
Jarsen136 Nov 29, 2023
90b076d
ref: pr review
hassnian Nov 29, 2023
dc4ef29
fix: tailwindcss style
Jarsen136 Nov 29, 2023
f18af90
chore: unify type
Jarsen136 Nov 29, 2023
efed136
🔧 reviewdog lint
roiLeo Nov 29, 2023
4602aa5
remove: buffer fee
hassnian Nov 29, 2023
664bf57
Merge branch 'main' into iframe-tricky-hack
shashkovdanil Nov 29, 2023
20d0d22
add: confirm drop modal
hassnian Nov 29, 2023
46e1189
Merge pull request #8292 from roiLeo/fix/reviewdog/lint
roiLeo Nov 29, 2023
1d5313a
ref: unify laoders
hassnian Nov 29, 2023
30a67b7
Merge branch 'main' into iframe-tricky-hack
shashkovdanil Nov 29, 2023
4a9bfbc
Merge pull request #8275 from shashkovdanil/iframe-tricky-hack
vikiival Nov 29, 2023
7b3280c
:wrench: new drop is snowflakes
vikiival Nov 29, 2023
1387b3b
Merge pull request #8298 from kodadot/snow-flakes
vikiival Nov 29, 2023
5595a34
Merge pull request #8288 from Jarsen136/issue-8268
vikiival Nov 29, 2023
32e6097
add: teleport buffer fee
hassnian Nov 30, 2023
59f7625
add: consent checkbox
hassnian Nov 30, 2023
e569843
add: shine button
hassnian Nov 30, 2023
4cbac63
Merge branch 'main' into issue-8260
hassnian Nov 30, 2023
f84b53a
ref: k accent color 3 varaible
hassnian Nov 30, 2023
4f926f3
fix: disable shine on disabled
hassnian Nov 30, 2023
4aa370c
Merge branch 'issue-8260' of https://github.com/hassnian/nft-gallery …
hassnian Nov 30, 2023
1b692f5
ref: use tailwind css vars
hassnian Nov 30, 2023
4ef3055
chore: prevent reload on development mode
preschian Nov 30, 2023
a9968f2
:wrench: email
vikiival Nov 30, 2023
329713b
Merge pull request #8306 from kodadot/chore/prevent-reloading-develop…
preschian Nov 30, 2023
a56af7f
Merge branch 'main' into issue-8260
hassnian Nov 30, 2023
4b1d18e
Merge branch 'issue-8260' of https://github.com/hassnian/nft-gallery …
hassnian Nov 30, 2023
f865870
add: email do waifu request
hassnian Nov 30, 2023
718b91b
Merge pull request #8290 from Jarsen136/issue-8285
yangwao Nov 30, 2023
0c3c0ce
Merge pull request #8200 from hassnian/issue-5130
yangwao Nov 30, 2023
b597f4a
Merge pull request #8289 from Jarsen136/issue-8283
yangwao Nov 30, 2023
6f6c555
Merge pull request #8266 from hassnian/issue-8146
yangwao Nov 30, 2023
4e00835
Merge pull request #8294 from hassnian/issue-8260
yangwao Nov 30, 2023
c81ce29
Merge pull request #8312 from kodadot/main
yangwao Nov 30, 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
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* @kodadot/code-review-guild
* @kodadot/code-review-guild
/libs/ui @kodadot/internal-dev
46 changes: 46 additions & 0 deletions assets/styles/abstracts/_animations.scss
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,49 @@
display: inline-block;
animation: dots 1.5s infinite;
}

@mixin shineEffect($shineColor, $shineHover) {
overflow: hidden;

&::before,
&::after {
content: '';
position: absolute;
top: 0;
height: 100%;
background-color: $shineColor;
transform: skewX(-30deg);
transition: background-color 0.3s;
z-index: 0;
}

&::before {
left: -120%;
width: 15%;
animation: shine1 3s ease-in-out infinite;
}

&::after {
left: -115%;
width: 3%;
animation: shine2 3s ease-in-out infinite;
}

&:hover {
&::before,
&::after {
background-color: $shineHover
}
}
}

@keyframes shine1 {
0% { left: -118%; }
100% { left: 112%; }
}

@keyframes shine2 {
0% { left: -100%; }
100% { left: 130%; }
}

4 changes: 4 additions & 0 deletions assets/styles/abstracts/_theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ $themes: (
'k-redaccent2': #ffe6e6,
'k-grey': #999999,
'k-grey-fix': #999999,
'k-grey-light': #ECECEC,
'k-pink': #ffb6ef,
'k-yellow': #feffb6,
'warning-yellow': #fffbcc,
'k-blueaccent': #b6cbff,
'k-aqua-blue': #cafdf4,
'k-greenaccent': #c2ffac,
Expand Down Expand Up @@ -70,8 +72,10 @@ $themes: (
'k-redaccent2': #390b0b,
'k-grey': #cccccc,
'k-grey-fix': #999999,
'k-grey-light': #ECECEC,
'k-pink': #7a2a68,
'k-yellow': #363234,
'warning-yellow': #3f3500,
'k-blueaccent': #2e50a2,
'k-aqua-blue': #106153,
'k-greenaccent': #056a02,
Expand Down
4 changes: 2 additions & 2 deletions assets/styles/components/_price-chart.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
left: 0;
top: 0;
}
.neo-dropdown {
.time-range-dropdown {
$width: 89px;
$height: 30px;
$font-size: 12px;

position: absolute;
right: 10px;
right: 60px;
top: -8px;
font-size: $font-size;

Expand Down
7 changes: 7 additions & 0 deletions assets/styles/layouts/_main-navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -352,3 +352,10 @@
height: 2.5rem;
}
}

.has-navbar-fixed-top {
padding-top: $navbar-desktop-min-height !important;
@include mobile {
padding-top: $navbar-mobile-min-height !important;
}
}
226 changes: 226 additions & 0 deletions components/base/MediaItem.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
<template>
<div ref="mediaItem" class="media-object" style="height: fit-content">
<component
:is="resolveComponent"
:src="properSrc"
:sizes="sizes"
:animation-src="animationSrc"
:alt="title"
:placeholder="placeholder"
:original="original"
:is-lewd="isLewd"
:is-detail="isDetail"
:disable-operation="disableOperation"
:player-cover="audioPlayerCover"
:hover-on-cover-play="audioHoverOnCoverPlay"
:parent-hovering="isMediaItemHovering"
:image-component="imageComponent"
:preview="preview"
:autoplay="autoplay" />
<div
v-if="isLewd && isLewdBlurredLayer"
class="nsfw-blur is-capitalized is-flex is-align-items-center is-justify-content-center is-flex-direction-column">
<NeoIcon icon="eye-slash" class="mb-3" />
<span class="has-text-weight-bold">
{{ $t('lewd.explicit') }}
</span>
<span class="nsfw-desc text-align-center">{{
$t('lewd.explicitDesc')
}}</span>
</div>
<div
v-if="isInteractive"
class="k-shade border-k-grey is-flex is-align-items-center is-justify-content-center border is-rounded absolute-position image is-24x24">
<NeoIcon
icon="code"
pack="far"
class="is-size-7 has-text-weight-medium" />
</div>
<NeoButton
v-if="isLewd"
rounded
no-shadow
class="nsfw-action no-border px-4 py-1 is-size-6"
:class="{ hide: isLewdBlurredLayer }"
:label="
isLewdBlurredLayer ? $t('lewd.showContent') : $t('lewd.hideContent')
"
@click="toggleContent" />
</div>
</template>

<script lang="ts" setup>
import type { ComputedOptions, ConcreteComponent, MethodOptions } from 'vue'
import { useElementHover, useElementVisibility } from '@vueuse/core'
import {
NeoAudioMedia,
NeoButton,
NeoIFrameMedia,
NeoIcon,
NeoImageMedia,
NeoJsonMedia,
NeoObjectMedia,
NeoUnknownMedia,
NeoVideoMedia,
} from '@kodadot1/brick'
import { getMimeType, resolveMedia } from '@/utils/gallery/media'
import { MediaType } from '@/components/rmrk/types'

const props = withDefaults(
defineProps<{
src?: string
animationSrc?: string
mimeType?: string
title?: string
original?: boolean
isLewd?: boolean
isDetail?: boolean
placeholder?: string
disableOperation?: boolean
audioPlayerCover?: string
audioHoverOnCoverPlay?: boolean
// props for video component
preview?: boolean
autoplay?: boolean
// props for image component
sizes?: string
imageComponent?:
| string
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
| ConcreteComponent<{}, any, any, ComputedOptions, MethodOptions>
}>(),
{
src: '',
animationSrc: '',
mimeType: '',
title: 'KodaDot NFT',
original: false,
isLewd: false,
isDetail: false,
placeholder: './Koda.svg',
disableOperation: undefined,
audioPlayerCover: '',
imageComponent: 'img',
},
)

const mediaItem = ref<HTMLDivElement>()

// props.mimeType may be empty string "". Add `image/png` as fallback
const mimeType = computed(() => props.mimeType || type.value || 'image/png')

const sizes = computed(() =>
props.sizes === 'original' ? undefined : props.sizes,
)

const targetIsVisible = useElementVisibility(mediaItem)
const modelComponent = ref<Component>()
const isModelComponentLoaded = ref(false)
const shouldLoadModelComponent = computed(() => {
return targetIsVisible.value && mimeType.value === 'model/gltf-binary'
})
watch(shouldLoadModelComponent, (shouldLoad) => {
if (shouldLoad && !isModelComponentLoaded.value) {
modelComponent.value = defineAsyncComponent(
async () => (await import('@kodadot1/brick')).NeoModelMedia,
)
isModelComponentLoaded.value = true
}
})

const PREFIX = 'Neo'
const SUFFIX = 'Media'

const isInteractive = computed(() => {
return resolveMedia(mimeType.value) === MediaType.IFRAME && !props.isDetail
})
const type = ref('')

const isLewdBlurredLayer = ref(props.isLewd)
const components = {
NeoImageMedia,
NeoVideoMedia,
NeoAudioMedia,
NeoJsonMedia,
NeoIFrameMedia,
NeoObjectMedia,
NeoUnknownMedia,
}

const resolveComponent = computed(() => {
let mediaType = resolveMedia(mimeType.value)

if (mediaType === MediaType.IFRAME && !props.isDetail) {
mediaType = MediaType.IMAGE
}

return mediaType === 'Model'
? modelComponent.value
: components[PREFIX + mediaType + SUFFIX]
})
const properSrc = computed(() => props.src || props.placeholder)

const updateComponent = async () => {
if (props.animationSrc && !props.mimeType) {
type.value = await getMimeType(props.animationSrc)
}
}

watch(
() => props.animationSrc,
() => updateComponent(),
{
immediate: true,
},
)

const toggleContent = () => {
isLewdBlurredLayer.value = !isLewdBlurredLayer.value
}

const isMediaItemHovering = useElementHover(mediaItem)

defineExpose({ isLewdBlurredLayer })
</script>

<style lang="scss" scoped>
@import '@/assets/styles/abstracts/variables';
.media-object {
.nsfw-blur {
backdrop-filter: blur(60px);
position: absolute;
top: 0;
height: 100%;
width: 100%;
@include ktheme() {
color: theme('text-color');
}

.nsfw-desc {
max-width: 18.75rem;
}
}
.nsfw-action {
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 1.25rem;
@include ktheme() {
color: theme('text-color') !important;
background: theme('background-color') !important;
}
&.hide {
@include ktheme() {
color: theme('background-color') !important;
background: theme('text-color') !important;
}
}
}

.absolute-position {
position: absolute;
right: 0.75rem;
top: 0.75rem;
}
}
</style>
1 change: 1 addition & 0 deletions components/base/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export interface CarouselNFT extends ItemResources {
}
name: string
price: string
latestSalePrice?: string
timestamp: string
unixTime: number
metadata?: string
Expand Down
2 changes: 1 addition & 1 deletion components/carousel/CarouselTypeGenerative.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ import { useCarouselGenerativeNftEvents } from './utils/useCarouselEvents'

const { nfts, ids } = await useCarouselGenerativeNftEvents(
['176'],
['38', '40'],
['38', '40', '46'],
)
</script>
21 changes: 14 additions & 7 deletions components/carousel/module/CarouselInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,16 @@
? 'is-justify-content-space-between'
: 'is-justify-content-end',
]">
<Money
v-if="showPrice"
:value="item.price"
inline
:prefix="item.chain"
:unit-symbol="unitSymbol" />
<div v-if="showPrice" class="is-flex is-align-items-center">
<Money
:value="price"
inline
:prefix="item.chain"
:unit-symbol="unitSymbol" />
<span v-if="showSold" class="ml-2 has-text-grey is-size-7"
>- {{ $t('spotlight.sold') }}</span
>
</div>
<p class="is-size-7 chain-name is-capitalized">{{ chainName }}</p>
</div>
</div>
Expand Down Expand Up @@ -71,8 +75,11 @@ const chainName = computed(() => {
return getChainNameByPrefix(props.item.chain || urlPrefix.value)
})

const price = computed(() => props.item.latestSalePrice ?? props.item.price)
const showSold = computed(() => Number(props.item.latestSalePrice) > 0)

const showPrice = computed((): boolean => {
return Number(props.item.price) > 0 && !isCollection
return Number(price.value) > 0 && !isCollection
})

const unitSymbol = computed(() => prefixToToken[props.item.chain || 'ksm'])
Expand Down
Loading