From 8f32fd58cafe677c07d9ed9fff84f6e255156d37 Mon Sep 17 00:00:00 2001 From: darkuss Date: Sat, 22 Aug 2026 01:58:37 +0200 Subject: holy shit i'm finally done --- src/apps/edit_rich.tsx | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/apps/edit_rich.tsx (limited to 'src/apps/edit_rich.tsx') diff --git a/src/apps/edit_rich.tsx b/src/apps/edit_rich.tsx new file mode 100644 index 0000000..0b61178 --- /dev/null +++ b/src/apps/edit_rich.tsx @@ -0,0 +1,28 @@ +import { Signal, useSignalEffect } from "@preact/signals" +import { Source, VirtualFile, VirtualTextFile } from "$/apps/source"; +import { memo, useEffect } from "preact/compat"; + +export const Edit = memo(function Edit(props: Edit.Props) { + const source = props.source as Signal; + const title = props.title; + + useEffect(() => { + props.contentReady.value = true + }, []) + + useSignalEffect(() => { + title.value = `${source.value.name} - moed`; + }) + + return
+ {(source.value as VirtualTextFile).content} +
+}) + +namespace Edit { + export type Props = { + source: Signal, + title: Signal, + contentReady: Signal + } +} -- cgit v1.2.3