diff --git a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/index.js b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/index.js index d6ecc57a9..e46b0ba8c 100644 --- a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/index.js +++ b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/index.js @@ -15,6 +15,7 @@ import CloneCollectionItem from './CloneCollectionItem'; import DeleteCollectionItem from './DeleteCollectionItem'; import { isItemARequest, isItemAFolder, itemIsOpenedInTabs } from 'utils/tabs'; import { doesRequestMatchSearchText, doesFolderHaveItemsMatchSearchText } from 'utils/collections/search'; +import { hideHomePage } from 'providers/ReduxStore/slices/app'; import StyledWrapper from './StyledWrapper'; @@ -68,6 +69,7 @@ const CollectionItem = ({item, collection, searchText}) => { collectionUid: collection.uid })); } + dispatch(hideHomePage()); } else { dispatch(collectionFolderClicked({ itemUid: item.uid, diff --git a/packages/bruno-app/src/components/Sidebar/TitleBar/index.js b/packages/bruno-app/src/components/Sidebar/TitleBar/index.js index e33b2ab9f..baa636175 100644 --- a/packages/bruno-app/src/components/Sidebar/TitleBar/index.js +++ b/packages/bruno-app/src/components/Sidebar/TitleBar/index.js @@ -1,8 +1,10 @@ import React, { useState, forwardRef, useRef } from 'react'; import Toast from 'components/Toast'; import Dropdown from 'components/Dropdown'; +import Bruno from 'components/Bruno'; import { useDispatch } from 'react-redux'; import { createCollection } from 'providers/ReduxStore/slices/collections'; +import { showHomePage } from 'providers/ReduxStore/slices/app'; import { IconDots } from '@tabler/icons'; import CreateCollection from '../CreateCollection'; import StyledWrapper from './StyledWrapper'; @@ -24,6 +26,7 @@ const TitleBar = () => { const handleCancel = () => setModalOpen(false); const handleCloseToast = () => setShowToast({show: false}); + const handleTitleClick = () => dispatch(showHomePage()); const handleConfirm = (values) => { setModalOpen(false); @@ -41,31 +44,16 @@ const TitleBar = () => { ) : null}
-
- - - - - - - - - - - - - - - - - - - - - - +
+ +
+
+ bruno
-
bruno
} placement='bottom-start'>
{ diff --git a/packages/bruno-app/src/pageComponents/Index/index.js b/packages/bruno-app/src/pageComponents/Index/index.js index 1f86a1cd3..1b8ba531a 100644 --- a/packages/bruno-app/src/pageComponents/Index/index.js +++ b/packages/bruno-app/src/pageComponents/Index/index.js @@ -1,5 +1,6 @@ import React from 'react'; import classnames from 'classnames'; +import Welcome from 'components/Welcome'; import RequestTabs from 'components/RequestTabs'; import RequestTabPanel from 'components/RequestTabPanel'; import Sidebar from 'components/Sidebar'; @@ -32,6 +33,7 @@ if(!SERVER_RENDERED) { export default function Main() { const activeTabUid = useSelector((state) => state.tabs.activeTabUid); const isDragging = useSelector((state) => state.app.isDragging); + const showHomePage = useSelector((state) => state.app.showHomePage); const className = classnames({ 'is-dragging': isDragging @@ -42,8 +44,14 @@ export default function Main() {
- - + {showHomePage ? ( + + ): ( + <> + + + + )}
diff --git a/packages/bruno-app/src/providers/ReduxStore/slices/app.js b/packages/bruno-app/src/providers/ReduxStore/slices/app.js index a38b64596..70eca7dab 100644 --- a/packages/bruno-app/src/providers/ReduxStore/slices/app.js +++ b/packages/bruno-app/src/providers/ReduxStore/slices/app.js @@ -5,7 +5,8 @@ const initialState = { idbConnectionReady: false, leftSidebarWidth: 270, leftMenuBarOpen: true, - screenWidth: 500 + screenWidth: 500, + showHomePage: false }; export const appSlice = createSlice({ @@ -28,6 +29,12 @@ export const appSlice = createSlice({ updateIsDragging: (state, action) => { state.isDragging = action.payload.isDragging; }, + showHomePage: (state) => { + state.showHomePage = true; + }, + hideHomePage: (state) => { + state.showHomePage = false; + } } }); @@ -36,7 +43,9 @@ export const { toggleLeftMenuBar, refreshScreenWidth, updateLeftSidebarWidth, - updateIsDragging + updateIsDragging, + showHomePage, + hideHomePage } = appSlice.actions; export default appSlice.reducer;