|
69 | 69 | <b-skeleton :count="2" size="is-large" :active="isLoading"></b-skeleton> |
70 | 70 | <div class="price-block" v-if="hasPrice"> |
71 | 71 | <div class="label">{{ $t('price') }}</div> |
72 | | - <div class="price-block__original">{{ nft.price | formatBalance(12, 'KSM') }}</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> |
| 75 | + </div> |
73 | 76 | <!--<div class="label price-block__exchange">{{ this.nft.price | formatBalance(12, 'USD') }}</div>--> <!-- // price in USD --> |
74 | 77 | </div> |
75 | 78 |
|
|
82 | 85 | <p class="subtitle"> |
83 | 86 | <Auth /> |
84 | 87 | <AvailableActions |
| 88 | + ref="actions" |
85 | 89 | :accountId="accountId" |
86 | 90 | :currentOwnerId="nft.currentOwner" |
87 | 91 | :price="nft.price" |
@@ -118,7 +122,7 @@ import { NFT, NFTMetadata, Emote } from '../service/scheme'; |
118 | 122 | import { sanitizeIpfsUrl, resolveMedia } from '../utils'; |
119 | 123 | import { emptyObject } from '@/utils/empty'; |
120 | 124 |
|
121 | | -// import AvailableActions from './AvailableActions.vue'; |
| 125 | +import AvailableActions from './AvailableActions.vue'; |
122 | 126 | import { notificationTypes, showNotification } from '@/utils/notification'; |
123 | 127 | // import Money from '@/components/shared/format/Money.vue'; |
124 | 128 | // import/ Sharing from '@/components/rmrk/Gallery/Item/Sharing.vue'; |
@@ -292,6 +296,12 @@ export default class GalleryItem extends Vue { |
292 | 296 | showNotification(`INSTANCE REMOVED`, notificationTypes.warn) |
293 | 297 | } |
294 | 298 | } |
| 299 | +
|
| 300 | + protected handleUnlist() { |
| 301 | + //call unlist function from the AvailableActions component |
| 302 | + (this.$refs.actions as AvailableActions).unlistNft(); |
| 303 | + } |
| 304 | +
|
295 | 305 | } |
296 | 306 | </script> |
297 | 307 |
|
@@ -408,6 +418,12 @@ hr.comment-divider { |
408 | 418 | font-weight: 500; |
409 | 419 | } |
410 | 420 |
|
| 421 | + &__container { |
| 422 | + display: flex; |
| 423 | + justify-content: space-between; |
| 424 | + align-items: center; |
| 425 | + } |
| 426 | +
|
411 | 427 | &__exchange { |
412 | 428 | opacity: .6; |
413 | 429 | color: $dark; |
|
0 commit comments