Recreated page navigation buttons.
This commit is contained in:
@@ -64,7 +64,7 @@ export class DocumentHandler {
|
||||
|
||||
handleWebSocketMessage(event: MessageEvent) {
|
||||
const msg = JSON.parse(event.data)
|
||||
if ("error" in msg) {
|
||||
if ('error' in msg) {
|
||||
if (msg.error.code === 401) {
|
||||
this.store.user.isLoggedIn = false
|
||||
this.store.user.isOpenLoginModal = true
|
||||
@@ -72,10 +72,12 @@ export class DocumentHandler {
|
||||
this.store.error = msg.error.message
|
||||
}
|
||||
// The server closes the websocket after errors, so we need to reopen it
|
||||
setTimeout(
|
||||
() => { this.store.wsWatch = createWebSocket(url_document_watch_ws, this.handleWebSocketMessage)},
|
||||
1000
|
||||
)
|
||||
setTimeout(() => {
|
||||
this.store.wsWatch = createWebSocket(
|
||||
url_document_watch_ws,
|
||||
this.handleWebSocketMessage
|
||||
)
|
||||
}, 1000)
|
||||
}
|
||||
switch (true) {
|
||||
case !!msg.root:
|
||||
|
||||
Reference in New Issue
Block a user