From c0fa9903f4ca6a6996c7adefa3476cb66a0174e7 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Thu, 16 Aug 2018 16:54:50 +0200 Subject: [PATCH] Update model directory JS [ci skip] Prevent the default release URL from being overwritten and add license type --- website/_harp.json | 2 +- website/assets/js/models.vue.js | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/website/_harp.json b/website/_harp.json index 58316d681..f866c554d 100644 --- a/website/_harp.json +++ b/website/_harp.json @@ -85,7 +85,7 @@ ], "V_CSS": "2.2.1", - "V_JS": "2.2.3", + "V_JS": "2.2.4", "DEFAULT_SYNTAX": "python", "ANALYTICS": "UA-58931649-1", "MAILCHIMP": { diff --git a/website/assets/js/models.vue.js b/website/assets/js/models.vue.js index abd8cf101..2b5f53973 100644 --- a/website/assets/js/models.vue.js +++ b/website/assets/js/models.vue.js @@ -10,6 +10,7 @@ export default function(repo) { 'CC BY-SA 4.0': 'https://creativecommons.org/licenses/by-sa/4.0/', 'CC BY-NC': 'https://creativecommons.org/licenses/by-nc/3.0/', 'CC BY-NC 3.0': 'https://creativecommons.org/licenses/by-nc/3.0/', + 'CC BY-NC 4.0': 'https://creativecommons.org/licenses/by-nc/4.0/', 'CC-BY-NC-SA 3.0': 'https://creativecommons.org/licenses/by-nc-sa/3.0/', 'GPL': 'https://www.gnu.org/licenses/gpl.html', 'LGPL': 'https://www.gnu.org/licenses/lgpl.html', @@ -33,8 +34,8 @@ export default function(repo) { version: 'n/a', notes: null, sizeFull: null, + fullName: null, pipeline: null, - releaseUrl: null, description: null, license: null, author: null, @@ -61,6 +62,10 @@ export default function(repo) { }, hasAccuracy() { return this.uas || this.las || this.tags_acc || this.ents_f || this.ents_p || this.ents_r; + }, + releaseUrl() { + const baseUrl = `${this.repo}/releases`; + return `${baseUrl}/${this.fullName ? `/tag/${this.fullName}` : ''}` } }, beforeMount() { @@ -78,9 +83,8 @@ export default function(repo) { }, methods: { $_updateData(data) { - const fullName = `${data.lang}_${data.name}-${data.version}`; + this.fullName = `${data.lang}_${data.name}-${data.version}`; this.version = data.version; - this.releaseUrl = `${this.repo}/releases/tag/${fullName}`; this.sizeFull = data.size; this.pipeline = data.pipeline; this.notes = data.notes;