Add context menu (#2001)

This commit is contained in:
Ricky Miller 2017-11-03 16:24:41 -04:00 committed by CHaBou
parent 2af575c3c0
commit 62e29effbf
7 changed files with 58 additions and 0 deletions

View file

@ -20,6 +20,7 @@ import {
UI_WINDOW_GEOMETRY_CHANGED,
UI_WINDOW_MOVE,
UI_OPEN_FILE,
UI_CONTEXTMENU_OPEN,
UI_COMMAND_EXEC
} from '../constants/ui';
@ -27,6 +28,22 @@ import {setActiveGroup} from './term-groups';
const {stat} = window.require('fs');
export function openContextMenu(uid, selection) {
return (dispatch, getState) => {
dispatch({
type: UI_CONTEXTMENU_OPEN,
uid,
effect() {
const state = getState();
const show = !state.ui.quickEdit;
if (show) {
rpc.emit('open context menu', selection);
}
}
});
};
}
export function increaseFontSize() {
return (dispatch, getState) => {
dispatch({