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

Coloring Add Cluster headings

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2021-03-23 14:36:02 +03:00
parent 473975ca57
commit 848953d224
3 changed files with 43 additions and 48 deletions

View File

@ -42,9 +42,4 @@
.text-primary {
color: var(--textColorAccent);
}
.hint {
display: block;
padding-top: 6px;
}
}

View File

@ -231,7 +231,7 @@ export class AddCluster extends React.Component {
/>
</Tabs>
{this.sourceTab === KubeConfigSourceTab.FILE && (
<div>
<>
<div className="kube-config-select flex gaps align-center">
<Input
theme="round-black"
@ -256,10 +256,10 @@ export class AddCluster extends React.Component {
<small className="hint">
Pro-Tip: you can also drag-n-drop kubeconfig file to this area
</small>
</div>
</>
)}
{this.sourceTab === KubeConfigSourceTab.TEXT && (
<div className="flex column">
<div className="flex column gaps">
<AceEditor
autoFocus
showGutter={false}
@ -352,45 +352,47 @@ export class AddCluster extends React.Component {
return (
<DropFileInput onDropFiles={this.onDropKubeConfig}>
<PageLayout className="AddClusters" header={<><Icon svg="logo-lens" big /> <h2>Add Clusters</h2></>} showOnTop={true}>
<h2>Add Clusters from Kubeconfig</h2>
{this.renderInfo()}
{this.renderKubeConfigSource()}
{this.renderContextSelector()}
<div className="cluster-settings">
<a href="#" onClick={() => this.showSettings = !this.showSettings}>
Proxy settings
</a>
</div>
{this.showSettings && (
<div className="proxy-settings">
<p>HTTP Proxy server. Used for communicating with Kubernetes API.</p>
<Input
autoFocus
value={this.proxyServer}
onChange={value => this.proxyServer = value}
theme="round-black"
/>
<small className="hint">
{"A HTTP proxy server URL (format: http://<address>:<port>)."}
</small>
<PageLayout className="AddClusters" header={<h1>Add Clusters</h1>} showOnTop={true}>
<section>
<h1>Add Clusters from Kubeconfig</h1>
{this.renderInfo()}
{this.renderKubeConfigSource()}
{this.renderContextSelector()}
<div className="cluster-settings">
<a href="#" onClick={() => this.showSettings = !this.showSettings}>
Proxy settings
</a>
</div>
)}
{this.error && (
<div className="error">{this.error}</div>
)}
{this.showSettings && (
<div className="proxy-settings">
<p>HTTP Proxy server. Used for communicating with Kubernetes API.</p>
<Input
autoFocus
value={this.proxyServer}
onChange={value => this.proxyServer = value}
theme="round-black"
/>
<small className="hint">
{"A HTTP proxy server URL (format: http://<address>:<port>)."}
</small>
</div>
)}
{this.error && (
<div className="error">{this.error}</div>
)}
<div className="actions-panel">
<Button
primary
disabled={submitDisabled}
label={this.selectedContexts.length < 2 ? "Add cluster" : "Add clusters"}
onClick={this.addClusters}
waiting={this.isWaiting}
tooltip={submitDisabled ? "Select at least one cluster to add." : undefined}
tooltipOverrideDisabled
/>
</div>
<div className="actions-panel">
<Button
primary
disabled={submitDisabled}
label={this.selectedContexts.length < 2 ? "Add cluster" : "Add clusters"}
onClick={this.addClusters}
waiting={this.isWaiting}
tooltip={submitDisabled ? "Select at least one cluster to add." : undefined}
tooltipOverrideDisabled
/>
</div>
</section>
</PageLayout>
</DropFileInput>
);

View File

@ -3,7 +3,6 @@
--nav-width: 180px;
--nav-column-width: 30vw;
--spacing: calc(var(--unit) * 2);
--wrapper-padding: calc(var(--spacing) * 2);
--header-height: 64px;
--header-height-mac: 80px;
@ -48,7 +47,7 @@
> .header {
position: sticky;
padding: var(--spacing);
padding: 16px 24px;
background-color: var(--layoutTabsBackground);
height: var(--header-height);
grid-column-start: 1;
@ -57,7 +56,6 @@
.ClusterIcon {
--size: 32px;
--flex-gap: 15px;
margin-left: 4px;
}
h1 {