mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Moving TopBar components out of Routes
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
1814b6ec86
commit
026de5185e
@ -35,10 +35,6 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
> * {
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.HotbarMenu {
|
.HotbarMenu {
|
||||||
@ -52,7 +48,7 @@
|
|||||||
#lens-views {
|
#lens-views {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 40px; // Move below top bar
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -34,8 +34,6 @@ import { Extensions } from "../+extensions";
|
|||||||
import { HotbarMenu } from "../hotbar/hotbar-menu";
|
import { HotbarMenu } from "../hotbar/hotbar-menu";
|
||||||
import { EntitySettings } from "../+entity-settings";
|
import { EntitySettings } from "../+entity-settings";
|
||||||
import { Welcome } from "../+welcome";
|
import { Welcome } from "../+welcome";
|
||||||
import { ClusterTopbar } from "./cluster-topbar";
|
|
||||||
import { CatalogTopbar } from "./catalog-topbar";
|
|
||||||
import * as routes from "../../../common/routes";
|
import * as routes from "../../../common/routes";
|
||||||
|
|
||||||
@observer
|
@observer
|
||||||
@ -43,8 +41,6 @@ export class ClusterManager extends React.Component {
|
|||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="ClusterManager">
|
<div className="ClusterManager">
|
||||||
<Route component={CatalogTopbar} {...routes.catalogRoute} />
|
|
||||||
<Route component={ClusterTopbar} {...routes.clusterViewRoute} />
|
|
||||||
<main>
|
<main>
|
||||||
<div id="lens-views"/>
|
<div id="lens-views"/>
|
||||||
<Switch>
|
<Switch>
|
||||||
|
|||||||
@ -34,6 +34,7 @@ import { catalogEntityRegistry } from "../../api/catalog-entity-registry";
|
|||||||
import { navigate } from "../../navigation";
|
import { navigate } from "../../navigation";
|
||||||
import { catalogURL, ClusterViewRouteParams } from "../../../common/routes";
|
import { catalogURL, ClusterViewRouteParams } from "../../../common/routes";
|
||||||
import { previousActiveTab } from "../+catalog";
|
import { previousActiveTab } from "../+catalog";
|
||||||
|
import { ClusterTopbar } from "./cluster-topbar";
|
||||||
|
|
||||||
interface Props extends RouteComponentProps<ClusterViewRouteParams> {
|
interface Props extends RouteComponentProps<ClusterViewRouteParams> {
|
||||||
}
|
}
|
||||||
@ -104,6 +105,7 @@ export class ClusterView extends React.Component<Props> {
|
|||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="ClusterView flex column align-center">
|
<div className="ClusterView flex column align-center">
|
||||||
|
<ClusterTopbar {...this.props}/>
|
||||||
{this.renderStatus()}
|
{this.renderStatus()}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -61,7 +61,6 @@
|
|||||||
width: 0;
|
width: 0;
|
||||||
height: 2px;
|
height: 2px;
|
||||||
background: $primary;
|
background: $primary;
|
||||||
transition: width 250ms;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -260,6 +260,8 @@ export class Menu extends React.Component<MenuProps, State> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onBlur() {
|
onBlur() {
|
||||||
|
if (!this.isOpen) return;
|
||||||
|
|
||||||
if (document.activeElement?.tagName == "IFRAME") {
|
if (document.activeElement?.tagName == "IFRAME") {
|
||||||
this.close();
|
this.close();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user