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

Commit 2f11f44

Browse files
authored
Merge pull request #800 from kodadot/main
websharing api, unified collection, historychart fix
2 parents b145982 + 0563b4b commit 2f11f44

File tree

3 files changed

+38
-11
lines changed

3 files changed

+38
-11
lines changed

src/components/rmrk/Gallery/CollectionItem.vue

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,20 @@
1919

2020
<div class="columns">
2121
<div class="column">
22-
<p class="subtitle">
23-
Creator <ProfileLink :address="issuer" :inline="true" :showTwitter="true"/>
24-
</p>
25-
<p class="subtitle" v-if="owner">
26-
Owner <ProfileLink :address="owner" :inline="true" />
27-
</p>
22+
<div class="label">
23+
{{ $t('creator') }}
24+
</div>
25+
<div class="subtitle is-size-6">
26+
<ProfileLink :address="issuer" :inline="true" :showTwitter="true"/>
27+
</div>
28+
</div>
29+
<div class="column" v-if="owner">
30+
<div class="label">
31+
{{ $t('owner') }}
32+
</div>
33+
<div class="subtitle">
34+
<ProfileLink :address="owner" :inline="true" />
35+
</div>
2836
</div>
2937
<div class="column is-2">
3038
<Sharing v-if="sharingVisible"

src/components/rmrk/Gallery/History.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,6 @@ export default class History extends Vue {
127127
}
128128
129129
this.data = this.data.reverse();
130-
this.priceData.push([
131-
new Date(),
132-
this.formatPrice(this.data[0]['Amount']),
133-
]);
134130
}
135131
136132
protected parseDate(date: Date) {

src/components/rmrk/Gallery/Item/Sharing.vue

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</b-icon>
1515
</b-button>
1616
</div>
17-
<div class="card-footer-item" v-if="!onlyCopyLink" @click="active = !active" @focusout="active = !active">
17+
<div class="card-footer-item" v-if="!onlyCopyLink" @click="shareTooltip" @focusout="openFallbackShareTooltip">
1818
<b-tooltip
1919
position="is-left"
2020
class="share__tooltip"
@@ -229,6 +229,29 @@ export default class Sharing extends Vue {
229229
public toast(message: string): void {
230230
this.$buefy.toast.open(message);
231231
}
232+
233+
public async shareTooltip() {
234+
this.openFallbackShareTooltip();
235+
if (navigator.share) {
236+
const shareData = {
237+
title: 'KodaDot',
238+
text: this.label,
239+
url: this.realworldFullPath,
240+
};
241+
try {
242+
await navigator.share(shareData);
243+
} catch (err) {
244+
console.error(err);
245+
}
246+
}
247+
}
248+
249+
public openFallbackShareTooltip() {
250+
// only call this when share api is not available, example on web
251+
if (!navigator.share) {
252+
this.active = !this.active;
253+
}
254+
}
232255
}
233256
</script>
234257

0 commit comments

Comments
 (0)