1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Show UpdateButton in topbar

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2022-05-12 13:47:58 +03:00
parent f741e3d6ad
commit d42a08f114

View File

@ -11,7 +11,7 @@ import { Icon } from "../../icon";
import { observable } from "mobx"; import { observable } from "mobx";
import { ipcRendererOn } from "../../../../common/ipc"; import { ipcRendererOn } from "../../../../common/ipc";
import { watchHistoryState } from "../../../remote-helpers/history-updater"; import { watchHistoryState } from "../../../remote-helpers/history-updater";
import { cssNames } from "../../../utils"; import { cssNames, noop } from "../../../utils";
import topBarItemsInjectable from "./top-bar-items/top-bar-items.injectable"; import topBarItemsInjectable from "./top-bar-items/top-bar-items.injectable";
import { withInjectables } from "@ogre-tools/injectable-react"; import { withInjectables } from "@ogre-tools/injectable-react";
import type { TopBarRegistration } from "./top-bar-registration"; import type { TopBarRegistration } from "./top-bar-registration";
@ -23,6 +23,7 @@ import type { NavigateToCatalog } from "../../../../common/front-end-routing/rou
import navigateToCatalogInjectable from "../../../../common/front-end-routing/routes/catalog/navigate-to-catalog.injectable"; import navigateToCatalogInjectable from "../../../../common/front-end-routing/routes/catalog/navigate-to-catalog.injectable";
import catalogRouteInjectable from "../../../../common/front-end-routing/routes/catalog/catalog-route.injectable"; import catalogRouteInjectable from "../../../../common/front-end-routing/routes/catalog/catalog-route.injectable";
import routeIsActiveInjectable from "../../../routes/route-is-active.injectable"; import routeIsActiveInjectable from "../../../routes/route-is-active.injectable";
import { UpdateButton } from "../../update-button";
interface Dependencies { interface Dependencies {
navigateToCatalog: NavigateToCatalog; navigateToCatalog: NavigateToCatalog;
@ -114,6 +115,7 @@ const NonInjectedTopBar = observer(({ items, navigateToCatalog, catalogRouteIsAc
onClick={goForward} onClick={goForward}
disabled={!nextEnabled.get()} disabled={!nextEnabled.get()}
/> />
<UpdateButton update={noop} warningLevel="light" />
</div> </div>
<div className={styles.items}> <div className={styles.items}>
{renderRegisteredItems(items.get())} {renderRegisteredItems(items.get())}