diff --git a/apps/web/src/components/publish-view/index.js b/apps/web/src/components/publish-view/index.js
index 8344fddfb..d3977e3bb 100644
--- a/apps/web/src/components/publish-view/index.js
+++ b/apps/web/src/components/publish-view/index.js
@@ -1,6 +1,6 @@
import React, { useEffect, useMemo, useState } from "react";
import ReactDOM from "react-dom";
-import { Flex, Text, Button } from "rebass";
+import { Flex, Text, Button, Box } from "rebass";
import * as Icon from "../icons";
import Toggle from "../toggle";
import Field from "../field";
@@ -25,17 +25,17 @@ function PublishView(props) {
setPublishId(db.monographs.monograph(noteId));
}, [noteId]);
- useEffect(() => {
- window.addEventListener("keydown", onKeyDown);
- window.addEventListener("click", onWindowClick);
- window.addEventListener("blur", onWindowClick);
+ // useEffect(() => {
+ // window.addEventListener("keydown", onKeyDown);
+ // window.addEventListener("click", onWindowClick);
+ // window.addEventListener("blur", onWindowClick);
- return () => {
- window.removeEventListener("click", onWindowClick);
- window.removeEventListener("keydown", onKeyDown);
- window.removeEventListener("blur", onWindowClick);
- }
- }, []);
+ // return () => {
+ // window.removeEventListener("click", onWindowClick);
+ // window.removeEventListener("keydown", onKeyDown);
+ // window.removeEventListener("blur", onWindowClick);
+ // };
+ // }, []);
useEffect(() => {
const attachmentsLoadingEvent = EV.subscribe(
@@ -61,183 +61,206 @@ function PublishView(props) {
border: "1px solid",
borderColor: "border",
borderRadius: "default",
+ boxShadow: "0px 0px 15px 0px #00000011",
...position,
}}
bg="background"
- p={2}
+ // p={2}
flexDirection="column"
- onClick={e => {
- e.stopPropagation()
+ onClick={(e) => {
+ e.stopPropagation();
}}
>
-
- {noteTitle}
-
- {isPublishing ? (
-
- Publishing note
- {processingStatus && (
-
- Downloading images ({processingStatus.current}/
- {processingStatus.total})
-
- )}
-
- ) : (
- <>
- {publishId ? (
-
-
-
- This note is published at:
+
+
+ {noteTitle}
+
+ {isPublishing ? (
+
+ Please wait...
+ {processingStatus && (
+
+ Downloading images ({processingStatus.current}/
+ {processingStatus.total})
+
+ )}
+
+ ) : (
+ <>
+ {publishId ? (
+
+
+ Published at
-
- {`https://monograph.notesnook.com/${publishId}`}
-
+
+ {`https://monograph.notesnook.com/${publishId}`}
+
+
+
-
-
- ) : (
- <>
-
- This note will be published to a public URL.
-
- >
- )}
- setSelfDestruct((s) => !s)}
- />
- setIsPasswordProtected((s) => !s)}
- />
- {isPasswordProtected && (
-
- )}
-
-
- {publishId && (
-
+ ) : (
+ <>
+
+ This note will be published to a public URL.
+
+ >
)}
-
-
- >
- )}
+ setSelfDestruct((s) => !s)}
+ />
+ setIsPasswordProtected((s) => !s)}
+ />
+ {isPasswordProtected && (
+
+ )}
+ >
+ )}
+
+
+
+
+ {publishId && (
+
+ )}
+
+
+
);
}
@@ -258,8 +281,8 @@ export function showPublishView(noteId, location = "top") {