Better lock message

pull/1/head
yflory 5 years ago
parent 7bb59b518f
commit e1119290df

@ -458,6 +458,7 @@ define([
setTimeout(function () {
Notifier.notify();
});
return frame;
};
UI.alert = function (msg, cb, opt) {

@ -531,6 +531,9 @@ define([
delete content.locks[id];
}
});
if (content.saveLock && !isUserOnline(content.saveLock)) {
delete content.saveLock;
}
};
var handleAuth = function (obj, send) {
@ -595,9 +598,16 @@ define([
};
// Add a lock
var isLockedModal = {
content: UI.customModal(h('div', [
h('span.fa.fa-spin.fa-spinner'),
"pewpewpew"
]))
var handleLock = function (obj, send) {
if (content.saveLock) {
if (Messages.oo_isLocked) { UI.log(Messages.oo_isLocked); }
if (!isLockedModal.modal) {
isLockedModal.modal = UI.openCustomModal(isLockedModal.content);
}
setTimeout(function () {
handleLock(obj, send);
}, 50);
@ -621,12 +631,18 @@ define([
if (!again) { cpNfInner.offPatchSent(onPatchSent); }
// Answer to our onlyoffice
if (!content.saveLock) {
if (isLockedModal.modal) {
isLockedModal.modal.closeModal();
delete isLockedModal.modal();
}
send({
type: "getLock",
locks: getLock()
});
} else {
if (Messages.oo_isLocked) { UI.log(Messages.oo_isLocked); }
if (!isLockedModal.modal) {
isLockedModal.modal = UI.openCustomModal(isLockedModal.content);
}
setTimeout(function () {
onPatchSent(true);
}, 50);

Loading…
Cancel
Save