mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-25 01:14:23 +01:00
feat: add logic to handle saving collection settings on shortcut (preview mode) (#3145)
This commit is contained in:
parent
dd2b93e8cd
commit
e019a96cd5
@ -7,7 +7,7 @@ import SaveRequest from 'components/RequestPane/SaveRequest';
|
|||||||
import EnvironmentSettings from 'components/Environments/EnvironmentSettings';
|
import EnvironmentSettings from 'components/Environments/EnvironmentSettings';
|
||||||
import NetworkError from 'components/ResponsePane/NetworkError';
|
import NetworkError from 'components/ResponsePane/NetworkError';
|
||||||
import NewRequest from 'components/Sidebar/NewRequest';
|
import NewRequest from 'components/Sidebar/NewRequest';
|
||||||
import { sendRequest, saveRequest } from 'providers/ReduxStore/slices/collections/actions';
|
import { sendRequest, saveRequest, saveCollectionRoot } from 'providers/ReduxStore/slices/collections/actions';
|
||||||
import { findCollectionByUid, findItemInCollection } from 'utils/collections';
|
import { findCollectionByUid, findItemInCollection } from 'utils/collections';
|
||||||
import { closeTabs, switchTab } from 'providers/ReduxStore/slices/tabs';
|
import { closeTabs, switchTab } from 'providers/ReduxStore/slices/tabs';
|
||||||
|
|
||||||
@ -54,6 +54,8 @@ export const HotkeysProvider = (props) => {
|
|||||||
const item = findItemInCollection(collection, activeTab.uid);
|
const item = findItemInCollection(collection, activeTab.uid);
|
||||||
if (item && item.uid) {
|
if (item && item.uid) {
|
||||||
dispatch(saveRequest(activeTab.uid, activeTab.collectionUid));
|
dispatch(saveRequest(activeTab.uid, activeTab.collectionUid));
|
||||||
|
} else if (activeTab.type === 'collection-settings') {
|
||||||
|
dispatch(saveCollectionRoot(collection.uid));
|
||||||
} else {
|
} else {
|
||||||
// todo: when ephermal requests go live
|
// todo: when ephermal requests go live
|
||||||
// setShowSaveRequestModal(true);
|
// setShowSaveRequestModal(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user