1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Styling Proxy tab

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2021-04-01 14:44:25 +03:00
parent 16eacee140
commit 909032a535
2 changed files with 43 additions and 26 deletions

View File

@ -137,7 +137,6 @@ export class Preferences extends React.Component {
<hr/>
<section id="startup">
<h2>Start-up</h2>
<FormSwitch
control={
<Switcher
@ -153,30 +152,41 @@ export class Preferences extends React.Component {
)}
{this.activeTab == PreferencesTab.Proxy && (
<section id="proxy">
<h2>Proxy</h2>
<SubTitle title="HTTP Proxy"/>
<Input
theme="round-black"
placeholder="Type HTTP proxy url (example: http://proxy.acme.org:8080)"
value={this.httpProxy}
onChange={v => this.httpProxy = v}
onBlur={() => preferences.httpsProxy = this.httpProxy}
/>
<small className="hint">
Proxy is used only for non-cluster communication.
</small>
<section>
<h2>Proxy</h2>
<SubTitle title="HTTP Proxy"/>
<Input
theme="round-black"
placeholder="Type HTTP proxy url (example: http://proxy.acme.org:8080)"
value={this.httpProxy}
onChange={v => this.httpProxy = v}
onBlur={() => preferences.httpsProxy = this.httpProxy}
/>
<small className="hint">
Proxy is used only for non-cluster communication.
</small>
</section>
<SubTitle title="Certificate Trust"/>
<Checkbox
label="Allow untrusted Certificate Authorities"
value={preferences.allowUntrustedCAs}
onChange={v => preferences.allowUntrustedCAs = v}
/>
<small className="hint">
This will make Lens to trust ANY certificate authority without any validations.{" "}
Needed with some corporate proxies that do certificate re-writing.{" "}
Does not affect cluster communications!
</small>
<hr className="small"/>
<section className="small">
<SubTitle title="Certificate Trust"/>
<FormSwitch
control={
<Switcher
checked={preferences.allowUntrustedCAs}
onChange={v => preferences.allowUntrustedCAs = v.target.checked}
name="startup"
/>
}
label="Allow untrusted Certificate Authorities"
/>
<small className="hint">
This will make Lens to trust ANY certificate authority without any validations.{" "}
Needed with some corporate proxies that do certificate re-writing.{" "}
Does not affect cluster communications!
</small>
</section>
</section>
)}

View File

@ -168,6 +168,10 @@
&:not(:first-child) {
margin-top: 40px;
&.small {
margin-top: 20px;
}
}
h1, h2 {
@ -183,9 +187,8 @@
}
.hint {
margin-top: 4px;
margin-top: 8px;
font-size: 14px;
color: var(--textColorDimmed);
}
.SubTitle {
@ -199,6 +202,10 @@
margin-top: 40px;
height: 1px;
border-top: thin solid #ffffff0f;
&.small {
margin-top: 20px;
}
}
}
}