-
-
- updateValue("disableAISummary", state)}
- />
-
-
-
-
{
- if (value) {
- updateValue("publishedAt", value.toISOString())
- } else {
- updateValue("publishedAt", "")
- }
- }}
- styles={{
- input: {
- borderRadius: "0.5rem",
- borderColor: "var(--border-color)",
- height: "2.5rem",
- "&:focus-within": {
- borderColor: "var(--theme-color)",
- },
- },
- }}
- />
-
- {t(
- `This ${
- isPost ? "post" : "page"
- } will be accessible from this time. Leave blank to use the current time.`,
- )}
-
- {values.publishedAt > new Date().toISOString() && (
-
- {t(
- "The post is currently not public as its publication date has been scheduled for a future time.",
- )}
-
+ return () => {
+ present({
+ title: t("Advanced Settings"),
+ content: () => ,
+ })
+ }
+}
+
+const EditorAdvancedModal: FC<{
+ isPost: boolean
+}> = ({ isPost }) => {
+ const { t } = useTranslation("dashboard")
+
+ const values = useEditorState(
+ (state) => pick(state, ["disableAISummary", "publishedAt"]),
+ shallow,
+ )
+ const updateValue = useEditorState.setState
+ return (
+
+
+
+ updateValue("disableAISummary", state)}
+ setChecked={(state) => {
+ updateValue({
+ disableAISummary: state,
+ })
+ }}
+ />
+
+
+
+
{
+ if (value) {
+ updateValue({
+ publishedAt: value.toISOString(),
+ })
+ } else {
+ updateValue({
+ publishedAt: "",
+ })
+ }
+ }}
+ styles={{
+ input: {
+ borderRadius: "0.5rem",
+ borderColor: "var(--border-color)",
+ height: "2.5rem",
+ "&:focus-within": {
+ borderColor: "var(--theme-color)",
+ },
+ },
+ }}
+ />
+
+ {t(
+ `This ${
+ isPost ? "post" : "page"
+ } will be accessible from this time. Leave blank to use the current time.`,
+ )}
+
+ {values.publishedAt > new Date().toISOString() && (
+
+ {t(
+ "The post is currently not public as its publication date has been scheduled for a future time.",
)}
-
-
- )
- },
-)
+ )}
+
+
+ )
+}
-EditorAdvancedOptions.displayName = "EditorAdvancedOptions"
+const PublishedModal = ({
+ dismiss,
+ postUrl,
+ transactionUrl,
+ twitterShareUrl,
+}: ModalContentProps<{
+ postUrl: string
+ transactionUrl: string
+ twitterShareUrl: string
+}>) => {
+ const { t } = useTranslation("dashboard")
+ return (
+ <>
+
+ {t(
+ "Your post has been securely stored on the blockchain. Now you may want to",
+ )}
+
+ -
+
+ {t("View the post")}
+
+
+ -
+
+ {t("View the transaction")}
+
+
+ -
+
+ {t("Share to Twitter")}
+
+
+
+
+
+
+
+ >
+ )
+}
diff --git a/src/app/providers.tsx b/src/app/providers.tsx
index 0b7c1bdc..ac58d54b 100644
--- a/src/app/providers.tsx
+++ b/src/app/providers.tsx
@@ -11,6 +11,7 @@ import {
import { QueryClient } from "@tanstack/react-query"
import { PersistQueryClientProvider } from "@tanstack/react-query-persist-client"
+import { ModalStackProvider } from "~/components/ui/ModalStack"
// eslint-disable-next-line import/no-unresolved
import { useDarkMode } from "~/hooks/useDarkMode"
import { useMobileLayout } from "~/hooks/useMobileLayout"
@@ -84,7 +85,10 @@ export default function Providers({
signInStrategy="simple"
ignoreWalletDisconnectEvent={true}
>
-
{children}
+
+ {children}
+
+
void
}) => {
const { t } = useTranslation("common")
- const [open, setOpen] = useState(false)
+
+ const presentPatronModal = usePatronModal()
return (
<>
-
-