diff --git a/app/config.json b/app/config.json index efd89cb17f9d6bb5f21ecf2d1a6061f051786893..216de473fe58cdd5ad2c663167750d7511bcdb64 100644 --- a/app/config.json +++ b/app/config.json @@ -9,6 +9,7 @@ "timeout": 30000, "timeWarningExpireMembership": 5184000, "timeWarningExpire": 7776000, + "minPeerCountAtStartup": 10, "keepAuthIdle": 600, "useLocalStorage": true, "useRelative": false, @@ -133,19 +134,22 @@ "readonly": false, "fallbackLanguage": "en", "rememberMe": true, - "timeout": 300000, + "showUDHistory": true, + "timeout": 30000, "timeWarningExpireMembership": 5184000, "timeWarningExpire": 7776000, + "minPeerCountAtStartup": 2, "useLocalStorage": true, "useRelative": false, "expertMode": true, "decimalCount": 2, + "httpsMode": false, "shareBaseUrl": "https://g1-test.cesium.app", "helptip": { "enable": false, "installDocUrl": { "fr-FR": "https://duniter.fr/wiki/doc/installer/", - "en": "https://duniter.org/en/wiki/duniter/install/" + "en": "https://duniter.org/wiki/doc/install/" } }, "node": { @@ -154,23 +158,25 @@ }, "fallbackNodes": [ { - "host": "g1-test.cgeek.fr", - "port": 443 + "host": "gt.moul.re", + "port": 10902 }, { - "host": "gtest.jytou.fr", - "port": 443 - }, - { - "host": "ts.gt.elo.tf", + "host": "g1-test.duniter.org", "port": 443 } ], + "developers": [ + {"name": "Benoit Lavenier", "pubkey": "38MEAZN68Pz1DTvT3tqgxx4yQP6snJCQhPqEFxbDk4aE"}, + {"name": "Cédric Moreau", "pubkey": "2ny7YAdmzReQxAayyJZsyVYwYhVyax2thKcGknmQy5nQ"}, + {"name": "Kapis", "pubkey": "24jaf8XhYZyDyUb7hMcy5qsanaHBC11AwPefcCQRBQNA"}, + {"name": "Matograine", "pubkey": "CmFKubyqbmJWbhyH2eEPVSSs4H4NeXGDfrETzEnRFtPd"} + ], "plugins":{ "es": { - "enable": true, - "askEnable": true, - "useRemoteStorage": true, + "enable": false, + "askEnable": false, + "useRemoteStorage": false, "host": "g1-test.data.e-is.pro", "port": 443, "notifications": { diff --git a/gulpfile.js b/gulpfile.js index f738c1d213190956778f13f701bd3b531d34035c..e6f87aec34bcdcf146fa5158ec5b0e9e5390f91a 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -172,6 +172,37 @@ function appConfig() { .pipe(gulp.dest('www/js')); } +function appConfigTest() { + const allConfig = JSON.parse(fs.readFileSync('./app/config.json', 'utf8')); + + // Determine which environment to use when building config. + const env = 'g1-test'; + const config = allConfig[env]; + + if (!config) { + throw new Error(colors.red("=> Could not load `" + env + "` environment!")); + } + + log(colors.green("Building App test config at `www/js/config-test.js` for `" + env + "` environment...")); + + const project = JSON.parse(fs.readFileSync('./package.json', 'utf8')); + config['version'] = project.version; + config['build'] = (new Date()).toJSON(); + config['newIssueUrl'] = project.bugs.new; + + return ngConstant({ + name: 'cesium.config', + constants: {"csConfig": config}, + stream: true, + dest: 'config-test.js' + }) + // Add a warning header + .pipe(header("/******\n* !! WARNING: This is a generated file !!\n*\n* PLEASE DO NOT MODIFY DIRECTLY\n*\n* => Changes should be done on file 'app/config.json'.\n******/\n\n")) + // Writes into file www/js/config-test.js + .pipe(rename('config-test.js')) + .pipe(gulp.dest('www/js')); +} + function appAndPluginLint() { log(colors.green('Linting JS files...')); @@ -1330,6 +1361,7 @@ const appAndPluginSass = gulp.series(appSass, pluginSass); const app = gulp.series(appSass, appNgTemplate, appNgAnnotate, appNgTranslate); const plugin = gulp.series(pluginSass, pluginNgTemplate, pluginNgAnnotate, pluginNgTranslate); const build = gulp.series(appLicense, app, plugin); +const config = gulp.series(appConfig, appConfigTest); const webApp = gulp.series(appSass, webCopyFiles, webNgTemplate, webAppNgAnnotate); const webPlugin = gulp.series(pluginSass, webPluginCopyFiles, webPluginNgTemplate, webPluginNgAnnotate); @@ -1372,6 +1404,7 @@ const webExtBuild = gulp.series( exports.help = help; exports.config = appConfig; +exports.configTest = appConfigTest; exports.license = appLicense; exports.sass = appAndPluginSass; exports.translate = translate; @@ -1415,6 +1448,6 @@ const cdvBeforeCompile = gulp.series( ); exports.cdvBeforeCompile = cdvAsHook(cdvBeforeCompile); -exports.default = gulp.series(appConfig, build); +exports.default = gulp.series(config, build); exports.serveBefore = gulp.series(build, appAndPluginWatch); exports['ionic:serve:before'] = exports.serveBefore; // Alias need by @ionic/cli diff --git a/www/js/config.js b/www/js/config.js index 2b4c3fdb522732ccee7bd16888922f62daf37d6f..8fb81c0b73e945418956657a0ea92f30b1084e29 100644 --- a/www/js/config.js +++ b/www/js/config.js @@ -15,9 +15,10 @@ angular.module("cesium.config", []) "fallbackLanguage": "en", "rememberMe": true, "showUDHistory": true, - "timeout": 40000, + "timeout": 30000, "timeWarningExpireMembership": 5184000, "timeWarningExpire": 7776000, + "minPeerCountAtStartup": 10, "keepAuthIdle": 600, "useLocalStorage": true, "useRelative": false, @@ -47,11 +48,11 @@ angular.module("cesium.config", []) "jsonFeed": { "ca": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-ca.json", "de-DE": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-de-DE.json", - "en": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/draft/feed-en.json", + "en": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-en.json", "en-GB": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-en-GB.json", "eo-EO": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-eo-EO.json", - "es-ES": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/draft/feed-es.json", - "fr-FR": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/draft/feed-fr.json", + "es-ES": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-es-ES.json", + "fr-FR": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-fr.json", "it-IT": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-it-IT.json", "nl-NL": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-nl-NL.json", "pt-PT": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-pt-PT.json" @@ -147,8 +148,8 @@ angular.module("cesium.config", []) } }, "version": "1.7.7", - "build": "2023-08-14T17:05:16.324Z", + "build": "2023-08-17T12:58:05.172Z", "newIssueUrl": "https://git.duniter.org/clients/cesium-grp/cesium/issues/new" }) -; +; \ No newline at end of file diff --git a/www/js/services/settings-services.js b/www/js/services/settings-services.js index d59337abb8d86944d4c03e2ee61013b961d666be..81ceb5e5a25c7c6f9fe0f71d0455895cfa6663dc 100644 --- a/www/js/services/settings-services.js +++ b/www/js/services/settings-services.js @@ -76,7 +76,7 @@ angular.module('cesium.settings.services', ['ngApi', 'cesium.config']) timeWarningExpire: 2592000 * 3 /*=3 mois*/, minVersion: '1.8.0', minVersionAtStartup: '1.8.7', // use for node auto-selection - minPeerCountAtStartup: 10, // use for node auto-selection + minPeerCountAtStartup: 10, // use for node auto-selection (avoid to start if no few peers found) sourceUrl: 'https://git.duniter.org/clients/cesium-grp/cesium', sourceLicenseUrl: 'https://git.duniter.org/clients/cesium-grp/cesium/-/raw/master/LICENSE', newIssueUrl: "https://git.duniter.org/clients/cesium-grp/cesium/issues/new",