Skip to content

Commit 04cb689

Browse files
committed
added skeleton for item
1 parent 700f77e commit 04cb689

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

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

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
<div class="tile is-6 is-vertical is-parent">
55
<div class="tile is-child box">
66
<b-image
7-
v-if="imageVisible"
7+
v-if="!isLoading && imageVisible"
88
:src="nft.image || require('@/assets/kodadot_logo_v1_transparent_400px.png')"
99
:src-fallback="require('@/assets/kodadot_logo_v1_transparent_400px.png')"
1010
alt="NFT minted image"
1111
ratio="1by1"
1212
></b-image>
13+
<b-skeleton height="524px" size="is-large" :active="isLoading"></b-skeleton>
1314
<MediaResolver v-if="nft.animation_url" :class="{ withPicture: imageVisible }" :src="nft.animation_url" :mimeType="mimeType" />
1415
<Appreciation :accountId="accountId" :currentOwnerId="nft.currentOwner" :nftId="nft.id" />
1516
<div class="card">
@@ -18,13 +19,16 @@
1819
{{ $t('legend')}}
1920
</p>
2021
<p class="subtitle is-size-7">
21-
<b># {{ nftId }}</b>
22+
<b v-if="!isLoading"># {{ nftId }}</b>
23+
<b-skeleton size="is-large" :active="isLoading"></b-skeleton>
2224
<b-tag v-if="nft.price" type="is-dark" size="is-medium">
2325
<Money :value="nft.price" :inline="true" />
2426
</b-tag>
25-
<p class="subtitle is-size-5">
27+
<p v-if="!isLoading"
28+
class="subtitle is-size-5">
2629
{{ nft.description }}
2730
</p>
31+
<b-skeleton count="3" size="is-large" :active="isLoading"></b-skeleton>
2832
</p>
2933
</div>
3034
</div>
@@ -40,7 +44,10 @@
4044
role="button"
4145
aria-controls="contentIdForA11y3">
4246
<p class="card-header-title is-size-1">
43-
{{ nft.name }}
47+
<span v-if="!isLoading">
48+
{{ nft.name }}
49+
</span>
50+
<b-skeleton height="100px" size="is-large" :active="isLoading"></b-skeleton>
4451
</p>
4552
<a class="card-header-icon">
4653
<b-icon
@@ -241,7 +248,7 @@ export default class GalleryItem extends Vue {
241248
private passsword: string = '';
242249
private nft: NFTType = emptyObject<NFTType>();
243250
private imageVisible: boolean = true;
244-
private isLoading: boolean = false;
251+
public isLoading: boolean = true;
245252
246253
@Prop() public value!: any;
247254
@@ -255,8 +262,6 @@ export default class GalleryItem extends Vue {
255262
return;
256263
}
257264
258-
this.isLoading = true;
259-
260265
try {
261266
const nft = await rmrkService.getNFT(this.id);
262267
console.log(nft);

0 commit comments

Comments
 (0)