mirror of
https://github.com/usebruno/bruno.git
synced 2025-01-03 04:29:09 +01:00
fix: env name truncate
This commit is contained in:
parent
ad59e3f8d1
commit
bf142af6d9
@ -27,7 +27,7 @@ const DeleteEnvironment = ({ onClose, environment, collection }) => {
|
|||||||
handleConfirm={onConfirm}
|
handleConfirm={onConfirm}
|
||||||
handleCancel={onClose}
|
handleCancel={onClose}
|
||||||
>
|
>
|
||||||
<div className='flex gap-1'>Are you sure you want to delete <span className="font-semibold max-w-[200px] truncate inline-block">{environment.name}</span> ?</div>
|
Are you sure you want to delete <span className="font-semibold">{environment.name}</span> ?
|
||||||
</Modal>
|
</Modal>
|
||||||
</StyledWrapper>
|
</StyledWrapper>
|
||||||
</Portal>
|
</Portal>
|
||||||
|
@ -23,6 +23,10 @@ const StyledWrapper = styled.div`
|
|||||||
padding: 8px 10px;
|
padding: 8px 10px;
|
||||||
border-left: solid 2px transparent;
|
border-left: solid 2px transparent;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
max-width: 200px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
@ -8,6 +8,7 @@ import ImportEnvironment from '../ImportEnvironment';
|
|||||||
import ManageSecrets from '../ManageSecrets';
|
import ManageSecrets from '../ManageSecrets';
|
||||||
import StyledWrapper from './StyledWrapper';
|
import StyledWrapper from './StyledWrapper';
|
||||||
import ConfirmSwitchEnv from './ConfirmSwitchEnv';
|
import ConfirmSwitchEnv from './ConfirmSwitchEnv';
|
||||||
|
import ToolHint from 'components/ToolHint';
|
||||||
|
|
||||||
const EnvironmentList = ({ selectedEnvironment, setSelectedEnvironment, collection, isModified, setIsModified }) => {
|
const EnvironmentList = ({ selectedEnvironment, setSelectedEnvironment, collection, isModified, setIsModified }) => {
|
||||||
const { environments } = collection;
|
const { environments } = collection;
|
||||||
@ -108,7 +109,9 @@ const EnvironmentList = ({ selectedEnvironment, setSelectedEnvironment, collecti
|
|||||||
className={selectedEnvironment.uid === env.uid ? 'environment-item active' : 'environment-item'}
|
className={selectedEnvironment.uid === env.uid ? 'environment-item active' : 'environment-item'}
|
||||||
onClick={() => handleEnvironmentClick(env)} // Use handleEnvironmentClick to handle clicks
|
onClick={() => handleEnvironmentClick(env)} // Use handleEnvironmentClick to handle clicks
|
||||||
>
|
>
|
||||||
<span className="break-all">{env.name}</span>
|
<ToolHint text={env.name} toolhintId={env.uid} place="bottom">
|
||||||
|
<span className="break-all">{env.name}</span>
|
||||||
|
</ToolHint>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
<div className="btn-create-environment" onClick={() => handleCreateEnvClick()}>
|
<div className="btn-create-environment" onClick={() => handleCreateEnvClick()}>
|
||||||
|
@ -117,12 +117,11 @@ const QueryParams = ({ item, collection }) => {
|
|||||||
<StyledWrapper className="w-full flex flex-col absolute">
|
<StyledWrapper className="w-full flex flex-col absolute">
|
||||||
<div className="flex-1 mt-2">
|
<div className="flex-1 mt-2">
|
||||||
<div className="mb-1 title text-xs">Query</div>
|
<div className="mb-1 title text-xs">Query</div>
|
||||||
|
|
||||||
<Table
|
<Table
|
||||||
headers={[
|
headers={[
|
||||||
{ name: 'Name', accessor: 'name', width: '31%' },
|
{ name: 'Name', accessor: 'name', width: '31%' },
|
||||||
{ name: 'Path', accessor: 'path', width: '50%' },
|
{ name: 'Path', accessor: 'path', width: '56%' },
|
||||||
{ name: '', accessor: '', width: '19%' }
|
{ name: '', accessor: '', width: '13%' }
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<ReorderTable updateReorderedItem={handleParamDrag}>
|
<ReorderTable updateReorderedItem={handleParamDrag}>
|
||||||
@ -158,7 +157,7 @@ const QueryParams = ({ item, collection }) => {
|
|||||||
type="checkbox"
|
type="checkbox"
|
||||||
checked={param.enabled}
|
checked={param.enabled}
|
||||||
tabIndex="-1"
|
tabIndex="-1"
|
||||||
className="mr-1.5 mousetrap"
|
className="mr-3 mousetrap"
|
||||||
onChange={(e) => handleQueryParamChange(e, param, 'enabled')}
|
onChange={(e) => handleQueryParamChange(e, param, 'enabled')}
|
||||||
/>
|
/>
|
||||||
<button tabIndex="-1" onClick={() => handleRemoveQueryParam(param)}>
|
<button tabIndex="-1" onClick={() => handleRemoveQueryParam(param)}>
|
||||||
@ -188,7 +187,7 @@ const QueryParams = ({ item, collection }) => {
|
|||||||
</code>
|
</code>
|
||||||
</div>
|
</div>
|
||||||
`}
|
`}
|
||||||
infotipId="path-param-InfoTip"
|
infotipId="path-param-InfoTip"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<table>
|
<table>
|
||||||
@ -241,11 +240,7 @@ const QueryParams = ({ item, collection }) => {
|
|||||||
: null}
|
: null}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{!(pathParams && pathParams.length) ?
|
{!(pathParams && pathParams.length) ? <div className="title pr-2 py-3 mt-2 text-xs"></div> : null}
|
||||||
<div className="title pr-2 py-3 mt-2 text-xs">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
: null}
|
|
||||||
</div>
|
</div>
|
||||||
</StyledWrapper>
|
</StyledWrapper>
|
||||||
);
|
);
|
||||||
|
@ -23,7 +23,7 @@ import FolderSettings from 'components/FolderSettings';
|
|||||||
import { getGlobalEnvironmentVariables, getGlobalEnvironmentVariablesMasked } from 'utils/collections/index';
|
import { getGlobalEnvironmentVariables, getGlobalEnvironmentVariablesMasked } from 'utils/collections/index';
|
||||||
import { produce } from 'immer';
|
import { produce } from 'immer';
|
||||||
|
|
||||||
const MIN_LEFT_PANE_WIDTH = 300;
|
const MIN_LEFT_PANE_WIDTH = 450;
|
||||||
const MIN_RIGHT_PANE_WIDTH = 350;
|
const MIN_RIGHT_PANE_WIDTH = 350;
|
||||||
const DEFAULT_PADDING = 5;
|
const DEFAULT_PADDING = 5;
|
||||||
|
|
||||||
@ -39,12 +39,15 @@ const RequestTabPanel = () => {
|
|||||||
const _collections = useSelector((state) => state.collections.collections);
|
const _collections = useSelector((state) => state.collections.collections);
|
||||||
|
|
||||||
// merge `globalEnvironmentVariables` into the active collection and rebuild `collections` immer proxy object
|
// merge `globalEnvironmentVariables` into the active collection and rebuild `collections` immer proxy object
|
||||||
let collections = produce(_collections, draft => {
|
let collections = produce(_collections, (draft) => {
|
||||||
let collection = find(draft, (c) => c.uid === focusedTab?.collectionUid);
|
let collection = find(draft, (c) => c.uid === focusedTab?.collectionUid);
|
||||||
|
|
||||||
if (collection) {
|
if (collection) {
|
||||||
// add selected global env variables to the collection object
|
// add selected global env variables to the collection object
|
||||||
const globalEnvironmentVariables = getGlobalEnvironmentVariables({ globalEnvironments, activeGlobalEnvironmentUid });
|
const globalEnvironmentVariables = getGlobalEnvironmentVariables({
|
||||||
|
globalEnvironments,
|
||||||
|
activeGlobalEnvironmentUid
|
||||||
|
});
|
||||||
const globalEnvSecrets = getGlobalEnvironmentVariablesMasked({ globalEnvironments, activeGlobalEnvironmentUid });
|
const globalEnvSecrets = getGlobalEnvironmentVariablesMasked({ globalEnvironments, activeGlobalEnvironmentUid });
|
||||||
collection.globalEnvironmentVariables = globalEnvironmentVariables;
|
collection.globalEnvironmentVariables = globalEnvironmentVariables;
|
||||||
collection.globalEnvSecrets = globalEnvSecrets;
|
collection.globalEnvSecrets = globalEnvSecrets;
|
||||||
|
Loading…
Reference in New Issue
Block a user