|
1 | 1 | <template> |
2 | 2 | <section class="wrapper no-padding-desktop gallery-item"> |
3 | | - |
4 | | - <b-message type="is-primary" v-if="message"> |
5 | | - <div class="columns"> |
| 3 | + <b-message type="is-primary" v-if="message"> |
| 4 | + <div class="columns"> |
6 | 5 | <div class="column is-four-fifths"> |
7 | | - <p class="title is-3 has-text-black">{{ $t('mint.success') }} 🎉</p> |
8 | | - <p class="subtitle is-size-5 has-text-black">{{ $t('mint.shareWithFriends', [nft.name]) }} △</p> |
| 6 | + <p class="title is-3 has-text-black">{{ $t('mint.success') }} 🎉</p> |
| 7 | + <p class="subtitle is-size-5 has-text-black">{{ $t('mint.shareWithFriends', [nft.name]) }} △</p> |
9 | 8 | </div> |
10 | 9 | <div class="column"> |
11 | | - <Sharing onlyCopyLink/> |
12 | | - </div> |
| 10 | + <Sharing onlyCopyLink/> |
13 | 11 | </div> |
14 | | - |
15 | | - </b-message> |
16 | | - <div class="columns"> |
17 | | - <div class="image-wrapper"> |
18 | | - <button id="theatre-view" @click="toggleView" v-if="!isLoading && imageVisible">{{ viewMode === 'default' ? $t('theatre') : $t('default') }} {{$t('view')}}</button> |
19 | | - <div class="column" :class="{ 'is-12 is-theatre': viewMode === 'theatre', 'is-6 is-offset-3': viewMode === 'default'}"> |
20 | | - <div v-orientation="viewMode === 'default' && !isFullScreenView && imageVisible" class="image-preview has-text-centered" :class="{fullscreen: isFullScreenView}"> |
21 | | - <b-image |
22 | | - v-if="!isLoading && imageVisible && !meta.animation_url" |
23 | | - :src="meta.image || '/placeholder.svg'" |
24 | | - src-fallback="/placeholder.svg'" |
25 | | - alt="KodaDot NFT minted multimedia" |
26 | | - ratio="1by1" |
27 | | - @error="onImageError" |
28 | | - ></b-image> |
29 | | - <img class="fullscreen-image" :src="meta.image || '/placeholder.svg'" alt="KodaDot NFT minted multimedia"> |
30 | | - <b-skeleton height="524px" size="is-large" :active="isLoading"></b-skeleton> |
31 | | - <MediaResolver v-if="meta.animation_url" :class="{ withPicture: imageVisible }" :src="meta.animation_url" :mimeType="mimeType" /> |
32 | | - </div> |
33 | | - </div> |
34 | | - <button id="fullscreen-view" @keyup.esc="minimize" @click="toggleFullScreen" v-if="!isLoading && imageVisible" :class="{fullscreen: isFullScreenView}"> |
35 | | - <b-icon |
36 | | - :icon="isFullScreenView ? 'compress-alt' : 'arrows-alt'" |
37 | | - > |
38 | | - </b-icon> |
39 | | - </button> |
40 | | - </div> |
41 | 12 | </div> |
| 13 | + </b-message> |
| 14 | + |
| 15 | + <div class="columns"> |
| 16 | + <div class="image-wrapper"> |
| 17 | + <button id="theatre-view" @click="toggleView" v-if="!isLoading && imageVisible">{{ viewMode === 'default' ? $t('theatre') : $t('default') }} {{$t('view')}}</button> |
| 18 | + <div class="column" :class="{ 'is-12 is-theatre': viewMode === 'theatre', 'is-6 is-offset-3': viewMode === 'default'}"> |
| 19 | + <div v-orientation="viewMode === 'default' && !isFullScreenView && imageVisible" class="image-preview has-text-centered" :class="{fullscreen: isFullScreenView}"> |
| 20 | + <b-image |
| 21 | + v-if="!isLoading && imageVisible && !meta.animation_url" |
| 22 | + :src="meta.image || '/placeholder.svg'" |
| 23 | + src-fallback="/placeholder.svg'" |
| 24 | + alt="KodaDot NFT minted multimedia" |
| 25 | + ratio="1by1" |
| 26 | + @error="onImageError" |
| 27 | + ></b-image> |
| 28 | + <img class="fullscreen-image" :src="meta.image || '/placeholder.svg'" alt="KodaDot NFT minted multimedia"> |
| 29 | + <b-skeleton height="524px" size="is-large" :active="isLoading"></b-skeleton> |
| 30 | + <MediaResolver v-if="meta.animation_url" :class="{ withPicture: imageVisible }" :src="meta.animation_url" :mimeType="mimeType" /> |
| 31 | + </div> |
| 32 | + </div> |
| 33 | + <button id="fullscreen-view" @keyup.esc="minimize" @click="toggleFullScreen" v-if="!isLoading && imageVisible" :class="{fullscreen: isFullScreenView}"> |
| 34 | + <b-icon |
| 35 | + :icon="isFullScreenView ? 'compress-alt' : 'arrows-alt'" |
| 36 | + > |
| 37 | + </b-icon> |
| 38 | + </button> |
| 39 | + </div> |
| 40 | + </div> |
| 41 | + |
| 42 | + <div class="columns"> |
| 43 | + <div class="column is-6"> |
| 44 | + <Appreciation |
| 45 | + :emotes="nft.emotes" |
| 46 | + :accountId="accountId" |
| 47 | + :currentOwnerId="nft.currentOwner" |
| 48 | + :nftId="nft.id" |
| 49 | + :burned="nft.burned" |
| 50 | + /> |
| 51 | + <div class="nft-title"> |
| 52 | + <Name :nft="nft" :isLoading="isLoading" /> |
| 53 | + </div> |
42 | 54 |
|
43 | | - <div class="columns"> |
44 | | - <div class="column is-6"> |
45 | | - <Appreciation |
46 | | - :emotes="nft.emotes" |
47 | | - :accountId="accountId" |
48 | | - :currentOwnerId="nft.currentOwner" |
49 | | - :nftId="nft.id" |
50 | | - :burned="nft.burned" |
51 | | - /> |
52 | | - <div class="nft-title"> |
53 | | - <Name :nft="nft" :isLoading="isLoading" /> |
54 | | - </div> |
55 | | - |
56 | | - <div v-if="meta.description" class="block"> |
57 | | - <p class="label">{{ $t('legend')}}</p> |
58 | | - <VueMarkdown v-if="!isLoading" class="is-size-5" :source="meta.description.replaceAll('\n', ' \n')" /> |
59 | | - <b-skeleton :count="3" size="is-large" :active="isLoading"></b-skeleton> |
60 | | - </div> |
61 | | - |
62 | | - <History v-if="!isLoading" :events="nft.events"/> |
| 55 | + <div v-if="meta.description" class="block"> |
| 56 | + <p class="label">{{ $t('legend')}}</p> |
| 57 | + <VueMarkdown v-if="!isLoading" class="is-size-5" :source="meta.description.replaceAll('\n', ' \n')" /> |
| 58 | + <b-skeleton :count="3" size="is-large" :active="isLoading"></b-skeleton> |
63 | 59 | </div> |
64 | 60 |
|
65 | | - <div class="column is-3 is-offset-3" v-if="detailVisible"> |
66 | | - <b-skeleton :count="2" size="is-large" :active="isLoading"></b-skeleton> |
| 61 | + </div> |
67 | 62 |
|
68 | | - <Sharing class="mb-4" /> |
| 63 | + <div class="column is-6" v-if="detailVisible"> |
| 64 | + <b-skeleton :count="2" size="is-large" :active="isLoading"></b-skeleton> |
69 | 65 |
|
70 | | - <div class="price-block mb-4" v-if="hasPrice"> |
71 | | - <div class="label">{{ $t('price') }}</div> |
72 | | - <div class="price-block__container"> |
73 | | - <div class="price-block__original">{{ nft.price | formatBalance(12, 'KSM') }}</div> |
74 | | - <b-button v-if="nft.currentOwner === accountId" type="is-warning" outlined @click="handleUnlist">{{ $t('Unlist') }}</b-button> |
| 66 | + <div class="columns"> |
| 67 | + <div class="column"> |
| 68 | + <div class="nft-title"> |
| 69 | + <Detail :nft="nft" :isLoading="isLoading"/> |
75 | 70 | </div> |
76 | | - <!--<div class="label price-block__exchange">{{ this.nft.price | formatBalance(12, 'USD') }}</div>--> <!-- // price in USD --> |
77 | 71 | </div> |
78 | | - |
79 | | - <template v-if="detailVisible && !nft.burned"> |
80 | | - <!-- <PackSaver v-if="accountId" :accountId="accountId" :currentOwnerId="nft.currentOwner" :nftId="nft.id" /> --> |
81 | | - <div class="card mb-4" aria-id="contentIdForA11y3"> |
| 72 | + <div class="column is-flex is-flex-direction-column is-justify-content-space-between"> |
| 73 | + <div |
| 74 | + class="card mb-4" |
| 75 | + aria-id="contentIdForA11y3" |
| 76 | + > |
82 | 77 | <div class="card-content"> |
83 | | - <div class="label ">{{ $t('actions') }}</div> |
84 | | - <div class="content"> |
85 | | - <p class="subtitle"> |
86 | | - <Auth /> |
87 | | - <IndexerGuard showMessage> |
88 | | - <AvailableActions |
| 78 | + <template v-if="hasPrice"> |
| 79 | + <div class="label"> |
| 80 | + {{ $t('price') }} |
| 81 | + </div> |
| 82 | + <div class="price-block__container"> |
| 83 | + <div class="price-block__original"> |
| 84 | + {{ nft.price | formatBalance(12, 'KSM') }} |
| 85 | + </div> |
| 86 | + <b-button |
| 87 | + v-if="nft.currentOwner === accountId" |
| 88 | + type="is-warning" |
| 89 | + outlined |
| 90 | + @click="handleUnlist" |
| 91 | + > |
| 92 | + {{ $t('Unlist') }} |
| 93 | + </b-button> |
| 94 | + </div> |
| 95 | + </template> |
| 96 | + |
| 97 | + <div class="content pt-4"> |
| 98 | + <p class="subtitle"> |
| 99 | + <IndexerGuard show-message class="pb-4"> |
| 100 | + <AvailableActions |
89 | 101 | ref="actions" |
90 | | - :accountId="accountId" |
91 | | - :currentOwnerId="nft.currentOwner" |
| 102 | + :account-id="accountId" |
| 103 | + :current-owner-id="nft.currentOwner" |
92 | 104 | :price="nft.price" |
93 | | - :nftId="nft.id" |
94 | | - :ipfsHashes="[nft.image, nft.animation_url, nft.metadata]" |
| 105 | + :nft-id="nft.id" |
| 106 | + :ipfs-hashes="[nft.image, nft.animation_url, nft.metadata]" |
95 | 107 | @change="handleAction" |
96 | | - /> |
97 | | - </IndexerGuard> |
98 | | - </p> |
99 | | - </div> |
| 108 | + /> |
| 109 | + </IndexerGuard> |
| 110 | + <Auth /> |
| 111 | + </p> |
100 | 112 | </div> |
101 | | - </div> |
102 | | - </template> |
103 | 113 |
|
104 | | - <template v-if="detailVisible"> |
105 | | - <Facts :nft="nft" :meta="meta" /> |
106 | | - </template> |
| 114 | + <Sharing class="mb-4" /> |
| 115 | + </div> |
| 116 | + </div> |
| 117 | + </div> |
107 | 118 | </div> |
108 | | - </div> |
109 | 119 |
|
110 | | - <!-- <hr class="comment-divider" /> |
111 | | - <BaseCommentSection :nft="nft" :meta="meta" /> --> |
| 120 | + <Facts :nft="nft" :meta="meta" /> |
| 121 | + </div> |
| 122 | + </div> |
112 | 123 |
|
| 124 | + <div class="columns"> |
| 125 | + <div class="column"> |
| 126 | + <History v-if="!isLoading" :events="nft.events"/> |
| 127 | + </div> |
| 128 | + </div> |
113 | 129 | </section> |
114 | 130 | </template> |
115 | 131 |
|
@@ -168,7 +184,8 @@ import Orientation from '@/directives/DeviceOrientation' |
168 | 184 | MediaResolver: () => import('../Media/MediaResolver.vue'), |
169 | 185 | // PackSaver: () => import('../Pack/PackSaver.vue'), |
170 | 186 | IndexerGuard: () => import('@/components/shared/wrapper/IndexerGuard.vue'), |
171 | | - VueMarkdown: () => import('vue-markdown-render') |
| 187 | + VueMarkdown: () => import('vue-markdown-render'), |
| 188 | + Detail: () => import('@/components/rmrk/Gallery/Item/Detail.vue'), |
172 | 189 | }, |
173 | 190 | directives: { |
174 | 191 | orientation: Orientation |
|
0 commit comments