Skip to content

Commit

Permalink
Merge branch 'develop' into save-settings
Browse files Browse the repository at this point in the history
  • Loading branch information
aszecsei committed Apr 20, 2018
2 parents 27c33c5 + f0aa4ef commit fa63f78
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions app/renderer/components/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ interface ISidebarProps {
curChanID: Guid | undefined
onChannelClick: (conn: Connection, channel: Channel) => void
onAddServerClick: () => void
onSettingsClick: () => void
}

export const Sidebar: React.SFC<ISidebarProps> = props => {
Expand Down Expand Up @@ -39,6 +40,11 @@ export const Sidebar: React.SFC<ISidebarProps> = props => {
<li>
<a href="#">About</a>
</li>
<li>
<a href="#" onClick={props.onSettingsClick}>
Settings
</a>
</li>
</ul>
</nav>
)
Expand Down
9 changes: 8 additions & 1 deletion app/renderer/containers/sidebar-container.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { connect, Dispatch } from 'react-redux'
import { Sidebar } from '../components/sidebar'
import { ElectricState } from '../store'
import { viewChannel, toggleAddServerModal } from '../actions'
import {
viewChannel,
toggleAddServerModal,
toggleSettingsModal
} from '../actions'
import { Connection } from '../models/connections'
import { Channel } from '../models/channel'

Expand All @@ -19,6 +23,9 @@ const mapDispatchToProps = (dispatch: Dispatch<ElectricState>) => {
},
onAddServerClick: () => {
dispatch(toggleAddServerModal(true))
},
onSettingsClick: () => {
dispatch(toggleSettingsModal(true))
}
}
}
Expand Down

0 comments on commit fa63f78

Please sign in to comment.