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 #6564

Merged
merged 118 commits into from
Aug 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
544e142
refactor: redesign feature gating
Jarsen136 Jul 25, 2023
9e2bfb1
feat: transfer redesign
Jarsen136 Jul 27, 2023
5a769f6
production branch is now production-cf
yangwao Jul 28, 2023
c02b985
feat: transfer page redesign
Jarsen136 Jul 29, 2023
1faef15
fix: add i18n for transfer
Jarsen136 Jul 29, 2023
d2c862a
fix: i18n text
Jarsen136 Jul 29, 2023
ba9566e
fix: deepscan issue
Jarsen136 Jul 29, 2023
3e0f716
new assets
daiagi Jul 31, 2023
e8670b3
shopping cart button in navbar
daiagi Jul 31, 2023
c9abdec
move nft avatar parsing
daiagi Jul 31, 2023
fb24fc7
NeoButton text variant
daiagi Jul 31, 2023
7a9f727
add 'no-shadow' to NeoModal
daiagi Jul 31, 2023
41dc0f7
add 'hover-action' slot to NeoNftCard
daiagi Jul 31, 2023
ac8240d
add to global styles
daiagi Jul 31, 2023
2de0ce0
add shopping cart state to prefrences store
daiagi Jul 31, 2023
506d189
shoppingCart store
daiagi Jul 31, 2023
667bdcc
🔥 delete BaseGalleryItem.vue
daiagi Jul 31, 2023
cd937a3
shopping cart and confirm purcahse modals
daiagi Jul 31, 2023
ad59f2c
Buy.vue (move buy processing to layouts)
daiagi Jul 31, 2023
2fbbc24
use Buy.vue in all layouts that have navbar
daiagi Jul 31, 2023
6c32e9d
redesign, no more sliding buy button, integrate buy with shopping cart
daiagi Jul 31, 2023
410ec61
GalleryItemAction signature change
daiagi Jul 31, 2023
38979dd
galleryItem - trigger buy-success notification by listening to event bus
daiagi Jul 31, 2023
c2dab0b
add shopping cart and buy now to ItemsGridImage
daiagi Jul 31, 2023
134e77b
locals
daiagi Jul 31, 2023
9d27b6a
new pub/sub event bus
daiagi Jul 31, 2023
0d307f5
enable buying multiple NFTs
daiagi Jul 31, 2023
27752d3
shoppingCartIcon composable
daiagi Jul 31, 2023
7755590
balanceIsEnough composable
daiagi Jul 31, 2023
4336bba
Merge branch 'main' of https://github.com/kodadot/nft-gallery into fe…
daiagi Jul 31, 2023
b0bcf75
🔧 DeepSource issues
daiagi Jul 31, 2023
978ebc8
remove unused import from ipfs
daiagi Jul 31, 2023
ff2ec71
deepSource...
daiagi Jul 31, 2023
e97cfde
fix: review comment
Jarsen136 Jul 31, 2023
ee4ee2c
shopping actions on minimal card
daiagi Jul 31, 2023
7d687fc
🔧 disbaled buy button width
daiagi Jul 31, 2023
21e88a5
enable go to cart even if not enough funds
daiagi Jul 31, 2023
7790bdb
Update README.md
AshutoshSingh72 Aug 2, 2023
6931773
Update README.md
AshutoshSingh72 Aug 2, 2023
4f6b780
Update README.md
AshutoshSingh72 Aug 2, 2023
2a14cdc
Update README.md
AshutoshSingh72 Aug 2, 2023
95ef6a4
Update README.md
AshutoshSingh72 Aug 2, 2023
e1832f3
Update README.md
AshutoshSingh72 Aug 2, 2023
86b8a2c
Update README.md
AshutoshSingh72 Aug 2, 2023
37f9894
Update README.md
AshutoshSingh72 Aug 2, 2023
c0a7581
Update README.md
AshutoshSingh72 Aug 2, 2023
0980b39
Update README.md
AshutoshSingh72 Aug 2, 2023
b3ce739
Update README.md
AshutoshSingh72 Aug 2, 2023
a97e5c7
Update README.md
AshutoshSingh72 Aug 2, 2023
87367e7
Update README.md
AshutoshSingh72 Aug 2, 2023
aca5f5e
Merge branch 'main' of https://github.com/kodadot/nft-gallery into fe…
daiagi Aug 2, 2023
000e185
Merge branch 'main' of github.com:kodadot/nft-gallery
yangwao Aug 2, 2023
27ab089
Update README.md
AshutoshSingh72 Aug 2, 2023
91ba2a6
added blog routes
hassnian Aug 2, 2023
69054a3
Update README.md
AshutoshSingh72 Aug 2, 2023
ec20c53
Update README.md
AshutoshSingh72 Aug 2, 2023
c15e539
fix: Use new gen formats for blog assets (#6516)
Jarsen136 Aug 2, 2023
10f1bbf
Merge branch 'main' into main
AshutoshSingh72 Aug 2, 2023
6331ecb
Merge pull request #6519 from hassnian/issue-6513
yangwao Aug 2, 2023
17daa94
Merge branch 'main' into main
AshutoshSingh72 Aug 2, 2023
e551e67
Merge branch 'main' into issue-6464
Jarsen136 Aug 3, 2023
741178f
limit NeoModal height
daiagi Aug 3, 2023
b3f1fce
🔧 import
daiagi Aug 3, 2023
bc4e989
🔧 explore item buttons
daiagi Aug 3, 2023
81b16c0
identityItem - add no popover prop
daiagi Aug 3, 2023
fc8e5da
GalleryItemBuy -> toggle cart button
daiagi Aug 3, 2023
33b3fec
clickable props on shopppingCartItemRow
daiagi Aug 3, 2023
56b7fb0
💄 shopping cart modals
daiagi Aug 3, 2023
93ba95d
Merge branch 'main' of https://github.com/kodadot/nft-gallery into fe…
daiagi Aug 3, 2023
f381aa8
reactive tooltip position (fixing code from merge)
daiagi Aug 3, 2023
642b578
build: temporary disable source-map
preschian Aug 3, 2023
2b7391c
feat: transfer page redesign
Jarsen136 Aug 3, 2023
beb817b
fix auto import
daiagi Aug 3, 2023
65b406b
fix: pay link icon
Jarsen136 Aug 3, 2023
81651bc
use store instead of eventBus
daiagi Aug 3, 2023
bc48813
fix royalties display
daiagi Aug 3, 2023
71ca6ca
🔧 incorrect token
daiagi Aug 3, 2023
f2431e7
🔧 overflowing text
daiagi Aug 3, 2023
ba09a2f
💄 shopping cart navbar btn
daiagi Aug 3, 2023
1c9353b
dont open cart from explore
daiagi Aug 3, 2023
93fdd57
fetch balance
daiagi Aug 3, 2023
2a1315e
fetch royalty for explore
daiagi Aug 3, 2023
d7b5598
query recipient
daiagi Aug 3, 2023
4f49597
fetch balance
daiagi Aug 3, 2023
24d70d8
delete a console log
daiagi Aug 3, 2023
01b8450
fix lingering items after logout
daiagi Aug 3, 2023
fd9999d
fix: disabled button
Jarsen136 Aug 3, 2023
4fe03a9
fix: button height
Jarsen136 Aug 3, 2023
0f605f3
#6489 padding (#6493)
prachi00 Aug 3, 2023
cd1c7ab
fix: pnpm install not running
hassnian Aug 4, 2023
3a56e92
implement review
daiagi Aug 4, 2023
bc8c886
Merge branch 'main' of https://github.com/kodadot/nft-gallery into fe…
daiagi Aug 4, 2023
a7d2204
review
daiagi Aug 4, 2023
a3ae08e
[skip ci] updated code diagram
kkukelka Aug 4, 2023
0bac985
fix: transation
Jarsen136 Aug 4, 2023
ff787c3
Merge branch 'main' into issue-6464
Jarsen136 Aug 4, 2023
6f37ee9
Merge pull request #6533 from kodadot/action
yangwao Aug 4, 2023
306fadc
Merge pull request #6523 from kodadot/build/disable-source-maps
yangwao Aug 4, 2023
0035df9
Merge pull request #6531 from hassnian/issue-6428
yangwao Aug 4, 2023
929e3b6
Merge pull request #6501 from kodadot/feat/shopping-cart
yangwao Aug 4, 2023
a923f61
Merge pull request #6486 from Jarsen136/issue-6464
yangwao Aug 4, 2023
44933a7
Delete gh
yangwao Aug 5, 2023
f9f1fae
Delete pulls
yangwao Aug 5, 2023
f737fd2
fix: Change URL slug of blogs Onchain nfts and Dynamic nfts
Jarsen136 Aug 5, 2023
3b47257
fix: Page reload when clicking on view article
Jarsen136 Aug 5, 2023
599567d
added: post content
hassnian Aug 5, 2023
ae593e1
changed alt text
hassnian Aug 5, 2023
bf48ab2
updated: thumbnail image
hassnian Aug 5, 2023
da7ffa1
fix: subtitle
hassnian Aug 5, 2023
24c7799
Merge pull request #6557 from Jarsen136/issue-6556
yangwao Aug 5, 2023
aa792b7
Merge pull request #6560 from hassnian/issue-6558
yangwao Aug 5, 2023
a8fbabe
fix: [Blogpost] The Power of Polkadots Asset Hub: Revolutionising Ass…
Jarsen136 Aug 5, 2023
1647f46
Merge pull request #6521 from AshutoshSingh72/main
yangwao Aug 5, 2023
4d5ddda
fix: Blog title too big with images that have substancial width
Jarsen136 Aug 5, 2023
126f880
Merge branch 'main' into issue-6559
Jarsen136 Aug 5, 2023
4d29125
Merge pull request #6562 from Jarsen136/issue-6559
yangwao Aug 5, 2023
0db1827
changed release branch prod
yangwao Aug 5, 2023
a3aec76
Merge branch 'main' of github.com:kodadot/nft-gallery
yangwao Aug 5, 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/diagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions .github/push_release_old-prod.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
# experimental
# https://github.com/kodadot/nft-gallery/issues/5770

gh pr list -s merged --json url -B main --jq ".[] | .url" | sed 's/^/- /' $1 | awk 'BEGIN{print "copilot:summary \n"}{ print}' $1 | gh pr create -t "release update" -d -H beta -B production -l release --body-file -
3 changes: 1 addition & 2 deletions .github/push_release_production.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
# experimental
# https://github.com/kodadot/nft-gallery/issues/5770

gh pr list -s merged --json url -B main --jq ".[] | .url" | sed 's/^/- /' $1 | awk 'BEGIN{print "copilot:summary \n"}{ print}' $1 | gh pr create -t "release update" -d -H
beta -B production-cf -l release --body-file -
gh pr list -s merged --json url -B main --jq ".[] | .url" | sed 's/^/- /' $1 | awk 'BEGIN{print "copilot:summary \n"}{ print}' $1 | gh pr create -t "release update" -d -H beta -B production -l release --body-file -
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Dockerfile
FROM node:18

RUN npm i -g pnpm
# Set the same pnpm version as the version in the package.json
ENV PNPM_VERSION 8.6.0

RUN npm i -g pnpm@$PNPM_VERSION
WORKDIR /app

COPY . .
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ You'll find our goals for KodaDot upcoming future!
- Read on the ever-evolving states of our [data storage](https://medium.com/kodadot/on-the-past-present-and-future-of-data-storage-at-kodadot-7634a0c32530)
- Read up on our efforts to be a [public good](https://medium.com/kodadot/on-sustaining-open-source-as-a-public-good-a3e8c36e67d6)
- Get a glimpse into our [contributor culture](https://medium.com/kodadot/contributor-culture-at-kodadot-665243d3d6a6)

- Read about [keyboard shortcuts](https://medium.com/@ashutoshrishi844101/quick-guide-for-using-keyboard-shortcuts-on-kodadot-83b427d60145)
# Support KodaDot

#### Please ⭐️ **star** and **share** this repository! This exposes us to other builders and creators in the space.
Expand All @@ -54,3 +54,4 @@ You'll find our goals for KodaDot upcoming future!
- Follow us on [Twitter](https://twitter.com/KodaDot), [Youtube](https://www.youtube.com/channel/UCEULduld5NrqOL49k1KVjoA), [SubStack](https://kodadot.substack.com/) and [Medium](https://blog.kodadot.xyz), [Instagram](https://instagram.com/kodadot.xyz),
- Join our [Telegram KodaDot Ecosystem](https://t.me/kodadot_eco), [Discord](https://discord.gg/u6ymnbz4PR)
- [Pick your T-shirt in KodaDot Swag Shop](https://shop.kodadot.xyz), use voucher `readme100` to get 100% OFF, first 10 redemptions only.

Binary file added assets/empty-cart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/shopping-cart-outline-sharp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/shopping-cart-outline-sharp_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/striked-out-cart-shopping.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/striked-out-cart-shopping_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/token/bsx.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/token/dot.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/token/ksm.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@
:show-label="isMobile"
@closeBurgerMenu="showMobileNavbar" />

<ShoppingCartButton
:show-label="isMobile"
@closeBurgerMenu="showMobileNavbar" />

<template v-if="isMobile">
<template v-if="!account">
<MobileLanguageOption @closeLanguageOption="showMobileNavbar" />
Expand Down Expand Up @@ -204,6 +208,7 @@ import ConnectWalletButton from '@/components/shared/ConnectWalletButton.vue'
import { useIdentityStore } from '@/stores/identity'
import { getChainNameByPrefix } from '@/utils/chain'
import { createVisible, explorerVisible } from '@/utils/config/permision.config'
import ShoppingCartButton from './navbar/ShoppingCartButton.vue'

const { $buefy, $nextTick } = useNuxtApp()
const instance = getCurrentInstance()
Expand Down
83 changes: 83 additions & 0 deletions components/buy/Buy.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<template>
<div>
<ConfirmPurchaseModal @confirm="onConfirm" />
<Loader v-model="isLoading" :status="status" />
</div>
</template>

<script lang="ts" setup>
import { ShoppingActions } from '@/utils/shoppingActions'
import { useShoppingCartStore } from '@/stores/shoppingCart'
import { usePreferencesStore } from '@/stores/preferences'
import { useFiatStore } from '@/stores/fiat'

import { warningMessage } from '@/utils/notification'
import ConfirmPurchaseModal from '@/components/common/confirmPurchaseModal/ConfirmPurchaseModal.vue'
import Loader from '@/components/shared/Loader.vue'
import { TokenToBuy } from '@/composables/transaction/types'
import { ShoppingCartItem } from '@/components/common/shoppingCart/types'
const { urlPrefix } = usePrefix()
const shoppingCartStore = useShoppingCartStore()
const preferencesStore = usePreferencesStore()
const fiatStore = useFiatStore()

const items = computed(() =>
shoppingCartStore.getItemsByPrefix(urlPrefix.value)
)

onMounted(async () => {
if (
fiatStore.getCurrentKSMValue === null ||
fiatStore.getCurrentDOTValue === null ||
fiatStore.getCurrentBSXValue === null
) {
fiatStore.fetchFiatPrice()
}
})

const { transaction, status, isLoading } = useTransaction()
const { $i18n } = useNuxtApp()

const ShoppingCartItemToTokenToBuy = (item: ShoppingCartItem): TokenToBuy => {
return {
currentOwner: item.currentOwner,
price: item.price,
id: item.id,
royalty: item.royalty,
}
}

watchEffect(() => {
if (isLoading.value === false && status.value === 'loader.finalized') {
preferencesStore.setTriggerBuySuccess(true)
shoppingCartStore.clear()
}
})

const onConfirm = () => {
if (preferencesStore.getCompletePurchaseModal.mode === 'shopping-cart') {
handleBuy(items.value.map(ShoppingCartItemToTokenToBuy))
} else {
handleBuy(
ShoppingCartItemToTokenToBuy(
shoppingCartStore.getItemToBuy as ShoppingCartItem
)
)
shoppingCartStore.removeItemToBuy()
}
}

const handleBuy = async (nfts: TokenToBuy | TokenToBuy[]) => {
try {
await transaction({
interaction: ShoppingActions.BUY,
nfts,
urlPrefix: urlPrefix.value,
successMessage: $i18n.t('mint.successNewNfts'),
errorMessage: $i18n.t('transaction.buy.error'),
})
} catch (error) {
warningMessage(error)
}
}
</script>
17 changes: 3 additions & 14 deletions components/collection/activity/events/eventRow/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ import {
Offer,
OfferInteraction,
} from '@/composables/collectionActivity/types'
import { sanitizeIpfsUrl } from '@/utils/ipfs'
import { processSingleMetadata } from '@/utils/cachingStrategy'
import { NFTMetadata } from '@/components/rmrk/service/scheme'
import { parseNftAvatar } from '@/utils/nft'
import { mintInteraction } from '@/composables/collectionActivity/helpers'

export const interactionNameMap = {
Expand Down Expand Up @@ -68,15 +66,6 @@ export const getToAddress = (event: InteractionWithNFT | Offer): string => {
}
return blank
}
export const getNFTAvatar = async (
export const getNFTAvatar = (
event: InteractionWithNFT | Offer
): Promise<string> => {
if (event.nft.meta?.image) {
return sanitizeIpfsUrl(event.nft.meta.image)
} else {
const meta = (await processSingleMetadata(
event.nft.metadata
)) as NFTMetadata
return sanitizeIpfsUrl(meta?.image)
}
}
): Promise<string> => parseNftAvatar(event.nft)
3 changes: 3 additions & 0 deletions components/common/ConnectWallet/WalletAssetIdentity.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
<script setup lang="ts">
import { NeoIcon } from '@kodadot1/brick'
import { useIdentityStore } from '@/stores/identity'
import { useShoppingCartStore } from '@/stores/shoppingCart'
import useIdentity from '@/components/identity/utils/useIdentity'

const identityStore = useIdentityStore()
const shoppingCartStore = useShoppingCartStore()
const { urlPrefix } = usePrefix()
const { toast } = useToast()
const { display, shortenedAddress } = useIdentity({
Expand All @@ -35,5 +37,6 @@ const logout = () => {
identityStore.resetAuth()
sessionStorage.clear()
localStorage.clear()
shoppingCartStore.clear()
}
</script>
16 changes: 15 additions & 1 deletion components/common/ConnectWallet/useConnectWallet.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
import ConnectWalletModal from './ConnectWalletModal.vue'

import { ModalProgrammatic as Modal } from 'buefy'
import { BModalComponent, BModalConfig } from 'buefy/types/components'
export const ConnectWalletModalConfig = {
component: ConnectWalletModal,
canCancel: ['escape', 'outside'],
customClass: 'connect-wallet-modal',
autoFocus: false,
}

export const openConnectWalletModal = (instance) => {
const modal = ref<BModalComponent | null>()

modal.value = Modal.open({
parent: instance?.proxy,
onCancel: () => {
modal.value = null
document.body.classList.remove('is-clipped')
},
...ConnectWalletModalConfig,
} as unknown as BModalConfig)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<template>
<div class="is-flex is-justify-content-space-between">
<div class="is-flex pr-2">
<div>
<BasicImage
:src="avatar"
:alt="nft?.name"
class="border image is-48x48" />
</div>

<div
class="is-flex is-flex-direction-column is-justify-content-space-between ml-4 limit-width">
<div
class="has-text-weight-bold has-text-color line-height-1 no-wrap is-clipped ellipsis">
{{ nft.name }}
</div>
<div class="line-height-1 no-wrap is-clipped ellipsis">
{{ nft.collection?.name || nft.collection.id }}
</div>
</div>
</div>

<div class="is-flex is-align-items-end no-wrap line-height-1">
<CommonTokenMoney :value="nft.price" />
</div>
</div>
</template>

<script setup lang="ts">
import { parseNftAvatar } from '@/utils/nft'
import BasicImage from '@/components/shared/view/BasicImage.vue'
import { ShoppingCartItem } from '../shoppingCart/types'
import CommonTokenMoney from '@/components/shared/CommonTokenMoney.vue'

const avatar = ref<string>()

const props = defineProps<{
nft: ShoppingCartItem
}>()

const getAvatar = async () => {
if (props.nft) {
avatar.value = await parseNftAvatar(props.nft)
}
}

onMounted(() => {
getAvatar()
})
</script>

<style scoped lang="scss">
@import '@/styles/abstracts/variables';

.limit-width {
max-width: 170px;
}

.ellipsis {
text-overflow: ellipsis;
}

.line-height-1 {
line-height: 1;
}
</style>
Loading