feature: move docs
This commit is contained in:
@@ -298,6 +298,7 @@
|
||||
|
||||
const currentPath = documentShell ? documentShell.getAttribute("data-document-path") : null;
|
||||
const currentHash = documentShell ? documentShell.getAttribute("data-document-hash") : null;
|
||||
const currentDocumentID = documentShell ? documentShell.getAttribute("data-document-id") : null;
|
||||
const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
|
||||
let reconnectTimer = null;
|
||||
|
||||
@@ -332,6 +333,11 @@
|
||||
|
||||
const change = payload.data;
|
||||
|
||||
if (change.type === "move" && currentDocumentID && change.documentId === currentDocumentID) {
|
||||
window.location.assign("/documents/" + encodeURIComponent(currentDocumentID));
|
||||
return;
|
||||
}
|
||||
|
||||
if (isEditing && currentPath && change.path === currentPath) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user