mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 20:34:02 +03:00
Changed the bio in the comment box to bring up the modal
This commit is contained in:
parent
7e4f0bf361
commit
843a79511f
@ -48,7 +48,7 @@ const Comment = (props) => {
|
||||
const isPaidMember = member && !!member.paid;
|
||||
const canReply = member && (isPaidMember || !paidOnly);
|
||||
|
||||
// comment.member.bio = 'Head of Marketing'; // FOR TESTING
|
||||
comment.member.bio = 'Head of Marketing'; // FOR TESTING
|
||||
|
||||
if (isInEditMode) {
|
||||
return (
|
||||
@ -72,7 +72,7 @@ const Comment = (props) => {
|
||||
<div className="flex items-baseline font-sans font-semibold text-[14px] tracking-tight text-neutral-400 dark:text-[rgba(255,255,255,0.5)]">
|
||||
{comment.member.bio && <div>{comment.member.bio}<span className="mx-[0.3em]">·</span></div>}
|
||||
<div>{formatRelativeTime(comment.created_at)}</div>
|
||||
{comment.edited_at && <div><span className="mx-[0.3em]">·</span>Edited</div>}
|
||||
<div><span className="mx-[0.3em]">·</span>Edited</div>
|
||||
</div>
|
||||
</div>}
|
||||
</div>
|
||||
|
@ -236,6 +236,17 @@ const Form = (props) => {
|
||||
editor.commands.focus();
|
||||
};
|
||||
|
||||
const handleAddBio = (event) => {
|
||||
event.preventDefault();
|
||||
|
||||
dispatchAction('openPopup', {
|
||||
type: 'addDetailsDialog',
|
||||
callback: () => {
|
||||
editor.commands.focus();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
let submitText;
|
||||
if (props.isReply) {
|
||||
submitText = <><span className="hidden sm:inline">Add </span><span className="capitalize sm:normal-case">reply</span></>;
|
||||
@ -326,7 +337,7 @@ const Form = (props) => {
|
||||
<div className="flex items-baseline font-sans font-semibold text-[14px] tracking-tight text-neutral-400 dark:text-[rgba(255,255,255,0.5)]">
|
||||
{memberBio ?
|
||||
<div>{memberBio}</div> :
|
||||
<div>Add your bio</div>}
|
||||
<button className="transition duration-150 hover:text-neutral-500" onClick={handleAddBio}>Add your bio</button>}
|
||||
</div>
|
||||
</Transition>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user