hyper/lib/containers/terms.js
Raz Friman 6039acd7a9 Update Electron to v6 (#3785)
* 3.0.0

* 3.0.2

* Save

* Save

* Upgrade yarn lock packages

* update node-gyp and node-pty

* update travis and appveyor to node 12

* appveyor is outdated as always

* update travis to xenial

* update node-pty@0.9.0-beta26

* update yarn.lock

* update electron to 6.0.8

* move node-pty to the correct package.json

* Fix linting failure

* Update yarn lockfile to try to fix appveyor build

* Remove unnecessary changes from package.json

* Try to fix appveyor by using a newer image

* Fix linting after my last change

* update electron to 6.0.9

* install windows-build-tools on appveyor

* fix syntax

* switch back to 2017 image

* remove old resolutions field

* revert accidental version change

* update electron to 6.0.11 and electron-rebuild to 1.8.6

* downgrade yarn to 1.18

until this issue is resolved https://github.com/yarnpkg/yarn/issues/7584

* update node-gyp to 6.0.0 and generate a fresh yarn lockfile

* update react and a few other dependencies

* fix lint

* this should actually be electron-builder, I think!

* update a few dependencies

* change to electron-store

electron-config was renamed to electron-store a while ago

* update xterm to v4.1.0 and ora to 4.0.2

* move pify to app/package.json

* TODO: Revert maybe. Throw a fit on every change to maybe fix the resizing issues

* a

* fix react ref problem

* fix split view focus problem

* remove the unnecessary fit

* remove the init col and row

* fix the problem that cannot show about hyper

* update electron to 6.0.12

* fix lint

* add more todos for componentWillReceiveProps deprecation

* update babel and plugins


Co-authored-by: Juan Campa <juancampa@gmail.com>
Co-authored-by: Benjamin Staneck <staneck@gmail.com>
Co-authored-by: ivan <ivanwonder@outlook.com>
2019-10-10 21:20:26 +02:00

81 lines
2.5 KiB
JavaScript

import Terms from '../components/terms';
import {connect} from '../utils/plugins';
import {resizeSession, sendSessionData, setSessionXtermTitle, setActiveSession, onSearch} from '../actions/sessions';
import {openContextMenu} from '../actions/ui';
import getRootGroups from '../selectors';
const TermsContainer = connect(
state => {
const {sessions} = state.sessions;
return {
sessions,
cols: state.ui.cols,
rows: state.ui.rows,
scrollback: state.ui.scrollback,
termGroups: getRootGroups(state),
activeRootGroup: state.termGroups.activeRootGroup,
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,
fontWeight: state.ui.fontWeight,
fontWeightBold: state.ui.fontWeightBold,
lineHeight: state.ui.lineHeight,
letterSpacing: state.ui.letterSpacing,
uiFontFamily: state.ui.uiFontFamily,
fontSmoothing: state.ui.fontSmoothingOverride,
padding: state.ui.padding,
cursorColor: state.ui.cursorColor,
cursorAccentColor: state.ui.cursorAccentColor,
cursorShape: state.ui.cursorShape,
cursorBlink: state.ui.cursorBlink,
borderColor: state.ui.borderColor,
selectionColor: state.ui.selectionColor,
colors: state.ui.colors,
foregroundColor: state.ui.foregroundColor,
backgroundColor: state.ui.backgroundColor,
bell: state.ui.bell,
bellSoundURL: state.ui.bellSoundURL,
bellSound: state.ui.bellSound,
copyOnSelect: state.ui.copyOnSelect,
modifierKeys: state.ui.modifierKeys,
quickEdit: state.ui.quickEdit,
webGLRenderer: state.ui.webGLRenderer,
macOptionSelectionMode: state.ui.macOptionSelectionMode,
disableLigatures: state.ui.disableLigatures
};
},
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));
},
onActive(uid) {
dispatch(setActiveSession(uid));
},
toggleSearch(uid) {
dispatch(onSearch(uid));
},
onContextMenu(uid, selection) {
dispatch(setActiveSession(uid));
dispatch(openContextMenu(uid, selection));
}
};
},
null,
{forwardRef: true}
)(Terms, 'Terms');
export default TermsContainer;