mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-23 17:16:26 +01:00
Hide "more" icon for posts in notifications
This commit is contained in:
parent
07f927d4ff
commit
4b9ff0ca5b
2 changed files with 22 additions and 5 deletions
|
@ -292,7 +292,12 @@ function Notification({
|
||||||
instance ? `/${instance}/s/${status.id}` : `/s/${status.id}`
|
instance ? `/${instance}/s/${status.id}` : `/s/${status.id}`
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Status status={status} size="s" />
|
<Status
|
||||||
|
status={status}
|
||||||
|
size="s"
|
||||||
|
previewMode
|
||||||
|
allowContextMenu
|
||||||
|
/>
|
||||||
</TruncatedLink>
|
</TruncatedLink>
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
|
@ -326,9 +331,19 @@ function Notification({
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{isStatic ? (
|
{isStatic ? (
|
||||||
<Status status={actualStatus} size="s" />
|
<Status
|
||||||
|
status={actualStatus}
|
||||||
|
size="s"
|
||||||
|
previewMode
|
||||||
|
allowContextMenu
|
||||||
|
/>
|
||||||
) : (
|
) : (
|
||||||
<Status statusID={actualStatusID} size="s" />
|
<Status
|
||||||
|
statusID={actualStatusID}
|
||||||
|
size="s"
|
||||||
|
previewMode
|
||||||
|
allowContextMenu
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
</TruncatedLink>
|
</TruncatedLink>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -124,6 +124,7 @@ function Status({
|
||||||
quoted,
|
quoted,
|
||||||
onStatusLinkClick = () => {},
|
onStatusLinkClick = () => {},
|
||||||
showFollowedTags,
|
showFollowedTags,
|
||||||
|
allowContextMenu,
|
||||||
}) {
|
}) {
|
||||||
if (skeleton) {
|
if (skeleton) {
|
||||||
return (
|
return (
|
||||||
|
@ -987,7 +988,8 @@ function Status({
|
||||||
const [isContextMenuOpen, setIsContextMenuOpen] = useState(false);
|
const [isContextMenuOpen, setIsContextMenuOpen] = useState(false);
|
||||||
const [contextMenuProps, setContextMenuProps] = useState({});
|
const [contextMenuProps, setContextMenuProps] = useState({});
|
||||||
|
|
||||||
const showContextMenu = !isSizeLarge && !previewMode && !_deleted && !quoted;
|
const showContextMenu =
|
||||||
|
allowContextMenu || (!isSizeLarge && !previewMode && !_deleted && !quoted);
|
||||||
|
|
||||||
// Only iOS/iPadOS browsers don't support contextmenu
|
// Only iOS/iPadOS browsers don't support contextmenu
|
||||||
// Some comments report iPadOS might support contextmenu if a mouse is connected
|
// Some comments report iPadOS might support contextmenu if a mouse is connected
|
||||||
|
@ -1412,7 +1414,7 @@ function Status({
|
||||||
/>
|
/>
|
||||||
)}{' '}
|
)}{' '}
|
||||||
<RelativeTime datetime={createdAtDate} format="micro" />
|
<RelativeTime datetime={createdAtDate} format="micro" />
|
||||||
{showContextMenu && <Icon icon="more2" class="more" />}
|
{!previewMode && <Icon icon="more2" class="more" />}
|
||||||
</Link>
|
</Link>
|
||||||
) : (
|
) : (
|
||||||
// <Menu
|
// <Menu
|
||||||
|
|
Loading…
Reference in a new issue