Skip to content

Commit 53a284e

Browse files
committed
feat: allow quick connecting by double clicking
1 parent f5f5df9 commit 53a284e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

client/components/main/Main/ConnectionSelector/Favorite.jsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class Favorite extends React.Component {
5959
select(favorite, connect) {
6060
const activeKey = favorite ? favorite.get('key') : null;
6161
this.setState({ activeKey });
62-
if (connect && activeKey) {
62+
if (connect) {
6363
this.props.onRequireConnecting(activeKey);
6464
} else {
6565
this.props.onSelect(activeKey);
@@ -70,7 +70,11 @@ class Favorite extends React.Component {
7070
return <div style={ { flex: 1, display: 'flex', flexDirection: 'column', overflowY: 'hidden' } }>
7171
<nav className="nav-group">
7272
<h5 className="nav-group-title"></h5>
73-
<a className={'nav-group-item' + (this.state.activeKey ? '' : ' active')} onClick={this.onClick.bind(this, -1)}>
73+
<a
74+
className={'nav-group-item' + (this.state.activeKey ? '' : ' active')}
75+
onClick={this.onClick.bind(this, -1)}
76+
onDoubleClick={this.onDoubleClick.bind(this, -1)}
77+
>
7478
<span className="icon icon-flash"></span>
7579
QUICK CONNECT
7680
</a>

0 commit comments

Comments
 (0)