From 671c893e8aad9bd2c5634c2f5ed0f451c9a9e93b Mon Sep 17 00:00:00 2001 From: Caleb James DeLisle Date: Mon, 11 Sep 2017 17:52:34 +0200 Subject: [PATCH] Duplicating code like a moron, this should hopefully get fixed later. --- www/code/inner.js | 8 ++++++++ www/slide/inner.js | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/www/code/inner.js b/www/code/inner.js index 488a084e4..53d852ebd 100644 --- a/www/code/inner.js +++ b/www/code/inner.js @@ -571,6 +571,14 @@ define([ cpNfInner = common.startRealtime(config); metadataMgr = cpNfInner.metadataMgr; + cpNfInner.onInfiniteSpinner(function () { + setEditable(false); + Cryptpad.confirm(Messages.realtime_unrecoverableError, function (yes) { + if (!yes) { return; } + common.gotoURL(); + }); + }); + editor.on('change', onLocal); Cryptpad.onLogout(function () { setEditable(false); }); diff --git a/www/slide/inner.js b/www/slide/inner.js index a4eb9bf72..80fb3e02d 100644 --- a/www/slide/inner.js +++ b/www/slide/inner.js @@ -682,6 +682,14 @@ define([ cpNfInner = common.startRealtime(config); metadataMgr = cpNfInner.metadataMgr; + cpNfInner.onInfiniteSpinner(function () { + setEditable(false); + Cryptpad.confirm(Messages.realtime_unrecoverableError, function (yes) { + if (!yes) { return; } + common.gotoURL(); + }); + }); + editor.on('change', onLocal); Cryptpad.onLogout(function () { setEditable(false); });