mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Test waters with features as NPM packages
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
parent
ba54a64ebb
commit
e3ed8abea6
@ -23,6 +23,12 @@ const extensionInjectable = getInjectable({
|
||||
|
||||
return {
|
||||
register: () => {
|
||||
const anyInstance = instance as any;
|
||||
|
||||
if (anyInstance.__v2Register) {
|
||||
anyInstance.__v2Register(childDi);
|
||||
}
|
||||
|
||||
const injectables = extensionRegistrators.flatMap((getInjectablesOfExtension) =>
|
||||
getInjectablesOfExtension(instance),
|
||||
);
|
||||
|
||||
@ -11,9 +11,16 @@ import * as LensExtensionsMainApi from "../extensions/main-api";
|
||||
import { getDi } from "./getDi";
|
||||
import startMainApplicationInjectable from "./start-main-application/start-main-application.injectable";
|
||||
import shouldStartHiddenInjectable from "./electron-app/features/should-start-hidden.injectable";
|
||||
import registerTray from "@lensapp/tray";
|
||||
import registerMikko from "@lensapp/mikko";
|
||||
import registerJanne from "@lensapp/janne";
|
||||
|
||||
const di = getDi();
|
||||
|
||||
registerTray();
|
||||
registerMikko(di);
|
||||
registerJanne(di);
|
||||
|
||||
const shouldStartHidden = di.inject(shouldStartHiddenInjectable);
|
||||
|
||||
const startApplication = di.inject(startMainApplicationInjectable);
|
||||
|
||||
@ -2,22 +2,5 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectionToken } from "@ogre-tools/injectable";
|
||||
import type { IComputedValue } from "mobx";
|
||||
|
||||
export interface TrayMenuItem {
|
||||
id: string;
|
||||
parentId: string | null;
|
||||
orderNumber: number;
|
||||
enabled: IComputedValue<boolean>;
|
||||
visible: IComputedValue<boolean>;
|
||||
|
||||
label?: IComputedValue<string>;
|
||||
click?: () => Promise<void> | void;
|
||||
tooltip?: string;
|
||||
separator?: boolean;
|
||||
}
|
||||
|
||||
export const trayMenuItemInjectionToken = getInjectionToken<TrayMenuItem>({
|
||||
id: "tray-menu-item",
|
||||
});
|
||||
export { trayMenuItemInjectionToken } from "@lensapp/tray";
|
||||
export type { TrayMenuItem } from "@lensapp/tray";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user