mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Simplify pages/menus/registry extension api internal implementation (#1364)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> Co-authored-by: Roman <ixrock@gmail.com>
This commit is contained in:
1 parent
eccc502ef2
commit
df0f080380
21 files changed
+176
-142
No files matched your search
@@ -2,13 +2,14 @@ import type { MenuRegistration } from "./registries/menu-registry";
|
||||
import { observable } from "mobx";
|
||||
import { LensExtension } from "./lens-extension"
|
||||
import { WindowManager } from "../main/window-manager";
|
||||
import { getPageUrl } from "./registries/page-registry"
|
||||
|
||||
export class LensMainExtension extends LensExtension {
|
||||
@observable.shallow appMenus: MenuRegistration[] = []
|
||||
|
||||
async navigate(location?: string, frameId?: number) {
|
||||
const windowManager = WindowManager.getInstance<WindowManager>();
|
||||
const url = this.getPageUrl(location); // get full path to extension's page
|
||||
const url = getPageUrl(this, location); // get full path to extension's page
|
||||
await windowManager.navigate(url, frameId);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user