mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Remove usages of legacy global navigate
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
501ce156c0
commit
88a393849b
@ -3,8 +3,8 @@
|
|||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { navigate } from "../../renderer/navigation";
|
|
||||||
import type { CatalogEntityMetadata, CatalogEntitySpec, CatalogEntityStatus } from "../catalog";
|
import type { CatalogEntityMetadata, CatalogEntitySpec, CatalogEntityStatus } from "../catalog";
|
||||||
|
import type { CatalogEntityActionContext } from "../catalog/catalog-entity";
|
||||||
import { CatalogCategory, CatalogEntity, categoryVersion } from "../catalog/catalog-entity";
|
import { CatalogCategory, CatalogEntity, categoryVersion } from "../catalog/catalog-entity";
|
||||||
|
|
||||||
interface GeneralEntitySpec extends CatalogEntitySpec {
|
interface GeneralEntitySpec extends CatalogEntitySpec {
|
||||||
@ -19,8 +19,8 @@ export class GeneralEntity extends CatalogEntity<CatalogEntityMetadata, CatalogE
|
|||||||
public readonly apiVersion = "entity.k8slens.dev/v1alpha1";
|
public readonly apiVersion = "entity.k8slens.dev/v1alpha1";
|
||||||
public readonly kind = "General";
|
public readonly kind = "General";
|
||||||
|
|
||||||
async onRun() {
|
async onRun(context: CatalogEntityActionContext) {
|
||||||
navigate(this.spec.path);
|
context.navigate(this.spec.path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,14 +3,6 @@
|
|||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { asLegacyGlobalFunctionForExtensionApi } from "../../extensions/as-legacy-globals-for-extension-api/as-legacy-global-function-for-extension-api";
|
|
||||||
import navigateInjectable from "./navigate.injectable";
|
|
||||||
|
|
||||||
export { searchParamsOptions } from "./search-params";
|
export { searchParamsOptions } from "./search-params";
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated use `di.inject(navigateInjectable)` instead
|
|
||||||
*/
|
|
||||||
export const navigate = asLegacyGlobalFunctionForExtensionApi(navigateInjectable);
|
|
||||||
|
|
||||||
export * from "./page-param";
|
export * from "./page-param";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user