Add context menu (#2001)
This commit is contained in:
parent
2af575c3c0
commit
62e29effbf
7 changed files with 58 additions and 0 deletions
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue