mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-25 01:14:23 +01:00
fix: multiple tab collection level settings (#2905)
* added isFolderSettingsOpenedInTabs logic
This commit is contained in:
parent
b121afe7bb
commit
4ddccefee3
@ -19,8 +19,8 @@ const FolderSettings = ({ collection, folder }) => {
|
||||
const setTab = (tab) => {
|
||||
dispatch(
|
||||
updatedFolderSettingsSelectedTab({
|
||||
collectionUid: collection.uid,
|
||||
folderUid: folder.uid,
|
||||
collectionUid: collection?.uid,
|
||||
folderUid: folder?.uid,
|
||||
tab
|
||||
})
|
||||
);
|
||||
|
@ -189,16 +189,28 @@ const CollectionItem = ({ item, collection, searchText }) => {
|
||||
toast.error('URL is required');
|
||||
}
|
||||
};
|
||||
|
||||
const viewFolderSettings = () => {
|
||||
if (isItemAFolder(item)) {
|
||||
if (itemIsOpenedInTabs(item, tabs)) {
|
||||
dispatch(
|
||||
focusTab({
|
||||
uid: item.uid
|
||||
})
|
||||
);
|
||||
return;
|
||||
}
|
||||
dispatch(
|
||||
addTab({
|
||||
uid: uuid(),
|
||||
uid: item.uid,
|
||||
collectionUid: collection.uid,
|
||||
folderUid: item.uid,
|
||||
type: 'folder-settings'
|
||||
})
|
||||
);
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
const requestItems = sortRequestItems(filter(item.items, (i) => isItemARequest(i)));
|
||||
const folderItems = sortFolderItems(filter(item.items, (i) => isItemAFolder(i)));
|
||||
|
||||
|
@ -41,7 +41,7 @@ export const tabsSlice = createSlice({
|
||||
requestPaneTab: action.payload.requestPaneTab || 'params',
|
||||
responsePaneTab: 'response',
|
||||
type: action.payload.type || 'request',
|
||||
...(action.payload.folderUid ? { folderUid: action.payload.folderUid } : {})
|
||||
...(action.payload.uid ? { folderUid: action.payload.uid } : {})
|
||||
});
|
||||
state.activeTabUid = action.payload.uid;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user