Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix runtime variables color #4072

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions packages/bruno-app/src/components/VariablesEditor/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import React, { useState } from 'react';
import get from 'lodash/get';
import filter from 'lodash/filter';
import { Inspector } from 'react-inspector';
import { Inspector, chromeDark, chromeLight } from 'react-inspector';
import { useTheme } from 'providers/Theme';
import { findEnvironmentInCollection, maskInputValue } from 'utils/collections';
import StyledWrapper from './StyledWrapper';
import { IconEye, IconEyeOff } from '@tabler/icons';

const KeyValueExplorer = ({ data = [], theme }) => {
const [showSecret, setShowSecret] = useState(false);
const customTheme = theme.theme === 'chromeDark' ? {...theme, ...({OBJECT_VALUE_STRING_COLOR: 'rgb(255, 255, 255)'})} : {...theme, ...({OBJECT_VALUE_STRING_COLOR: 'rgb(0, 0, 0)'})};
delete customTheme.theme;

return (
<div>
Expand All @@ -21,7 +23,7 @@ const KeyValueExplorer = ({ data = [], theme }) => {
<td className="px-2 py-1">
<Inspector
data={!showSecret && envVar.secret ? maskInputValue(envVar.value) : envVar.value}
theme={theme}
theme={customTheme}
/>
</td>
</tr>
Expand Down Expand Up @@ -86,7 +88,7 @@ const RuntimeVariables = ({ collection, theme }) => {
const VariablesEditor = ({ collection }) => {
const { storedTheme } = useTheme();

const reactInspectorTheme = storedTheme === 'light' ? 'chromeLight' : 'chromeDark';
const reactInspectorTheme = storedTheme === 'light' ? {...chromeLight, theme: "chromeLight"} : {...chromeDark, theme: "chromeDark"};

return (
<StyledWrapper className="px-4 py-4">
Expand Down
30 changes: 0 additions & 30 deletions packages/bruno-tests/collection_level_oauth2/package-lock.json

This file was deleted.

30 changes: 0 additions & 30 deletions packages/bruno-tests/collection_oauth2/package-lock.json

This file was deleted.