change name of Indicator component

This commit is contained in:
pooja-bruno
2025-07-01 15:49:37 +05:30
committed by Maintainer Bruno
parent b461de9aaf
commit 837a152a96
4 changed files with 20 additions and 20 deletions

View File

@@ -15,7 +15,7 @@ import Test from './Tests';
import Presets from './Presets';
import StyledWrapper from './StyledWrapper';
import Vars from './Vars/index';
import Indicator from 'components/Indicators';
import StatusDot from 'components/StatusDot';
import Overview from './Overview/index';
const CollectionSettings = ({ collection }) => {
@@ -147,26 +147,26 @@ const CollectionSettings = ({ collection }) => {
</div>
<div className={getTabClassname('auth')} role="tab" onClick={() => setTab('auth')}>
Auth
{authMode !== 'none' && <Indicator />}
{authMode !== 'none' && <StatusDot />}
</div>
<div className={getTabClassname('script')} role="tab" onClick={() => setTab('script')}>
Script
{hasScripts && <Indicator />}
{hasScripts && <StatusDot />}
</div>
<div className={getTabClassname('tests')} role="tab" onClick={() => setTab('tests')}>
Tests
{hasTests && <Indicator />}
{hasTests && <StatusDot />}
</div>
<div className={getTabClassname('presets')} role="tab" onClick={() => setTab('presets')}>
Presets
</div>
<div className={getTabClassname('proxy')} role="tab" onClick={() => setTab('proxy')}>
Proxy
{Object.keys(proxyConfig).length > 0 && <Indicator />}
{Object.keys(proxyConfig).length > 0 && <StatusDot />}
</div>
<div className={getTabClassname('clientCert')} role="tab" onClick={() => setTab('clientCert')}>
Client Certificates
{clientCertConfig.length > 0 && <Indicator />}
{clientCertConfig.length > 0 && <StatusDot />}
</div>
</div>
<section className="mt-4 h-full">{getTabPanel(tab)}</section>

View File

@@ -9,7 +9,7 @@ import StyledWrapper from './StyledWrapper';
import Vars from './Vars';
import Documentation from './Documentation';
import Auth from './Auth';
import Indicator from 'components/Indicators';
import StatusDot from 'components/StatusDot';
import get from 'lodash/get';
const FolderSettings = ({ collection, folder }) => {
@@ -83,11 +83,11 @@ const FolderSettings = ({ collection, folder }) => {
</div>
<div className={getTabClassname('script')} role="tab" onClick={() => setTab('script')}>
Script
{hasScripts && <Indicator />}
{hasScripts && <StatusDot />}
</div>
<div className={getTabClassname('test')} role="tab" onClick={() => setTab('test')}>
Test
{hasTests && <Indicator />}
{hasTests && <StatusDot />}
</div>
<div className={getTabClassname('vars')} role="tab" onClick={() => setTab('vars')}>
Vars
@@ -95,7 +95,7 @@ const FolderSettings = ({ collection, folder }) => {
</div>
<div className={getTabClassname('auth')} role="tab" onClick={() => setTab('auth')}>
Auth
{hasAuth && <Indicator />}
{hasAuth && <StatusDot />}
</div>
<div className={getTabClassname('docs')} role="tab" onClick={() => setTab('docs')}>
Docs

View File

@@ -16,7 +16,7 @@ import { find, get } from 'lodash';
import Documentation from 'components/Documentation/index';
import HeightBoundContainer from 'ui/HeightBoundContainer';
import { useEffect } from 'react';
import Indicator from 'components/Indicators';
import StatusDot from 'components/StatusDot';
const HttpRequestPane = ({ item, collection }) => {
const dispatch = useDispatch();
@@ -120,7 +120,7 @@ const HttpRequestPane = ({ item, collection }) => {
</div>
<div className={getTabClassname('body')} role="tab" onClick={() => selectTab('body')}>
Body
{body.mode !== 'none' && <Indicator />}
{body.mode !== 'none' && <StatusDot />}
</div>
<div className={getTabClassname('headers')} role="tab" onClick={() => selectTab('headers')}>
Headers
@@ -128,7 +128,7 @@ const HttpRequestPane = ({ item, collection }) => {
</div>
<div className={getTabClassname('auth')} role="tab" onClick={() => selectTab('auth')}>
Auth
{auth.mode !== 'none' && <Indicator />}
{auth.mode !== 'none' && <StatusDot />}
</div>
<div className={getTabClassname('vars')} role="tab" onClick={() => selectTab('vars')}>
Vars
@@ -138,8 +138,8 @@ const HttpRequestPane = ({ item, collection }) => {
Script
{(script.req || script.res) && (
item.preRequestScriptErrorMessage || item.postResponseScriptErrorMessage ?
<Indicator type="error" /> :
<Indicator />
<StatusDot type="error" /> :
<StatusDot />
)}
</div>
<div className={getTabClassname('assert')} role="tab" onClick={() => selectTab('assert')}>
@@ -150,13 +150,13 @@ const HttpRequestPane = ({ item, collection }) => {
Tests
{tests && tests.length > 0 && (
item.testScriptErrorMessage ?
<Indicator type="error" /> :
<Indicator />
<StatusDot type="error" /> :
<StatusDot />
)}
</div>
<div className={getTabClassname('docs')} role="tab" onClick={() => selectTab('docs')}>
Docs
{docs && docs.length > 0 && <Indicator />}
{docs && docs.length > 0 && <StatusDot />}
</div>
{focusedTab.requestPaneTab === 'body' ? (
<div className="flex flex-grow justify-end items-center">

View File

@@ -1,7 +1,7 @@
import React from 'react';
import DotIcon from 'components/Icons/Dot';
const Indicator = ({ type = 'default' }) => (
const StatusDot = ({ type = 'default' }) => (
<sup
className={`ml-[.125rem] opacity-80 font-medium ${
type === 'error' ? 'text-red-500' : ''
@@ -12,4 +12,4 @@ const Indicator = ({ type = 'default' }) => (
);
export default Indicator;
export default StatusDot;