Comment: add hideContextMenu
+ hide reply button too when hideActions
is set
This commit is contained in:
parent
8aa6a60acf
commit
ed0fb59983
1 changed files with 24 additions and 19 deletions
|
@ -70,6 +70,7 @@ type Props = {
|
||||||
doToast: ({ message: string }) => void,
|
doToast: ({ message: string }) => void,
|
||||||
isTopLevel?: boolean,
|
isTopLevel?: boolean,
|
||||||
hideActions?: boolean,
|
hideActions?: boolean,
|
||||||
|
hideContextMenu?: boolean,
|
||||||
othersReacts: ?{
|
othersReacts: ?{
|
||||||
like: number,
|
like: number,
|
||||||
dislike: number,
|
dislike: number,
|
||||||
|
@ -106,6 +107,7 @@ function CommentView(props: Props) {
|
||||||
doToast,
|
doToast,
|
||||||
isTopLevel,
|
isTopLevel,
|
||||||
hideActions,
|
hideActions,
|
||||||
|
hideContextMenu,
|
||||||
othersReacts,
|
othersReacts,
|
||||||
playingUri,
|
playingUri,
|
||||||
stakedLevel,
|
stakedLevel,
|
||||||
|
@ -331,6 +333,7 @@ function CommentView(props: Props) {
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
{!hideContextMenu && (
|
||||||
<div className="comment__menu">
|
<div className="comment__menu">
|
||||||
<Menu>
|
<Menu>
|
||||||
<MenuButton className="menu__button">
|
<MenuButton className="menu__button">
|
||||||
|
@ -349,6 +352,7 @@ function CommentView(props: Props) {
|
||||||
/>
|
/>
|
||||||
</Menu>
|
</Menu>
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{isEditing ? (
|
{isEditing ? (
|
||||||
|
@ -417,7 +421,8 @@ function CommentView(props: Props) {
|
||||||
<Spinner text={numDirectReplies > 1 ? __('Loading Replies') : __('Loading Reply')} type="small" />
|
<Spinner text={numDirectReplies > 1 ? __('Loading Replies') : __('Loading Reply')} type="small" />
|
||||||
</span>
|
</span>
|
||||||
) : (
|
) : (
|
||||||
numDirectReplies > 0 && (
|
numDirectReplies > 0 &&
|
||||||
|
!hideActions && (
|
||||||
<div className="comment__actions">
|
<div className="comment__actions">
|
||||||
{!showReplies ? (
|
{!showReplies ? (
|
||||||
openNewThread ? (
|
openNewThread ? (
|
||||||
|
|
Loading…
Reference in a new issue