From 4a8480f35afe12c2703f07a19579e06ec3f509fb Mon Sep 17 00:00:00 2001 From: Jared Pereira Date: Thu, 5 Mar 2026 18:58:14 -0500 Subject: [PATCH] add toolbar stuff --- app/[leaflet_id]/Footer.tsx | 12 +++ app/globals.css | 6 +- components/DesktopFooter.tsx | 15 ++++ components/Footnotes/FootnoteContext.tsx | 2 + components/Footnotes/FootnoteEditor.tsx | 88 ++++++++++++++++++- .../Footnotes/FootnoteSideColumnLayout.tsx | 8 +- components/Footnotes/usePageFootnotes.ts | 4 +- components/Toolbar/FootnoteTextToolbar.tsx | 71 +++++++++++++++ components/Toolbar/FootnoteToolbarWrapper.tsx | 77 ++++++++++++++++ src/useUIState.ts | 2 + 10 files changed, 278 insertions(+), 7 deletions(-) create mode 100644 components/Toolbar/FootnoteTextToolbar.tsx create mode 100644 components/Toolbar/FootnoteToolbarWrapper.tsx diff --git a/app/[leaflet_id]/Footer.tsx b/app/[leaflet_id]/Footer.tsx index ad063f02..f8ff45fa 100644 --- a/app/[leaflet_id]/Footer.tsx +++ b/app/[leaflet_id]/Footer.tsx @@ -4,6 +4,7 @@ import { Footer } from "components/ActionBar/Footer"; import { Media } from "components/Media"; import { ThemePopover } from "components/ThemeManager/ThemeSetter"; import { Toolbar } from "components/Toolbar"; +import { FootnoteToolbar } from "components/Toolbar/FootnoteToolbarWrapper"; import { ShareOptions } from "app/[leaflet_id]/actions/ShareOptions"; import { HomeButton } from "app/[leaflet_id]/actions/HomeButton"; import { PublishButton } from "./actions/PublishButton"; @@ -56,6 +57,17 @@ export function LeafletFooter(props: { entityID: string }) { blockType={blockType} /> + ) : focusedBlock && + focusedBlock.entityType === "footnote" && + entity_set.permissions.write ? ( +
{ + if (e.currentTarget === e.target) e.preventDefault(); + }} + > + +
) : entity_set.permissions.write ? (