mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-11-15 20:50:12 +00:00
Show expandable relay, peer, and sync observations below Stats and route Diag events to the existing Log Pane without notification or editor-status churn. Retain departed-peer evidence and replay logs recorded before the pane opens. Keep narrow panes usable with wrapping peer controls, readable device names, and larger buttons. Add browser regressions for disclosure, control bounds, button targets, and existing actions.
16 lines
843 B
TypeScript
16 lines
843 B
TypeScript
import { mount, unmount } from "svelte";
|
|
import LogPane from "../../../src/modules/features/Log/LogPane.svelte";
|
|
import { logMessages } from "@vrtmrz/livesync-commonlib/compat/mock_and_interop/stores";
|
|
import { setGlobalLogFunction } from "octagonal-wheels/common/logger";
|
|
|
|
// Simulate ordinary INFO messages being hidden while a prior diagnostic is visible.
|
|
setGlobalLogFunction(() => undefined);
|
|
logMessages.value = ["[P2P Diag] Earlier connection failure"];
|
|
const component = mount(LogPane, { target: document.querySelector("#app")!, props: { close: () => undefined } });
|
|
document.querySelector<HTMLButtonElement>("#append")!.onclick = () => {
|
|
logMessages.value = [...logMessages.value, "[P2P Diag] Later connection recovery"];
|
|
};
|
|
document.querySelector<HTMLButtonElement>("#unmount")!.onclick = () => {
|
|
void unmount(component);
|
|
};
|