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): November 2024 Elderberry 🍇🖤 #11194

Merged
merged 125 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
24b35b3
add(CodeChecker.vue): ensure `p5.min.js` file is in the root directory
hassnian Oct 19, 2024
b955523
add(codeChecker/validate.ts): validate `postMessageKoda` is used
hassnian Oct 19, 2024
08df320
perf(useCollectionForMint): remove fetching of all collection nfts
hassnian Oct 22, 2024
ae9370a
Merge branch 'main' into issue-7298
hassnian Oct 23, 2024
bbc37a6
Merge branch 'main' into issue-7298
hassnian Oct 23, 2024
5822c6c
add: add funds modal without overlap
hassnian Oct 25, 2024
3d8c4d3
ref(useModalManager.ts): move modal set on `onMounted`
hassnian Oct 25, 2024
a47abc7
Merge pull request #11119 from hassnian/issue-cc-0002
vikiival Oct 25, 2024
87ebd22
ref(useCollectionForMint): use `collection.supply` to exclude burned …
hassnian Oct 26, 2024
4c3850b
ref(useCollectionForMint): remove extra map
hassnian Oct 26, 2024
5cfdf06
fix(drops): close mint modal on error
hassnian Oct 26, 2024
84051db
ref(useSubscriptionGraphql.ts): remove `fetchGraphql` util
hassnian Oct 28, 2024
88de79a
Merge branch 'main' into issue-9790-1
hassnian Oct 28, 2024
997ee14
Merge pull request #11168 from hassnian/issue-11166
vikiival Oct 28, 2024
ebbf6c5
add(collectinos): init new edit collection modal
hassnian Oct 28, 2024
5af05ad
Merge pull request #11157 from hassnian/issue-7298
vikiival Oct 28, 2024
b839e6f
Merge pull request #11165 from hassnian/issue-9790-1
vikiival Oct 28, 2024
b90b894
add(collection): edit collection transaction
hassnian Oct 29, 2024
49c6e5e
fix(codeChecker/validate.ts): regex `lastIndex` issue by creating a n…
hassnian Oct 29, 2024
0439e14
Merge pull request #11170 from hassnian/issue-11169
vikiival Oct 29, 2024
c7d369c
add(transactionUpdateCollection.ts): collection banner in metadata
hassnian Oct 30, 2024
193601f
ref(transactionUpdateCollection.ts): one liner
hassnian Oct 30, 2024
3d9ec0c
fix(useTransaction.ts): api param type
hassnian Oct 30, 2024
57c820a
fix(EditModal.vue): disabled computed
hassnian Oct 30, 2024
b1d22cf
add(HeroButtonEditCollection.vue): refresh page on collection data in…
hassnian Oct 30, 2024
cecd403
fix(EditModal.vue): collection max overriden on image upload
hassnian Oct 30, 2024
8ec7cbc
add(HeroButtons.vue): refresh collection metadata
hassnian Oct 30, 2024
ebe3879
Merge branch 'main' into issue-5286-1
hassnian Oct 31, 2024
fea4527
add(EditModal.vue): into translation keys
hassnian Oct 31, 2024
b0b7ce5
Merge branch 'issue-5286-1' of https://github.com/hassnian/nft-galler…
hassnian Oct 31, 2024
5b5f880
add(EditModal.vue): capitalize text
hassnian Oct 31, 2024
dd0d332
add(GalleryItem): set collection metadata
hassnian Nov 1, 2024
0991b28
fix(EditNftModal.vue): disabled computed and attributes updating
hassnian Nov 2, 2024
b7c6d17
add(GalleryItem): refresh page on metadata update
hassnian Nov 2, 2024
a9b7c25
ref(GalleryItemEditNftButton.vue): cleaner code
hassnian Nov 2, 2024
7a873f3
update: edit collection and edit nft sign transaction modal
hassnian Nov 2, 2024
3a47685
fix(EditModal.vue): submit button disabled on image change
hassnian Nov 4, 2024
ececa74
ref(transactionUpdateCollection.ts): update collection max if supply …
hassnian Nov 4, 2024
be4edc9
fix(HeroButtonEditCollection.vue): collection data refresh subscription
hassnian Nov 4, 2024
64c8b89
fix(GalleryItemEditNftButton.vue): invalid metadata case
hassnian Nov 4, 2024
33cc62d
fix(useGalleryItem.ts): refresh token on metdata update
hassnian Nov 4, 2024
01d1051
fix: translation key typo
hassnian Nov 4, 2024
c4bdec1
ref: reuse logo field section
hassnian Nov 4, 2024
d824cc6
ref: add prefix form to common/form
hassnian Nov 5, 2024
509dcdf
ref(EditNftModal.vue): remove required optional hint from label
hassnian Nov 5, 2024
2a7c157
ref(FormLogoField.vue): add `title` and `hint` props
hassnian Nov 5, 2024
ee4728f
fix(CollectionCard.vue): use `banner` metadata field
hassnian Nov 5, 2024
be7198b
fix(transactionUpdateCollection.ts): `unSanitizeIpfsUrl` banner field
hassnian Nov 5, 2024
17809c3
ref: Sonarcloud Remove redundant type alias and replace its occurrenc…
hassnian Nov 5, 2024
01a4280
fix: sonarcloud issues
hassnian Nov 5, 2024
d2aecb8
fix: sonarcloud img alt issue
hassnian Nov 5, 2024
2c0db4c
fix(transaction/types.ts): `UpdateCollection` missing export
hassnian Nov 5, 2024
e8afcb1
ref(EditNftModal.vue): cleaner and more efficient deep clonning
hassnian Nov 5, 2024
d699fba
ref: remove unused `data-testid`
hassnian Nov 5, 2024
3bc2422
ref(GalleryItemEditNftButton.vue): move composable above
hassnian Nov 5, 2024
5ca5ef7
fix(GalleryItemEditNftButton.vue): fetch metadata when nft is provided
hassnian Nov 5, 2024
3084239
ref: remove nullish props from edit modals
hassnian Nov 5, 2024
5635fd2
🔧 action list price is_null
roiLeo Nov 12, 2024
b99f966
fix(massmint): wrong nft `id` value
hassnian Nov 16, 2024
a5115d5
Update ParaSpell to v7.2.0
dudo50 Nov 17, 2024
06a61e0
ref(CollectionCard.vue): use from
hassnian Nov 18, 2024
cb1fbd3
ref(CollectionCard.vue): use `CollectionMetadata` from `hyperdata`
hassnian Nov 18, 2024
9c1706a
Merge branch 'issue-5286-1' of https://github.com/hassnian/nft-galler…
hassnian Nov 18, 2024
e414790
[skip ci] updated code diagram
kkukelka Nov 19, 2024
82b2713
🔧 action list on owned items
roiLeo Nov 19, 2024
cd4997a
add(swaps): item view activity table and ininit modal
hassnian Nov 19, 2024
6751e68
add(swaps): gallery item table image and name
hassnian Nov 20, 2024
00bc6bc
fix(TradeOverviewModal.vue): height modal
hassnian Nov 20, 2024
289e6f4
ref(TradeOverviewModal.vue): restructure file
hassnian Nov 20, 2024
5a9a4dc
add(swaps): `cancel swap` transaction
hassnian Nov 20, 2024
8e73e14
fix(swaps): overview mode not reactive
hassnian Nov 20, 2024
79e8e37
add(swaps): `ACCEPT_SWAP` transaction
hassnian Nov 20, 2024
7685be5
ref(TradeOverviewModal.vue): move `OverviewMode` to utils
hassnian Nov 20, 2024
29a5a47
fix: Remove "every Thursday" from Drops
Jarsen136 Nov 20, 2024
4e693fb
ref(TypeSwap.vue): utils import
hassnian Nov 21, 2024
121ee59
fix(tests/e2e/sidebar.spec.ts): wait for profile pill to load
hassnian Nov 21, 2024
b69af34
fix(tests/e2e/sidebar.spec.ts): `OnRampModal` test id not being passe…
hassnian Nov 21, 2024
a5ef373
fix(Details.vue): utils import
hassnian Nov 21, 2024
3975c7f
fix(tests/e2e/galleryitem.spec.ts): gallery item tab id
hassnian Nov 21, 2024
cee50ac
add(swaps): tab to profile page
hassnian Nov 21, 2024
13ad3e6
fix(profile): tabs responsive width
hassnian Nov 21, 2024
b69f944
fix(profile): show `sort by dopdown` correct tabs
hassnian Nov 21, 2024
8d7da62
Merge pull request #11185 from hassnian/issue-11184
vikiival Nov 21, 2024
316d0a9
Merge branch 'main' into issue-11177
vikiival Nov 21, 2024
e525e0e
fix(profile): reset query params on tab select
hassnian Nov 21, 2024
671180a
🔧 variables prepareListingQuery
roiLeo Nov 21, 2024
a743b7b
➖ console log
roiLeo Nov 21, 2024
9a18b0e
Merge branch 'main' into issue-11131
hassnian Nov 21, 2024
f17fe62
Merge branch 'issue-11131' of https://github.com/hassnian/nft-gallery…
hassnian Nov 21, 2024
4846eb4
add(profile): `swap` event interaction
hassnian Nov 22, 2024
a04f75a
Merge pull request #11178 from hassnian/issue-11177
vikiival Nov 22, 2024
caa4774
Merge pull request #11183 from Jarsen136/issue-11181
vikiival Nov 22, 2024
8821ba3
Merge pull request #11180 from dudo50/main
vikiival Nov 22, 2024
674afef
Merge pull request #11120 from kodadot/action
vikiival Nov 22, 2024
9f41d5f
Merge branch 'main' into fix/actions/list
roiLeo Nov 22, 2024
f1bf71f
🔧 action list remove price filter
roiLeo Nov 22, 2024
86929fc
ref: removed old `offer` interaction
hassnian Nov 23, 2024
eb54f41
Merge branch 'main' into issue-11131
hassnian Nov 23, 2024
9db9aa4
Merge branch 'feature/init/swapLanding' of https://github.com/roiLeo/…
hassnian Nov 23, 2024
8907dc0
fix(GalleryItemEditNftButton.vue): key nft metadata
hassnian Nov 23, 2024
492f13b
ref(transaction): `transactionUpdateCollection` optional update metadata
hassnian Nov 23, 2024
46a84dd
Trigger Build
hassnian Nov 23, 2024
2723532
fix: pnpm-lock.yaml failing build
hassnian Nov 23, 2024
516e3e2
Merge pull request #11176 from roiLeo/fix/actions/list
vikiival Nov 24, 2024
3b977bc
Merge branch 'main' into issue-5286-1
vikiival Nov 24, 2024
33687af
Merge branch 'main' into issue-11131
hassnian Nov 25, 2024
8c378c5
ref: update pnpm-lock.yaml
hassnian Nov 25, 2024
f8fba6a
Revert "ref: update pnpm-lock.yaml"
hassnian Nov 25, 2024
f84802d
ref: update pnpm-lock.yaml
hassnian Nov 25, 2024
da9cd4b
ref: soft update `pnpm-lock.yaml`
hassnian Nov 26, 2024
df25797
Merge pull request #11171 from hassnian/issue-5286-1
vikiival Nov 26, 2024
3de576c
fix(en.json): typo in `confirmPurchase.notEnoughFuns`
hassnian Nov 26, 2024
abcd2ca
ref: remove duplication make util function `estimateTransactionFee`
hassnian Nov 26, 2024
35ea656
fix(massmint): not checking required amount to mint tokens
hassnian Nov 26, 2024
7f6e836
Merge branch 'main' into issue-mm-0001
hassnian Nov 26, 2024
c2ed76b
ref(utils/transactionExecutor.ts): `estimateTransactionFee` to return…
hassnian Nov 27, 2024
85c61a8
Merge branch 'issue-mm-0001' of https://github.com/hassnian/nft-galle…
hassnian Nov 27, 2024
f94648c
Merge branch 'main' into issue-11131
hassnian Nov 27, 2024
9bd70cb
fix(massmint): cancelled transaction showing success notification
hassnian Nov 27, 2024
50f1f41
add(massmint): `metadataDeposit` to needed amount to mint
hassnian Nov 27, 2024
a3d628b
Merge pull request #11191 from hassnian/issue-mm-0002
vikiival Nov 27, 2024
cf5679d
Merge branch 'main' into issue-11131
vikiival Nov 27, 2024
84aea3d
Merge pull request #11182 from hassnian/issue-11131
vikiival Nov 27, 2024
2f214aa
Merge branch 'main' into issue-mm-0001
vikiival Nov 27, 2024
1d9b58c
Merge pull request #11188 from hassnian/issue-mm-0001
vikiival Nov 27, 2024
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.
9 changes: 7 additions & 2 deletions components/codeChecker/CodeChecker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,7 @@ const onFileSelected = async (file: File) => {
clear()
startClock()
selectedFile.value = file
const { indexFile, sketchFile, entries }
= await extractAssetsFromZip(file)
const { indexFile, sketchFile, p5File, entries } = await extractAssetsFromZip(file)

if (!indexFile) {
errorMessage.value = `Index file not found: Please make sure that “index.html” is in the root directory`
Expand All @@ -291,6 +290,12 @@ const onFileSelected = async (file: File) => {
errorMessage.value = `Sketch file not found: ${config.sketchFile}`
return
}

if (!p5File) {
errorMessage.value = `p5 file not found: Please make sure that “p5.min.js” is in the root directory`
return
}

const valid = validate(indexFile.content, sketchFile.content)
if (!valid.isSuccess) {
errorMessage.value = valid.error ?? 'Unknown error'
Expand Down
1 change: 1 addition & 0 deletions components/codeChecker/codechecker.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export default {
iframeId: 'sketch-iframe',
sketchFile: 'sketch.js',
p5File: 'p5.min.js',
p5: 'p5',
maxAllowedLoadTime: 3000, // in ms
varaitionsOptions: [1, 3, 5, 10, 15, 20],
Expand Down
22 changes: 15 additions & 7 deletions components/codeChecker/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,23 +84,29 @@ const calculateCommonPrefix = (filePaths: string[]): string => {
const categorizeFiles = async (
entries: { [key: string]: ZipEntry },
commonPrefix: string,
): Promise<{ htmlFiles: FileEntry[], jsFiles: FileEntry[] }> => {
): Promise<{ htmlFiles: FileEntry[], jsFiles: FileEntry[], p5Files: FileEntry[] }> => {
const htmlFiles: FileEntry[] = []
const jsFiles: FileEntry[] = []
const p5Files: FileEntry[] = []

for (const [path, file] of Object.entries(entries)) {
const adjustedPath = path.replace(commonPrefix, '')
const content = await file.text()
const isJsFile = path.endsWith('.js')

if (path === 'index.html') {
htmlFiles.push({ path: adjustedPath, content })
}
else if (path.endsWith('.js') && !path.includes(config.p5)) {
// allows p5 libraries
else if (path.includes(config.p5) && isJsFile) {
p5Files.push({ path: adjustedPath, content })
}
else if (isJsFile) {
jsFiles.push({ path: adjustedPath, content })
}
}

return { htmlFiles, jsFiles }
return { htmlFiles, jsFiles, p5Files }
}

// exported functions
Expand Down Expand Up @@ -130,6 +136,7 @@ export const extractAssetsFromZip = async (
): Promise<{
indexFile: FileEntry
sketchFile: FileEntry
p5File: FileEntry
entries: { [key: string]: ZipEntry }
jsFiles: FileEntry[]
}> => {
Expand All @@ -138,14 +145,15 @@ export const extractAssetsFromZip = async (

const commonPrefix = calculateCommonPrefix(filePaths)

const { htmlFiles, jsFiles } = await categorizeFiles(entries, commonPrefix)
const sketchFile = jsFiles.find(file =>
file.path.includes(config.sketchFile),
) as FileEntry
const { htmlFiles, jsFiles, p5Files } = await categorizeFiles(entries, commonPrefix)

const sketchFile = jsFiles.find(file => file.path.includes(config.sketchFile)) as FileEntry
const p5File = p5Files.find(file => file.path.includes(config.p5File)) as FileEntry

return {
indexFile: htmlFiles[0],
sketchFile,
p5File,
entries,
jsFiles,
}
Expand Down
6 changes: 4 additions & 2 deletions components/codeChecker/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,16 @@ const constants = {
localP5JsRegex: /<script.*src="(?!http)([^"]*p5[^"]*\.js)"/,
titleTagRegex: /<title>(.*?)<\/title>/,
kodaRendererRegex: /kodahash\/render\/completed/,
kodaRendererCalledRegex: /(?<!function\s)postMessageKoda\s*\(/,
resizerRegex: /resizeCanvas\(/,
disallowedTitle: 'KodaHash',
}

const validateCanvasCreation = (
sketchFileContent: string,
): Result<RegExpExecArray> => {
const canvasMatch = constants.canvasRegex.exec(sketchFileContent)
// Create a new regex instance to avoid issues with lastIndex when using the global flag.
const canvasMatch = new RegExp(constants.canvasRegex).exec(sketchFileContent)
if (!canvasMatch) {
return { isSuccess: false, error: 'createCanvas function not found.' }
}
Expand Down Expand Up @@ -141,7 +143,7 @@ const validateSketchContent = (
canvasSize,
localP5jsUsed: false, // This will be set based on HTML content checks
validTitle: false, // This will be updated after HTML content checks
kodaRendererUsed: constants.kodaRendererRegex.test(sketchFileContent),
kodaRendererUsed: constants.kodaRendererRegex.test(sketchFileContent) && constants.kodaRendererCalledRegex.test(sketchFileContent),
resizerUsed: constants.resizerRegex.test(sketchFileContent),
usesHashParam: validateURLParamsUsage(sketchFileContent).isSuccess,
}
Expand Down
20 changes: 13 additions & 7 deletions components/collection/CollectionCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:to="`/${urlPrefix}/collection/${collection.id}`"
>
<BasicImage
:src="image"
:src="banner"
:alt="collection.name"
:lazy="lazyLoading"
sizes="300px md:350px"
Expand Down Expand Up @@ -40,7 +40,7 @@

<script setup lang="ts">
import { NeoSkeleton } from '@kodadot1/brick'
import type { TokenMetadata } from '@kodadot1/hyperdata'
import type { CollectionMetadata } from '@kodadot1/hyperdata'
import CollectionDetail from './CollectionDetail.vue'
import type { CollectionWithMeta } from '@/types'
import BasicImage from '@/components/shared/view/BasicImage.vue'
Expand All @@ -55,17 +55,21 @@ const props = defineProps<{

const isLoadingMeta = ref(false)
const image = ref('')
const banner = ref('')

const { urlPrefix } = usePrefix()

const getImageFromMetadata = async (collectionMetadata: string) => {
isLoadingMeta.value = true

const metadata = (await processSingleMetadata(
collectionMetadata,
)) as TokenMetadata
const metadata = await processSingleMetadata<CollectionMetadata>(collectionMetadata)

const metadataImage = getCollectionImage(metadata) || ''
const metadataBanner = metadata.banner || metadataImage

image.value = sanitizeIpfsUrl(metadataImage)
banner.value = sanitizeIpfsUrl(metadataBanner)

image.value = sanitizeIpfsUrl(getCollectionImage(metadata) || '')
isLoadingMeta.value = false
}

Expand All @@ -76,9 +80,11 @@ onMounted(async () => {

const meta = props.collection.meta
const metaImage = meta ? getCollectionImage(meta) : undefined
const metaBanner = meta?.banner || metaImage

if (metaImage) {
if (metaImage && metaBanner) {
image.value = sanitizeIpfsUrl(metaImage)
banner.value = sanitizeIpfsUrl(metaBanner)
}
else {
getImageFromMetadata(props.collection.metadata)
Expand Down
20 changes: 20 additions & 0 deletions components/collection/CollectionHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<section class="pt-5">
<div class="container is-fluid">
<CollectionInfo
ref="collectionInfo"
:collection-id="collectionId"
:collection="collection"
/>
Expand All @@ -21,12 +22,31 @@ import { useCollectionMinimal } from '@/components/collection/utils/useCollectio
import CollectionInfo from '@/components/collection/CollectionInfo.vue'
import CollectionBanner from '@/components/collection/CollectionHeader/CollectionBanner.vue'

const collectionInfo = ref()

const { toast } = useToast()
const { $i18n } = useNuxtApp()
const route = useRoute()
const collectionId = computed(() => route.params.id.toString())

const { collection, refetch } = useCollectionMinimal({
collectionId,
})

useSubscriptionGraphql({
query: `
collectionEntity: collectionEntityById(id: "${collectionId.value}") {
max
metadata
}
`,
onChange: () => {
toast($i18n.t('edit.collection.updated'))
refetch()
collectionInfo.value?.refetch()
},
immediate: false,
})

watch(collectionId, () => refetch())
</script>
4 changes: 3 additions & 1 deletion components/collection/CollectionInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ const visibleDescription = computed(() => {
)
})

const { stats } = useCollectionDetails({
const { stats, refetch } = useCollectionDetails({
collectionId: computed(() => props.collectionId),
})

defineExpose({ refetch })
</script>
93 changes: 0 additions & 93 deletions components/collection/CustomizeModal.vue

This file was deleted.

Loading
Loading