From cf10fbb80a022ddb141e41203b9135b6f1ed9527 Mon Sep 17 00:00:00 2001 From: bobzel Date: Tue, 27 Aug 2024 13:49:07 -0400 Subject: uniying image labels => tags. made face tags distinguishable from other tags - and drag off to place face collection. --- .../views/collections/collectionFreeForm/ImageLabelBox.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/client/views/collections/collectionFreeForm/ImageLabelBox.tsx') 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() { 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).push(label); }); -- cgit v1.2.3-70-g09d2