mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
@@ -42,6 +42,7 @@
|
||||
"clipboard": "^2.0.6",
|
||||
"colors": "^1.4.0",
|
||||
"commander": "^6.0.0",
|
||||
"compare-versions": "3.6.0",
|
||||
"compression": "^1.7.4",
|
||||
"connect-ensure-login": "^0.1.1",
|
||||
"connect-flash": "^0.1.1",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
|
||||
define('admin/dashboard', ['semver', 'Chart', 'translator', 'benchpress'], function (semver, Chart, translator, Benchpress) {
|
||||
define('admin/dashboard', ['Chart', 'translator', 'benchpress'], function (Chart, translator, Benchpress) {
|
||||
var Admin = {};
|
||||
var intervals = {
|
||||
rooms: false,
|
||||
|
||||
@@ -128,8 +128,9 @@ define('admin/extend/plugins', ['jqueryui', 'translator', 'benchpress'], functio
|
||||
return bootbox.alert('[[admin/extend/plugins:alert.package-manager-unreachable]]');
|
||||
}
|
||||
|
||||
require(['semver'], function (semver) {
|
||||
if (payload.version !== 'latest' && semver.gt(payload.version, parent.find('.currentVersion').text())) {
|
||||
require(['compare-versions'], function (compareVersions) {
|
||||
var currentVersion = parent.find('.currentVersion').text();
|
||||
if (payload.version !== 'latest' && compareVersions.compare(payload.version, currentVersion, '>')) {
|
||||
upgrade(pluginID, btn, payload.version);
|
||||
} else if (payload.version === 'latest') {
|
||||
confirmInstall(pluginID, function () {
|
||||
|
||||
1046
public/vendor/semver/semver.browser.js
vendored
1046
public/vendor/semver/semver.browser.js
vendored
File diff suppressed because it is too large
Load Diff
@@ -89,7 +89,6 @@ JS.scripts = {
|
||||
'public/vendor/jquery/sortable/Sortable.js',
|
||||
'public/vendor/colorpicker/colorpicker.js',
|
||||
'public/src/admin/admin.js',
|
||||
'public/vendor/semver/semver.browser.js',
|
||||
'public/vendor/jquery/serializeObject/jquery.ba-serializeobject.min.js',
|
||||
'public/vendor/jquery/deserialize/jquery.deserialize.min.js',
|
||||
],
|
||||
@@ -106,6 +105,7 @@ JS.scripts = {
|
||||
'nprogress.js': 'node_modules/nprogress/nprogress.js',
|
||||
'tinycon.js': 'node_modules/tinycon/tinycon.js',
|
||||
'slideout.js': 'node_modules/slideout/dist/slideout.min.js',
|
||||
'compare-versions.js': 'node_modules/compare-versions/index.js',
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user