Recreated page navigation buttons.

This commit is contained in:
Leo Vasanko
2023-11-04 00:21:35 +00:00
parent 589b21f944
commit 12eabd29c3
73 changed files with 209 additions and 205 deletions

View File

@@ -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: