diff options
author | pluralcafe-docker <docker@plural.cafe> | 2018-08-22 08:26:56 +0000 |
---|---|---|
committer | pluralcafe-docker <docker@plural.cafe> | 2018-08-22 08:26:56 +0000 |
commit | a4935a8e24dcfa865fb330693d8ec90beca1aa98 (patch) | |
tree | 9fc0be073bc2ed5bf4231d850106f214fdeb020e /app/javascript/flavours/glitch/features | |
parent | c339d49d82b3fd2873831029d9c92b3fbf1236e3 (diff) | |
parent | 37965ac8d9773ae79f6b8dd6fcd353894d2194ca (diff) |
Merge branch 'glitch'
Diffstat (limited to 'app/javascript/flavours/glitch/features')
3 files changed, 13 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/composer/options/dropdown/index.js b/app/javascript/flavours/glitch/features/composer/options/dropdown/index.js index b3462e25a..8cfbac1bb 100644 --- a/app/javascript/flavours/glitch/features/composer/options/dropdown/index.js +++ b/app/javascript/flavours/glitch/features/composer/options/dropdown/index.js @@ -168,6 +168,7 @@ export default class ComposerOptionsDropdown extends React.PureComponent { const computedClass = classNames('composer--options--dropdown', { active, open, + top: placement === 'top', }); // The result. diff --git a/app/javascript/flavours/glitch/features/ui/components/column_link.js b/app/javascript/flavours/glitch/features/ui/components/column_link.js index b058aa963..1b6d7d09e 100644 --- a/app/javascript/flavours/glitch/features/ui/components/column_link.js +++ b/app/javascript/flavours/glitch/features/ui/components/column_link.js @@ -22,8 +22,13 @@ const ColumnLink = ({ icon, text, to, onClick, href, method, badge }) => { </Link> ); } else { + const handleOnClick = (e) => { + e.preventDefault(); + e.stopPropagation(); + return onClick(e); + } return ( - <a onClick={onClick} className='column-link' role='button' tabIndex='0' data-method={method}> + <a href='#' onClick={onClick && handleOnClick} className='column-link' tabIndex='0'> <i className={`fa fa-fw fa-${icon} column-link__icon`} /> {text} {badgeElement} diff --git a/app/javascript/flavours/glitch/features/ui/index.js b/app/javascript/flavours/glitch/features/ui/index.js index 7024e60da..d58e11b55 100644 --- a/app/javascript/flavours/glitch/features/ui/index.js +++ b/app/javascript/flavours/glitch/features/ui/index.js @@ -92,6 +92,7 @@ const keyMap = { goToProfile: 'g u', goToBlocked: 'g b', goToMuted: 'g m', + goToRequests: 'g r', toggleSpoiler: 'x', }; @@ -369,6 +370,10 @@ export default class UI extends React.Component { this.props.history.push('/mutes'); } + handleHotkeyGoToRequests = () => { + this.props.history.push('/follow_requests'); + } + render () { const { width, draggingOver } = this.state; const { children, layout, isWide, navbarUnder, dropdownMenuIsOpen } = this.props; @@ -408,6 +413,7 @@ export default class UI extends React.Component { goToProfile: this.handleHotkeyGoToProfile, goToBlocked: this.handleHotkeyGoToBlocked, goToMuted: this.handleHotkeyGoToMuted, + goToRequests: this.handleHotkeyGoToRequests, }; return ( |