|
[
]
@@ -293,7 +367,7 @@ const PostForm = () => {
comment = editedComment;
}
- const { deleted, locked, removed } = comment || {};
+ const { deleted, locked, removed, postCid } = comment || {};
const isThreadClosed = deleted || locked || removed || isInDescriptionView || isInRulesView;
const [showForm, setShowForm] = useState(false);
@@ -320,7 +394,7 @@ const PostForm = () => {
]
) : (
-
@@ -336,7 +410,7 @@ const PostForm = () => {
- {showForm &&
@@ -169,7 +202,7 @@ const ReplyModal = ({ closeModal, parentCid, scrollY }: ReplyModalProps) => {
[
]
diff --git a/src/components/settings-modal/account-settings/account-settings.module.css b/src/components/settings-modal/account-settings/account-settings.module.css
index 2371bb88..1fd66e37 100644
--- a/src/components/settings-modal/account-settings/account-settings.module.css
+++ b/src/components/settings-modal/account-settings/account-settings.module.css
@@ -36,11 +36,32 @@
}
.deleteAccount {
- color: red;
display: block;
- margin-top: 10px;
+}
+
+.deleteAccount:not(:disabled) {
+ color: red;
}
.setting .createAccount {
margin-left: 5px;
+}
+
+.settingTip {
+ display: block;
+ font-size: 0.85em;
+ margin: 2px 0 10px 0;
+ padding-left: 19px;
+}
+
+.anonMode {
+ padding: 10px 0;
+}
+
+.anonMode label {
+ text-transform: capitalize;
+}
+
+.anonMode input[type="checkbox"] {
+ margin-right: 3px;
}
\ No newline at end of file
diff --git a/src/components/settings-modal/account-settings/account-settings.tsx b/src/components/settings-modal/account-settings/account-settings.tsx
index df7e74b6..c8a48dc8 100644
--- a/src/components/settings-modal/account-settings/account-settings.tsx
+++ b/src/components/settings-modal/account-settings/account-settings.tsx
@@ -3,6 +3,21 @@ import { useTranslation } from 'react-i18next';
import { createAccount, deleteAccount, exportAccount, importAccount, setAccount, setActiveAccount, useAccount, useAccounts } from '@plebbit/plebbit-react-hooks';
import stringify from 'json-stringify-pretty-compact';
import styles from './account-settings.module.css';
+import useAnonModeStore from '../../../stores/use-anon-mode-store';
+
+const AnonMode = () => {
+ const anonMode = useAnonModeStore((state) => state.anonMode);
+ const setAnonMode = useAnonModeStore((state) => state.setAnonMode);
+
+ return (
+ > )} diff --git a/src/components/post-mobile/post-mobile.tsx b/src/components/post-mobile/post-mobile.tsx index 01e9c3af..025b65e5 100644 --- a/src/components/post-mobile/post-mobile.tsx +++ b/src/components/post-mobile/post-mobile.tsx @@ -127,7 +127,7 @@ const PostInfoAndMedia = ({ openReplyModal, post, postReplyCount = 0, roles }: P !cid && e.preventDefault()}> c/ - openReplyModal && openReplyModal(cid)}> + openReplyModal && openReplyModal(cid, postCid)}> {shortCid} > diff --git a/src/components/reply-modal/reply-modal.tsx b/src/components/reply-modal/reply-modal.tsx index c8842b93..2020722d 100644 --- a/src/components/reply-modal/reply-modal.tsx +++ b/src/components/reply-modal/reply-modal.tsx @@ -2,7 +2,7 @@ import { useEffect, useRef, useState } from 'react'; import { useLocation, useParams } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import Draggable from 'react-draggable'; -import { setAccount, useAccount, useSubplebbit } from '@plebbit/plebbit-react-hooks'; +import { setAccount, useAccount, useComment, useSubplebbit } from '@plebbit/plebbit-react-hooks'; import Plebbit from '@plebbit/plebbit-js/dist/browser/index.js'; import { getFormattedTimeAgo } from '../../lib/utils/time-utils'; import { isValidURL } from '../../lib/utils/url-utils'; @@ -13,17 +13,19 @@ import useIsMobile from '../../hooks/use-is-mobile'; import styles from './reply-modal.module.css'; import { LinkTypePreviewer } from '../post-form'; import _ from 'lodash'; +import useAnonMode from '../../hooks/use-anon-mode'; interface ReplyModalProps { closeModal: () => void; parentCid: string; + postCid: string; scrollY: number; } -const ReplyModal = ({ closeModal, parentCid, scrollY }: ReplyModalProps) => { +const ReplyModal = ({ closeModal, parentCid, postCid, scrollY }: ReplyModalProps) => { const { t } = useTranslation(); const { subplebbitAddress } = useParams() as { subplebbitAddress: string }; - const { setContent, publishReply } = useReply({ cid: parentCid, subplebbitAddress }); + const { setPublishReplyOptions, publishReply } = useReply({ cid: parentCid, subplebbitAddress }); const account = useAccount(); const { displayName } = account?.author || {}; const [url, setUrl] = useState(''); @@ -31,7 +33,35 @@ const ReplyModal = ({ closeModal, parentCid, scrollY }: ReplyModalProps) => { const urlRef = useRef
+
+ Automatically use a different user ID in each thread
+
+ );
+};
const AccountSettings = () => {
const { t } = useTranslation();
@@ -167,7 +182,7 @@ const AccountSettings = () => {
|