mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-27 06:01:54 +03:00
Display warnings when saving draft if another user is editing the page or if the page was updated since the current user has started editing the page.
This commit is contained in:
@ -119,6 +119,9 @@ class PageEditor {
|
||||
}
|
||||
this.draftNotifyChange(`${resp.data.message} ${Dates.utcTimeStampToLocalTime(resp.data.timestamp)}`);
|
||||
this.autoSave.last = Date.now();
|
||||
if (resp.data.warning.length > 0) {
|
||||
window.$events.emit('warning', resp.data.warning);
|
||||
}
|
||||
} catch (err) {
|
||||
// Save the editor content in LocalStorage as a last resort, just in case.
|
||||
try {
|
||||
|
Reference in New Issue
Block a user