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

Commit 7d31859

Browse files
authored
Merge pull request #727 from kodadot/main
Ice Ice baby
2 parents 5fe149a + 420bd98 commit 7d31859

File tree

6 files changed

+70
-29
lines changed

6 files changed

+70
-29
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
**Thank you for your contribution** to the KodaDot NFT gallery.
22
Let's do a quick check before the merge.
3-
Your contribution will be an eternal part of the community codebase
3+
Your contribution will be an eternal part of the community codebase.
4+
5+
### PR type
6+
- [ ] Bugfix
7+
- [ ] Feature
8+
- [ ] Refactoring
49

510
### Before submitting this PR, please make sure:
611
- [ ] Code builds clean without any errors or warnings
712
- [ ] I've merged recent default branch -- **main** and I've no conflicts
8-
- [ ] I didn't break any original functionality
13+
- [ ] I've didn't break any original functionality
14+
- [ ] I've posted screenshot of demonstrated change in this PR
915

1016
### Optional
1117
- [ ] I've tested it on mobile and everything works
18+
- [ ] I found edge cases
1219

13-
### PR type
14-
- [ ] Bugfix
15-
- [ ] Feature
16-
- [ ] Refactoring
17-
18-
### What's new? (maybe part of changelog)
19-
- closes #<issue_number> - <Brief_description_how_you_fixed_it>
20+
### What's new? (may be part of changelog)
21+
- This PR closes #<issue_number> - <Brief_description_how_I've_fixed_it>
2022

21-
### If issue contains bounty label ($,$$,$$$)
22-
- Your KSM address: <Kusama_address>
23+
### If issue had bounty label ($,$$,$$$)
24+
- Fill up your KSM address: https://kodadot.xyz/transfer/?target=<Kusama_Address>
2325

2426
### Community participation
25-
- [ ] Are you at KodaDot Discord? If no, [let's join us - https://discord.gg/35hzy2dXXh](https://discord.gg/35hzy2dXXh)
27+
- [ ] Are you at KodaDot Discord? If not yet, [let's join us - https://discord.gg/35hzy2dXXh](https://discord.gg/35hzy2dXXh)
2628

2729
### Screenshot
28-
- [ ] Whenever your fix will change **something** on UI, a screenshot is more than welcome
30+
- [ ] Whenever my fix has changed **something** on UI, a screenshot for others, is more than welcome
Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
Thank you for your contribution to the KodaDot NFT gallery.
1+
Thank you for your contribution to the KodaDot NFT gallery,
2+
we really appreciate your contribution!
3+
4+
### PR type
5+
- [ ] Bugfix
6+
- [ ] Feature
7+
- [ ] Refactoring
28

39
### Before submitting this PR, please make sure:
410
- [ ] Your code builds clean without any erros or warnigns
@@ -8,14 +14,11 @@ Thank you for your contribution to the KodaDot NFT gallery.
814

915
### Optional
1016
- [ ] You've tested it on mobile
11-
12-
### PR type
13-
- [ ] Bugfix
14-
- [ ] Feature
15-
- [ ] Refactoring
17+
- [ ] Are there any edge cases? Name if any
1618

1719
### What's new? (may be part of changelog)
18-
- closes #<issue_number> - <Brief_description_how_you_fixed_it>
20+
- closes #<issue_number> - <Brief_description_how_you've_fixed_it>
1921

2022
### If issue had bounty label ($,$$,$$$)
21-
- Your KSM address: <Kusama_address>
23+
- Fill up your KSM address: https://kodadot.xyz/transfer/?target=<Kusama_Address>
24+

src/components/rmrk/Gallery/GalleryCard.vue

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="card nft-card">
2+
<div class="card nft-card" :class="{'is-current-owner': accountIsCurrentOwner()}">
33
<LinkResolver class="nft-card__skeleton" :route="type" :param="id" :link="link" tag="div" >
44
<div class="card-image" v-if="image">
55
<span v-if="emoteCount" class="card-image__emotes">
@@ -51,8 +51,9 @@
5151
</template>
5252

5353
<script lang="ts" >
54-
import { Component, Prop, Vue } from 'vue-property-decorator';
54+
import { Component, Prop, Vue, Watch } from 'vue-property-decorator';
5555
import { get, update } from 'idb-keyval';
56+
import shouldUpdate from '@/utils/shouldUpdate';
5657
import { sanitizeIpfsUrl, fetchNFTMetadata, getSanitizer } from '../utils';
5758
import { NFT } from '../service/scheme';
5859
@@ -74,6 +75,7 @@ export default class GalleryCard extends Vue {
7475
@Prop() public imageType!: string;
7576
@Prop() public price!: string;
7677
@Prop() public metadata!: string;
78+
@Prop() public currentOwner!: string;
7779
7880
private placeholder = '/koda300x300.svg';
7981
@@ -86,12 +88,27 @@ export default class GalleryCard extends Vue {
8688
this.title = meta.name
8789
} else {
8890
const m = await fetchNFTMetadata({ metadata: this.metadata } as NFT, getSanitizer(this.metadata, undefined, 'permafrost'))
89-
this.image = getSanitizer(meta.image || '')(meta.image || '')
91+
this.image = getSanitizer(m.image || '')(m.image || '')
9092
this.title = m.name
9193
update(this.metadata, () => m)
9294
}
9395
}
9496
}
97+
98+
@Watch('accountId', { immediate: true })
99+
hasAccount(value: string, oldVal: string) {
100+
if (shouldUpdate(value, oldVal)) {
101+
this.accountIsCurrentOwner();
102+
}
103+
}
104+
105+
get accountId() {
106+
return this.$store.getters.getAuthAddress;
107+
}
108+
109+
public accountIsCurrentOwner() {
110+
return this.accountId === this.currentOwner
111+
}
95112
}
96113
</script>
97114

