Skip to content

Commit

Permalink
Merge branch 'main' into feature/clickableRunnerItem
Browse files Browse the repository at this point in the history
  • Loading branch information
nikischin committed Nov 8, 2024
2 parents 37b2e0c + 9614ab0 commit dcaee51
Show file tree
Hide file tree
Showing 52 changed files with 1,107 additions and 388 deletions.
57 changes: 22 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions packages/bruno-app/src/components/CodeEditor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import React from 'react';
import isEqual from 'lodash/isEqual';
import { isEqual, escapeRegExp } from 'lodash';
import { getEnvironmentVariables } from 'utils/collections';
import { defineCodeMirrorBrunoVariablesMode } from 'utils/common/codemirror';
import StyledWrapper from './StyledWrapper';
Expand Down Expand Up @@ -61,6 +61,8 @@ if (!SERVER_RENDERED) {
'bru.getProcessEnv(key)',
'bru.hasEnvVar(key)',
'bru.getEnvVar(key)',
'bru.getFolderVar(key)',
'bru.getCollectionVar(key)',
'bru.setEnvVar(key,value)',
'bru.hasVar(key)',
'bru.getVar(key)',
Expand Down Expand Up @@ -406,7 +408,8 @@ export default class CodeEditor extends React.Component {
const searchInput = document.querySelector('.CodeMirror-search-field');

if (searchInput && searchInput.value.length > 0) {
const text = new RegExp(searchInput.value, 'gi');
// Escape special characters in search input to prevent RegExp crashes. Fixes #3051
const text = new RegExp(escapeRegExp(searchInput.value), 'gi');
const matches = this.editor.getValue().match(text);
count = matches ? matches.length : 0;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import styled from 'styled-components';

const StyledWrapper = styled.div`
div.title {
color: var(--color-tab-inactive);
}
`;

export default StyledWrapper;
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import styled from 'styled-components';

const Wrapper = styled.div`
table {
width: 100%;
border-collapse: collapse;
font-weight: 600;
table-layout: fixed;
thead,
td {
border: 1px solid ${(props) => props.theme.table.border};
}
thead {
color: ${(props) => props.theme.table.thead.color};
font-size: 0.8125rem;
user-select: none;
}
td {
padding: 6px 10px;
&:nth-child(1) {
width: 30%;
}
&:nth-child(3) {
width: 70px;
}
}
}
.btn-add-var {
font-size: 0.8125rem;
}
input[type='text'] {
width: 100%;
border: solid 1px transparent;
outline: none !important;
background-color: inherit;
&:focus {
outline: none !important;
border: solid 1px transparent;
}
}
input[type='checkbox'] {
cursor: pointer;
position: relative;
top: 1px;
}
`;

export default Wrapper;
Loading

0 comments on commit dcaee51

Please sign in to comment.