mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 14:49:53 +00:00
31 lines
679 B
JavaScript
31 lines
679 B
JavaScript
|
|
import {show} from './modals';
|
|
import {MODAL_ENVIRONMENT_EDITOR, MODAL_REQUEST_GROUP_RENAME} from '../../lib/constants';
|
|
|
|
export const REQUEST_GROUP_TOGGLE = 'request-groups/toggle';
|
|
|
|
// ~~~~~~~~ //
|
|
// REDUCERS //
|
|
// ~~~~~~~~ //
|
|
|
|
// Nothing yet...
|
|
|
|
|
|
// ~~~~~~~ //
|
|
// ACTIONS //
|
|
// ~~~~~~~ //
|
|
|
|
export function toggle (requestGroup) {
|
|
return {type: REQUEST_GROUP_TOGGLE, requestGroup}
|
|
}
|
|
|
|
export function showUpdateNamePrompt (requestGroup) {
|
|
const defaultValue = requestGroup.name;
|
|
return show(MODAL_REQUEST_GROUP_RENAME, {defaultValue, requestGroup});
|
|
}
|
|
|
|
export function showEnvironmentEditModal (requestGroup) {
|
|
return show(MODAL_ENVIRONMENT_EDITOR, {requestGroup});
|
|
}
|
|
|