mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 11:26:15 +01:00
refactor: proper websocket message types
This commit is contained in:
@@ -5,6 +5,7 @@ import options from "../services/options.js";
|
||||
import syncService from "../services/sync.js";
|
||||
import { escapeQuotes } from "../services/utils.js";
|
||||
import { Tooltip } from "bootstrap";
|
||||
import { WebSocketMessage } from "@triliumnext/commons";
|
||||
|
||||
const TPL = /*html*/`
|
||||
<div class="sync-status-widget launcher-button">
|
||||
@@ -117,8 +118,7 @@ export default class SyncStatusWidget extends BasicWidget {
|
||||
this.$widget.find(`.sync-status-${className}`).show();
|
||||
}
|
||||
|
||||
// TriliumNextTODO: Use Type Message from "services/ws.ts"
|
||||
processMessage(message: { type: string; lastSyncedPush: number; data: { lastSyncedPush: number } }) {
|
||||
processMessage(message: WebSocketMessage) {
|
||||
if (message.type === "sync-pull-in-progress") {
|
||||
this.syncState = "in-progress";
|
||||
this.lastSyncedPush = message.lastSyncedPush;
|
||||
|
||||
Reference in New Issue
Block a user