Update adminAdapters.js
This commit is contained in:
parent
8bd5d525e8
commit
c93e66565d
@ -396,7 +396,7 @@ function Adapters(main) {
|
||||
for (var o = 0; o < order.length; o++) {
|
||||
var user = that.urls[order[o]].match(/\.com\/([-_$§A-Za-z0-9]+)\/([-._$§A-Za-z0-9]+)\//);
|
||||
if (user && user.length >= 2 && (that.main.config.expertMode || order[o].indexOf('js-controller') === -1)) {
|
||||
text += '<option value="https://github.com/' + user[1] + '/yunkong2.' + order[o] + '/tarball/master ' + order[o] + '">' + order[o] + '</option>';
|
||||
text += '<option value="https://git.spacen.net/' + user[1] + '/yunkong2.' + order[o] + '/tarball/master ' + order[o] + '">' + order[o] + '</option>';
|
||||
}
|
||||
}
|
||||
that.$installDialog.find('#install-github-link').html(text).val(that.main.config.adaptersGithub || '');
|
||||
@ -411,7 +411,7 @@ function Adapters(main) {
|
||||
if (isCustom) {
|
||||
url = that.$installDialog.find('#install-url-link').val();
|
||||
|
||||
if (url.startsWith("http") && url.endsWith(".git") url = "git+" _ url;
|
||||
if (url.startsWith("http") && url.endsWith(".git")) url = "git+" + url;
|
||||
|
||||
debug = that.$installDialog.find('#install-url-debug').prop('checked') ? ' --debug' : '';
|
||||
adapter = '';
|
||||
@ -1478,18 +1478,10 @@ function Adapters(main) {
|
||||
callback(true);
|
||||
}, 10000);
|
||||
|
||||
if (!that.data[adapter].licenseUrl) {
|
||||
that.data[adapter].licenseUrl = 'https://raw.githubusercontent.com/yunkong2/yunkong2.' + (that.data[adapter].name || adapter) + '/master/LICENSE';
|
||||
}
|
||||
if (typeof that.data[adapter].licenseUrl === 'object') {
|
||||
that.data[adapter].licenseUrl = that.data[adapter].licenseUrl[systemLang] || that.data[adapter].licenseUrl.en;
|
||||
}
|
||||
// Workaround
|
||||
// https://github.com/yunkong2/yunkong2.vis/blob/master/LICENSE =>
|
||||
// https://raw.githubusercontent.com/yunkong2/yunkong2.vis/master/LICENSE
|
||||
if (that.data[adapter].licenseUrl.indexOf('github.com') !== -1) {
|
||||
that.data[adapter].licenseUrl = that.data[adapter].licenseUrl.replace('github.com', 'raw.githubusercontent.com').replace('/blob/', '/');
|
||||
}
|
||||
|
||||
|
||||
that.main.socket.emit('httpGet', that.data[adapter].licenseUrl, function (error, response, body) {
|
||||
if (timeout) {
|
||||
|
Loading…
Reference in New Issue
Block a user