@@ -103,6 +120,10 @@ export default class GalleryCard extends Vue {
103120
overflow: hidden;
104121
box-shadow: 0px 2px 5px 0.5px #d32e79;
105122
123+
&.is-current-owner {
124+
box-shadow: 0px 2px 5px 0.5px #41b883;
125+
}
126+
106127
.has-text-overflow-ellipsis {
107128
overflow: hidden;
108129
white-space: nowrap;

src/components/rmrk/Gallery/GalleryCardList.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
:type="type"
1111
:link="link"
1212
:metadata="nft.metadata"
13-
:price="nft.price"
13+
:price="nft.price"
1414
:emoteCount="nft.emoteCount"
15+
:currentOwner="nft.currentOwner"
1516
/>
1617
</div>
1718
</div>

src/queries/collectionById.graphql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ query collectionById($id: String!) {
1010
name
1111
price
1212
burned
13+
currentOwner
1314
}
1415
}
1516
}

src/views/OnChainProperty.vue

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,25 @@
44
<b-tooltip class="p-2"
55
:label="icons[index].label"
66
position="is-top"
7-
v-clipboard:copy="icons[index].label"
87
>
98
<b-icon class="property"
9+
v-if="icons[index].icon !== 'twitter'"
1010
:size="icons[index].size"
1111
:pack="icons[index].pack"
1212
:icon="icons[index].icon"
13-
@click.native="toast('Copied to clipboard')"
13+
v-clipboard:copy="icons[index].label"
14+
@click.native="toast('Copied to clipboard')"
1415
>
1516
</b-icon>
16-
</b-tooltip>
17+
<b-icon class="property"
18+
v-else
19+
:size="icons[index].size"
20+
:pack="icons[index].pack"
21+
:icon="icons[index].icon"
22+
@click.native="navigateToTwitter(icons[index].label)"
23+
>
24+
</b-icon>
25+
</b-tooltip>
1726
</span>
1827
</div>
1928
</template>
@@ -119,7 +128,11 @@ export default class OnChainProperty extends Vue{
119128
120129
public toast(message: string): void {
121130
this.$buefy.toast.open(message);
122-
}
131+
}
132+
133+
public navigateToTwitter(handle: string): void {
134+
window.open('https://twitter.com/' + handle.replace(/@/, ''), '_blank');
135+
}
123136
124137
@Watch('legal')
125138
async watchLegal(newLegal: string, oldLegal: string){

0 commit comments

Comments
 (0)