2026-03-21 20:58:44 +00:00
|
|
|
<template>
|
2026-04-16 17:14:57 +00:00
|
|
|
<router-view />
|
2026-03-21 20:58:44 +00:00
|
|
|
</template>
|
|
|
|
|
|
2026-04-21 23:35:59 +00:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { onMounted } from "vue";
|
|
|
|
|
import { SSEManager, type SSEMessage } from "@/SSEManager";
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
SSEManager.connect("/api/events");
|
|
|
|
|
SSEManager.subscribe((msg: SSEMessage) => {
|
|
|
|
|
if (msg.type != "heartbeat") {
|
|
|
|
|
console.log("SSE", msg);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
</script>
|