hyper/lib/containers/terms.js
Guillermo Rauch aaed99abac Reorg (#386)
* Step 1: move electorn into `app/`.

This is to comply with the suggested directory format of
`electron-builder`: https://github.com/electron-userland/electron-builder#two-packagejson-structure

* Step 2: add build directory with icon files for mac / windows

* Step 3: move all development (web) assets into main directory

* Step 4: add `build` namespace to dev `package.json`

* Step 5: move all dev dependencies into dev file and get rid of
old electron packagers in favor of `eletorn-builder`

* Step 6: target build inside `app/` as everything else is excluded at build time

* Step 7: remove old stuff!

* Step 8: update README

* turn off asar for `child_pty`
2016-07-24 10:59:21 -07:00

63 lines
1.6 KiB
JavaScript

import Terms from '../components/terms';
import { values } from '../utils/object';
import { connect } from '../utils/plugins';
import {
resizeSession,
sendSessionData,
exitSessionBrowser,
setSessionXtermTitle,
setActiveSession
} from '../actions/sessions';
const TermsContainer = connect(
(state) => {
const sessions = state.sessions.sessions;
return {
cols: state.ui.cols,
rows: state.ui.rows,
sessions: values(sessions),
activeSession: state.sessions.activeUid,
customCSS: state.ui.termCSS,
write: state.sessions.write,
fontSize: state.ui.fontSizeOverride
? state.ui.fontSizeOverride
: state.ui.fontSize,
fontFamily: state.ui.fontFamily,
fontSmoothing: state.ui.fontSmoothingOverride,
padding: state.ui.padding,
cursorColor: state.ui.cursorColor,
cursorShape: state.ui.cursorShape,
borderColor: state.ui.borderColor,
colors: state.ui.colors,
foregroundColor: state.ui.foregroundColor,
backgroundColor: state.ui.backgroundColor
};
},
(dispatch) => {
return {
onData (uid, data) {
dispatch(sendSessionData(uid, data));
},
onTitle (uid, title) {
dispatch(setSessionXtermTitle(uid, title));
},
onResize (uid, cols, rows) {
dispatch(resizeSession(uid, cols, rows));
},
onURLAbort (uid) {
dispatch(exitSessionBrowser(uid));
},
onActive (uid) {
dispatch(setActiveSession(uid));
}
};
},
null,
{ withRef: true }
)(Terms, 'Terms');
export default TermsContainer;