From 8751ba26ebf7b7761b9e237f2bf3453623dd1018 Mon Sep 17 00:00:00 2001 From: polwex Date: Mon, 6 Oct 2025 10:13:39 +0700 Subject: added frontend WS connection for demonstration purposes --- gui/src/logic/trill/helpers.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 gui/src/logic/trill/helpers.ts (limited to 'gui/src/logic/trill') diff --git a/gui/src/logic/trill/helpers.ts b/gui/src/logic/trill/helpers.ts new file mode 100644 index 0000000..6b5a138 --- /dev/null +++ b/gui/src/logic/trill/helpers.ts @@ -0,0 +1,10 @@ +import type { FullNode, Poast } from "@/types/trill"; + +export function toFlat(n: FullNode): Poast { + return { + ...n, + children: !n.children + ? [] + : Object.keys(n.children).map((c) => n.children[c].id), + }; +} -- cgit v1.2.3