Skip to content

Commit

Permalink
πŸ’„ Add title to collector table (#1448)
Browse files Browse the repository at this point in the history
* πŸ’„ Add title to collectorList table

* 🎨 Improve code formatting

* ♻️ Refactor title row using v-for
  • Loading branch information
AuroraHuang22 authored Dec 6, 2023
1 parent bc7c744 commit f9d4313
Showing 1 changed file with 39 additions and 8 deletions.
47 changes: 39 additions & 8 deletions src/components/NFTPage/CollectorList/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,22 @@
<div :class="contentPaddingClass">
<table class="w-full">
<tbody class="w-full">
<tr class="w-full border-b-shade-gray border-b-[1px]">
<td
v-for="(text, index) in tableHeaderItems"
:key="index"
class="py-[8px]"
>
<Label
class="justify-start text-left text-dark-gray text-[12px] font-500"
:text="text"
tag="div"
valign="middle"
align="left"
content-class="whitespace-nowrap"
/>
</td>
</tr>
<NFTPageCollectorListItem
v-for="owner in trimmedItems"
:key="owner.id"
Expand Down Expand Up @@ -42,21 +58,29 @@
<IconPerson />
</template>
</Label>
<Label
class="w-min font-600"
:text="$t('nft_details_page_label_owning')"
preset="h5"
valign="middle"
content-class="whitespace-nowrap text-like-green "
prepend-class="text-like-green"
/>
</div>
<hr class="w-full border-shade-gray" />
</template>
<template #content>
<div class="min-w-[310px]">
<table class="w-full">
<tbody class="w-full">
<tr class="w-full border-b-shade-gray border-b-[1px]">
<td
v-for="(text, index) in tableHeaderItems"
:key="index"
class="py-[8px]"
>
<Label
class="justify-start text-left text-dark-gray text-[12px] font-500"
:text="text"
tag="div"
valign="middle"
align="left"
content-class="whitespace-nowrap"
/>
</td>
</tr>
<NFTPageCollectorListItem
v-for="owner in items"
:key="owner.id"
Expand Down Expand Up @@ -107,6 +131,13 @@ export default {
shouldShowMore() {
return this.items.length > this.trimmedItems.length;
},
tableHeaderItems() {
return [
this.$t('nft_details_page_title_collector'),
this.$t('nft_message_type_generic'),
this.$t('nft_details_page_label_owning'),
];
},
},
};
</script>

0 comments on commit f9d4313

Please sign in to comment.