diff --git a/components/editor/Menubar/index.js b/components/editor/Menubar/index.js index d7a1918..f1d14b0 100644 --- a/components/editor/Menubar/index.js +++ b/components/editor/Menubar/index.js @@ -3,7 +3,7 @@ import { useEffect, useState } from 'react'; import { toaster } from '@/components/toast'; import { ToolTip, ToolTipCon, ToolTipTrigger } from '@/components/UI/Tooltip'; import { DropDown, DropDownContainer, DropDownExtension, DropDownExtensionContainer, DropDownExtensionTrigger, DropDownItem, DropDownSection, DropDownSectionTitle, DropDownTrigger } from '@/lib/Pop-Cards/DropDown'; -import { CalendarDays, CircleUser, TextSelect, BookDashed, Pencil, Share2, PartyPopper, Archive, ArchiveRestore, Baseline, CaseLower, Copy, Eye, EyeOff, Info, PanelRightDashed, Settings2, Share, Space, Trash2Icon, WholeWord, Settings, PanelRight, Paintbrush, Printer, Glasses, Folder } from 'lucide-react'; +import { CalendarDays, CircleUser, TextSelect, BookDashed, Pencil, Share2, PartyPopper, Archive, ArchiveRestore, Baseline, CaseLower, Copy, Eye, EyeOff, Info, PanelRightDashed, Settings2, Share, Space, Trash2Icon, WholeWord, Settings, PanelRight, Paintbrush, Printer, Glasses, Folder, Fullscreen, X, PanelRightClose } from 'lucide-react'; import { CountCharacters, CountWords } from './helpers'; import { SendPageChanges } from '@/lib/Page state manager'; import { findPageListPage } from '@/components/Pages List/list-functions'; @@ -25,7 +25,7 @@ export function MenuBarButton({ ...props }) { ) } -export default function MenuBar({ sidebarstate, currentPageData, currentPage, listedPageItems, unauthed = false }) { +export default function MenuBar({ sidebarstate, currentPageData, currentPage, listedPageItems, unauthed = false, peekPageOpen = false }) { if (!listedPageItems || !currentPage || !currentPageData) { return <> @@ -75,6 +75,46 @@ export default function MenuBar({ sidebarstate, currentPageData, currentPage, li ) : null} + + + + {peekPageOpen ? ( +
+ + + { + const queryParams = new URLSearchParams(window.location.search) + const page = queryParams.get("p") + queryParams.set("edit", page) + queryParams.delete("pm") + queryParams.delete("p") + window.location.replace(`/page?${queryParams.toString()}`) + }} type="button"> + + + + + Fullscreen + + + + + { + const queryParams = new URLSearchParams(window.location.search) + queryParams.delete("pm") + queryParams.delete("p") + window.location.replace(`/page?${queryParams.toString()}`) + }}> + + + + + Close + + +
+ ) : null} + diff --git a/components/editor/Peeks/PeekPage.js b/components/editor/Peeks/PeekPage.js index 032719c..e952a68 100644 --- a/components/editor/Peeks/PeekPage.js +++ b/components/editor/Peeks/PeekPage.js @@ -8,39 +8,8 @@ export default function PeekPageBlock({ pageId }) { return ( <> <> -
Router.push(window.location.pathname)} className="print:hidden print:collapse flex items-center justify-center w-full h-screen"> +
Router.push(window.location.pathname)} className="pt-[40px] print:hidden print:collapse flex items-center justify-center w-full h-screen">
e.stopPropagation()} className="relative w-full bg-[var(--background)] h-full overflow-hidden"> -
-
-
- - - { - const queryParams = new URLSearchParams(window.location.search) - queryParams.delete("pm") - queryParams.delete("p") - Router.push(`/page?${queryParams.toString()}`) - }} type="button"> - - - - - Close - - - - - - { Router.push(`/page?edit=${pageId}`) }} type="button"> - - - - - Fullscreen - - -
-
diff --git a/pages/page/index.js b/pages/page/index.js index 0714800..27fe023 100644 --- a/pages/page/index.js +++ b/pages/page/index.js @@ -79,11 +79,10 @@ function NotionEditor() {
- +
- {pageId && listedPageItems && listedPageItems.length >= 1 !== "" ? ( }> @@ -94,7 +93,7 @@ function NotionEditor() { ) : null} {query.pm === "s" ? ( -
+
) : null}