Skip to content
This repository has been archived by the owner on Jun 26, 2024. It is now read-only.

Commit

Permalink
fix(ui): use term(iri) instead of labels
Browse files Browse the repository at this point in the history
  • Loading branch information
vhf committed Oct 28, 2019
1 parent 532d6d7 commit f5d7272
Show file tree
Hide file tree
Showing 14 changed files with 163 additions and 412 deletions.
9 changes: 2 additions & 7 deletions components/fallback/LinkToIri.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
v-if="path"
:to="{ path: path + (anchor ? `#${anchor}` : ''), params: {} }"
:class="classes">
{{ getTerm(term.value) }}
{{ $getTerm(term) }}
</nuxt-link>
<a
v-else
:href="url"
:class="classes">
{{ getTerm(term.value) }}
{{ $getTerm(term) }}
<span
class="icon is-small"
title="Outgoing link will open in new tab">
Expand All @@ -21,8 +21,6 @@
</template>

<script>
import { term } from '@/libs/utils'
export default {
name: 'LinkToIri',
props: {
Expand Down Expand Up @@ -56,9 +54,6 @@ export default {
url
}
},
methods: {
getTerm: term
},
computed: {
classes () {
return Object.entries(this.linkClass)
Expand Down
15 changes: 8 additions & 7 deletions components/fallback/ObjectDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,13 @@
<span v-else />
</template>
</h1>
<h2 class="subtitle is-6">
Canonical URL: <span class="title-url">{{ iri.value }}</span>
</h2>

<div class="content">
<ul class="goto-nav">
<li>Quick links:</li>
<li><a href="#proposals">Proposals</a></li>
<li><a href="#conversations">Conversation</a></li>
</ul>
Expand All @@ -73,17 +77,14 @@

<template v-if="isClass">
<properties-table
v-if="properties.length"
:properties="properties"
:ontology="ontology"
:structure="structure" />
<template
v-else
<p
v-show="!properties.length"
class="content">
<p>
This class does not have any properties.
</p>
</template>
This class does not have any properties.
</p>
</template>

<template v-else>
Expand Down
7 changes: 6 additions & 1 deletion components/fallback/PouchBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@
title="Class icon"
class="class-box-icon">
<p class="class-box-title">
{{ label }}
<template v-if="type === 'container'">
{{ label }}
</template>
<template v-else>
{{ $getTerm(iri) || label }}
</template>
</p>
<div class="class-box-level">
<div
Expand Down
2 changes: 1 addition & 1 deletion components/fallback/sidenav/ObjectNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
v-show="showPlusSymbol"
class="mdi mdi-plus" />
</span>
{{ tree.label }}
{{ $getTerm(tree.iri) || tree.label }}
</nuxt-link>

<ul
Expand Down
2 changes: 1 addition & 1 deletion components/fallback/sidenav/ObjectTree.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<p class="menu-label">
{{ tree.label }}
{{ $getTerm(tree.iri) || tree.label }}
</p>
<ul
class="menu-list">
Expand Down
2 changes: 1 addition & 1 deletion components/fallback/sidenav/SideNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default {
},
data () {
return {
children: _get(this, '$store.state.graph.structureTree[0].children', [])
children: _get(this, '$store.state.graph.structureTree', [])
}
},
methods: {
Expand Down
Loading

0 comments on commit f5d7272

Please sign in to comment.