diff options
| author | bobzel <zzzman@gmail.com> | 2024-08-27 13:49:07 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-08-27 13:49:07 -0400 |
| commit | cf10fbb80a022ddb141e41203b9135b6f1ed9527 (patch) | |
| tree | a07622cb43c0485eebb3b5011b74b236bdf957dd /src/client/views/collections/collectionFreeForm/ImageLabelBox.tsx | |
| parent | 248f9fdced99a36c28fb34f39b78e1267ec02486 (diff) | |
uniying image labels => tags. made face tags distinguishable from other tags - and drag off to place face collection.
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/ImageLabelBox.tsx')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/ImageLabelBox.tsx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/client/views/collections/collectionFreeForm/ImageLabelBox.tsx b/src/client/views/collections/collectionFreeForm/ImageLabelBox.tsx index 6eb3eb784..5d3154e3c 100644 --- a/src/client/views/collections/collectionFreeForm/ImageLabelBox.tsx +++ b/src/client/views/collections/collectionFreeForm/ImageLabelBox.tsx @@ -51,7 +51,7 @@ export class ImageLabelBoxData { label = label.toUpperCase().trim(); if (label.length > 0) { if (!this._labelGroups.includes(label)) { - this._labelGroups = [...this._labelGroups, label]; + this._labelGroups = [...this._labelGroups, label.startsWith('#') ? label : '#' + label]; } } }; @@ -178,8 +178,12 @@ export class ImageLabelBox extends ViewBoxBaseComponent<FieldViewProps>() { const labels = imageInfo.labels.split('\n'); labels.forEach(label => { - label = label.replace(/^\d+\.\s*|-|f\*/, '').trim(); - console.log(label); + label = + '#' + + label + .replace(/^\d+\.\s*|-|f\*/, '') + .replace(/^#/, '') + .trim(); imageInfo.doc[DocData][label] = true; (imageInfo.doc[DocData].tags as List<string>).push(label); }); |
