Duplicating code like a moron, this should hopefully get fixed later.

This commit is contained in:
Caleb James DeLisle 2017-09-11 17:52:34 +02:00
parent 8d3ebdbaf7
commit 671c893e8a
2 changed files with 16 additions and 0 deletions

View File

@ -571,6 +571,14 @@ define([
cpNfInner = common.startRealtime(config); cpNfInner = common.startRealtime(config);
metadataMgr = cpNfInner.metadataMgr; metadataMgr = cpNfInner.metadataMgr;
cpNfInner.onInfiniteSpinner(function () {
setEditable(false);
Cryptpad.confirm(Messages.realtime_unrecoverableError, function (yes) {
if (!yes) { return; }
common.gotoURL();
});
});
editor.on('change', onLocal); editor.on('change', onLocal);
Cryptpad.onLogout(function () { setEditable(false); }); Cryptpad.onLogout(function () { setEditable(false); });

View File

@ -682,6 +682,14 @@ define([
cpNfInner = common.startRealtime(config); cpNfInner = common.startRealtime(config);
metadataMgr = cpNfInner.metadataMgr; metadataMgr = cpNfInner.metadataMgr;
cpNfInner.onInfiniteSpinner(function () {
setEditable(false);
Cryptpad.confirm(Messages.realtime_unrecoverableError, function (yes) {
if (!yes) { return; }
common.gotoURL();
});
});
editor.on('change', onLocal); editor.on('change', onLocal);
Cryptpad.onLogout(function () { setEditable(false); }); Cryptpad.onLogout(function () { setEditable(false); });