From 8e2cf9bb0298b9f6edf6b646f36f278ff015227a Mon Sep 17 00:00:00 2001 From: Philipinho <16838612+Philipinho@users.noreply.github.com> Date: Sat, 31 Jan 2026 16:46:40 +0000 Subject: [PATCH] fix --- .../components/history-diff.module.css | 4 ---- .../components/history-editor.tsx | 19 +++++++++++++++---- .../components/history.module.css | 16 ++++++++-------- packages/editor-ext/package.json | 6 +++--- pnpm-lock.yaml | 6 +++--- 5 files changed, 29 insertions(+), 22 deletions(-) diff --git a/apps/client/src/features/page-history/components/history-diff.module.css b/apps/client/src/features/page-history/components/history-diff.module.css index 389681bf..ebd6105e 100644 --- a/apps/client/src/features/page-history/components/history-diff.module.css +++ b/apps/client/src/features/page-history/components/history-diff.module.css @@ -1,7 +1,3 @@ -.container { - width: 100%; -} - .diffSummary { border: rem(1px) solid light-dark(var(--mantine-color-gray-3), var(--mantine-color-dark-4)); diff --git a/apps/client/src/features/page-history/components/history-editor.tsx b/apps/client/src/features/page-history/components/history-editor.tsx index 4232c29d..908efa46 100644 --- a/apps/client/src/features/page-history/components/history-editor.tsx +++ b/apps/client/src/features/page-history/components/history-editor.tsx @@ -6,6 +6,8 @@ import { Badge, Divider, Group, Text, Title } from "@mantine/core"; import { Decoration, DecorationSet } from "@tiptap/pm/view"; import { computeHistoryBlockDiff } from "@/features/page-history/utils/history-diff"; import classes from "./history-diff.module.css"; +import historyClasses from "./history.module.css"; + export interface HistoryEditorProps { title: string; @@ -23,7 +25,10 @@ export function HistoryEditor({ editable: false, }); - const [diffCounts, setDiffCounts] = useState<{ added: number; deleted: number }>({ + const [diffCounts, setDiffCounts] = useState<{ + added: number; + deleted: number; + }>({ added: 0, deleted: 0, }); @@ -58,7 +63,10 @@ export function HistoryEditor({ Decoration.node(r.from, r.to, { class: "history-diff-deleted" }), ); - decorationSet = DecorationSet.create(diffDoc, [...decos, ...deletedDecos]); + decorationSet = DecorationSet.create(diffDoc, [ + ...decos, + ...deletedDecos, + ]); } catch { decorationSet = DecorationSet.empty; addedCount = 0; @@ -83,7 +91,7 @@ export function HistoryEditor({ return ( <> -