Tweak naming

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne SavolainenandMikko Aspiala committed 2022-05-20 14:07:55 +03:00
1 parent 84ac22904d
commit 1f178ba833
10 files changed
+80 -80

No files matched your search

@@ -5,14 +5,14 @@
import { getInjectable } from "@ogre-tools/injectable";
import { computed } from "mobx";
import { trayMenuItemInjectionToken } from "../tray/tray-menu-item/tray-menu-item-injection-token";
import updateIsAvailableInjectable from "./update-is-available.injectable";
import updateIsReadyToBeInstalledInjectable from "./update-is-ready-to-be-installed.injectable";
import triggerApplicationUpdateInjectable from "./trigger-application-update.injectable";
const triggerApplicationUpdateTrayItemInjectable = getInjectable({
id: "trigger-application-update-tray-item",
instantiate: (di) => {
const updateIsAvailable = di.inject(updateIsAvailableInjectable);
const updateIsReadyToBeInstalled = di.inject(updateIsReadyToBeInstalledInjectable);
const triggerApplicationUpdate = di.inject(triggerApplicationUpdateInjectable);
return {
@@ -21,7 +21,7 @@ const triggerApplicationUpdateTrayItemInjectable = getInjectable({
orderNumber: 50,
label: "Trigger update",
enabled: computed(() => true),
visible: computed(() => updateIsAvailable.get()),
visible: computed(() => updateIsReadyToBeInstalled.get()),
click: () => {
triggerApplicationUpdate();
@@ -1,19 +0,0 @@
/**
* 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 { computed } from "mobx";
import updateIsAvailableStateInjectable from "./update-is-available-state.injectable";
const updateIsAvailableInjectable = getInjectable({
id: "update-is-available",
instantiate: (di) => {
const updateIsAvailableState = di.inject(updateIsAvailableStateInjectable);
return computed(() => updateIsAvailableState.get());
},
});
export default updateIsAvailableInjectable;
@@ -5,9 +5,9 @@
import { getInjectable } from "@ogre-tools/injectable";
import { observable } from "mobx";
const updateIsAvailableState = getInjectable({
id: "update-is-available-state",
const updateIsReadyToBeInstalledState = getInjectable({
id: "update-is-ready-to-be-installed-state",
instantiate: () => observable.box<boolean>(false),
});
export default updateIsAvailableState;
export default updateIsReadyToBeInstalledState;
@@ -0,0 +1,19 @@
/**
* 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 { computed } from "mobx";
import updateIsReadyToBeInstalledInjectableState from "./update-is-ready-to-be-installed-state.injectable";
const updateIsReadyToBeInstalledInjectable = getInjectable({
id: "update-is-ready-to-be-installed",
instantiate: (di) => {
const updateIsReadyToBeInstalledState = di.inject(updateIsReadyToBeInstalledInjectableState);
return computed(() => updateIsReadyToBeInstalledState.get());
},
});
export default updateIsReadyToBeInstalledInjectable;