Skip to content

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

fix: showing smart tags in mobile mode, and hiding the name of tags yesterday and custom date

Ilian Sapundshiev22723191713f
diff --git a/src/renderer/components/TagContainer.tsx b/src/renderer/components/TagContainer.tsx
index b2d5ddfdc..b702bd607 100644
--- a/src/renderer/components/TagContainer.tsx
+++ b/src/renderer/components/TagContainer.tsx
@@ -228,11 +228,9 @@ function TagContainer({
{(isTagDate || isDateSmartTag) && (
<DateIcon sx={{ color: txtColor, height: 16, ml: '-5px' }} />
)}
- {!isTagGeo &&
- !(
- (isTagDate || isDateSmartTag) &&
- (originalTitle?.length ?? 0) > 8
- ) && <span>{displayTitle}</span>}
+ {!isTagGeo && !(isTagDate && (originalTitle?.length ?? 0) > 8) && (
+ <span>{displayTitle}</span>
+ )}
</Box>
<TagContainerMenu
diff --git a/src/renderer/components/dialogs/AddRemoveTagsDialog.tsx b/src/renderer/components/dialogs/AddRemoveTagsDialog.tsx
index 91250a504..f678810f5 100644
--- a/src/renderer/components/dialogs/AddRemoveTagsDialog.tsx
+++ b/src/renderer/components/dialogs/AddRemoveTagsDialog.tsx
@@ -25,6 +25,7 @@ import TsDialogActions from '-/components/dialogs/components/TsDialogActions';
import TsDialogTitle from '-/components/dialogs/components/TsDialogTitle';
import { useSelectedEntriesContext } from '-/hooks/useSelectedEntriesContext';
import { useTaggingActionsContext } from '-/hooks/useTaggingActionsContext';
+import { isDesktopMode } from '-/reducers/settings';
import SmartTags from '-/reducers/smart-tags';
import { TS } from '-/tagspaces.namespace';
import Box from '@mui/material/Box';
@@ -36,6 +37,7 @@ import { useTheme } from '@mui/material/styles';
import useMediaQuery from '@mui/material/useMediaQuery';
import { useReducer, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
+import { useSelector } from 'react-redux';
import TagsSelect from '../TagsSelect';
interface Props {
@@ -47,7 +49,7 @@ interface Props {
function AddRemoveTagsDialog(props: Props) {
const { t } = useTranslation();
const { open, selected } = props;
-
+ const desktopMode = useSelector(isDesktopMode);
const { addTagsToFsEntries, removeTags, addTags } =
useTaggingActionsContext();
const { selectedEntries } = useSelectedEntriesContext();
@@ -164,7 +166,7 @@ function AddRemoveTagsDialog(props: Props) {
tagMode="remove"
autoFocus={true}
/>
- {smallScreen && AppConfig.ExtShowSmartTags && (
+ {!desktopMode && AppConfig.ExtShowSmartTags && (
<Box sx={{ marginTop: 1.5 }}>
<Typography variant="caption" color="textSecondary">
{t('core:smartTags')}