mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
added original landing page back only for default workspace with no clusters
Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
parent
9d9d4ace27
commit
37d6636d01
@ -1,6 +1,27 @@
|
|||||||
.PageLayout.LandingPage {
|
.LandingPage {
|
||||||
--width: 80%;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
text-align: center;
|
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: .75;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
position: absolute;
|
||||||
|
z-index: -1;
|
||||||
|
|
||||||
|
.theme-light & {
|
||||||
|
opacity: 0.2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.startup-hint {
|
.startup-hint {
|
||||||
$bgc: $mainBackground;
|
$bgc: $mainBackground;
|
||||||
@ -36,4 +57,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.PageLayout.LandingOverview {
|
||||||
|
--width: 80%;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
@ -14,7 +14,18 @@ export class LandingPage extends React.Component {
|
|||||||
get workspace(): Workspace {
|
get workspace(): Workspace {
|
||||||
return workspaceStore.currentWorkspace;
|
return workspaceStore.currentWorkspace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
renderStartupHint() {
|
||||||
|
return (
|
||||||
|
<div className="startup-hint flex column gaps" onMouseEnter={() => this.showHint = false}>
|
||||||
|
<p>This is the quick launch menu.</p>
|
||||||
|
<p>
|
||||||
|
Associate clusters and choose the ones you want to access via quick launch menu by clicking the + button.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const clusters = clusterStore.getByWorkspaceId(this.workspace.id);
|
const clusters = clusterStore.getByWorkspaceId(this.workspace.id);
|
||||||
const noClustersInScope = !clusters.length;
|
const noClustersInScope = !clusters.length;
|
||||||
@ -22,16 +33,24 @@ export class LandingPage extends React.Component {
|
|||||||
|
|
||||||
const header = <h2>Workspace: {this.workspace.name}</h2>;
|
const header = <h2>Workspace: {this.workspace.name}</h2>;
|
||||||
|
|
||||||
return (
|
if (this.workspace.name === "default" && noClustersInScope) {
|
||||||
<PageLayout className="LandingPage flex column gaps" header={header} provideBackButtonNavigation={false} contentGaps={false}>
|
return (
|
||||||
{showStartupHint && (
|
<div className="LandingPage flex">
|
||||||
<div className="startup-hint flex column gaps" onMouseEnter={() => this.showHint = false}>
|
{showStartupHint && this.renderStartupHint()}
|
||||||
<p>This is the quick launch menu.</p>
|
<div className="no-clusters flex column gaps box center">
|
||||||
|
<h1>
|
||||||
|
Welcome!
|
||||||
|
</h1>
|
||||||
<p>
|
<p>
|
||||||
Associate clusters and choose the ones you want to access via quick launch menu by clicking the + button.
|
Get started by associating one or more clusters to Lens.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
)}
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<PageLayout className="LandingOverview flex column gaps" header={header} provideBackButtonNavigation={false} contentGaps={false}>
|
||||||
<WorkspaceOverview workspace={this.workspace}/>
|
<WorkspaceOverview workspace={this.workspace}/>
|
||||||
</PageLayout>
|
</PageLayout>
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user