From 9a6d1f3a8dd055cf6eb3b5168e5b149df935fa48 Mon Sep 17 00:00:00 2001 From: meetqy Date: Wed, 21 Jun 2023 21:42:47 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=A4=B9=20iPad=20Mobile=20=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Closes: #270 --- apps/nextjs/src/components/Layout.tsx | 8 +++-- apps/nextjs/src/components/Menu.tsx | 2 +- apps/nextjs/src/components/Navbar.tsx | 2 +- apps/nextjs/src/pages/[library]/folders.tsx | 36 +++++++++++++++++---- 4 files changed, 37 insertions(+), 11 deletions(-) diff --git a/apps/nextjs/src/components/Layout.tsx b/apps/nextjs/src/components/Layout.tsx index 90e479b7..39cbd9b4 100644 --- a/apps/nextjs/src/components/Layout.tsx +++ b/apps/nextjs/src/components/Layout.tsx @@ -6,6 +6,7 @@ import Menu from "./Menu"; import Navbar from "./Navbar"; interface Props { + navbar?: JSX.Element | null; children?: JSX.Element; loadMore?: () => void; loadMoreContent: JSX.Element | string; @@ -15,6 +16,7 @@ interface Props { const defaultProps: Props = { loadMoreContent: "加载中...", href: "/", + navbar: , }; const Layout = (props: Props) => { @@ -33,9 +35,9 @@ const Layout = (props: Props) => { return (
- +
- + {props.navbar} {/* children */}
@@ -46,7 +48,7 @@ const Layout = (props: Props) => {
- +
diff --git a/apps/nextjs/src/components/Menu.tsx b/apps/nextjs/src/components/Menu.tsx index 4eafa7b3..85ea5b74 100644 --- a/apps/nextjs/src/components/Menu.tsx +++ b/apps/nextjs/src/components/Menu.tsx @@ -54,7 +54,7 @@ const Menu = ({ library, href }: MenuProps) => { 标签 -
  • +
  • diff --git a/apps/nextjs/src/components/Navbar.tsx b/apps/nextjs/src/components/Navbar.tsx index 4b02e186..a93c2584 100644 --- a/apps/nextjs/src/components/Navbar.tsx +++ b/apps/nextjs/src/components/Navbar.tsx @@ -77,7 +77,7 @@ const Navbar = () => { return (
    diff --git a/apps/nextjs/src/pages/[library]/folders.tsx b/apps/nextjs/src/pages/[library]/folders.tsx index 4867a6c3..f2599912 100644 --- a/apps/nextjs/src/pages/[library]/folders.tsx +++ b/apps/nextjs/src/pages/[library]/folders.tsx @@ -18,14 +18,38 @@ const Page: NextPage = () => { library: librarryName, }); + const Header = () => { + return ( +
    + +
    + ); + }; + return ( - {"已经到底了~~"}}> + } href="/folders" loadMoreContent={{"已经到底了~~"}}> <> {assetsUrl && ( -
    +
    {data?.map((item) => item._count.images ? ( - +
    {item.images[0] ? ( @@ -35,10 +59,10 @@ const Page: NextPage = () => { )}
    -
    -

    {item.name}

    +
    +

    {item.name}

    -