Distinguish between status messages and resource messages in SSE
This commit is contained in:
parent
38359e20e9
commit
52c41e29d8
14 changed files with 106 additions and 41 deletions
|
|
@ -211,7 +211,7 @@
|
|||
import { ref, reactive, onMounted, onBeforeUnmount, nextTick } from "vue";
|
||||
import { Tooltip, Popover } from "bootstrap";
|
||||
import NavigationLink from "@/components/common/NavigationLink.vue";
|
||||
import { SSEManager, type SSEMessage } from "@/SSEManager";
|
||||
import { SSEManager, type SSEMessageResource } from "@/SSEManager";
|
||||
import { useSessionStore } from "@/store/session";
|
||||
import type { Session } from "@/type/api";
|
||||
|
||||
|
|
@ -283,7 +283,7 @@ const setTooltipsForSidebar = () => {
|
|||
|
||||
// Lifecycle hooks
|
||||
onMounted(async () => {
|
||||
const sub = SSEManager.subscribe((msg: SSEMessage) => {
|
||||
const sub = SSEManager.subscribe((msg: SSEMessageResource) => {
|
||||
if (msg.resource != "sync:session") {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue