From b9db79988c7089b314a48393ce7f4504a0d6b6c1 Mon Sep 17 00:00:00 2001 From: axolotle Date: Fri, 4 Jun 2021 10:42:41 +0200 Subject: [PATCH] update card views --- src/components/NodeMap.vue | 8 ++++---- src/components/text/TextCard.vue | 2 +- src/components/text/TextCardBase.vue | 14 ++++---------- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/components/NodeMap.vue b/src/components/NodeMap.vue index c8b93c0..db46abe 100644 --- a/src/components/NodeMap.vue +++ b/src/components/NodeMap.vue @@ -20,7 +20,7 @@ :cx="node.x" :cy="node.y" class="svg-dot-btn" - :class="['svg-dot-btn-' + node.data.variant, { 'origin': node.data.isOrigin }]" + :class="['svg-dot-btn-' + node.data.variant, { 'origin': node.parent === null }]" tabindex="0" @click="onNodeClick(node.data)" @keyup.enter="onNodeClick(node.data)" @@ -45,11 +45,11 @@ @mouseleave="activeNode = null" > {{ toCommaList(activeNode.data.authors) }},
- - + + diff --git a/src/components/text/TextCard.vue b/src/components/text/TextCard.vue index 452d8d5..dc593f2 100644 --- a/src/components/text/TextCard.vue +++ b/src/components/text/TextCard.vue @@ -9,7 +9,7 @@ @click="onChildOpen($event, text.id, child.id)" :active="children.includes(child.id)" :variant="child.variant" > - {{ child.families[0].name }} + {{ $t('variants.' + child.variant) }} diff --git a/src/components/text/TextCardBase.vue b/src/components/text/TextCardBase.vue index 88a3ab3..65df763 100644 --- a/src/components/text/TextCardBase.vue +++ b/src/components/text/TextCardBase.vue @@ -15,7 +15,7 @@ @@ -23,8 +23,8 @@
- - + +
{{ text.edition ? text.edition.name : text.edition }} @@ -36,12 +36,6 @@
-
- 'titre_regular': {{ text.field_titre_regular }} -
-
- 'titre_italique: {{ text.field_titre_italique }} -
'lien_reference': {{ text.lien_reference }}
@@ -126,7 +120,7 @@ export default { created () { if (this.text !== null) return - this.$store.dispatch('GET_TEXT', { id: this.id }).then((text) => { + this.$store.dispatch('GET_NODE', { id: this.id }).then((text) => { this.text = text this.loading = false })