Update model directory JS [ci skip]

Prevent the default release URL from being overwritten and add license type
This commit is contained in:
Ines Montani 2018-08-16 16:54:50 +02:00
parent fd9d175a53
commit c0fa9903f4
2 changed files with 8 additions and 4 deletions

View File

@ -85,7 +85,7 @@
], ],
"V_CSS": "2.2.1", "V_CSS": "2.2.1",
"V_JS": "2.2.3", "V_JS": "2.2.4",
"DEFAULT_SYNTAX": "python", "DEFAULT_SYNTAX": "python",
"ANALYTICS": "UA-58931649-1", "ANALYTICS": "UA-58931649-1",
"MAILCHIMP": { "MAILCHIMP": {

View File

@ -10,6 +10,7 @@ export default function(repo) {
'CC BY-SA 4.0': 'https://creativecommons.org/licenses/by-sa/4.0/', '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': 'https://creativecommons.org/licenses/by-nc/3.0/',
'CC BY-NC 3.0': '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/', 'CC-BY-NC-SA 3.0': 'https://creativecommons.org/licenses/by-nc-sa/3.0/',
'GPL': 'https://www.gnu.org/licenses/gpl.html', 'GPL': 'https://www.gnu.org/licenses/gpl.html',
'LGPL': 'https://www.gnu.org/licenses/lgpl.html', 'LGPL': 'https://www.gnu.org/licenses/lgpl.html',
@ -33,8 +34,8 @@ export default function(repo) {
version: 'n/a', version: 'n/a',
notes: null, notes: null,
sizeFull: null, sizeFull: null,
fullName: null,
pipeline: null, pipeline: null,
releaseUrl: null,
description: null, description: null,
license: null, license: null,
author: null, author: null,
@ -61,6 +62,10 @@ export default function(repo) {
}, },
hasAccuracy() { hasAccuracy() {
return this.uas || this.las || this.tags_acc || this.ents_f || this.ents_p || this.ents_r; 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() { beforeMount() {
@ -78,9 +83,8 @@ export default function(repo) {
}, },
methods: { methods: {
$_updateData(data) { $_updateData(data) {
const fullName = `${data.lang}_${data.name}-${data.version}`; this.fullName = `${data.lang}_${data.name}-${data.version}`;
this.version = data.version; this.version = data.version;
this.releaseUrl = `${this.repo}/releases/tag/${fullName}`;
this.sizeFull = data.size; this.sizeFull = data.size;
this.pipeline = data.pipeline; this.pipeline = data.pipeline;
this.notes = data.notes; this.notes = data.notes;