feat(templates): templates attached to species (e.g. ipc template), with prompts when switching to a matching species
This commit is contained in:
parent
5488352514
commit
abe0755abc
6 changed files with 132 additions and 4 deletions
|
|
@ -107,11 +107,13 @@ export function parseTemplate(xml: string, id: string): Template {
|
|||
fields: r.field.map(parseField)
|
||||
}));
|
||||
|
||||
const speciesAttr = root['@_species'];
|
||||
return {
|
||||
id,
|
||||
name: root['@_name'],
|
||||
description: root.description ?? '',
|
||||
schemaVersion: Number(root['@_schemaVersion'] ?? 1),
|
||||
...(speciesAttr && { species: speciesAttr.split(',').map((s: string) => s.trim()) }),
|
||||
records
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue