1
0
Fork 0
forked from gitea/nas

Add "More" to the sidebar menu with links to mutes, blocks, and so on (#34987)

This commit is contained in:
Eugen Rochko 2025-06-11 18:12:04 +02:00 committed by GitHub
parent 9896bed85f
commit f53bb4cd7d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 151 additions and 157 deletions

View file

@ -418,7 +418,7 @@ export const AccountHeader: React.FC<{
return arr;
}
if (signedIn && account.id !== me && !account.suspended) {
if (signedIn && !account.suspended) {
arr.push({
text: intl.formatMessage(messages.mention, {
name: account.username,
@ -442,37 +442,7 @@ export const AccountHeader: React.FC<{
arr.push(null);
}
if (account.id === me) {
arr.push({
text: intl.formatMessage(messages.edit_profile),
href: '/settings/profile',
});
arr.push({
text: intl.formatMessage(messages.preferences),
href: '/settings/preferences',
});
arr.push(null);
arr.push({
text: intl.formatMessage(messages.follow_requests),
to: '/follow_requests',
});
arr.push({
text: intl.formatMessage(messages.favourites),
to: '/favourites',
});
arr.push({ text: intl.formatMessage(messages.lists), to: '/lists' });
arr.push({
text: intl.formatMessage(messages.followed_tags),
to: '/followed_tags',
});
arr.push(null);
arr.push({ text: intl.formatMessage(messages.mutes), to: '/mutes' });
arr.push({ text: intl.formatMessage(messages.blocks), to: '/blocks' });
arr.push({
text: intl.formatMessage(messages.domain_blocks),
to: '/domain_blocks',
});
} else if (signedIn) {
if (signedIn) {
if (relationship?.following) {
if (!relationship.muting) {
if (relationship.showing_reblogs) {
@ -611,8 +581,7 @@ export const AccountHeader: React.FC<{
}
if (
(account.id !== me &&
(permissions & PERMISSION_MANAGE_USERS) === PERMISSION_MANAGE_USERS) ||
(permissions & PERMISSION_MANAGE_USERS) === PERMISSION_MANAGE_USERS ||
(isRemote &&
(permissions & PERMISSION_MANAGE_FEDERATION) ===
PERMISSION_MANAGE_FEDERATION)
@ -880,12 +849,14 @@ export const AccountHeader: React.FC<{
<div className='account__header__tabs__buttons'>
{!hidden && bellBtn}
{!hidden && shareBtn}
<Dropdown
disabled={menu.length === 0}
items={menu}
icon='ellipsis-v'
iconComponent={MoreHorizIcon}
/>
{accountId !== me && (
<Dropdown
disabled={menu.length === 0}
items={menu}
icon='ellipsis-v'
iconComponent={MoreHorizIcon}
/>
)}
{!hidden && actionBtn}
</div>
</div>