diff --git a/app/(home-pages)/home/Actions/CreateNewButton.tsx b/app/(home-pages)/home/Actions/CreateNewButton.tsx index 44acafc0..732bf847 100644 --- a/app/(home-pages)/home/Actions/CreateNewButton.tsx +++ b/app/(home-pages)/home/Actions/CreateNewButton.tsx @@ -27,9 +27,8 @@ export const CreateNewLeafletButton = (props: {}) => { labelOnMobile id="new-leaflet-button" primary - icon= + icon= label="New" - smallOnMobile /> } > diff --git a/app/(home-pages)/home/Actions/HomeThemeSetter.tsx b/app/(home-pages)/home/Actions/HomeThemeSetter.tsx index 37ae5169..34519324 100644 --- a/app/(home-pages)/home/Actions/HomeThemeSetter.tsx +++ b/app/(home-pages)/home/Actions/HomeThemeSetter.tsx @@ -18,7 +18,6 @@ export const HomeThemeSetter = (props: { entityID: string }) => { trigger={ label="Theme" className="sm:flex! hidden" diff --git a/app/(home-pages)/home/HomeLayout.tsx b/app/(home-pages)/home/HomeLayout.tsx index 4db862dc..68d35e5a 100644 --- a/app/(home-pages)/home/HomeLayout.tsx +++ b/app/(home-pages)/home/HomeLayout.tsx @@ -25,6 +25,9 @@ import { GetLeafletDataReturnType } from "app/api/rpc/[command]/get_leaflet_data import { useState } from "react"; import { useDebouncedEffect } from "src/hooks/useDebouncedEffect"; import { HomeEmptyState } from "./HomeEmpty/HomeEmpty"; +import { PageTitle } from "components/ActionBar/DesktopNavigation"; +import { HomeSmall } from "components/Icons/HomeSmall"; +import { HomeTiny } from "components/Icons/HomeTiny"; export type Leaflet = { added_at: string; @@ -79,6 +82,7 @@ export const HomeLayout = (props: { currentPage="home" defaultTab="home" actions={} + pageTitle={} pageTitle="Home" />} tabs={{ home: { content: ( diff --git a/app/(home-pages)/looseleafs/LooseleafsLayout.tsx b/app/(home-pages)/looseleafs/LooseleafsLayout.tsx index f8e0f4b7..ff7aa140 100644 --- a/app/(home-pages)/looseleafs/LooseleafsLayout.tsx +++ b/app/(home-pages)/looseleafs/LooseleafsLayout.tsx @@ -11,6 +11,9 @@ import { useIdentityData } from "components/IdentityProvider"; import useSWR from "swr"; import { getHomeDocs } from "../home/storage"; import { Leaflet, LeafletList } from "../home/HomeLayout"; +import { PageTitle } from "components/ActionBar/DesktopNavigation"; +import { LooseLeafSmall } from "components/Icons/LooseleafSmall"; +import { LooseleafTiny } from "components/Icons/LooseleafTiny"; export const LooseleafsLayout = (props: { entityID: string | null; @@ -36,6 +39,9 @@ export const LooseleafsLayout = (props: { currentPage="looseleafs" defaultTab="home" actions={} + pageTitle={ + } pageTitle={"Looseleafs"} /> + } tabs={{ home: { content: ( diff --git a/app/(home-pages)/notifications/page.tsx b/app/(home-pages)/notifications/page.tsx index 3fa36f92..77174d97 100644 --- a/app/(home-pages)/notifications/page.tsx +++ b/app/(home-pages)/notifications/page.tsx @@ -6,18 +6,27 @@ import { hydrateNotifications } from "src/notifications"; import { supabaseServerClient } from "supabase/serverClient"; import { CommentNotification } from "./CommentNotication"; import { NotificationList } from "./NotificationList"; +import { NotificationsUnreadSmall } from "components/Icons/NotificationSmall"; +import { PageTitle } from "components/ActionBar/DesktopNavigation"; export default async function Notifications() { return ( } + pageTitle={"Notifications"} + /> + } tabs={{ default: { content: ( diff --git a/app/(home-pages)/p/[didOrHandle]/layout.tsx b/app/(home-pages)/p/[didOrHandle]/layout.tsx index 45d2c2b9..49de62b2 100644 --- a/app/(home-pages)/p/[didOrHandle]/layout.tsx +++ b/app/(home-pages)/p/[didOrHandle]/layout.tsx @@ -11,6 +11,8 @@ import { Agent } from "@atproto/api"; import { get_profile_data } from "app/api/rpc/[command]/get_profile_data"; import { Metadata } from "next"; import { cache } from "react"; +import { PageTitle } from "components/ActionBar/DesktopNavigation"; +import { Avatar } from "components/Avatar"; // Cache the profile data call to prevent concurrent OAuth restores const getCachedProfileData = cache(async (did: string) => { @@ -85,10 +87,27 @@ export default async function ProfilePageLayout(props: { currentPage="profile" profileDid={did} actions={null} + pageTitle={ + + } + pageTitle={ + profile?.displayName ? profile.displayName : profile.handle + } + /> + } tabs={{ default: { content: ( diff --git a/app/(home-pages)/tag/[tag]/page.tsx b/app/(home-pages)/tag/[tag]/page.tsx index 345f3337..043b3774 100644 --- a/app/(home-pages)/tag/[tag]/page.tsx +++ b/app/(home-pages)/tag/[tag]/page.tsx @@ -3,6 +3,8 @@ import { DashboardPageLayout } from "components/PageLayouts/DashboardPageLayout" import { PostListing } from "components/PostListing"; import { getDocumentsByTag } from "./getDocumentsByTag"; import { Metadata } from "next"; +import { PageTitle } from "components/ActionBar/DesktopNavigation"; +import { TagTiny } from "components/Icons/TagTiny"; export async function generateMetadata(props: { params: Promise<{ tag: string }>; @@ -25,10 +27,12 @@ export default async function TagPage(props: { currentPage="tag" defaultTab="default" actions={null} + pageTitle=} pageTitle={decodedTag} /> tabs={{ default: { content: ( diff --git a/app/lish/[did]/[publication]/dashboard/Actions.tsx b/app/lish/[did]/[publication]/dashboard/Actions.tsx index f8be5ab0..bd2cc862 100644 --- a/app/lish/[did]/[publication]/dashboard/Actions.tsx +++ b/app/lish/[did]/[publication]/dashboard/Actions.tsx @@ -9,14 +9,8 @@ import { usePublicationData } from "./PublicationSWRProvider"; import { useSmoker } from "components/Toast"; import { useIsMobile } from "src/hooks/isMobile"; import { SpeedyLink } from "components/SpeedyLink"; -import { ButtonSecondary, ButtonTertiary } from "components/Buttons"; -import { UpgradeModal } from "../UpgradeModal"; -import { LeafletPro } from "components/Icons/LeafletPro"; -import { useIsPro, useCanSeePro } from "src/hooks/useEntitlement"; export const Actions = (props: { publication: string }) => { - let isPro = useIsPro(); - let canSeePro = useCanSeePro(); return ( <> @@ -43,7 +37,7 @@ function PublicationShareButton() { icon= label="Share" onClick={() => {}} - smallOnMobile + className="w-full" /> } > diff --git a/app/lish/[did]/[publication]/dashboard/NewDraftButton.tsx b/app/lish/[did]/[publication]/dashboard/NewDraftButton.tsx index a24652ba..f6ae4a0e 100644 --- a/app/lish/[did]/[publication]/dashboard/NewDraftButton.tsx +++ b/app/lish/[did]/[publication]/dashboard/NewDraftButton.tsx @@ -16,8 +16,8 @@ export function NewDraftActionButton(props: { publication: string }) { let newLeaflet = await createPublicationDraft(props.publication); router.push(`/${newLeaflet}`); }} - icon= - smallOnMobile + 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 6c6fad74..6185098c 100644 --- a/app/lish/[did]/[publication]/dashboard/PublicationDashboard.tsx +++ b/app/lish/[did]/[publication]/dashboard/PublicationDashboard.tsx @@ -8,13 +8,15 @@ import { PublishedPostsList } from "./PublishedPostsLists"; import { PublicationSubscribers } from "./PublicationSubscribers"; import { DashboardLayout } from "components/PageLayouts/DashboardLayout"; import { DashboardPageLayout } from "components/PageLayouts/DashboardPageLayout"; -import { PageSearch } from "components/PageLayouts/PageSearch"; import { useDebouncedEffect } from "src/hooks/useDebouncedEffect"; 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"; export default function PublicationDashboard({ publication, @@ -45,12 +47,21 @@ export default function PublicationDashboard({ } + currentPage="pub" + publication={pubUri} + pageTitle={ + } + /> + } tabs={{ Drafts: { content: ( } controls={ } publication={pubUri} showHeader={false} @@ -90,7 +101,7 @@ export default function PublicationDashboard({ content: ( } publication={pubUri} showHeader={false} @@ -105,12 +116,14 @@ export default function PublicationDashboard({ content: ( } publication={pubUri} showHeader={false} > - + ), }, @@ -121,7 +134,7 @@ export default function PublicationDashboard({ content: ( } publication={pubUri} showHeader={false} @@ -131,10 +144,6 @@ export default function PublicationDashboard({ ), }, }} - actions={} - currentPage="pub" - publication={pubUri} - pubName={record.name} /> ); } diff --git a/components/ActionBar/ActionButton.tsx b/components/ActionBar/ActionButton.tsx index 341fb876..c1971038 100644 --- a/components/ActionBar/ActionButton.tsx +++ b/components/ActionBar/ActionButton.tsx @@ -18,7 +18,6 @@ export const ActionButton = forwardRef< className?: string; subtext?: string; labelOnMobile?: boolean; - smallOnMobile?: boolean; z?: boolean; } >((_props, ref) => { @@ -29,7 +28,6 @@ export const ActionButton = forwardRef< primary, secondary, labelOnMobile, - smallOnMobile, subtext, className, ...buttonProps @@ -58,7 +56,6 @@ export const ActionButton = forwardRef< flex gap-2 items-start justify-start sm:w-full sm:max-w-full ${labelOnMobile ? "w-full" : "w-fit"} outline-2 outline-transparent outline-offset-1 - ${smallOnMobile && "sm:text-base text-sm py-0! sm:py-1! sm:h-fit h-6 items-center!"} ${ primary diff --git a/components/ActionBar/DesktopNavigation.tsx b/components/ActionBar/DesktopNavigation.tsx index cfb7bbac..e2beeeba 100644 --- a/components/ActionBar/DesktopNavigation.tsx +++ b/components/ActionBar/DesktopNavigation.tsx @@ -14,6 +14,7 @@ import { AccountSmall } from "components/Icons/AccountSmall"; import { TabsSmall } from "components/Icons/TabsSmall"; type NavigationProps = { + pageTitle: React.ReactNode; currentPage: navPages; publication?: string; actions?: React.ReactNode; @@ -33,13 +34,15 @@ export const NavigationContent = (props: NavigationProps) => { return ( <> - {props.actions} + {props.pageTitle} +
{props.actions}
{props.tabs && Object.keys(props.tabs).length > 1 && ( <> -
+
{Object.keys(props.tabs).map((t) => ( } label={t} @@ -56,7 +59,7 @@ export const NavigationContent = (props: NavigationProps) => { {props.currentPage === "home" && ( <> -
+
PUBLICATIONS
@@ -98,6 +101,20 @@ export const NavigationContent = (props: NavigationProps) => { ); }; +export const PageTitle = (props: { + pageTitle: string; + icon: React.ReactNode; +}) => { + return ( +
+ {/*{props.icon}*/} +
+ {props.pageTitle} +
+
+ ); +}; + export const DesktopNavigation = (props: NavigationProps) => { return ( diff --git a/components/ActionBar/MobileNavigation.tsx b/components/ActionBar/MobileNavigation.tsx index 74d833c4..273b0caf 100644 --- a/components/ActionBar/MobileNavigation.tsx +++ b/components/ActionBar/MobileNavigation.tsx @@ -12,6 +12,7 @@ import { useCardBorderHidden } from "components/Pages/useCardBorderHidden"; export const MobileNavigation = (props: { controls?: React.ReactNode; actions?: React.ReactNode; + pageTitle: string; }) => { let [state, setState] = useState<"search" | "default">("default"); let [hidden, setHidden] = useState(false); @@ -78,7 +79,7 @@ export const MobileNavigation = (props: { } >
20 ? "border-border-light" : "border-transparent"} flex gap-4 justify-between items-center p-1 w-full`} + className={`mobilePageHeaderContent border rounded-lg border-border-light flex gap-4 justify-between items-center p-1 w-full`} style={ scrollPos < 20 ? { @@ -103,7 +104,7 @@ export const MobileNavigation = (props: { ) : ( <> - +
); }; diff --git a/components/PageLayouts/DashboardLayout.tsx b/components/PageLayouts/DashboardLayout.tsx index 3fb4cedb..cf9d1704 100644 --- a/components/PageLayouts/DashboardLayout.tsx +++ b/components/PageLayouts/DashboardLayout.tsx @@ -123,10 +123,10 @@ export function DashboardLayout< defaultTab: keyof T; currentPage: navPages; publication?: string; - pubName?: string; profileDid?: string; actions?: React.ReactNode; onTabHover?: (tabName: string) => void; + pageTitle: React.ReactNode; }) { const searchParams = useSearchParams(); const tabParam = searchParams.get("tab"); @@ -153,6 +153,7 @@ export function DashboardLayout< currentTab: tab as string, onTabClick: (t: string) => setTabWithUrl(t as keyof T), onTabHover: props.onTabHover, + pageTitle: props.pageTitle, }; let { open, setOpen } = useSidebarStore(); @@ -183,4 +184,3 @@ export function DashboardLayout< ); } - diff --git a/components/PageLayouts/DashboardPageLayout.tsx b/components/PageLayouts/DashboardPageLayout.tsx index 6746a0a4..7880336d 100644 --- a/components/PageLayouts/DashboardPageLayout.tsx +++ b/components/PageLayouts/DashboardPageLayout.tsx @@ -5,7 +5,7 @@ import { usePreserveScroll } from "src/hooks/usePreserveScroll"; export function DashboardPageLayout(props: { scrollKey: string; - pageTitle?: string; + pageTitle: string; actions?: React.ReactNode; controls?: React.ReactNode; publication?: string; @@ -20,16 +20,18 @@ export function DashboardPageLayout(props: { ref={ref} id="home-content" > - {props.showHeader && ( - <> - + - -
- {props.controls} -
-
- + {props.showHeader && ( + +
+ {props.controls} +
+
)} {props.children}