Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 dashboard/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ yarn-error.log*
*.njsproj
*.sln
*.sw?

.netlify
.vercel
/test
6 changes: 2 additions & 4 deletions dashboard/src/components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,8 @@
</b-navbar-dropdown> -->
</template>
<template v-slot:end>
<!-- <b-navbar-item>
<LocaleChanger />
</b-navbar-item> -->
<NavbarProfileDropdown />
<LocaleChanger />
<NavbarProfileDropdown />
</template>
</b-navbar>
</template>
Expand Down
3 changes: 2 additions & 1 deletion dashboard/src/components/landing/Landing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,12 @@ export default class Landing extends Vue {
public creators: any = [
'Dx6nVUy6f2znn4ZwNZ3TGbEyUz3FLbCRGQGKAut4LxjCVRs',
'J6mwrrDE5ZywDe8T4mWgsdgHCcrDcrVtoGh37i7PSaZARRs',
'FqCJeGcPidYSsvvmT17fHVaYdE2nXMYgPsBn3CP9gugvZR5',
'DmUVjSi8id22vcH26btyVsVq39p8EVPiepdBEYhzoLL8Qby',
'CxQJNQeowRUJBgUHQpspudWy4BU6Rk2u93yDZEKe6GzcLDe',
'GHuTwhh9txr69tHBM2f1mPE6tWn9XCYKMi3nRNFrYvGv9Yy',
'CuHWHNcBt3ASMVSJmcJyiBWGxxiWLyjYoYbGjfhL4ovoeSd',
'HtRTwHSP6fYC5PtCsJ7pG4H1hwyPhzXbtVTTVRJ6kvfPFe1',
'F87P5Ab1QFq68a2tCq2N7TSmkfDUtG7EYUecgSBaYRFeCnf',
'Cu7QaEnRGPE91WvLduzUii2ZNa3jhMWtmB8SYwumycNRmoN'
]

Expand Down
21 changes: 13 additions & 8 deletions dashboard/src/components/rmrk/Gallery/Item/Facts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
</p>
<ArweaveLink v-if="nft.imageArId" :id="nft.imageArId" label="image" />
<ArweaveLink v-if="nft.animationArId" :id="nft.animationArId" label="animated" />
<p class="subtitle is-size-6">
<b>IPFS</b>: {{ multimediaCid }}
<ol v-if="showGwLinks">
<p v-if="imageId" class="subtitle is-size-6" >
<b>IPFS</b>:
<ol>
<li v-for="gw in gwList"
:key="gw">
<a :href="gw+multimediaCid" target="_blank">Gateway</a>
<a :href="gw+imageId" target="_blank">Gateway</a>
</li>
</ol>
</p>
Expand All @@ -55,7 +55,7 @@ const components = {
@Component({ components })
export default class Facts extends Vue {
@Prop({ default: () => emptyObject<NFTWithMeta>() }) public nft!: NFTWithMeta;
public multimediaCid: string = 'IPFS Gateways';
public multimediaCid: string = '';
public showGwLinks: boolean = false;
public gwList: any = [
'https://gateway.pinata.cloud/ipfs/',
Expand All @@ -66,9 +66,14 @@ export default class Facts extends Vue {
];


public async created() {
this.multimediaCid = await extractCid(this.nft && this.nft.image);
this.showGwLinks = true;
get imageId() {
return extractCid(this.nft.image);
}

// public created() {
// console.log(this.nft)
// this.multimediaCid = extractCid(this.nft.image);
// this.showGwLinks = true;
// }
}
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ export default class NavbarProfileDropdown extends Vue {
}

&__avatar-icon {
cursor: pointer;

@include until($desktop) {
padding-right: 0.75rem;
}
Expand All @@ -115,7 +117,7 @@ export default class NavbarProfileDropdown extends Vue {
padding: 0.5rem 0.75rem;

@include from($desktop) {
padding-right: 0;
padding: 0.5rem 0;
}

&.is-text {
Expand Down
6 changes: 3 additions & 3 deletions dashboard/src/components/rmrk/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ import { NFTMetadata, Collection, PackMetadata, NFT, NFTWithMeta } from './servi
export const SQUARE = '::'
export const DEFAULT_IPFS_PROVIDER = 'https://ipfs.io/';

export type ProviderKeyType = 'pinata' | 'cloudflare' | 'ipfs' | 'dweb' | ''
export type ProviderKeyType = 'pinata' | 'cloudflare' | 'ipfs' | 'dweb' | 'kodadot'

export const ipfsProviders: Record<ProviderKeyType, string> = {
pinata: 'https://gateway.pinata.cloud/',
cloudflare: 'https://cloudflare-ipfs.com/',
ipfs: DEFAULT_IPFS_PROVIDER,
dweb: 'https://dweb.link/',
'': 'https://gateway.pinata.cloud/'
kodadot: 'https://kodadot.mypinata.cloud/',
}

const resolveProvider = (key?: ProviderKeyType) => ipfsProviders[key || '']
const resolveProvider = (key: ProviderKeyType = 'kodadot') => ipfsProviders[key]

export const zip = <T1, T2, T3>(a: T1[], b: T2[], cb?: (el: (T1 | T2)[]) => T3): T3[] | (T1 | T2)[][] => {
const res = a.map((k, i) => [k, b[i]]);
Expand Down
10 changes: 10 additions & 0 deletions dashboard/src/components/shared/Avatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
:size="size"
:theme="'polkadot'"
:value="value"
class="avatar"
/>
</template>

Expand All @@ -19,3 +20,12 @@ export default class Avatar extends Vue {
@Prop({ default: 64 }) public size!: number;
}
</script>

<style lang="scss">
.avatar {
& > div {
display: flex;
align-items: center;
}
}
</style>
28 changes: 17 additions & 11 deletions dashboard/src/components/shared/SwitchLocale.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<template>
<b-select
placeholder="Language"
icon="language"
icon-pack="fas"
v-model="userLang"
<div class="language-switcher">
<b-select
placeholder="Language"
v-model="userLang"
>
<option
v-for="(lang, i) in langsFlags"
:key="`Lang${i}`"
:value="lang[0]">{{ lang[1] }}
</option>
</b-select>
<option
v-for="(lang, i) in langsFlags"
:key="`Lang${i}`"
:value="lang[0]">{{ lang[1] }}
</option>
</b-select>
</div>
</template>

<script lang="ts" >
Expand All @@ -35,3 +35,9 @@ set userLang(value) {

}
</script>

<style lang="scss" scoped>
.language-switcher {
padding: 0 12px;
}
</style>