mirror of https://github.com/portainer/portainer
fix(ui): remove right label for switch toggle EE-3786 (#7349)
* remove right label for switch togglepull/7447/head
parent
8ff2fa66b6
commit
ad8b8399c4
|
@ -13,6 +13,5 @@ export const switchField = r2a(SwitchField, [
|
||||||
'disabled',
|
'disabled',
|
||||||
'onChange',
|
'onChange',
|
||||||
'featureId',
|
'featureId',
|
||||||
'switchValues',
|
|
||||||
'switchClass',
|
'switchClass',
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -20,10 +20,6 @@ export interface Props {
|
||||||
dataCy?: string;
|
dataCy?: string;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
featureId?: FeatureId;
|
featureId?: FeatureId;
|
||||||
switchValues?: {
|
|
||||||
on: string;
|
|
||||||
off: string;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function SwitchField({
|
export function SwitchField({
|
||||||
|
@ -37,7 +33,6 @@ export function SwitchField({
|
||||||
disabled,
|
disabled,
|
||||||
onChange,
|
onChange,
|
||||||
featureId,
|
featureId,
|
||||||
switchValues,
|
|
||||||
switchClass,
|
switchClass,
|
||||||
}: Props) {
|
}: Props) {
|
||||||
const toggleName = name ? `toggle_${name}` : '';
|
const toggleName = name ? `toggle_${name}` : '';
|
||||||
|
@ -64,16 +59,6 @@ export function SwitchField({
|
||||||
featureId={featureId}
|
featureId={featureId}
|
||||||
dataCy={dataCy}
|
dataCy={dataCy}
|
||||||
/>
|
/>
|
||||||
{switchValues && checked && (
|
|
||||||
<span className={`"ml-2" ${styles.switchValues}`}>
|
|
||||||
{switchValues.on}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
{switchValues && !checked && (
|
|
||||||
<span className={`"ml-2" ${styles.switchValues}`}>
|
|
||||||
{switchValues.off}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
</label>
|
</label>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,6 @@ export function EdgeScriptSettingsFieldset({
|
||||||
}
|
}
|
||||||
label="Allow self-signed certs"
|
label="Allow self-signed certs"
|
||||||
labelClass="col-sm-3 col-lg-2"
|
labelClass="col-sm-3 col-lg-2"
|
||||||
switchValues={{ on: 'Yes', off: 'No' }}
|
|
||||||
tooltip="When allowing self-signed certificates the edge agent will ignore the domain validation when connecting to Portainer via HTTPS"
|
tooltip="When allowing self-signed certificates the edge agent will ignore the domain validation when connecting to Portainer via HTTPS"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue