Skip to content

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

fix: improving store search queries shortcut

Ilian Sapundshievdad4d15593b7
diff --git a/app/assets/illlustrations/day71-designer-tool-essential (copy).svg b/app/assets/illlustrations/day71-designer-tool-essential.svg
similarity index 100%
rename from app/assets/illlustrations/day71-designer-tool-essential (copy).svg
rename to app/assets/illlustrations/day71-designer-tool-essential.svg
diff --git a/app/components/SearchInline.tsx b/app/components/SearchInline.tsx
index bde265abe..a02310efb 100644
--- a/app/components/SearchInline.tsx
+++ b/app/components/SearchInline.tsx
@@ -463,14 +463,16 @@ function SearchInline(props: Props) {
<InputAdornment position="end">
{isDesktop && (
<>
- <IconButton
- id="basic-button"
- size="small"
- edge="end"
- onClick={handleOpenSavedSearches}
- >
- <ExpandMoreIcon style={{ color: 'lightgray' }} />
- </IconButton>
+ <Tooltip title={i18n.t('core:savedSearchesTitle')}>
+ <IconButton
+ id="basic-button"
+ size="small"
+ edge="end"
+ onClick={handleOpenSavedSearches}
+ >
+ <ExpandMoreIcon style={{ color: 'lightgray' }} />
+ </IconButton>
+ </Tooltip>
<HelpTooltip classes={classes} />
</>
)}
diff --git a/app/components/StoredSearches.tsx b/app/components/StoredSearches.tsx
index 5ade3e2e1..890da9a5e 100644
--- a/app/components/StoredSearches.tsx
+++ b/app/components/StoredSearches.tsx
@@ -49,7 +49,7 @@ import {
getShowUnixHiddenEntries,
getStoredSearchesVisible
} from '-/reducers/settings';
-import i18n from '../services/i18n';
+import i18n from '-/services/i18n';
import { Pro } from '../pro';
import { actions as SearchActions, getSearches } from '-/reducers/searches';
import { TS } from '-/tagspaces.namespace';
diff --git a/app/components/menus/SavedSearchesMenu.tsx b/app/components/menus/SavedSearchesMenu.tsx
index 36ef4ca69..e7b04e9fc 100644
--- a/app/components/menus/SavedSearchesMenu.tsx
+++ b/app/components/menus/SavedSearchesMenu.tsx
@@ -24,6 +24,7 @@ import { getSearches } from '-/reducers/searches';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { actions as LocationIndexActions } from '-/reducers/location-index';
+import i18n from '-/services/i18n';
import { getShowUnixHiddenEntries } from '-/reducers/settings';
interface Props {
@@ -49,17 +50,22 @@ function SavedSearchesMenu(props: Props) {
});
};
- const menuItems = props.searches.map(search => (
- <MenuItem
- key={search.uuid}
- onClick={() => {
- handleSavedSearchClick(search.uuid);
- props.onClose();
- }}
- >
- {search.title}
- </MenuItem>
- ));
+ const menuItems = props.searches.length ? (
+ props.searches.map(search => (
+ <MenuItem
+ key={search.uuid}
+ onClick={() => {
+ handleSavedSearchClick(search.uuid);
+ props.onClose();
+ }}
+ >
+ {search.title}
+ </MenuItem>
+ ))
+ ) : (
+ <MenuItem key={'noSavedSearches'}>{i18n.t('noSavedSearches')}</MenuItem>
+ );
+
return (
<div style={{ overflowY: 'hidden' }}>
<Menu