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 { .LandingPage {
height: 100%; height: 100%;
background: #282b2f url(../../components/icon/crane.svg) no-repeat; text-align: center;
z-index: 0;
&::after {
content: "";
background: url(../../components/icon/crane.svg) no-repeat;
background-position: 0 35%; background-position: 0 35%;
background-size: 85%; background-size: 85%;
background-clip: content-box; background-clip: content-box;
text-align: center; 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() { render() {
const { className, ...dialogProps } = this.props; const { className, ...dialogProps } = this.props;
const cronjobName = this.cronjob ? this.cronjob.getName() : ""; const cronjobName = this.cronjob ? this.cronjob.getName() : "";
console.log(cronjobName);
const header = ( const header = (
<h5> <h5>
<Trans>Trigger CronJob <span>{cronjobName}</span></Trans> <Trans>Trigger CronJob <span>{cronjobName}</span></Trans>

View File

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

View File

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

View File

@ -110,6 +110,7 @@ export class ClustersMenu extends React.Component<Props> {
</p> </p>
</div> </div>
)} )}
<div className="clusters flex column gaps">
{clusters.map(cluster => { {clusters.map(cluster => {
return ( return (
<ClusterIcon <ClusterIcon
@ -122,6 +123,7 @@ export class ClustersMenu extends React.Component<Props> {
/> />
) )
})} })}
</div>
<div className="add-cluster" onClick={this.addCluster}> <div className="add-cluster" onClick={this.addCluster}>
<Tooltip targetId="add-cluster-icon"> <Tooltip targetId="add-cluster-icon">
<Trans>Add Cluster</Trans> <Trans>Add Cluster</Trans>