Skip to content

Commit

Permalink
fix: Added disclaimer on variable delete
Browse files Browse the repository at this point in the history
  • Loading branch information
naman-bruno committed Jan 13, 2025
1 parent bbddbe4 commit 7c2dd1d
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 25 deletions.
2 changes: 1 addition & 1 deletion packages/bruno-app/src/components/Documentation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const Documentation = ({ item, collection }) => {
return (
<StyledWrapper className="flex flex-col gap-y-1 h-full w-full relative">
<div className="editing-mode" role="tab" onClick={toggleViewMode}>
{isEditing ? 'Preview' : 'Edit'}
{isEditing ? 'Preview1' : 'Edit'}
</div>

{isEditing ? (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';
import { IconTrash } from '@tabler/icons';
import SingleLineEditor from 'components/SingleLineEditor';
import AssertionOperator from '../AssertionOperator';
import { useTheme } from 'providers/Theme';
import RemoveButton from 'components/RemoveButton/index';

/**
* Assertion operators
Expand Down Expand Up @@ -211,9 +211,7 @@ const AssertionRow = ({
className="mr-3 mousetrap"
onChange={(e) => handleAssertionChange(e, assertion, 'enabled')}
/>
<button tabIndex="-1" onClick={() => handleRemoveAssertion(assertion)}>
<IconTrash strokeWidth={1.5} size={20} />
</button>
<RemoveButton onClick={() => handleRemoveAssertion(assertion)} />
</div>
</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import get from 'lodash/get';
import cloneDeep from 'lodash/cloneDeep';
import { IconTrash } from '@tabler/icons';
import { useDispatch } from 'react-redux';
import { useTheme } from 'providers/Theme';
import {
Expand All @@ -12,6 +11,7 @@ import {
import MultiLineEditor from 'components/MultiLineEditor';
import { sendRequest, saveRequest } from 'providers/ReduxStore/slices/collections/actions';
import StyledWrapper from './StyledWrapper';
import RemoveButton from 'components/RemoveButton/index';

const FormUrlEncodedParams = ({ item, collection }) => {
const dispatch = useDispatch();
Expand Down Expand Up @@ -122,9 +122,7 @@ const FormUrlEncodedParams = ({ item, collection }) => {
className="mr-3 mousetrap"
onChange={(e) => handleParamChange(e, param, 'enabled')}
/>
<button tabIndex="-1" onClick={() => handleRemoveParams(param)}>
<IconTrash strokeWidth={1.5} size={20} />
</button>
<RemoveButton onClick={() => handleRemoveParams(param)} />
</div>
</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import get from 'lodash/get';
import cloneDeep from 'lodash/cloneDeep';
import { IconTrash } from '@tabler/icons';
import { useDispatch } from 'react-redux';
import { useTheme } from 'providers/Theme';
import {
Expand All @@ -13,6 +12,7 @@ import MultiLineEditor from 'components/MultiLineEditor';
import { sendRequest, saveRequest } from 'providers/ReduxStore/slices/collections/actions';
import StyledWrapper from './StyledWrapper';
import FilePickerEditor from 'components/FilePickerEditor';
import RemoveButton from 'components/RemoveButton';

const MultipartFormParams = ({ item, collection }) => {
const dispatch = useDispatch();
Expand Down Expand Up @@ -180,9 +180,7 @@ const MultipartFormParams = ({ item, collection }) => {
className="mr-3 mousetrap"
onChange={(e) => handleParamChange(e, param, 'enabled')}
/>
<button tabIndex="-1" onClick={() => handleRemoveParams(param)}>
<IconTrash strokeWidth={1.5} size={20} />
</button>
<RemoveButton onClick={() => handleRemoveParams(param)} />
</div>
</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import get from 'lodash/get';
import cloneDeep from 'lodash/cloneDeep';
import InfoTip from 'components/InfoTip';
import { IconTrash } from '@tabler/icons';
import { useDispatch } from 'react-redux';
import { useTheme } from 'providers/Theme';
import {
Expand All @@ -18,6 +17,7 @@ import { saveRequest, sendRequest } from 'providers/ReduxStore/slices/collection
import StyledWrapper from './StyledWrapper';
import Table from 'components/Table/index';
import ReorderTable from 'components/ReorderTable';
import RemoveButton from 'components/RemoveButton';

const QueryParams = ({ item, collection }) => {
const dispatch = useDispatch();
Expand Down Expand Up @@ -160,9 +160,7 @@ const QueryParams = ({ item, collection }) => {
className="mr-3 mousetrap"
onChange={(e) => handleQueryParamChange(e, param, 'enabled')}
/>
<button tabIndex="-1" onClick={() => handleRemoveQueryParam(param)}>
<IconTrash strokeWidth={1.5} size={20} />
</button>
<RemoveButton onClick={() => handleRemoveQueryParam(param)} />
</div>
</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import get from 'lodash/get';
import cloneDeep from 'lodash/cloneDeep';
import { IconTrash } from '@tabler/icons';
import { useDispatch } from 'react-redux';
import { useTheme } from 'providers/Theme';
import { addRequestHeader, updateRequestHeader, deleteRequestHeader } from 'providers/ReduxStore/slices/collections';
Expand All @@ -10,6 +9,7 @@ import SingleLineEditor from 'components/SingleLineEditor';
import StyledWrapper from './StyledWrapper';
import { headers as StandardHTTPHeaders } from 'know-your-http-well';
import { MimeTypes } from 'utils/codemirror/autocompleteConstants';
import RemoveButton from 'components/RemoveButton/index';
const headerAutoCompleteList = StandardHTTPHeaders.map((e) => e.header);

const RequestHeaders = ({ item, collection }) => {
Expand Down Expand Up @@ -131,9 +131,7 @@ const RequestHeaders = ({ item, collection }) => {
className="mr-3 mousetrap"
onChange={(e) => handleHeaderValueChange(e, header, 'enabled')}
/>
<button tabIndex="-1" onClick={() => handleRemoveHeader(header)}>
<IconTrash strokeWidth={1.5} size={20} />
</button>
<RemoveButton onClick={() => handleRemoveHeader(header)} />
</div>
</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import cloneDeep from 'lodash/cloneDeep';
import { IconTrash } from '@tabler/icons';
import { useDispatch } from 'react-redux';
import { useTheme } from 'providers/Theme';
import { addVar, updateVar, deleteVar } from 'providers/ReduxStore/slices/collections';
Expand All @@ -10,6 +9,7 @@ import InfoTip from 'components/InfoTip';
import StyledWrapper from './StyledWrapper';
import toast from 'react-hot-toast';
import { variableNameRegex } from 'utils/common/regex';
import RemoveButton from 'components/RemoveButton/index';

const VarsTable = ({ item, collection, vars, varType }) => {
const dispatch = useDispatch();
Expand Down Expand Up @@ -143,9 +143,7 @@ const VarsTable = ({ item, collection, vars, varType }) => {
className="mr-3 mousetrap"
onChange={(e) => handleVarChange(e, _var, 'enabled')}
/>
<button tabIndex="-1" onClick={() => handleRemoveVar(_var)}>
<IconTrash strokeWidth={1.5} size={20} />
</button>
<RemoveButton onClick={() => handleRemoveVar(_var)} />
</div>
</td>
</tr>
Expand Down

0 comments on commit 7c2dd1d

Please sign in to comment.