Skip to content

Commit

Permalink
fix: warp entity metadata in details
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanprobst committed Feb 21, 2024
1 parent 0a4b1e5 commit 0fa351e
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion pages/entities/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const typesById = computed(() => {
</dt>
<dd>
<ul role="list">
<li v-for="(relation, index) of relations" :key="index">
<li v-for="(relation, index) of relations.slice(0, 10)" :key="index">
<NavLink
class="underline decoration-dotted hover:no-underline"
:href="{ path: `/entities/${getUnprefixedId(relation.relationTo)}` }"
Expand All @@ -147,6 +147,29 @@ const typesById = computed(() => {
</span>
</li>
</ul>
<details v-if="relations.length > 10">
<summary class="cursor-pointer py-1 text-sm text-muted-foreground">
Show more
</summary>
<ul role="list">
<li v-for="(relation, index) of relations.slice(10)" :key="index">
<NavLink
class="underline decoration-dotted hover:no-underline"
:href="{ path: `/entities/${getUnprefixedId(relation.relationTo)}` }"
>
{{ relation.label }}
</NavLink>
<span
v-if="
relation.relationSystemClass === 'type' &&
typesById.has(relation.relationTo)
"
>
({{ typesById.get(relation.relationTo)?.hierarchy }})
</span>
</li>
</ul>
</details>
</dd>
</div>
</dl>
Expand Down

0 comments on commit 0fa351e

Please sign in to comment.