mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-21 20:15:10 +01:00
Add "edit profile" link to dropdown on own profile
This commit is contained in:
parent
cc54683694
commit
a3384b6ea6
@ -9,7 +9,12 @@ const DropdownMenu = ({ icon, items, size }) => {
|
||||
|
||||
<DropdownContent style={{ lineHeight: '18px' }}>
|
||||
<ul>
|
||||
{items.map(({ text, action }, i) => <li key={i}><a href='#' onClick={e => { e.preventDefault(); action(); }}>{text}</a></li>)}
|
||||
{items.map(({ text, action, href = '#' }, i) => <li key={i}><a href={href} target='_blank' rel='noopener' onClick={e => {
|
||||
if (typeof action === 'function') {
|
||||
e.preventDefault();
|
||||
action();
|
||||
}
|
||||
}}>{text}</a></li>)}
|
||||
</ul>
|
||||
</DropdownContent>
|
||||
</Dropdown>
|
||||
|
@ -19,7 +19,7 @@ const ActionBar = React.createClass({
|
||||
let menu = [];
|
||||
|
||||
if (account.get('id') === me) {
|
||||
|
||||
menu.push({ text: 'Edit profile', href: '/settings/profile' });
|
||||
} else if (account.getIn(['relationship', 'blocking'])) {
|
||||
menu.push({ text: 'Unblock', action: this.props.onBlock });
|
||||
} else if (account.getIn(['relationship', 'following'])) {
|
||||
|
Loading…
Reference in New Issue
Block a user