TagSpaces is an offline, open source, document manager with tagging support
chore: adjustments in styling and text for the search component
Ilian Sapundshiev366c10a6a727
diff --git a/app/components/SearchAutocomplete.tsx b/app/components/SearchAutocomplete.tsxindex f7fff1962..5eefb9162 100644--- a/app/components/SearchAutocomplete.tsx+++ b/app/components/SearchAutocomplete.tsx@@ -25,6 +25,8 @@ import HelpOutlineIcon from '@mui/icons-material/HelpOutline';import Button from '@mui/material/Button';import Tooltip from '-/components/Tooltip';import IconButton from '@mui/material/IconButton';+import ClearSearchIcon from '@mui/icons-material/Close';+import InputAdornment from '@mui/material/InputAdornment';import {actions as AppActions,getCurrentLocationId,@@ -1202,6 +1204,13 @@ function SearchAutocomplete(props: Props) {}return (<>+ <style>+ {`+ .MuiAutocomplete-root .MuiInputBase-root {+ padding: 3px !important;+ }+ `}+ </style><divstyle={{width: '100%',@@ -1251,7 +1260,8 @@ function SearchAutocomplete(props: Props) {fontSize: 13,textTransform: 'none',color: 'black',- backgroundColor: 'green',+ backgroundColor: 'white',+ border: '1px solid gray',minHeight: 0,minWidth: 0,margin: 2,@@ -1263,7 +1273,8 @@ function SearchAutocomplete(props: Props) {...(action &&action.color && {color: action.textcolor,- backgroundColor: action.color+ backgroundColor: action.color,+ border: 'none'})}}onClick={() => {@@ -1331,7 +1342,7 @@ function SearchAutocomplete(props: Props) {fullWidth/*id="textQuery"name="textQuery"*/- label={i18n.t('core:searchTitle')}+ // label={i18n.t('core:searchTitle')}/*defaultValue={textQuery.current}*//*onChange={event => {textQuery.current = event.target.value;@@ -1346,80 +1357,81 @@ function SearchAutocomplete(props: Props) {size="small"margin="dense"variant="outlined"- /*InputProps={{- startAdornment: (- <InputAdornment position="start" style={{ marginRight: 0 }}>- {isDesktop ? (- <>- <Tooltip- classes={{ tooltip: classes.customWidth }}- title={- <span style={{ fontSize: 14 }}>- {i18n.t('searchScope')}:- <br />- • {i18n.t('location')} -{' '}- {i18n.t('searchPlaceholder')}- <br />- • {i18n.t('folder')} -{' '}- {i18n.t('searchCurrentFolderWithSubFolders')}- <br />- • {i18n.t('globalSearch')} -{' '}- {i18n.t('searchInAllLocationTooltip')} (- {i18n.t('betaStatus')})<br />- </span>- }- >- <Typography- variant="overline"- display="block"- onClick={toggleSearchBoxing}- style={{- border: '1px solid gray',- borderRadius: 5,- lineHeight: 'inherit',- paddingLeft: 3,- paddingRight: 3- }}- >- {searchBoxingName}- </Typography>- </Tooltip>- <HelpTooltip classes={classes} />- </>- ) : (- <HelpTooltip classes={classes} />- )}- </InputAdornment>- ),- endAdornment: (- <InputAdornment position="end">- {isDesktop && (- <Tooltip title={i18n.t('core:savedSearchesTitle')}>- <IconButton- size="small"- edge="end"- onClick={handleOpenSavedSearches}- >- <ExpandMoreIcon />- </IconButton>- </Tooltip>- )}- <Tooltip title={i18n.t('clearSearch') + ' (ESC)'}>- <IconButton- id="clearSearchID"- onClick={() => {- clearSearch();- // props.openCurrentDirectory();- }}- size="small"- edge="end"- >- <ClearSearchIcon />- </IconButton>- </Tooltip>- </InputAdornment>- )- }}*/+ // InputProps={{+ // startAdornment: (+ // <InputAdornment position="start" style={{ marginRight: 0 }}>+ // {isDesktop ? (+ // <>+ // <Tooltip+ // classes={{ tooltip: classes.customWidth }}+ // title={+ // <span style={{ fontSize: 14 }}>+ // {i18n.t('searchScope')}:+ // <br />+ // • {i18n.t('location')} -{' '}+ // {i18n.t('searchPlaceholder')}+ // <br />+ // • {i18n.t('folder')} -{' '}+ // {i18n.t('searchCurrentFolderWithSubFolders')}+ // <br />+ // • {i18n.t('globalSearch')} -{' '}+ // {i18n.t('searchInAllLocationTooltip')} (+ // {i18n.t('betaStatus')})<br />+ // </span>+ // }+ // >+ // <Typography+ // variant="overline"+ // display="block"+ // onClick={toggleSearchBoxing}+ // style={{+ // border: '1px solid gray',+ // borderRadius: 5,+ // lineHeight: 'inherit',+ // paddingLeft: 3,+ // paddingRight: 3+ // }}+ // >+ // {searchBoxingName}+ // </Typography>+ // </Tooltip>+ // <HelpTooltip classes={classes} />+ // </>+ // ) : (+ // <HelpTooltip classes={classes} />+ // )}+ // </InputAdornment>+ // ),+ // style: { padding: 3, borderRadius: 7 }+ // endAdornment: (+ // <InputAdornment position="end">+ // {/* {isDesktop && (+ // <Tooltip title={i18n.t('core:savedSearchesTitle')}>+ // <IconButton+ // size="small"+ // edge="end"+ // onClick={handleOpenSavedSearches}+ // >+ // <ExpandMoreIcon />+ // </IconButton>+ // </Tooltip>+ // )} */}+ // <Tooltip title={i18n.t('clearSearch') + ' (ESC)'}>+ // <IconButton+ // id="clearSearchID"+ // onClick={() => {+ // clearSearch();+ // // props.openCurrentDirectory();+ // }}+ // size="small"+ // edge="end"+ // >+ // <ClearSearchIcon />+ // </IconButton>+ // </Tooltip>+ // </InputAdornment>+ // )+ // }}/>)}/>@@ -1431,7 +1443,8 @@ function SearchAutocomplete(props: Props) {disabled={indexing}style={{marginRight: 10,- marginLeft: 10+ marginLeft: 10,+ marginTop: 3}}color="primary"onClick={clickSearchButton}diff --git a/app/components/SearchOptions.ts b/app/components/SearchOptions.tsindex 073e5ed44..b4f89a4ce 100644--- a/app/components/SearchOptions.ts+++ b/app/components/SearchOptions.ts@@ -23,23 +23,23 @@ export const SearchQueryComposition = {},TYPE: {shortName: 't:',- fullName: 'type:'+ fullName: 'type: '},SIZE: {shortName: 's:',- fullName: 'size:'+ fullName: 'size: '},LAST_MODIFIED: {shortName: 'lm:',- fullName: 'lastmod:'+ fullName: 'last modified: '},SCOPE: {shortName: 'sc:',- fullName: 'scope:'+ fullName: 'scope: '},ACCURACY: {shortName: 'a:',- fullName: 'accuracy:'+ fullName: 'accuracy: '}};@@ -52,23 +52,23 @@ export const SearchQueryComposition = {export const SearchActions = {LOCATION: {shortName: 'l:',- fullName: 'location:'+ fullName: 'locations'},FILTER: {shortName: 'f:',- fullName: 'filter:'+ fullName: 'filter'},HISTORY: {shortName: 'h:',- fullName: 'history:'+ fullName: 'history'},BOOK: {shortName: 'b:',- fullName: 'bookmark:'+ fullName: 'bookmarks'},SEARCH: {- shortName: 'sav:',- fullName: 'search:'+ shortName: 'sq:',+ fullName: 'search queries'}};@@ -177,7 +177,7 @@ export const SearchOptions: Array<SearchOptionType> = [label: SearchActions.LOCATION.shortName,fullName: SearchActions.LOCATION.fullName,action: SearchActions.LOCATION.shortName,- descr: 'filter and open location',+ descr: 'find and open a location',group: 'actions'},{@@ -185,7 +185,7 @@ export const SearchOptions: Array<SearchOptionType> = [label: SearchActions.FILTER.shortName,fullName: SearchActions.FILTER.fullName,action: SearchActions.FILTER.shortName,- descr: 'filter the current directory items',+ descr: 'filter the entries from the current folder',group: 'actions'},{@@ -193,7 +193,7 @@ export const SearchOptions: Array<SearchOptionType> = [label: SearchActions.HISTORY.shortName,fullName: SearchActions.HISTORY.fullName,action: SearchActions.HISTORY.shortName,- descr: 'filter and open all recent file and folders',+ descr: 'filter the recently used files and folders',group: 'actions'},{@@ -201,7 +201,7 @@ export const SearchOptions: Array<SearchOptionType> = [label: SearchActions.BOOK.shortName,fullName: SearchActions.BOOK.fullName,action: SearchActions.BOOK.shortName,- descr: 'filter and open the bookmarks',+ descr: 'find and open a bookmarks',group: 'actions'},{@@ -209,28 +209,31 @@ export const SearchOptions: Array<SearchOptionType> = [label: SearchActions.SEARCH.shortName,fullName: SearchActions.SEARCH.fullName,action: SearchActions.SEARCH.shortName,- descr: 'filter and run saved searched',+ descr: 'find and execute saved search queries',group: 'actions'},{id: SearchQueryComposition.TAG_AND.shortName,label: SearchQueryComposition.TAG_AND.shortName,action: SearchQueryComposition.TAG_AND.shortName,- descr: 'Tag AND',+ descr:+ 'entries should have this tag to be included in the results (logical AND)',group: 'query'},{id: SearchQueryComposition.TAG_NOT.shortName,label: SearchQueryComposition.TAG_NOT.shortName,action: SearchQueryComposition.TAG_NOT.shortName,- descr: 'Tag NOT',+ descr:+ 'entries should not have this tag to be included in the results (logical NOT)',group: 'query'},{id: SearchQueryComposition.TAG_OR.shortName,label: SearchQueryComposition.TAG_OR.shortName,action: SearchQueryComposition.TAG_OR.shortName,- descr: 'Tag OR',+ descr:+ 'allows searching for entries having one tag or another (logical OR)',group: 'query'},{