Adopt focused P2P service views

This commit is contained in:
vorotamoroz committed 2026-08-28 03:04:53 +00:00
1 parent cc000f2cdf
commit ad83ae858d
20 files changed
+276 -112

No files matched your search

@@ -2,21 +2,21 @@ import { WorkspaceLeaf } from "@/deps.ts";
import { mount } from "svelte";
import { SvelteItemView } from "@/common/SvelteItemView.ts";
import type { LiveSyncBaseCore } from "@/LiveSyncBaseCore.ts";
import type { P2PPaneParams } from "@vrtmrz/livesync-commonlib/compat/replication/trystero/UseP2PReplicatorResult";
import type { P2PServiceViews } from "@vrtmrz/livesync-commonlib/p2p";
import P2PServerStatusPane from "./P2PServerStatusPane.svelte";
export const VIEW_TYPE_P2P_SERVER_STATUS = "p2p-server-status";
export class P2PServerStatusPaneView extends SvelteItemView {
core: LiveSyncBaseCore;
private _p2pResult: P2PPaneParams;
private readonly p2p: P2PServiceViews;
override icon = "waypoints";
override navigation = false;
constructor(leaf: WorkspaceLeaf, core: LiveSyncBaseCore, p2pResult: P2PPaneParams) {
constructor(leaf: WorkspaceLeaf, core: LiveSyncBaseCore, p2p: P2PServiceViews) {
super(leaf);
this.core = core;
this._p2pResult = p2pResult;
this.p2p = p2p;
}
override getIcon(): string {
@@ -35,7 +35,7 @@ export class P2PServerStatusPaneView extends SvelteItemView {
return mount(P2PServerStatusPane, {
target,
props: {
getLiveSyncReplicator: () => this._p2pResult.replicator,
p2p: this.p2p,
core: this.core,
},
});