mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
change topbar X to back button
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
e43961ec4f
commit
78cfa64801
@ -30,10 +30,9 @@ export function CatalogTopbar() {
|
|||||||
<TopBar label="Catalog">
|
<TopBar label="Catalog">
|
||||||
<div>
|
<div>
|
||||||
<Icon
|
<Icon
|
||||||
style={{ cursor: "default" }}
|
material="chevron_left"
|
||||||
material="close"
|
|
||||||
onClick={() => navigate(welcomeURL())}
|
onClick={() => navigate(welcomeURL())}
|
||||||
tooltip="Close Catalog"
|
tooltip="Back to Welcome"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</TopBar>
|
</TopBar>
|
||||||
|
|||||||
@ -43,19 +43,17 @@ export const ClusterTopbar = observer((props: Props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<TopBar label={getCluster()?.name}>
|
<TopBar label={getCluster()?.name}>
|
||||||
<div>
|
<Icon
|
||||||
<Icon
|
interactive
|
||||||
style={{ cursor: "default" }}
|
material="chevron_left"
|
||||||
material="close"
|
onClick={() => {
|
||||||
onClick={() => {
|
navigate(`${catalogURL()}/${previousActiveTab.get()}`);
|
||||||
navigate(`${catalogURL()}/${previousActiveTab.get()}`);
|
}}
|
||||||
}}
|
tooltip={{
|
||||||
tooltip={{
|
preferredPositions: TooltipPosition.BOTTOM_RIGHT,
|
||||||
preferredPositions: TooltipPosition.BOTTOM_RIGHT,
|
children: "Back to Catalog"
|
||||||
children: "Back to Catalog"
|
}}
|
||||||
}}
|
/>
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</TopBar>
|
</TopBar>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -39,8 +39,10 @@
|
|||||||
|
|
||||||
.controls {
|
.controls {
|
||||||
align-self: flex-end;
|
align-self: flex-end;
|
||||||
padding-right: 1.5rem;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
> * {
|
||||||
|
-webkit-app-region: no-drag;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -55,10 +55,9 @@ export const TopBar = observer(({ label, children, ...rest }: Props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.topBar} {...rest}>
|
<div className={styles.topBar} {...rest}>
|
||||||
<div className={styles.title} data-testid="topbarLabel">{label}</div>
|
<div className={styles.title} data-testid="topbarLabel">{children} {label}</div>
|
||||||
<div className={styles.controls}>
|
<div className={styles.controls}>
|
||||||
{renderRegisteredItems()}
|
{renderRegisteredItems()}
|
||||||
{children}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user