Skip to content

Commit

Permalink
Merge pull request #4738 from Jarsen136/issue-4734
Browse files Browse the repository at this point in the history
fix: Description more important than Properties
  • Loading branch information
vikiival committed Jan 17, 2023
2 parents fa55f00 + d24432a commit cb6eda6
Showing 1 changed file with 18 additions and 22 deletions.
40 changes: 18 additions & 22 deletions components/gallery/GalleryItemDescription.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
<template>
<o-tabs v-model="activeTab" expanded content-class="o-tabs__content--fixed">
<!-- description tab -->
<o-tab-item value="0" :label="$t('tabs.description')" class="p-5">
<div class="mb-3 is-flex">
<span class="mr-2">{{ $t('tabs.tabDescription.made') }}:</span>
<nuxt-link
v-if="nft?.issuer"
:to="`/${urlPrefix}/u/${nft?.issuer}`"
class="has-text-link">
<Identity ref="identity" :address="nft?.issuer" />
</nuxt-link>
</div>
<vue-markdown
:source="nftMetadata?.description?.replaceAll('\n', ' \n') || ''"
:style="{ wordBreak: 'break-word' }" />
</o-tab-item>
<!-- properties tab -->
<DisablableTab
value="0"
value="1"
:disabled="propertiesTabDisabled"
:label="$t('tabs.properties')"
:disabled-tooltip="$t('tabs.noPropertiesForNFT')">
Expand All @@ -22,23 +39,6 @@
</o-table>
</DisablableTab>
<!-- description tab -->
<o-tab-item value="1" :label="$t('tabs.description')" class="p-5">
<div class="mb-3 is-flex">
<span class="mr-2">{{ $t('tabs.tabDescription.made') }}:</span>
<nuxt-link
v-if="nft?.issuer"
:to="`/${urlPrefix}/u/${nft?.issuer}`"
class="has-text-link">
<Identity ref="identity" :address="nft?.issuer" />
</nuxt-link>
</div>
<vue-markdown
:source="nftMetadata?.description?.replaceAll('\n', ' \n') || ''"
:style="{ wordBreak: 'break-word' }" />
</o-tab-item>
<!-- details tab -->
<o-tab-item value="2" :label="$t('tabs.details')" class="p-5">
<!-- <div class="is-flex is-justify-content-space-between">
Expand Down Expand Up @@ -113,10 +113,6 @@ const propertiesTabDisabled = computed(() => {
return !nftMetadata.value.attributes?.length
})
watch(propertiesTabDisabled, () => {
activeTab.value = propertiesTabDisabled.value ? '1' : '0'
})
const metadataMimeType = ref('application/json')
const metadataURL = ref('')
Expand Down

0 comments on commit cb6eda6

Please sign in to comment.