From ec8410c3d8213340de35357d85126dd2cf99c54b Mon Sep 17 00:00:00 2001 From: celine Date: Wed, 29 Apr 2026 17:12:45 -0400 Subject: [PATCH] more futzing --- app/(home-pages)/home/Actions/Actions.tsx | 2 - .../home/Actions/CreateNewButton.tsx | 23 +++++--- app/(home-pages)/home/HomeLayout.tsx | 8 +-- .../looseleafs/LooseleafsLayout.tsx | 5 +- app/(home-pages)/looseleafs/page.tsx | 4 -- .../dashboard/NewDraftButton.tsx | 23 ++++++-- .../dashboard/PublicationDashboard.tsx | 27 ++++++--- .../dashboard/settings/ProSettings.tsx | 9 ++- components/ActionBar/MobileNavigation.tsx | 58 ++++++++++++------- components/Icons/SortSmall.tsx | 1 + components/PageLayouts/DashboardLayout.tsx | 11 +++- .../PageLayouts/DashboardPageLayout.tsx | 10 ++-- components/PageLayouts/PageSearch.tsx | 16 +++-- 13 files changed, 126 insertions(+), 71 deletions(-) diff --git a/app/(home-pages)/home/Actions/Actions.tsx b/app/(home-pages)/home/Actions/Actions.tsx index 743e6721..dd300243 100644 --- a/app/(home-pages)/home/Actions/Actions.tsx +++ b/app/(home-pages)/home/Actions/Actions.tsx @@ -1,7 +1,5 @@ "use client"; -import { ThemePopover } from "components/ThemeManager/ThemeSetter"; import { CreateNewLeafletButton } from "./CreateNewButton"; -import { HelpButton } from "app/[leaflet_id]/actions/HelpButton"; import { HomeThemeSetter } from "./HomeThemeSetter"; import { useIdentityData } from "components/IdentityProvider"; import { useReplicache } from "src/replicache"; diff --git a/app/(home-pages)/home/Actions/CreateNewButton.tsx b/app/(home-pages)/home/Actions/CreateNewButton.tsx index 732bf847..f3892d58 100644 --- a/app/(home-pages)/home/Actions/CreateNewButton.tsx +++ b/app/(home-pages)/home/Actions/CreateNewButton.tsx @@ -2,13 +2,14 @@ import { createNewLeaflet } from "actions/createNewLeaflet"; import { ActionButton } from "components/ActionBar/ActionButton"; +import { ButtonPrimary } from "components/Buttons"; import { AddTiny } from "components/Icons/AddTiny"; import { BlockCanvasPageSmall } from "components/Icons/BlockCanvasPageSmall"; import { BlockDocPageSmall } from "components/Icons/BlockDocPageSmall"; import { Menu, MenuItem } from "components/Menu"; import { useIsMobile } from "src/hooks/isMobile"; -export const CreateNewLeafletButton = (props: {}) => { +export const CreateNewLeafletButton = (props: { compact?: boolean }) => { let isMobile = useIsMobile(); let openNewLeaflet = (id: string) => { if (isMobile) { @@ -23,13 +24,19 @@ export const CreateNewLeafletButton = (props: {}) => { side={isMobile ? "top" : "right"} align={isMobile ? "center" : "start"} trigger={ - - label="New" - /> + props.compact ? ( + + New Doc + + ) : ( + + label="New" + /> + ) } > } - pageTitle={} pageTitle="Home" />} + pageTitle={} pageTitle="Home" />} tabs={{ home: { content: ( } - controls={ + mobileActions={} + search={ } + mobileActions={} showHeader={false} > + Draft + + ); return ( { - let newLeaflet = await createPublicationDraft(props.publication); - router.push(`/${newLeaflet}`); - }} + onClick={handleOnClick} icon= className="w-full" label="Draft" diff --git a/app/lish/[did]/[publication]/dashboard/PublicationDashboard.tsx b/app/lish/[did]/[publication]/dashboard/PublicationDashboard.tsx index 6185098c..7b2fbd4e 100644 --- a/app/lish/[did]/[publication]/dashboard/PublicationDashboard.tsx +++ b/app/lish/[did]/[publication]/dashboard/PublicationDashboard.tsx @@ -13,10 +13,11 @@ import { type NormalizedPublication } from "src/utils/normalizeRecords"; import { PublicationAnalytics } from "./PublicationAnalytics"; import { useCanSeePro } from "src/hooks/useEntitlement"; import { SettingsContent } from "./settings/SettingsContent"; -import { SettingsTiny } from "components/Icons/SettingsTiny"; import { PageSearch } from "components/PageLayouts/PageSearch"; import { PubIcon } from "components/ActionBar/Publications"; import { PageTitle } from "components/ActionBar/DesktopNavigation"; +import { NewDraftActionButton } from "./NewDraftButton"; +import { SettingsSmall } from "components/Icons/SettingsSmall"; export default function PublicationDashboard({ publication, @@ -62,8 +63,10 @@ export default function PublicationDashboard({ } - controls={ + mobileActions={ + + } + search={ } + mobileActions={ + + } publication={pubUri} showHeader={false} > @@ -102,7 +107,9 @@ export default function PublicationDashboard({ } + mobileActions={ + + } publication={pubUri} showHeader={false} > @@ -117,7 +124,9 @@ export default function PublicationDashboard({ } + mobileActions={ + + } publication={pubUri} showHeader={false} > @@ -130,12 +139,14 @@ export default function PublicationDashboard({ } : {}), Settings: { - icon: , + icon: , content: ( } + mobileActions={ + + } publication={pubUri} showHeader={false} > diff --git a/app/lish/[did]/[publication]/dashboard/settings/ProSettings.tsx b/app/lish/[did]/[publication]/dashboard/settings/ProSettings.tsx index a5b79c5a..0bca697e 100644 --- a/app/lish/[did]/[publication]/dashboard/settings/ProSettings.tsx +++ b/app/lish/[did]/[publication]/dashboard/settings/ProSettings.tsx @@ -147,13 +147,16 @@ export const NewsletterSettings = () => {
-