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

Fixing minor light theme issues (#744)

* Cluster Menu scrolling & tooltip fixes

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Removing forgotten console.log()

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fix Landing Page in light theme

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Updating Chart on every componentDidUpdate

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2020-08-25 20:09:00 +03:00 committed by GitHub
parent a12aa8a04f
commit 886fba136a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 51 additions and 23 deletions

View File

@ -1,8 +1,24 @@
.LandingPage {
height: 100%;
background: #282b2f url(../../components/icon/crane.svg) no-repeat;
background-position: 0 35%;
background-size: 85%;
background-clip: content-box;
text-align: center;
z-index: 0;
&::after {
content: "";
background: url(../../components/icon/crane.svg) no-repeat;
background-position: 0 35%;
background-size: 85%;
background-clip: content-box;
opacity: 1;
top: 0;
left: 0;
bottom: 0;
right: 0;
position: absolute;
z-index: -1;
.theme-light & {
opacity: 0.2;
}
}
}

View File

@ -97,7 +97,6 @@ export class CronJobTriggerDialog extends Component<Props> {
render() {
const { className, ...dialogProps } = this.props;
const cronjobName = this.cronjob ? this.cronjob.getName() : "";
console.log(cronjobName);
const header = (
<h5>
<Trans>Trigger CronJob <span>{cronjobName}</span></Trans>

View File

@ -63,14 +63,14 @@ export class Chart extends React.Component<ChartProps> {
this.renderChart()
}
componentDidUpdate(prevProps: ChartProps) {
const { data, showChart, redraw } = this.props
componentDidUpdate() {
const { showChart, redraw } = this.props
if (redraw) {
this.chart.destroy()
this.renderChart()
return
}
if (!isEqual(prevProps.data, data) && showChart) {
if (showChart) {
if (!this.chart) this.renderChart()
else this.updateChart()
}

View File

@ -1,5 +1,4 @@
.ClustersMenu {
@include hidden-scrollbar;
$spacing: $padding * 2;
position: relative;
@ -23,8 +22,7 @@
padding: $spacing;
width: 320px;
background: $bgc;
z-index: 100;
color: white;
color: $textColorAccent;
filter: drop-shadow(0 0px 2px #ffffff33);
pointer-events: none;
@ -38,6 +36,19 @@
border-right: $arrowSize solid $bgc;
right: 100%;
}
.theme-light & {
filter: drop-shadow(0 0px 2px #777);
background: white;
&:before {
border-right-color: white;
}
}
}
.clusters {
@include hidden-scrollbar;
}
> .add-cluster {

View File

@ -110,18 +110,20 @@ export class ClustersMenu extends React.Component<Props> {
</p>
</div>
)}
{clusters.map(cluster => {
return (
<ClusterIcon
key={cluster.id}
showErrors={true}
cluster={cluster}
isActive={cluster.id === getMatchedClusterId()}
onClick={() => this.showCluster(cluster.id)}
onContextMenu={() => this.showContextMenu(cluster)}
/>
)
})}
<div className="clusters flex column gaps">
{clusters.map(cluster => {
return (
<ClusterIcon
key={cluster.id}
showErrors={true}
cluster={cluster}
isActive={cluster.id === getMatchedClusterId()}
onClick={() => this.showCluster(cluster.id)}
onContextMenu={() => this.showContextMenu(cluster)}
/>
)
})}
</div>
<div className="add-cluster" onClick={this.addCluster}>
<Tooltip targetId="add-cluster-icon">
<Trans>Add Cluster</Trans>