From f8b967cf2c883ee38157e59c7803eca95d5dd6f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Boduro=C4=9Flu?= <80620802+burakboduroglu@users.noreply.github.com> Date: Sun, 2 Aug 2026 23:46:43 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=93=9D=20rich-text=20notes=20with?= =?UTF-8?q?=20write/preview=20tabs=20and=20compact=20row=20actions=20-=20n?= =?UTF-8?q?ote-form=20swaps=20the=20plain=20textarea=20for=20RichTextEdito?= =?UTF-8?q?r=20with=20a=20=20=20write/preview=20toggle;=20note-card=20and?= =?UTF-8?q?=20note-reader=20render=20content=20as=20=20=20HTML=20with=20li?= =?UTF-8?q?st=20styling=20instead=20of=20paragraph=20splitting=20-=20Table?= =?UTF-8?q?RowActions=20gains=20a=20compact=20icon-only=20variant;=20payme?= =?UTF-8?q?nts=20page=20uses=20=20=20it=20with=20a=20centered=20actions=20?= =?UTF-8?q?column=20-=20combobox=20always=20mounts=20the=20listbox=20so=20?= =?UTF-8?q?child=20content=20composes=20with=20the=20=20=20default=20scrol?= =?UTF-8?q?lable=20list?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/notes/note-card.tsx | 11 +++--- src/components/notes/note-form.tsx | 41 ++++++++++++++++------ src/components/notes/note-reader-panel.tsx | 14 ++------ src/components/ui/combobox.tsx | 3 +- src/components/ui/table-row-actions.tsx | 8 +++-- src/pages/payments-page.tsx | 7 ++-- 6 files changed, 52 insertions(+), 32 deletions(-) diff --git a/src/components/notes/note-card.tsx b/src/components/notes/note-card.tsx index 4c48008..62c03cf 100644 --- a/src/components/notes/note-card.tsx +++ b/src/components/notes/note-card.tsx @@ -1,4 +1,4 @@ -import { createSignal } from "solid-js"; +import { Show, createSignal } from "solid-js"; import { formatApiError } from "@/api/client"; import type { Note } from "@/api/client"; import { NoteForm } from "@/components/notes/note-form"; @@ -55,9 +55,12 @@ export function NoteCard(props: {
-

- {props.note.content || t("notes.noContent")} -

+ {t("notes.noContent")}

} + > +
+ {error() &&

{error()}

}
diff --git a/src/components/notes/note-form.tsx b/src/components/notes/note-form.tsx index edcd6e4..b31502b 100644 --- a/src/components/notes/note-form.tsx +++ b/src/components/notes/note-form.tsx @@ -9,7 +9,8 @@ import { IconEdit, IconPlus, IconTrash } from "@/components/ui/icons"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { PageSpinner } from "@/components/ui/page-spinner"; -import { Textarea } from "@/components/ui/textarea"; +import { RichTextEditor } from "@/components/ui/rich-text-editor"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { formatBytes, maxUploadBytes } from "@/lib/upload-limits"; import { useT } from "@/stores/preferences-context"; @@ -36,6 +37,7 @@ export function NoteForm(props: { const isUpdate = () => !!props.initial?.id; const [title, setTitle] = createSignal(props.initial?.title ?? ""); const [content, setContent] = createSignal(props.initial?.content ?? ""); + const [contentView, setContentView] = createSignal<"write" | "preview">("write"); const [files, setFiles] = createSignal([]); const [error, setError] = createSignal(""); const [pending, setPending] = createSignal(false); @@ -123,15 +125,34 @@ export function NoteForm(props: { />
- -