1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/main/application-update/tray-icons/update-is-ready-to-be-installed-tray-icon.injectable.ts
Janne Savolainen 667053cdf5
Replace status bar item application update with different tray icon based on status of the update (#5769)
* Remove the auto-update status bar item for not being needed anymore

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Make adding of new tray icons easier by complying to Open Closed Principle

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Start showing different tray icon when checking for updates

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Include placeholder icon for checking for updates

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Simplify code

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Add first keyframe for downloading spinner

Signed-off-by: Sebastian Malton <sebastian@malton.name>

Co-authored-by: Sebastian Malton <sebastian@malton.name>
2022-07-05 15:44:03 -07:00

28 lines
1.0 KiB
TypeScript

/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import getTrayIconPathInjectable from "../../tray/menu-icon/get-tray-icon-path.injectable";
import { trayIconInjectionToken } from "../../tray/menu-icon/tray-icon-injection-token";
import updateIsReadyToBeInstalledInjectable from "../update-is-ready-to-be-installed.injectable";
const updateIsReadyToBeInstalledTrayIconInjectable = getInjectable({
id: "update-is-ready-to-be-installed-tray-icon",
instantiate: (di) => {
const getTrayIconPath = di.inject(getTrayIconPathInjectable);
const updateIsReadyToBeInstalled = di.inject(updateIsReadyToBeInstalledInjectable);
return {
iconPath: getTrayIconPath("update-available"),
priority: 1,
shouldBeShown: updateIsReadyToBeInstalled,
};
},
injectionToken: trayIconInjectionToken,
});
export default updateIsReadyToBeInstalledTrayIconInjectable;