diff --git a/src/assets/connectivity-explorer.scss b/src/assets/connectivity-explorer.scss
new file mode 100644
index 00000000..2ef19b64
--- /dev/null
+++ b/src/assets/connectivity-explorer.scss
@@ -0,0 +1,15 @@
+/*
+ * Common styles for connectivity explorer components
+ */
+
+.id-tag,
+.icon-tag {
+ color: #555;
+ padding: 2px 4px;
+ font-size: .75rem !important;
+}
+
+.id-tag {
+ background: #e0e0e0;
+ border-radius: 4px;
+}
diff --git a/src/components/ConnectivityCard.vue b/src/components/ConnectivityCard.vue
index 1ded1bad..ca48e327 100644
--- a/src/components/ConnectivityCard.vue
+++ b/src/components/ConnectivityCard.vue
@@ -8,7 +8,6 @@
-
{{ field }}:
-
{{ entry[field] }}
+
{{ entry[field] }}
+
+
+
+
+
@@ -76,6 +80,25 @@ export default {
}
return false;
},
+ // Get unique species based on iconClass to avoid duplicates in display,
+ // mainly used for human.
+ uniqueSpecies: function () {
+ if (!Array.isArray(this.entry?.species)) {
+ return [];
+ }
+
+ const seenIconClasses = new Set();
+ return this.entry.species.filter((species) => {
+ if (!species?.iconClass) {
+ return false;
+ }
+ if (seenIconClasses.has(species.iconClass)) {
+ return false;
+ }
+ seenIconClasses.add(species.iconClass);
+ return true;
+ });
+ },
},
methods: {
capitalise: function (text) {
@@ -98,6 +121,8 @@ export default {