1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/renderer/api/catalog-entity.ts
Jari Kolehmainen e948fc047c
Allow register actions to "add to catalog" button (#2497)
* registrable add-to-catalog button

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* cleanup

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix integration tests

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix integration tests

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2021-04-13 14:51:43 +03:00

21 lines
589 B
TypeScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { navigate } from "../navigation";
import { commandRegistry } from "../../extensions/registries";
import { CatalogEntity } from "../../common/catalog-entity";
export {
CatalogCategory,
CatalogEntity,
CatalogEntityData,
CatalogEntityActionContext,
CatalogEntityAddMenuContext,
CatalogEntityContextMenu,
CatalogEntityContextMenuContext
} from "../../common/catalog-entity";
export const catalogEntityRunContext = {
navigate: (url: string) => navigate(url),
setCommandPaletteContext: (entity?: CatalogEntity) => {
commandRegistry.activeEntity = entity;
}
};