mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
e9d64ebb23
* Got a hacky workspace implementation running * Removed some hax with reducer composition * Moved some more around * Moved files back out * Started on entities reducer * Split up some components * Moved nested modules back out of workspaces * Started on new Sidebar tree stuff * Better store stuff * Some more tweaks * Removed workspace update action * Re-implemented filtering in the Sidbare * Switch to get the newest response
31 lines
677 B
JavaScript
31 lines
677 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});
|
|
}
|
|
|