bump version

This commit is contained in:
yflory 2024-03-26 14:55:27 +01:00
parent 5f10ca4365
commit 0b3e88932c
4 changed files with 13 additions and 5 deletions

View File

@ -5,12 +5,13 @@
define([
'/common/hyperscript.js',
'/common/common-language.js',
'/common/common-util.js',
'/customize/application_config.js',
'/customize/messages.js',
'jquery',
'/api/config',
'optional!/api/instance',
], function (h, Language, AppConfig, Msg, $, ApiConfig, Instance) {
], function (h, Language, Util, AppConfig, Msg, $, ApiConfig, Instance) {
var Pages = {};
Pages.setHTML = function (e, html) {
@ -98,7 +99,8 @@ define([
return h('a', attrs, [icon, text]);
};
Pages.versionString = "5.7.0";
let urlArgs = ApiConfig.requireConf && ApiConfig.requireConf.urlArgs;
Pages.versionString = Util.getVersionFromUrlArgs(urlArgs);
var customURLs = Pages.customURLs = {};
(function () {

View File

@ -1,7 +1,7 @@
{
"name": "cryptpad",
"description": "realtime collaborative visual editor with zero knowledge server",
"version": "5.7.0",
"version": "2024.3.0",
"license": "AGPL-3.0+",
"repository": {
"type": "git",

View File

@ -752,6 +752,13 @@
return [...Array(length).keys()];
};
Util.getVersionFromUrlArgs = urlArgs => {
let arr = /ver=([0-9.]+)(-[0-9]*)?/.exec(urlArgs);
let ver = Array.isArray(arr) && arr[1];
return ver || undefined;
};
if (typeof(module) !== 'undefined' && module.exports) {
module.exports = Util;
} else if ((typeof(define) !== 'undefined' && define !== null) && (define.amd !== null)) {

View File

@ -2228,8 +2228,7 @@ define([
// Check for CryptPad updates
var urlArgs = newUrlArgs || (Config.requireConf ? Config.requireConf.urlArgs : null);
if (!urlArgs) { return; }
var arr = /ver=([0-9.]+)(-[0-9]*)?/.exec(urlArgs);
var ver = arr[1];
let ver = Util.getVersionFromUrlArgs(urlArgs);
if (!ver) { return; }
var verArr = ver.split('.');
//verArr[2] = 0;