From 1f3ef7734967cecc6f5206d2b1aaaa84fea35a9c Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 9 Apr 2019 16:29:42 +0200 Subject: [PATCH 1/2] Service workers tests --- www/common/outer/serviceworker.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/www/common/outer/serviceworker.js b/www/common/outer/serviceworker.js index 28f4f0a50..54bfecaf5 100644 --- a/www/common/outer/serviceworker.js +++ b/www/common/outer/serviceworker.js @@ -18,6 +18,9 @@ var debug = function (msg) { console.log(msg); }; var init = function (client, cb) { debug('SW INIT'); + require.config({ + waitSeconds: 600 + }); require(['/api/config?cb=' + (+new Date()).toString(16)], function (ApiConfig) { if (ApiConfig.requireConf) { require.config(ApiConfig.requireConf); } @@ -105,6 +108,7 @@ var init = function (client, cb) { Rpc._subscribeToMessenger(clientId); } if (data && data.state === "ALREADY_INIT") { + self.store = data.returned; return void cb(data.returned); } self.store = data; From 87d9ddc6117daacdf19fbef78c9d3b4b99560b10 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 9 Apr 2019 16:29:52 +0200 Subject: [PATCH 2/2] Add a maintenance page --- config/config.example.js | 3 ++- customize.dist/maintenance.html | 40 +++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 customize.dist/maintenance.html diff --git a/config/config.example.js b/config/config.example.js index 1fae5ae9c..0936576c0 100644 --- a/config/config.example.js +++ b/config/config.example.js @@ -132,7 +132,8 @@ module.exports = { 'contact', 'what-is-cryptpad', 'features', - 'faq' + 'faq', + 'maintenance' ], /* ===================== diff --git a/customize.dist/maintenance.html b/customize.dist/maintenance.html new file mode 100644 index 000000000..6815de38b --- /dev/null +++ b/customize.dist/maintenance.html @@ -0,0 +1,40 @@ + + + + CryptPad: Zero Knowledge, Collaborative Real Time Editing + + + + + + + +

Maintenance

+

We are currently upgrading CryptPad. We will be back shortly!

+