Created
December 7, 2015 21:31
-
-
Save parrish/b6cdff519e3edafcb2dc to your computer and use it in GitHub Desktop.
account-menu hacky work around
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/partials/account-bar.cjsx b/app/partials/account-bar.cjsx | |
index 0976873..435711c 100644 | |
--- a/app/partials/account-bar.cjsx | |
+++ b/app/partials/account-bar.cjsx | |
@@ -46,6 +46,9 @@ module.exports = React.createClass | |
@setState {unread: !!conversations.length} | |
.catch (e) -> throw new Error(e) | |
+ close: -> | |
+ document.querySelector('.account-menu.modal-form-underlay').click() | |
+ | |
render: -> | |
<div className="account-bar"> | |
<div className="account-info"> | |
@@ -60,19 +63,19 @@ module.exports = React.createClass | |
}> | |
<PassHistoryContext {...@props} context={history: @history}> | |
<div ref="accountMenu" role="menu" className="secret-list" onKeyDown={@navigateMenu}> | |
- <Link role="menuitem" to="/users/#{@props.user.login}"> | |
+ <Link role="menuitem" to="/users/#{@props.user.login}" onClick={@close}> | |
<i className="fa fa-user fa-fw"></i>{' '} | |
<Translate content="accountMenu.profile" /> | |
</Link> | |
- <Link role="menuitem" to="/settings"> | |
+ <Link role="menuitem" to="/settings" onClick={@close}> | |
<i className="fa fa-cogs fa-fw"></i>{' '} | |
<Translate content="accountMenu.settings" /> | |
</Link> | |
- <Link role="menuitem" to="/collections/#{@props.user.login}"> | |
+ <Link role="menuitem" to="/collections/#{@props.user.login}" onClick={@close}> | |
<i className="fa fa-image fa-fw"></i>{' '} | |
<Translate content="accountMenu.collections" /> | |
</Link> | |
- <Link role="menuitem" to="/favorites/#{@props.user.login}"> | |
+ <Link role="menuitem" to="/favorites/#{@props.user.login}" onClick={@close}> | |
<i className="fa fa-star fa-fw"></i>{' '} | |
<Translate content="accountMenu.favorites" /> | |
</Link> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment