mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-13 12:38:39 -09:00
* Bump `eslint-plugin-react`
* Add `eslint-config-xo-react`
* Add XO
* Remove eslint-related dependencies, add XO config and use XO as the linter
* Code style: Standard => XO ✨
* Use xo property to ignore files
* Fix remaining errors
51 lines
939 B
JavaScript
51 lines
939 B
JavaScript
import {CLOSE_TAB, CHANGE_TAB} from '../constants/tabs';
|
|
import {UI_WINDOW_MAXIMIZE, UI_WINDOW_UNMAXIMIZE} from '../constants/ui';
|
|
import rpc from '../rpc';
|
|
|
|
import {userExitSession, setActiveSession} from './sessions';
|
|
|
|
export function closeTab(uid) {
|
|
return dispatch => {
|
|
dispatch({
|
|
type: CLOSE_TAB,
|
|
uid,
|
|
effect() {
|
|
dispatch(userExitSession(uid));
|
|
}
|
|
});
|
|
};
|
|
}
|
|
|
|
export function changeTab(uid) {
|
|
return dispatch => {
|
|
dispatch({
|
|
type: CHANGE_TAB,
|
|
uid,
|
|
effect() {
|
|
dispatch(setActiveSession(uid));
|
|
}
|
|
});
|
|
};
|
|
}
|
|
|
|
export function maximize() {
|
|
return dispatch => {
|
|
dispatch({
|
|
type: UI_WINDOW_MAXIMIZE,
|
|
effect() {
|
|
rpc.emit('maximize');
|
|
}
|
|
});
|
|
};
|
|
}
|
|
|
|
export function unmaximize() {
|
|
return dispatch => {
|
|
dispatch({
|
|
type: UI_WINDOW_UNMAXIMIZE,
|
|
effect() {
|
|
rpc.emit('unmaximize');
|
|
}
|
|
});
|
|
};
|
|
}
|