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">
|
||||
<div>
|
||||
<Icon
|
||||
style={{ cursor: "default" }}
|
||||
material="close"
|
||||
material="chevron_left"
|
||||
onClick={() => navigate(welcomeURL())}
|
||||
tooltip="Close Catalog"
|
||||
tooltip="Back to Welcome"
|
||||
/>
|
||||
</div>
|
||||
</TopBar>
|
||||
|
||||
@ -43,19 +43,17 @@ export const ClusterTopbar = observer((props: Props) => {
|
||||
|
||||
return (
|
||||
<TopBar label={getCluster()?.name}>
|
||||
<div>
|
||||
<Icon
|
||||
style={{ cursor: "default" }}
|
||||
material="close"
|
||||
onClick={() => {
|
||||
navigate(`${catalogURL()}/${previousActiveTab.get()}`);
|
||||
}}
|
||||
tooltip={{
|
||||
preferredPositions: TooltipPosition.BOTTOM_RIGHT,
|
||||
children: "Back to Catalog"
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<Icon
|
||||
interactive
|
||||
material="chevron_left"
|
||||
onClick={() => {
|
||||
navigate(`${catalogURL()}/${previousActiveTab.get()}`);
|
||||
}}
|
||||
tooltip={{
|
||||
preferredPositions: TooltipPosition.BOTTOM_RIGHT,
|
||||
children: "Back to Catalog"
|
||||
}}
|
||||
/>
|
||||
</TopBar>
|
||||
);
|
||||
});
|
||||
|
||||
@ -39,8 +39,10 @@
|
||||
|
||||
.controls {
|
||||
align-self: flex-end;
|
||||
padding-right: 1.5rem;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
height: 100%;
|
||||
> * {
|
||||
-webkit-app-region: no-drag;
|
||||
}
|
||||
}
|
||||
|
||||
@ -55,10 +55,9 @@ export const TopBar = observer(({ label, children, ...rest }: Props) => {
|
||||
|
||||
return (
|
||||
<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}>
|
||||
{renderRegisteredItems()}
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user