Hide "View profile header" if there's no header

pull/1128/head
Lim Chee Aun 2025-04-27 13:09:53 +08:00
rodzic c99bba1918
commit e64c0286c2
1 zmienionych plików z 19 dodań i 17 usunięć

Wyświetl plik

@ -634,23 +634,25 @@ function AccountInfo({
<Trans>View profile image</Trans>
</span>
</MenuItem>
<MenuItem
onClick={() => {
states.showMediaModal = {
mediaAttachments: [
{
type: 'image',
url: headerStatic,
},
],
};
}}
>
<Icon icon="media" />
<span>
<Trans>View profile header</Trans>
</span>
</MenuItem>
{!!headerStatic && !headerIsAvatar && (
<MenuItem
onClick={() => {
states.showMediaModal = {
mediaAttachments: [
{
type: 'image',
url: headerStatic,
},
],
};
}}
>
<Icon icon="media" />
<span>
<Trans>View profile header</Trans>
</span>
</MenuItem>
)}
{currentAuthenticated &&
isSelf &&
supports('@mastodon/profile-edit') && (