diff --git a/packages/bruno-app/src/components/RequestTabs/CollectionToolBar/index.js b/packages/bruno-app/src/components/RequestTabs/CollectionToolBar/index.js index e19da78d..a8405657 100644 --- a/packages/bruno-app/src/components/RequestTabs/CollectionToolBar/index.js +++ b/packages/bruno-app/src/components/RequestTabs/CollectionToolBar/index.js @@ -1,6 +1,6 @@ import React from 'react'; import { uuid } from 'utils/common'; -import { IconFiles, IconRun, IconEye, IconSettings } from '@tabler/icons'; +import { IconRun, IconEye, IconSettings, IconAB2 } from '@tabler/icons'; import EnvironmentSelector from 'components/Environments/EnvironmentSelector'; import GlobalEnvironmentSelector from 'components/GlobalEnvironments/EnvironmentSelector'; import { addTab } from 'providers/ReduxStore/slices/tabs'; @@ -9,7 +9,7 @@ import ToolHint from 'components/ToolHint'; import StyledWrapper from './StyledWrapper'; import JsSandboxMode from 'components/SecuritySettings/JsSandboxMode'; -const CollectionToolBar = ({ collection }) => { +const CollectionToolBar = ({ collection, onClick }) => { const dispatch = useDispatch(); const handleRun = () => { @@ -45,9 +45,9 @@ const CollectionToolBar = ({ collection }) => { return (
-
- - {collection?.name} +
+ {collection?.name} +
diff --git a/packages/bruno-app/src/components/RequestTabs/index.js b/packages/bruno-app/src/components/RequestTabs/index.js index d0cd0b45..61ec3ebc 100644 --- a/packages/bruno-app/src/components/RequestTabs/index.js +++ b/packages/bruno-app/src/components/RequestTabs/index.js @@ -20,6 +20,25 @@ const RequestTabs = () => { const leftSidebarWidth = useSelector((state) => state.app.leftSidebarWidth); const screenWidth = useSelector((state) => state.app.screenWidth); + + const otherCollection = () => { + + let currentCollectionUid = activeTab.collectionUid + let index = collections.findIndex((collection) => collection.uid === currentCollectionUid); + let otherTab = null + + while (otherTab == null) { + index = (index + 1) % collections.length + currentCollectionUid = collections[index].uid + otherTab = find(tabs, (t) => t.collectionUid === collections[index].uid); + } + dispatch( + focusTab({ + uid: otherTab.uid + }) + ) + }; + const getTabClassname = (tab, index) => { return classnames('request-tab select-none', { active: tab.uid === activeTabUid, @@ -83,7 +102,7 @@ const RequestTabs = () => { )} {collectionRequestTabs && collectionRequestTabs.length ? ( <> - +
    {showChevrons ? (