Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit 059ae5f

Browse files
authored
Merge pull request #115 from kodadot/main
Three items in gallery and new ipfs gateway in links
2 parents c22c183 + 39090bc commit 059ae5f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

dashboard/src/components/rmrk/Gallery/Gallery.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<div>
1515
<div class="columns is-multiline">
1616
<div
17-
class="column is-one-quarter-desktop is-one-third-tablet"
17+
class="column is-4"
1818
v-for="nft in nfts"
1919
:key="nft.id"
2020
>

dashboard/src/components/rmrk/Gallery/GalleryItem.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export default class GalleryItem extends Vue {
154154
...nft,
155155
...meta,
156156
image: sanitizeIpfsUrl(meta.image || ''),
157-
animation_url: sanitizeIpfsUrl(meta.animation_url || '')
157+
animation_url: sanitizeIpfsUrl(meta.animation_url || '', 'pinata')
158158
};
159159
if (this.nft.animation_url) {
160160
const { headers } = await api.head(this.nft.animation_url);

dashboard/src/components/rmrk/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,15 @@ export const fetchRmrkMeta = async (
8282
return emptyObject<CollectionMetadata>();
8383
};
8484

85-
export const sanitizeIpfsUrl = (ipfsUrl: string) => {
85+
export const sanitizeIpfsUrl = (ipfsUrl: string, provider?: string) => {
8686
const rr = /^ipfs:\/\/ipfs/;
8787
if (rr.test(ipfsUrl)) {
88-
return ipfsUrl.replace('ipfs://', 'https://cloudflare-ipfs.com/');
88+
return ipfsUrl.replace('ipfs://', resolveProvider(provider));
8989
}
9090

9191
const r = /^ipfs:\/\//;
9292
if (r.test(ipfsUrl)) {
93-
return ipfsUrl.replace('ipfs://', 'https://cloudflare-ipfs.com/ipfs/');
93+
return ipfsUrl.replace('ipfs://', `${resolveProvider(provider)}ipfs/`);
9494
}
9595

9696
return ipfsUrl;

0 commit comments

Comments
 (0)