mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-11 09:51:30 +00:00
chore: addressed review comments
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import Modal from 'components/Modal/index';
|
||||
import classnames from 'classnames';
|
||||
import React, { useState } from 'react';
|
||||
import { useSelector } from 'react-redux';
|
||||
|
||||
import Support from './Support';
|
||||
import General from './General';
|
||||
@@ -14,8 +13,7 @@ import Beta from './Beta';
|
||||
import StyledWrapper from './StyledWrapper';
|
||||
|
||||
const Preferences = ({ onClose }) => {
|
||||
const preferencesTab = useSelector((state) => state.app.preferencesTab);
|
||||
const [tab, setTab] = useState(preferencesTab || 'general');
|
||||
const [tab, setTab] = useState('general');
|
||||
|
||||
const getTabClassname = (tabName) => {
|
||||
return classnames(`tab select-none ${tabName}`, {
|
||||
|
||||
@@ -11,7 +11,6 @@ const initialState = {
|
||||
screenWidth: 500,
|
||||
showHomePage: false,
|
||||
showPreferences: false,
|
||||
preferencesTab: null,
|
||||
showApiSpecPage: false,
|
||||
showManageWorkspacePage: false,
|
||||
isEnvironmentSettingsModalOpen: false,
|
||||
@@ -96,13 +95,7 @@ export const appSlice = createSlice({
|
||||
state.showApiSpecPage = false;
|
||||
},
|
||||
showPreferences: (state, action) => {
|
||||
if (typeof action.payload === 'object') {
|
||||
state.showPreferences = action.payload.show;
|
||||
state.preferencesTab = action.payload.tab || null;
|
||||
} else {
|
||||
state.showPreferences = action.payload;
|
||||
state.preferencesTab = null;
|
||||
}
|
||||
state.showPreferences = action.payload;
|
||||
},
|
||||
updatePreferences: (state, action) => {
|
||||
state.preferences = action.payload;
|
||||
|
||||
@@ -32,7 +32,7 @@ const themes = {
|
||||
export const themeRegistry = {
|
||||
'light': {
|
||||
id: 'light',
|
||||
name: 'Light',
|
||||
name: 'Bruno Light',
|
||||
mode: 'light'
|
||||
},
|
||||
'light-monochrome': {
|
||||
@@ -42,7 +42,7 @@ export const themeRegistry = {
|
||||
},
|
||||
'light-pastel': {
|
||||
id: 'light-pastel',
|
||||
name: 'Aurora',
|
||||
name: 'Bruno Light Pastel',
|
||||
mode: 'light'
|
||||
},
|
||||
'catppuccin-latte': {
|
||||
|
||||
@@ -258,7 +258,7 @@ const lightMonochromeTheme = {
|
||||
hoverBorder: '#696969'
|
||||
},
|
||||
close: {
|
||||
color: '212529',
|
||||
color: '#212529',
|
||||
bg: 'white',
|
||||
border: 'white',
|
||||
hoverBorder: ''
|
||||
|
||||
@@ -286,7 +286,7 @@ const lightTheme = {
|
||||
hoverBorder: '#696969'
|
||||
},
|
||||
close: {
|
||||
color: '212529',
|
||||
color: '#212529',
|
||||
bg: 'white',
|
||||
border: 'white',
|
||||
hoverBorder: ''
|
||||
|
||||
Reference in New Issue
Block a user