mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-25 17:33:28 +01:00
feat: Add descriptions for each panel in CollectionSettings (#2031)
* Add descriptions for each panel in CollectionSettings * Revert index.js Leftover change from when i was putzing around
This commit is contained in:
parent
fbee23329d
commit
84128052c0
@ -37,7 +37,11 @@ const Auth = ({ collection }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledWrapper className="w-full mt-2">
|
<StyledWrapper className="w-full h-full">
|
||||||
|
<div className="text-sm mb-6">
|
||||||
|
Configures authentication for the entire collection. This applies to all requests using the 'Inherit' option in
|
||||||
|
the 'Auth' tab, as well as any new requests added to this collection.
|
||||||
|
</div>
|
||||||
<div className="flex flex-grow justify-start items-center">
|
<div className="flex flex-grow justify-start items-center">
|
||||||
<AuthMode collection={collection} />
|
<AuthMode collection={collection} />
|
||||||
</div>
|
</div>
|
||||||
|
@ -30,13 +30,13 @@ const ClientCertSettings = ({ clientCertConfig, onUpdate, onRemove }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledWrapper>
|
<StyledWrapper className="w-full h-full">
|
||||||
<div className="flex items-center font-semibold mt-4 mb-2">
|
<div className="text-sm mb-6">Add client certificates to be used for specific domains.</div>
|
||||||
<IconCertificate className="mr-1 certificate-icon" size={24} strokeWidth={1.5} /> Client Certificates
|
|
||||||
</div>
|
<h1 className="font-semibold">Client Certificates</h1>
|
||||||
<ul className="mt-4">
|
<ul className="mt-4">
|
||||||
{!clientCertConfig.length
|
{!clientCertConfig.length
|
||||||
? 'None'
|
? 'No client certificates added'
|
||||||
: clientCertConfig.map((clientCert) => (
|
: clientCertConfig.map((clientCert) => (
|
||||||
<li key={uuid()} className="flex items-center available-certificates p-2 rounded-lg mb-2">
|
<li key={uuid()} className="flex items-center available-certificates p-2 rounded-lg mb-2">
|
||||||
<div className="flex items-center w-full justify-between">
|
<div className="flex items-center w-full justify-between">
|
||||||
|
@ -63,7 +63,8 @@ const Headers = ({ collection }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledWrapper className="w-full">
|
<StyledWrapper className="h-full w-full">
|
||||||
|
<div className="text-sm mb-6">Add request headers that will be sent with every request in this collection.</div>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -23,6 +23,7 @@ function countRequests(items) {
|
|||||||
const Info = ({ collection }) => {
|
const Info = ({ collection }) => {
|
||||||
return (
|
return (
|
||||||
<StyledWrapper className="w-full flex flex-col h-full">
|
<StyledWrapper className="w-full flex flex-col h-full">
|
||||||
|
<div className="text-sm mb-6">General information about the collection.</div>
|
||||||
<table className="w-full border-collapse">
|
<table className="w-full border-collapse">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr className="">
|
<tr className="">
|
||||||
|
@ -27,8 +27,10 @@ const PresetsSettings = ({ collection }) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledWrapper>
|
<StyledWrapper className="h-full w-full">
|
||||||
<h1 className="font-medium mb-3">Collection Presets</h1>
|
<div className="text-sm mb-6">
|
||||||
|
These presets will be used as the default values for new requests in this collection.
|
||||||
|
</div>
|
||||||
<form className="bruno-form" onSubmit={formik.handleSubmit}>
|
<form className="bruno-form" onSubmit={formik.handleSubmit}>
|
||||||
<div className="mb-3 flex items-center">
|
<div className="mb-3 flex items-center">
|
||||||
<label className="settings-label flex items-center" htmlFor="enabled">
|
<label className="settings-label flex items-center" htmlFor="enabled">
|
||||||
@ -66,7 +68,7 @@ const PresetsSettings = ({ collection }) => {
|
|||||||
<label className="settings-label" htmlFor="requestUrl">
|
<label className="settings-label" htmlFor="requestUrl">
|
||||||
Base URL
|
Base URL
|
||||||
</label>
|
</label>
|
||||||
<div className="flex items-center">
|
<div className="flex items-center w-full">
|
||||||
<div className="flex items-center flex-grow input-container h-full">
|
<div className="flex items-center flex-grow input-container h-full">
|
||||||
<input
|
<input
|
||||||
id="request-url"
|
id="request-url"
|
||||||
@ -79,6 +81,7 @@ const PresetsSettings = ({ collection }) => {
|
|||||||
spellCheck="false"
|
spellCheck="false"
|
||||||
onChange={formik.handleChange}
|
onChange={formik.handleChange}
|
||||||
value={formik.values.requestUrl || ''}
|
value={formik.values.requestUrl || ''}
|
||||||
|
style={{ width: '100%' }}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -95,8 +95,8 @@ const ProxySettings = ({ proxyConfig, onUpdate }) => {
|
|||||||
}, [proxyConfig]);
|
}, [proxyConfig]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledWrapper>
|
<StyledWrapper className="h-full w-full">
|
||||||
<h1 className="font-medium mb-3">Proxy Settings</h1>
|
<div className="text-sm mb-6">Configure proxy settings for this collection.</div>
|
||||||
<form className="bruno-form" onSubmit={formik.handleSubmit}>
|
<form className="bruno-form" onSubmit={formik.handleSubmit}>
|
||||||
<div className="mb-3 flex items-center">
|
<div className="mb-3 flex items-center">
|
||||||
<label className="settings-label flex items-center" htmlFor="enabled">
|
<label className="settings-label flex items-center" htmlFor="enabled">
|
||||||
|
@ -38,7 +38,10 @@ const Script = ({ collection }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledWrapper className="w-full flex flex-col">
|
<StyledWrapper className="w-full flex flex-col h-full">
|
||||||
|
<div className="text-sm mb-6">
|
||||||
|
Write pre and post-request scripts that will run before and after any request in this collection is sent.
|
||||||
|
</div>
|
||||||
<div className="flex-1 mt-2">
|
<div className="flex-1 mt-2">
|
||||||
<div className="mb-1 title text-xs">Pre Request</div>
|
<div className="mb-1 title text-xs">Pre Request</div>
|
||||||
<CodeEditor
|
<CodeEditor
|
||||||
|
@ -27,6 +27,7 @@ const Tests = ({ collection }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledWrapper className="w-full flex flex-col h-full">
|
<StyledWrapper className="w-full flex flex-col h-full">
|
||||||
|
<div className="text-sm mb-6">These tests will run any time a request in this collection is sent.</div>
|
||||||
<CodeEditor
|
<CodeEditor
|
||||||
collection={collection}
|
collection={collection}
|
||||||
value={tests || ''}
|
value={tests || ''}
|
||||||
|
@ -147,9 +147,7 @@ const CollectionSettings = ({ collection }) => {
|
|||||||
Info
|
Info
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<section className={`flex ${['auth', 'script', 'docs', 'clientCert'].includes(tab) ? '' : 'mt-4'}`}>
|
<section className="mt-4 h-full">{getTabPanel(tab)}</section>
|
||||||
{getTabPanel(tab)}
|
|
||||||
</section>
|
|
||||||
</StyledWrapper>
|
</StyledWrapper>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user