diff --git a/apps/web/src/dialogs/announcement-dialog.jsx b/apps/web/src/dialogs/announcement-dialog.jsx index de16e063a..b9d9e2d13 100644 --- a/apps/web/src/dialogs/announcement-dialog.jsx +++ b/apps/web/src/dialogs/announcement-dialog.jsx @@ -72,7 +72,7 @@ function AnnouncementDialog(props) { }, overlay: { zIndex: 999, - background: theme.colors.overlay + background: "var(--backdrop)" } }} > diff --git a/apps/web/src/dialogs/attachments-dialog.tsx b/apps/web/src/dialogs/attachments-dialog.tsx index 7922545ff..30ecb286d 100644 --- a/apps/web/src/dialogs/attachments-dialog.tsx +++ b/apps/web/src/dialogs/attachments-dialog.tsx @@ -56,8 +56,8 @@ import { Multiselect } from "../common/multi-select"; import { CustomScrollbarsVirtualList } from "../components/list-container"; import { Attachment } from "../components/attachment"; import { isDocument, isImage, isVideo } from "@notesnook/core/utils/filename"; - import { alpha } from "@theme-ui/color"; +import { ScopedThemeProvider } from "../components/theme-provider"; type ToolbarAction = { title: string; @@ -389,83 +389,88 @@ const Sidebar = memo( const download = useStore((store) => store.download); return ( - - - { - setRoute(e.target.value ? "none" : "all"); - if (e.target.value) filter(e.target.value); - }} - /> - {routes.map((item) => ( - { - onRouteChange(item.id); - setRoute(item.id); + + + + { + setRoute(e.target.value ? "none" : "all"); + if (e.target.value) filter(e.target.value); }} - selected={route === item.id} /> - ))} - - - - - {pluralize(counts.all, "file")} - {formatBytes(totalSize)} + {routes.map((item) => ( + { + onRouteChange(item.id); + setRoute(item.id); + }} + selected={route === item.id} + /> + ))} + + + + + {pluralize(counts.all, "file")} + {formatBytes(totalSize)} + + - - + ); }, (prev, next) => diff --git a/apps/web/src/dialogs/buy-dialog/buy-dialog.tsx b/apps/web/src/dialogs/buy-dialog/buy-dialog.tsx index 76c6111dd..c62eaef5c 100644 --- a/apps/web/src/dialogs/buy-dialog/buy-dialog.tsx +++ b/apps/web/src/dialogs/buy-dialog/buy-dialog.tsx @@ -22,7 +22,6 @@ import { Text, Flex, Button } from "@theme-ui/components"; import { Cross, Check, Loading } from "../../components/icons"; import { useStore as useUserStore } from "../../stores/user-store"; import { useStore as useThemeStore } from "../../stores/theme-store"; -import Modal from "react-modal"; import { useTheme } from "@emotion/react"; import { ReactComponent as Rocket } from "../../assets/rocket.svg"; import { ReactComponent as WorkAnywhere } from "../../assets/workanywhere.svg"; @@ -45,6 +44,8 @@ import { isUserSubscribed } from "../../hooks/use-is-user-premium"; import { SUBSCRIPTION_STATUS } from "../../common/constants"; import { alpha } from "@theme-ui/color"; +import BaseDialog from "../../components/dialog"; +import { ScopedThemeProvider } from "../../components/theme-provider"; type BuyDialogProps = { couponCode?: string; @@ -70,89 +71,52 @@ export function BuyDialog(props: BuyDialogProps) { }, [couponCode, onApplyCoupon]); return ( - { - if (!e || !onClose) return; - // we need this work around because ReactModal content spreads over the overlay - const child = e.contentEl.firstElementChild; - if (!child || !(child instanceof HTMLElement)) return; - - e.contentEl.onmousedown = function (e) { - if (!e.screenX && !e.screenY) return; - if ( - e.x < child.offsetLeft || - e.x > child.offsetLeft + child.clientWidth || - e.y < child.offsetTop || - e.y > child.offsetTop + child.clientHeight - ) { - onClose(); - } - }; - }} - style={{ - content: { - top: 0, - left: 0, - right: 0, - bottom: 0, - display: "flex", - justifyContent: "center", - backgroundColor: undefined, - padding: 0, - overflowY: "hidden", - border: 0, - zIndex: 0 - }, - overlay: { - zIndex: 999, - background: theme.colors.backdrop - } + width={"968px"} + onClose={() => props.onClose()} + noScroll + sx={{ + bg: "transparent", + width: ["95%", "80%", isCheckoutCompleted ? "400px" : "60%"] }} > - - +
- + ); } diff --git a/apps/web/src/dialogs/buy-dialog/features.tsx b/apps/web/src/dialogs/buy-dialog/features.tsx index a6cb636bb..2bbe044d1 100644 --- a/apps/web/src/dialogs/buy-dialog/features.tsx +++ b/apps/web/src/dialogs/buy-dialog/features.tsx @@ -437,8 +437,9 @@ export function Features() { flex: 1, flexDirection: "column", flexShrink: 0, - overflowY: ["hidden", "hidden", "auto"], - gap: 50 + overflowY: ["unset", "unset", "auto"], + gap: 50, + paddingBottom: [50, 50, 0] }} pt={4} bg="background" diff --git a/apps/web/src/dialogs/onboarding-dialog.jsx b/apps/web/src/dialogs/onboarding-dialog.jsx index 66a48c19f..f17a5e6d3 100644 --- a/apps/web/src/dialogs/onboarding-dialog.jsx +++ b/apps/web/src/dialogs/onboarding-dialog.jsx @@ -188,6 +188,7 @@ function OnboardingDialog({ onClose: _onClose, type }) { {Component && } {buttonText && ( -