Skip to content

Commit 6bdf18f

Browse files
committed
skeleton for gallery card item
1 parent 04cb689 commit 6bdf18f

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

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

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<template>
22
<div>
3-
<b-loading is-full-page v-model="isLoading" :can-cancel="true"></b-loading>
43
<!-- <b-field label="Owners">
54
<b-select
65
placeholder="Select an owner"
@@ -22,7 +21,12 @@
2221
<div class="card nft-card">
2322
<router-link :to="{ name: 'nftDetail', params: { id: nft.id }}" tag="div" class="nft-card__skeleton">
2423
<div class="card-image" v-if="nft.image">
24+
<b-skeleton
25+
height="240px"
26+
:active="isLoading">
27+
</b-skeleton>
2528
<b-image
29+
v-if="!isLoading"
2630
:src="nft.image"
2731
:src-fallback="require('@/utils/placeholder.png')"
2832
alt="Simple image"
@@ -39,9 +43,16 @@
3943
</div>
4044

4145
<div class="card-content">
42-
<p class="title is-4">
43-
<router-link :to="{ name: 'nftDetail', params: { id: nft.id }}">{{ nft.name }}</router-link></p>
44-
<!-- <p class="subtitle is-6">{{ nft.collection }}</p> -->
46+
<p
47+
v-if="!isLoading"
48+
class="title is-4">
49+
<router-link :to="{ name: 'nftDetail', params: { id: nft.id }}">
50+
{{ nft.name }}
51+
</router-link>
52+
</p>
53+
<b-skeleton
54+
:active="isLoading">
55+
</b-skeleton>
4556
</div>
4657
</router-link>
4758
</div>
@@ -64,8 +75,7 @@ const nftSort = (a: any, b: any) => b._mod - a._mod
6475
@Component({})
6576
export default class Gallery extends Vue {
6677
private nfts: NFTType[] = [];
67-
68-
private isLoading: boolean = false;
78+
private isLoading: boolean = true;
6979
7080
public async mounted() {
7181
const rmrkService = getInstance();
@@ -74,8 +84,6 @@ export default class Gallery extends Vue {
7484
return;
7585
}
7686
77-
this.isLoading = true;
78-
7987
try {
8088
this.nfts = await rmrkService.getAllNFTs().then(arr => arr.slice().sort(nftSort));
8189
this.collectionMeta();

0 commit comments

Comments
 (0)