diff --git a/packages/bruno-app/jsconfig.json b/packages/bruno-app/jsconfig.json index b3dac51c..9318203c 100644 --- a/packages/bruno-app/jsconfig.json +++ b/packages/bruno-app/jsconfig.json @@ -6,6 +6,8 @@ "paths": { "assets/*": ["src/assets/*"], "components/*": ["src/components/*"], + "hooks/*": ["src/hooks/*"], + "themes/*": ["src/themes/*"], "api/*": ["src/api/*"], "pageComponents/*": ["src/pageComponents/*"], "providers/*": ["src/providers/*"], diff --git a/packages/bruno-app/src/components/Dropdown/StyledWrapper.js b/packages/bruno-app/src/components/Dropdown/StyledWrapper.js index 168f8b2f..ee857ac6 100644 --- a/packages/bruno-app/src/components/Dropdown/StyledWrapper.js +++ b/packages/bruno-app/src/components/Dropdown/StyledWrapper.js @@ -9,11 +9,11 @@ const Wrapper = styled.div` .tippy-box { min-width: 135px; - background-color: white; font-size: 0.8125rem; - color: rgb(48 48 48); - background: #fff; - box-shadow: rgb(50 50 93 / 25%) 0px 6px 12px -2px, rgb(0 0 0 / 30%) 0px 3px 7px -3px; + color: ${(props) => props.theme.dropdown.color}; + background-color: ${(props) => props.theme.dropdown.bg}; + box-shadow: ${(props) => props.theme.dropdown.shadow}; + border-radius: 3px; .tippy-content { padding-left: 0; @@ -34,7 +34,7 @@ const Wrapper = styled.div` cursor: pointer; &:hover { - background-color: #e9e9e9; + background-color: ${(props) => props.theme.dropdown.hoverBg}; } } } diff --git a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RequestMethod/StyledWrapper.js b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RequestMethod/StyledWrapper.js index 7fb461ff..7b3058a6 100644 --- a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RequestMethod/StyledWrapper.js +++ b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RequestMethod/StyledWrapper.js @@ -13,25 +13,25 @@ const Wrapper = styled.div` } .method-get { - color: var(--color-method-get); + color: ${(props) => props.theme.request.methods.get}; } .method-post { - color: var(--color-method-post); + color: ${(props) => props.theme.request.methods.post}; } .method-put { - color: var(--color-method-put); + color: ${(props) => props.theme.request.methods.put}; } .method-delete { - color: var(--color-method-delete); + color: ${(props) => props.theme.request.methods.delete}; } .method-patch { - color: var(--color-method-patch); + color: ${(props) => props.theme.request.methods.put}; } .method-options { - color: var(--color-method-options); + color: ${(props) => props.theme.request.methods.put}; } .method-head { - color: var(--color-method-head); + color: ${(props) => props.theme.request.methods.put}; } `; diff --git a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/StyledWrapper.js b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/StyledWrapper.js index fb7ca9a2..3cc2362b 100644 --- a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/StyledWrapper.js +++ b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/StyledWrapper.js @@ -15,7 +15,7 @@ const Wrapper = styled.div` } .indent-block { - border-right: solid 1px #e1e1e1; + border-right: ${(props) => props.theme.sidebar.collection.item.indentBorder}; } .collection-item-name { @@ -34,7 +34,7 @@ const Wrapper = styled.div` } &:hover { - background: #e7e7e7; + background: ${(props) => props.theme.sidebar.collection.item.hoverBg}; .menu-icon { .dropdown { div[aria-expanded='false'] { @@ -45,14 +45,14 @@ const Wrapper = styled.div` } &.item-focused-in-tab { - background: var(--color-sidebar-collection-item-active-background); + background: ${(props) => props.theme.sidebar.collection.item.bg}; &:hover { - background: var(--color-sidebar-collection-item-active-background) !important; + background: ${(props) => props.theme.sidebar.collection.item.bg} !important; } .indent-block { - border-right: solid 1px var(--color-sidebar-collection-item-active-indent-border); + border-right: ${(props) => props.theme.sidebar.collection.item.active.indentBorder} !important; } } diff --git a/packages/bruno-app/src/components/Sidebar/LocalCollections/StyledWrapper.js b/packages/bruno-app/src/components/Sidebar/LocalCollections/StyledWrapper.js index aca13182..b81097d8 100644 --- a/packages/bruno-app/src/components/Sidebar/LocalCollections/StyledWrapper.js +++ b/packages/bruno-app/src/components/Sidebar/LocalCollections/StyledWrapper.js @@ -3,7 +3,7 @@ import styled from 'styled-components'; const Wrapper = styled.div` .current-workspace { margin-inline: 0.5rem; - background: #e1e1e1; + background-color: ${(props) => props.theme.sidebar.workspace.bg}; border-radius: 5px; .caret { diff --git a/packages/bruno-app/src/components/Sidebar/MenuBar/StyledWrapper.js b/packages/bruno-app/src/components/Sidebar/MenuBar/StyledWrapper.js index aa33e0dd..aed4aa44 100644 --- a/packages/bruno-app/src/components/Sidebar/MenuBar/StyledWrapper.js +++ b/packages/bruno-app/src/components/Sidebar/MenuBar/StyledWrapper.js @@ -1,8 +1,8 @@ import styled from 'styled-components'; const Wrapper = styled.div` - background-color: rgb(44, 44, 44); - color: rgba(255, 255, 255, 0.5); + background-color: ${(props) => props.theme.menubar.bg}; + color: rgba(255, 255, 255, 0.4); min-height: 100vh; .menu-item { diff --git a/packages/bruno-app/src/components/Sidebar/StyledWrapper.js b/packages/bruno-app/src/components/Sidebar/StyledWrapper.js index d9036b47..ce179974 100644 --- a/packages/bruno-app/src/components/Sidebar/StyledWrapper.js +++ b/packages/bruno-app/src/components/Sidebar/StyledWrapper.js @@ -1,8 +1,10 @@ import styled from 'styled-components'; const Wrapper = styled.div` + color: ${(props) => props.theme.sidebar.color}; + aside { - background-color: ${(props) => props.theme.theme['sidebar-background']}; + background-color: ${(props) => props.theme['sidebar-background']}; .collection-title { line-height: 1.5; @@ -25,6 +27,18 @@ const Wrapper = styled.div` top: -0.625rem; } } + + .collection-filter { + input { + border: ${(props) => props.theme.sidebar.search.border}; + border-radius: 2px; + background-color: ${(props) => props.theme.sidebar.search.bg}; + + &:focus { + outline: none; + } + } + } } div.drag-sidebar { @@ -45,12 +59,4 @@ const Wrapper = styled.div` } `; -export const BottomWrapper = styled.div` - background-color: ${(props) => props.theme.theme['sidebar-bottom-bg']}; -`; - -export const VersionNumber = styled.div` - color: ${(props) => props.theme.theme['primary-text']}; -`; - export default Wrapper; diff --git a/packages/bruno-app/src/components/Sidebar/TitleBar/StyledWrapper.js b/packages/bruno-app/src/components/Sidebar/TitleBar/StyledWrapper.js index 8a0104db..91b43487 100644 --- a/packages/bruno-app/src/components/Sidebar/TitleBar/StyledWrapper.js +++ b/packages/bruno-app/src/components/Sidebar/TitleBar/StyledWrapper.js @@ -25,8 +25,4 @@ const StyledWrapper = styled.div` } `; -export const SiteTitle = styled.div` - color: ${(props) => props.theme.theme['primary-text']}; -`; - export default StyledWrapper; diff --git a/packages/bruno-app/src/components/Sidebar/TitleBar/index.js b/packages/bruno-app/src/components/Sidebar/TitleBar/index.js index f6767151..98df47c0 100644 --- a/packages/bruno-app/src/components/Sidebar/TitleBar/index.js +++ b/packages/bruno-app/src/components/Sidebar/TitleBar/index.js @@ -10,11 +10,11 @@ import { IconFolders } from '@tabler/icons'; import { isElectron } from 'utils/common/platform'; import { useState, forwardRef, useRef } from 'react'; import { useSelector, useDispatch } from 'react-redux'; -import StyledWrapper, { SiteTitle } from './StyledWrapper'; import { showHomePage } from 'providers/ReduxStore/slices/app'; import { collectionImported } from 'providers/ReduxStore/slices/collections'; import { openLocalCollection } from 'providers/ReduxStore/slices/collections/actions'; import { addCollectionToWorkspace } from 'providers/ReduxStore/slices/workspaces/actions'; +import StyledWrapper from './StyledWrapper'; const TitleBar = () => { const [createCollectionModalOpen, setCreateCollectionModalOpen] = useState(false); @@ -69,13 +69,13 @@ const TitleBar = () => {
- bruno - +
} placement="bottom-start">
{
- +
{!leftMenuBarOpen && dispatch(toggleLeftMenuBar())} />} {/* */} @@ -124,8 +124,8 @@ const Sidebar = () => { title="GitHub" >
- v1.25.2 - +
v0.2.0
+
diff --git a/packages/bruno-app/src/components/ThemeSupport/index.js b/packages/bruno-app/src/components/ThemeSupport/index.js index ecb99d9e..45940833 100644 --- a/packages/bruno-app/src/components/ThemeSupport/index.js +++ b/packages/bruno-app/src/components/ThemeSupport/index.js @@ -1,10 +1,12 @@ import React from 'react'; import Modal from 'components/Modal/index'; import StyledWrapper from './StyledWrapper'; -import { useTheme } from 'styled-components'; +import { useTheme } from 'providers/Theme'; const ThemeSupport = ({ onClose }) => { - const { storedTheme, themeKeys, setStoredTheme } = useTheme(); + const { storedTheme, themeOptions, setStoredTheme } = useTheme(); + + console.log(themeOptions); const handleThemeChange = (e) => { setStoredTheme(e.target.value); @@ -15,7 +17,7 @@ const ThemeSupport = ({ onClose }) => {