Skip to content

TagSpaces is an offline, open source, document manager with tagging support

chore: improve rendering smart tags

Ilian Sapundshiev76ca70bdc1c3
diff --git a/src/renderer/components/Tag.tsx b/src/renderer/components/Tag.tsx
index 21dac5d51..b45b18884 100644
--- a/src/renderer/components/Tag.tsx
+++ b/src/renderer/components/Tag.tsx
@@ -45,7 +45,7 @@ function Tag(props: Props) {
whiteSpace: 'nowrap',
color: textColor,
backgroundColor: backgroundColor,
- minHeight: 18,
+ minHeight: 20,
minWidth: 0,
margin: 2,
paddingTop: 0,
diff --git a/src/renderer/components/TagLibrary.tsx b/src/renderer/components/TagLibrary.tsx
index d0a943569..541edb083 100644
--- a/src/renderer/components/TagLibrary.tsx
+++ b/src/renderer/components/TagLibrary.tsx
@@ -243,26 +243,17 @@ function TagLibrary(props: Props) {
<TagGroupContainer taggroup={tagGroup}>
{tagGroup.children &&
tagGroup.children.map((tag: TS.Tag, idx) => {
+ const isSmartTag =
+ tag.functionality && tag.functionality.length > 0;
if (readOnlyMode) {
return (
<TagContainer
key={tagGroup.uuid + tag.title}
tag={tag}
tagGroup={tagGroup}
+ tagMode={isSmartTag ? 'display' : 'default'}
handleTagMenu={handleTagMenuCallback}
addTags={addTags}
- /*moveTag={(
- tagTitle: string,
- fromTagGroupId: TS.Uuid,
- toTagGroupId: TS.Uuid
- ) =>
- moveTag(
- tagTitle,
- fromTagGroupId,
- toTagGroupId,
- tagGroups
- )
- }*/
/>
);
}
@@ -273,6 +264,7 @@ function TagLibrary(props: Props) {
index={idx}
tag={tag}
tagGroup={tagGroup}
+ tagMode={isSmartTag ? 'display' : 'default'}
handleTagMenu={handleTagMenuCallback}
addTags={addTags}
moveTag={(