mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-24 17:03:47 +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) => {
|
const setTab = (tab) => {
|
||||||
dispatch(
|
dispatch(
|
||||||
updatedFolderSettingsSelectedTab({
|
updatedFolderSettingsSelectedTab({
|
||||||
collectionUid: collection.uid,
|
collectionUid: collection?.uid,
|
||||||
folderUid: folder.uid,
|
folderUid: folder?.uid,
|
||||||
tab
|
tab
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
@ -189,16 +189,28 @@ const CollectionItem = ({ item, collection, searchText }) => {
|
|||||||
toast.error('URL is required');
|
toast.error('URL is required');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const viewFolderSettings = () => {
|
const viewFolderSettings = () => {
|
||||||
dispatch(
|
if (isItemAFolder(item)) {
|
||||||
addTab({
|
if (itemIsOpenedInTabs(item, tabs)) {
|
||||||
uid: uuid(),
|
dispatch(
|
||||||
collectionUid: collection.uid,
|
focusTab({
|
||||||
folderUid: item.uid,
|
uid: item.uid
|
||||||
type: 'folder-settings'
|
})
|
||||||
})
|
);
|
||||||
);
|
return;
|
||||||
|
}
|
||||||
|
dispatch(
|
||||||
|
addTab({
|
||||||
|
uid: item.uid,
|
||||||
|
collectionUid: collection.uid,
|
||||||
|
type: 'folder-settings'
|
||||||
|
})
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const requestItems = sortRequestItems(filter(item.items, (i) => isItemARequest(i)));
|
const requestItems = sortRequestItems(filter(item.items, (i) => isItemARequest(i)));
|
||||||
const folderItems = sortFolderItems(filter(item.items, (i) => isItemAFolder(i)));
|
const folderItems = sortFolderItems(filter(item.items, (i) => isItemAFolder(i)));
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ export const tabsSlice = createSlice({
|
|||||||
requestPaneTab: action.payload.requestPaneTab || 'params',
|
requestPaneTab: action.payload.requestPaneTab || 'params',
|
||||||
responsePaneTab: 'response',
|
responsePaneTab: 'response',
|
||||||
type: action.payload.type || 'request',
|
type: action.payload.type || 'request',
|
||||||
...(action.payload.folderUid ? { folderUid: action.payload.folderUid } : {})
|
...(action.payload.uid ? { folderUid: action.payload.uid } : {})
|
||||||
});
|
});
|
||||||
state.activeTabUid = action.payload.uid;
|
state.activeTabUid = action.payload.uid;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user