From a463c1a64a5eaf352fb381e2a1258e9170cd7215 Mon Sep 17 00:00:00 2001 From: zsavko Date: Sun, 9 Apr 2023 15:42:28 +0800 Subject: [PATCH 1/7] feat: topbar and drawer for mobile layout --- src/components/dashboard/DashboardLayout.tsx | 215 ++++++++++++------- src/components/dashboard/DashboardTopbar.tsx | 72 +++++++ src/hooks/useMobileLayout.ts | 24 +++ 3 files changed, 236 insertions(+), 75 deletions(-) create mode 100644 src/components/dashboard/DashboardTopbar.tsx create mode 100644 src/hooks/useMobileLayout.ts diff --git a/src/components/dashboard/DashboardLayout.tsx b/src/components/dashboard/DashboardLayout.tsx index 3b3a5b86..2dce25d9 100644 --- a/src/components/dashboard/DashboardLayout.tsx +++ b/src/components/dashboard/DashboardLayout.tsx @@ -1,6 +1,6 @@ import { cn } from "~/lib/utils" import { useRouter } from "next/router" -import React, { useEffect } from "react" +import React, { useEffect, useState } from "react" import { DISCORD_LINK, APP_NAME } from "~/lib/env" import { getSiteLink } from "~/lib/helpers" @@ -22,6 +22,8 @@ import { useTranslation } from "react-i18next" import { Logo } from "~/components/common/Logo" import { getStorage } from "~/lib/storage" import { useGetPagesBySite } from "~/queries/page" +import { DashboardTopbar } from "./DashboardTopbar" +import { useMobileLayout } from "~/hooks/useMobileLayout" export function DashboardLayout({ children, @@ -45,6 +47,8 @@ export function DashboardLayout({ const [hasPermission, setHasPermission] = React.useState(false) const { t } = useTranslation("dashboard") + const isMobileLayout = useMobileLayout() + useEffect(() => { if (ssrReady) { if (!isConnected) { @@ -169,10 +173,20 @@ export function DashboardLayout({ /> )}
- - {(isOpen) => ( - <> -
+ {isMobileLayout ? ( + + +
+ } + drawerWidget={(close: any) => ( + <>
- {isOpen && "xLog"} + {"xLog"}
- {userSite.data?.[0]?.username && - subdomain && - userSite.data[0].username !== subdomain && ( -
-
- {isOpen && "You are operating"} -
- - {isOpen && ( - - {site.data?.name} - - @{site.data?.username} - - - )} -
- )} -
- -
-
{links.map((link) => { const active = @@ -224,47 +207,129 @@ export function DashboardLayout({ href: link.href, }) return ( - - - {isOpen && {t(link.text)}} - +
close()}> + + + {t(link.text)} + +
) })}
-
-
- - - {isOpen && {t("Need help?")}} - - - - {isOpen && {t("View Site")}} - -
- - )} - - {children} + + )} + > + {(isOpen) =>
233
} + + ) : ( + + {(isOpen) => ( + <> +
+
+
+ +
+ {isOpen && "xLog"} +
+ {userSite.data?.[0]?.username && + subdomain && + userSite.data[0].username !== subdomain && ( +
+
+ {isOpen && "You are operating"} +
+ + {isOpen && ( + + {site.data?.name} + + @{site.data?.username} + + + )} +
+ )} +
+ +
+ +
+ {links.map((link) => { + const active = + link.href && + link.isActive({ + pathname: router.asPath, + href: link.href, + }) + return ( + + + {isOpen && {t(link.text)}} + + ) + })} +
+
+
+ + + {isOpen && {t("Need help?")}} + + + + {isOpen && {t("View Site")}} + +
+ + )} +
+ )} + +
{children}
) : ( diff --git a/src/components/dashboard/DashboardTopbar.tsx b/src/components/dashboard/DashboardTopbar.tsx new file mode 100644 index 00000000..e01b77b4 --- /dev/null +++ b/src/components/dashboard/DashboardTopbar.tsx @@ -0,0 +1,72 @@ +import { useState, useEffect, useMemo, Fragment } from "react" +import { setStorage, getStorage } from "~/lib/storage" + +import { Bars3Icon, ChevronDownIcon } from "@heroicons/react/24/outline" +import { Logo } from "../common/Logo" +import { Popover, Transition } from "@headlessui/react" + +export const DashboardTopbar: React.FC<{ + children: (open: boolean) => React.ReactNode + userWidget: React.ReactNode + drawerWidget: (close: any) => React.ReactNode +}> = ({ children, userWidget, drawerWidget }) => { + const [isOpen, setIsOpen] = useState(false) + + return ( +
+ + {({ open, close }) => ( + <> + + + + { + setIsOpen(true) + }} + > + + + + +
+ {drawerWidget(close)} +
+
+
+ + )} +
+ +
+
+ +
+ xLog +
+
+ {userWidget} +
+
+ ) +} diff --git a/src/hooks/useMobileLayout.ts b/src/hooks/useMobileLayout.ts new file mode 100644 index 00000000..b0f19acd --- /dev/null +++ b/src/hooks/useMobileLayout.ts @@ -0,0 +1,24 @@ +import { useCallback, useEffect, useState } from "react" + +const mobileWidth = 1024 + +export function useMobileLayout() { + const [isMobile, setIsMobile] = useState(false) + + const onResize = useCallback(() => { + setIsMobile(window.innerWidth < mobileWidth) + }, []) + + useEffect(() => { + window.addEventListener("resize", onResize) + return () => { + window.removeEventListener("resize", onResize) + } + }, [onResize]) + + useEffect(() => { + setIsMobile(window.innerWidth < mobileWidth) + }, []) + + return isMobile +} From 7a907baa94172081eae5fed39a945fa8774abb90 Mon Sep 17 00:00:00 2001 From: zsavko Date: Sun, 9 Apr 2023 20:00:18 +0800 Subject: [PATCH 2/7] feat: mobile layout for editor page --- package.json | 1 + pnpm-lock.yaml | 7 + src/components/dashboard/DashboardTopbar.tsx | 8 +- src/components/dashboard/OptionsButton.tsx | 126 ++++++++++ src/components/ui/Editor.tsx | 5 +- src/pages/dashboard/[subdomain]/editor.tsx | 230 ++++++++++++++----- tailwind.config.js | 2 +- 7 files changed, 312 insertions(+), 67 deletions(-) create mode 100644 src/components/dashboard/OptionsButton.tsx diff --git a/package.json b/package.json index 651db62a..5a83f55c 100644 --- a/package.json +++ b/package.json @@ -108,6 +108,7 @@ "sharp": "0.32.0", "sortablejs": "1.15.0", "tailwind-merge": "^1.12.0", + "tailwind-scrollbar-hide": "^1.1.7", "tailwindcss-animate": "^1.0.5", "unidata.js": "0.7.18", "unified": "10.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8f9290f4..af5a551e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -253,6 +253,9 @@ dependencies: tailwind-merge: specifier: ^1.12.0 version: 1.12.0 + tailwind-scrollbar-hide: + specifier: ^1.1.7 + version: 1.1.7 tailwindcss-animate: specifier: ^1.0.5 version: 1.0.5(tailwindcss@3.3.1) @@ -12129,6 +12132,10 @@ packages: resolution: {integrity: sha512-Y17eDp7FtN1+JJ4OY0Bqv9OA41O+MS8c1Iyr3T6JFLnOgLg3EvcyMKZAnQ8AGyvB5Nxm3t9Xb5Mhe139m8QT/g==} dev: false + /tailwind-scrollbar-hide@1.1.7: + resolution: {integrity: sha512-X324n9OtpTmOMqEgDUEA/RgLrNfBF/jwJdctaPZDzB3mppxJk7TLIDmOreEDm1Bq4R9LSPu4Epf8VSdovNU+iA==} + dev: false + /tailwindcss-animate@1.0.5(tailwindcss@3.3.1): resolution: {integrity: sha512-UU3qrOJ4lFQABY+MVADmBm+0KW3xZyhMdRvejwtXqYOL7YjHYxmuREFAZdmVG5LPe5E9CAst846SLC4j5I3dcw==} peerDependencies: diff --git a/src/components/dashboard/DashboardTopbar.tsx b/src/components/dashboard/DashboardTopbar.tsx index e01b77b4..c92b9673 100644 --- a/src/components/dashboard/DashboardTopbar.tsx +++ b/src/components/dashboard/DashboardTopbar.tsx @@ -14,11 +14,11 @@ export const DashboardTopbar: React.FC<{ return (
{({ open, close }) => ( - <> +
- +
{drawerWidget(close)}
- +
)}
diff --git a/src/components/dashboard/OptionsButton.tsx b/src/components/dashboard/OptionsButton.tsx new file mode 100644 index 00000000..07cd7e6f --- /dev/null +++ b/src/components/dashboard/OptionsButton.tsx @@ -0,0 +1,126 @@ +import { Menu, Transition } from "@headlessui/react" +import { Dispatch, Fragment, SetStateAction, useState } from "react" +import { useTranslation } from "react-i18next" +import { PageVisibilityEnum } from "~/lib/types" +import { cn } from "~/lib/utils" + +export const OptionsButton: React.FC<{ + visibility: PageVisibilityEnum | undefined + previewPage: () => void + renderPage: Dispatch> + savePage: (published: boolean) => any + isRendering: boolean + published: boolean +}> = ({ + visibility, + previewPage, + savePage, + isRendering, + renderPage, + published, +}) => { + const { t } = useTranslation("dashboard") + + return ( + <> +
renderPage(!isRendering)} + > + {isRendering ? ( + + ) : ( + + )} +
+ + {({ open, close }) => { + return ( + <> + +
+ {open ? ( + + ) : ( + + )} +
+
+ + + +
+ + {({ active }) => ( + + )} + +
+
+ + {({ active }) => ( + + )} + + + {({ active }) => ( + + )} + + + {({ active }) => ( + + )} + +
+
+
+ + ) + }} +
+ + ) +} diff --git a/src/components/ui/Editor.tsx b/src/components/ui/Editor.tsx index f617b0f0..3812b230 100644 --- a/src/components/ui/Editor.tsx +++ b/src/components/ui/Editor.tsx @@ -5,6 +5,7 @@ import { scroll } from "@uiw/codemirror-extensions-events" import type { EditorState } from "@codemirror/state" import { useState, useEffect, useMemo } from "react" import { useTranslation } from "next-i18next" +import { useMobileLayout } from "~/hooks/useMobileLayout" export const Editor: React.FC<{ value: string @@ -25,6 +26,7 @@ export const Editor: React.FC<{ }) => { const { t } = useTranslation("dashboard") const [extensions, setExtensions] = useState([]) + const isMobileLayout = useMobileLayout() useEffect(() => { setExtensions([ markdown(), @@ -34,6 +36,7 @@ export const Editor: React.FC<{ fontSize: "1rem", overflow: "auto", height: "100%", + padding: isMobileLayout ? "0 1.25rem" : "unset", }, ".cm-content": { paddingBottom: "600px", @@ -85,7 +88,7 @@ export const Editor: React.FC<{ return useMemo( () => ( { @@ -163,6 +165,9 @@ export default function SubdomainEditor() { const createOrUpdatePage = useCreateOrUpdatePage() + const isMobileLayout = useMobileLayout() + const [isRendering, setIsRendering] = useState(false) + const savePage = async (published: boolean) => { const check = await checkPageSlug({ slug: values.slug || defaultSlug, @@ -406,8 +411,18 @@ export default function SubdomainEditor() {
) : ( <> -
-
+
+
-
- - {t(visibility as string)} - - - -
+ {isMobileLayout ? ( +
+ {/* + {t(visibility as string)} + */} + {/* */} + {/* */} + { + window.open( + `/_site/${subdomain}/preview/${draftKey.replace( + `draft-${subdomain}-`, + "", + )}`, + ) + }} + /> +
+ ) : ( +
+ + {t(visibility as string)} + + + +
+ )}
-
+
@@ -474,30 +550,62 @@ export default function SubdomainEditor() { />
- { - setCurrentScrollArea("editor") - }} - /> - { - setCurrentScrollArea("preview") - }} - > + {isMobileLayout ? ( + !isRendering ? ( + { + setCurrentScrollArea("editor") + }} + /> + ) : ( + { + setCurrentScrollArea("preview") + }} + > + ) + ) : ( + <> + { + setCurrentScrollArea("editor") + }} + /> + { + setCurrentScrollArea("preview") + }} + > + + )}
-
+ {/*
-
+
*/}
)} diff --git a/tailwind.config.js b/tailwind.config.js index cc5e112d..f29ade6a 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -60,5 +60,5 @@ module.exports = { }, }, variants: {}, - plugins: [require("tailwindcss-animate")], + plugins: [require("tailwindcss-animate"), require("tailwind-scrollbar-hide")], } From 7d52d4a013f04443ffc6b272a6d640730da887c9 Mon Sep 17 00:00:00 2001 From: zsavko Date: Sun, 9 Apr 2023 21:20:30 +0800 Subject: [PATCH 3/7] fix: extra style errors --- src/components/dashboard/DashboardLayout.tsx | 98 ++++++++++++-------- src/components/dashboard/DashboardMain.tsx | 7 +- src/components/dashboard/DashboardTopbar.tsx | 8 +- src/components/dashboard/OptionsButton.tsx | 6 ++ src/components/dashboard/PagesManager.tsx | 3 + src/components/ui/Tabs.tsx | 5 +- src/pages/dashboard/[subdomain]/editor.tsx | 11 +-- 7 files changed, 85 insertions(+), 53 deletions(-) diff --git a/src/components/dashboard/DashboardLayout.tsx b/src/components/dashboard/DashboardLayout.tsx index 2dce25d9..4f36dc0e 100644 --- a/src/components/dashboard/DashboardLayout.tsx +++ b/src/components/dashboard/DashboardLayout.tsx @@ -187,44 +187,64 @@ export function DashboardLayout({ } drawerWidget={(close: any) => ( <> -
-
- +
+
+
+ +
+ {"xLog"} +
+
+ {links.map((link) => { + const active = + link.href && + link.isActive({ + pathname: router.asPath, + href: link.href, + }) + return ( +
close()}> + + + {t(link.text)} + +
+ ) + })} +
+
+ + + {{t("Need help?")}} + + + + {{t("View Site")}} +
- {"xLog"} -
-
- {links.map((link) => { - const active = - link.href && - link.isActive({ - pathname: router.asPath, - href: link.href, - }) - return ( -
close()}> - - - {t(link.text)} - -
- ) - })}
)} @@ -329,7 +349,9 @@ export function DashboardLayout({ )} -
{children}
+
+ {children} +
) : ( diff --git a/src/components/dashboard/DashboardMain.tsx b/src/components/dashboard/DashboardMain.tsx index 82ef7561..e194930e 100644 --- a/src/components/dashboard/DashboardMain.tsx +++ b/src/components/dashboard/DashboardMain.tsx @@ -1,5 +1,6 @@ import { cn } from "~/lib/utils" import { useTranslation } from "next-i18next" +import { useMobileLayout } from "~/hooks/useMobileLayout" export const DashboardMain: React.FC<{ children: React.ReactNode @@ -8,15 +9,15 @@ export const DashboardMain: React.FC<{ className?: string }> = ({ children, fullWidth, title, className }) => { const { t } = useTranslation("dashboard") + const isMobileLayout = useMobileLayout() return (
{title &&

{t(title)}

} diff --git a/src/components/dashboard/DashboardTopbar.tsx b/src/components/dashboard/DashboardTopbar.tsx index c92b9673..97162c6e 100644 --- a/src/components/dashboard/DashboardTopbar.tsx +++ b/src/components/dashboard/DashboardTopbar.tsx @@ -13,9 +13,7 @@ export const DashboardTopbar: React.FC<{ const [isOpen, setIsOpen] = useState(false) return ( -
+
{({ open, close }) => (
@@ -23,9 +21,9 @@ export const DashboardTopbar: React.FC<{ as={Fragment} enter="transition ease-out duration-200" enterFrom="opacity-0" - enterTo="opacity-100" + enterTo="opacity-10" leave="transition ease-in duration-150" - leaveFrom="opacity-100" + leaveFrom="opacity-10" leaveTo="opacity-0" > diff --git a/src/components/dashboard/OptionsButton.tsx b/src/components/dashboard/OptionsButton.tsx index 07cd7e6f..8a41582a 100644 --- a/src/components/dashboard/OptionsButton.tsx +++ b/src/components/dashboard/OptionsButton.tsx @@ -121,6 +121,12 @@ export const OptionsButton: React.FC<{ ) }} +
renderPage(!isRendering)} + > + +
) } diff --git a/src/components/dashboard/PagesManager.tsx b/src/components/dashboard/PagesManager.tsx index baf94f3b..5645a64e 100644 --- a/src/components/dashboard/PagesManager.tsx +++ b/src/components/dashboard/PagesManager.tsx @@ -25,6 +25,7 @@ import { Tooltip } from "../ui/Tooltip" import { APP_NAME } from "~/lib/env" import { Trans, useTranslation } from "next-i18next" import { readFiles } from "~/lib/read-files" +import { useMobileLayout } from "~/hooks/useMobileLayout" export const PagesManager: React.FC<{ isPost: boolean @@ -47,6 +48,8 @@ export const PagesManager: React.FC<{ const { t } = useTranslation(["dashboard", "site"]) const date = useDate() + const isMobileLayout = useMobileLayout() + useEffect(() => { if (deletePage.isSuccess) { toast.success(t("Deleted!"), { diff --git a/src/components/ui/Tabs.tsx b/src/components/ui/Tabs.tsx index 93030410..c1ff0353 100644 --- a/src/components/ui/Tabs.tsx +++ b/src/components/ui/Tabs.tsx @@ -21,7 +21,10 @@ export const Tabs: React.FC<{ items: TabItem[]; className?: string }> = ({ return (
{items.map((item) => { if (item.hidden) return null diff --git a/src/pages/dashboard/[subdomain]/editor.tsx b/src/pages/dashboard/[subdomain]/editor.tsx index ffa523b7..9985cae6 100644 --- a/src/pages/dashboard/[subdomain]/editor.tsx +++ b/src/pages/dashboard/[subdomain]/editor.tsx @@ -526,11 +526,10 @@ export default function SubdomainEditor() {
@@ -605,7 +604,7 @@ export default function SubdomainEditor() {
- {/*
+
-
*/} +
)} From 301410f5f79c973227082cb7471856fe57c3382d Mon Sep 17 00:00:00 2001 From: zsavko Date: Sun, 9 Apr 2023 21:42:24 +0800 Subject: [PATCH 4/7] fix: content properties config panel style --- src/components/dashboard/OptionsButton.tsx | 54 +++++- src/pages/dashboard/[subdomain]/editor.tsx | 194 ++++++++++----------- 2 files changed, 140 insertions(+), 108 deletions(-) diff --git a/src/components/dashboard/OptionsButton.tsx b/src/components/dashboard/OptionsButton.tsx index 8a41582a..d1f350de 100644 --- a/src/components/dashboard/OptionsButton.tsx +++ b/src/components/dashboard/OptionsButton.tsx @@ -1,4 +1,4 @@ -import { Menu, Transition } from "@headlessui/react" +import { Menu, Popover, Transition } from "@headlessui/react" import { Dispatch, Fragment, SetStateAction, useState } from "react" import { useTranslation } from "react-i18next" import { PageVisibilityEnum } from "~/lib/types" @@ -9,6 +9,7 @@ export const OptionsButton: React.FC<{ previewPage: () => void renderPage: Dispatch> savePage: (published: boolean) => any + propertiesWidget: React.ReactNode isRendering: boolean published: boolean }> = ({ @@ -18,6 +19,7 @@ export const OptionsButton: React.FC<{ isRendering, renderPage, published, + propertiesWidget, }) => { const { t } = useTranslation("dashboard") @@ -121,12 +123,50 @@ export const OptionsButton: React.FC<{ ) }} -
renderPage(!isRendering)} - > - -
+ + + {({ open, close }) => ( +
+ + + + { + // setIsOpen(true) + // }} + > +
+ +
+
+ + +
+ {propertiesWidget} +
+
+
+
+ )} +
) } diff --git a/src/pages/dashboard/[subdomain]/editor.tsx b/src/pages/dashboard/[subdomain]/editor.tsx index 9985cae6..8abd7207 100644 --- a/src/pages/dashboard/[subdomain]/editor.tsx +++ b/src/pages/dashboard/[subdomain]/editor.tsx @@ -197,6 +197,96 @@ export default function SubdomainEditor() { const [isCheersOpen, setIsCheersOpen] = useState(false) + const ExtraProperties = ( +
+
+ ) => { + try { + const value = date.inLocalTimezone(e.target.value).toISOString() + updateValue("publishedAt", value) + } catch (error) {} + }} + help={t( + `This ${ + isPost ? "post" : "page" + } will be accessible from this time`, + )} + /> +
+
+ ) => + updateValue("slug", e.target.value) + } + help={ + <> + {(values.slug || defaultSlug) && ( + <> + {t(`This ${isPost ? "post" : "page"} will be accessible at`)}{" "} + + {getSiteLink({ + subdomain, + domain: site.data?.custom_domain, + noProtocol: true, + })} + /{encodeURIComponent(values.slug || defaultSlug)} + + + )} + + } + /> +
+
+ ) => + updateValue("tags", e.target.value) + } + help={t("Separate multiple tags with English commas") + ` ","`} + /> +
+
+ ) => { + updateValue("excerpt", e.target.value) + }} + help={t("Leave it blank to use auto-generated excerpt")} + /> +
+
+ ) + useEffect(() => { if (createOrUpdatePage.isSuccess) { if (createOrUpdatePage.data?.code === 0) { @@ -412,7 +502,7 @@ export default function SubdomainEditor() { ) : ( <>
@@ -475,6 +565,7 @@ export default function SubdomainEditor() { published={visibility !== PageVisibilityEnum.Draft} isRendering={isRendering} renderPage={setIsRendering} + propertiesWidget={ExtraProperties} previewPage={() => { window.open( `/_site/${subdomain}/preview/${draftKey.replace( @@ -604,106 +695,7 @@ export default function SubdomainEditor() { -
-
- ) => { - try { - const value = date - .inLocalTimezone(e.target.value) - .toISOString() - updateValue("publishedAt", value) - } catch (error) {} - }} - help={t( - `This ${ - isPost ? "post" : "page" - } will be accessible from this time`, - )} - /> -
-
- ) => - updateValue("slug", e.target.value) - } - help={ - <> - {(values.slug || defaultSlug) && ( - <> - {t( - `This ${ - isPost ? "post" : "page" - } will be accessible at`, - )}{" "} - - {getSiteLink({ - subdomain, - domain: site.data?.custom_domain, - noProtocol: true, - })} - /{encodeURIComponent(values.slug || defaultSlug)} - - - )} - - } - /> -
-
- ) => - updateValue("tags", e.target.value) - } - help={ - t("Separate multiple tags with English commas") + ` ","` - } - /> -
-
- ) => { - updateValue("excerpt", e.target.value) - }} - help={t("Leave it blank to use auto-generated excerpt")} - /> -
-
+ {!isMobileLayout && ExtraProperties} )} From 009daa442fa7d1bf7505798cff66ad28a1a7db78 Mon Sep 17 00:00:00 2001 From: zsavko Date: Sun, 9 Apr 2023 21:50:56 +0800 Subject: [PATCH 5/7] fix: popup menu z-index error --- src/components/dashboard/DashboardTopbar.tsx | 2 +- src/components/dashboard/OptionsButton.tsx | 4 ++-- src/pages/dashboard/[subdomain]/editor.tsx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/dashboard/DashboardTopbar.tsx b/src/components/dashboard/DashboardTopbar.tsx index 97162c6e..1fecffe4 100644 --- a/src/components/dashboard/DashboardTopbar.tsx +++ b/src/components/dashboard/DashboardTopbar.tsx @@ -46,7 +46,7 @@ export const DashboardTopbar: React.FC<{ leaveFrom="opacity-100 transform translate-x-0" leaveTo="opacity-0 transform -translate-x-full" > - +
{drawerWidget(close)}
diff --git a/src/components/dashboard/OptionsButton.tsx b/src/components/dashboard/OptionsButton.tsx index d1f350de..691f3c01 100644 --- a/src/components/dashboard/OptionsButton.tsx +++ b/src/components/dashboard/OptionsButton.tsx @@ -58,7 +58,7 @@ export const OptionsButton: React.FC<{ leaveFrom="transform opacity-100 scale-100" leaveTo="transform opacity-0 scale-95" > - +
{({ active }) => ( @@ -158,7 +158,7 @@ export const OptionsButton: React.FC<{ leaveFrom="opacity-100 transform translate-x-0" leaveTo="opacity-0 transform -translate-x-full" > - +
{propertiesWidget}
diff --git a/src/pages/dashboard/[subdomain]/editor.tsx b/src/pages/dashboard/[subdomain]/editor.tsx index 8abd7207..5a07be1f 100644 --- a/src/pages/dashboard/[subdomain]/editor.tsx +++ b/src/pages/dashboard/[subdomain]/editor.tsx @@ -616,10 +616,10 @@ export default function SubdomainEditor() { )}
From 5c3b904ba58fc84fdddcd95753a14a3aedb05d53 Mon Sep 17 00:00:00 2001 From: zsakvo Date: Sun, 9 Apr 2023 22:35:43 +0800 Subject: [PATCH 6/7] fix: editor width on mobile page --- src/components/ui/Editor.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/ui/Editor.tsx b/src/components/ui/Editor.tsx index 3812b230..b67a7236 100644 --- a/src/components/ui/Editor.tsx +++ b/src/components/ui/Editor.tsx @@ -88,7 +88,9 @@ export const Editor: React.FC<{ return useMemo( () => ( Date: Sun, 9 Apr 2023 22:35:43 +0800 Subject: [PATCH 7/7] fix: editor width on mobile page --- src/components/dashboard/OptionsButton.tsx | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/components/dashboard/OptionsButton.tsx b/src/components/dashboard/OptionsButton.tsx index 691f3c01..6dba8324 100644 --- a/src/components/dashboard/OptionsButton.tsx +++ b/src/components/dashboard/OptionsButton.tsx @@ -127,17 +127,6 @@ export const OptionsButton: React.FC<{ {({ open, close }) => (
- - -