feat(ui): hide deprecated nodes from add node menu

They will still be usable if a workflow uses one. You just cannot add them directly.
This commit is contained in:
psychedelicious
2024-09-11 19:26:39 +10:00
committed by Kent Keirsey
parent bb2db3d6c3
commit 68237d357a
2 changed files with 7 additions and 2 deletions

View File

@@ -246,7 +246,12 @@ type NodeCommandItemData = {
nodePack: string;
};
const $templatesArray = computed($templates, (templates) => Object.values(templates));
/**
* An array of all templates, excluding deprecated ones.
*/
const $templatesArray = computed($templates, (templates) =>
Object.values(templates).filter((template) => template.classification !== 'deprecated')
);
const createRegex = memoize(
(inputValue: string) =>

View File

@@ -22,7 +22,7 @@ export const zColorField = z.object({
});
export type ColorField = z.infer<typeof zColorField>;
export const zClassification = z.enum(['stable', 'beta', 'prototype']);
export const zClassification = z.enum(['stable', 'beta', 'prototype', 'deprecated']);
export type Classification = z.infer<typeof zClassification>;
export const zSchedulerField = z.enum([