Skip to content

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

chore: ui improvements in the search

Ilian Sapundshiev6499360fe36c
diff --git a/app/components/FolderContainer.tsx b/app/components/FolderContainer.tsx
index 7e137b9d6..b78ad22ec 100644
--- a/app/components/FolderContainer.tsx
+++ b/app/components/FolderContainer.tsx
@@ -511,16 +511,13 @@ const FolderContainer = (props: Props) => {
anchorEl={anchorSearch}
onClose={() => setAnchorSearch(null)}
anchorOrigin={{
- vertical: 'top',
+ vertical: 'bottom',
horizontal: 'right'
}}
- style={{
- marginLeft: -8
- }}
PaperProps={{
style: {
overflow: 'hidden',
- height: 820
+ height: 720
}
}}
transformOrigin={{
diff --git a/app/components/SearchInline.css.tsx b/app/components/SearchInline.css.tsx
index 213e274db..e750af96d 100644
--- a/app/components/SearchInline.css.tsx
+++ b/app/components/SearchInline.css.tsx
@@ -62,8 +62,8 @@ export const styles = (theme: any) => {
},
searchArea: {
paddingTop: 0,
- paddingLeft: 5,
- paddingRight: 5,
+ paddingLeft: 10,
+ paddingRight: 10,
marginTop: 0,
height: 'calc(100% - 50px)',
maxHeight: 'calc(100% - 50px)',
diff --git a/app/reducers/location-index.ts b/app/reducers/location-index.ts
index ad9dc841a..34b1f6459 100644
--- a/app/reducers/location-index.ts
+++ b/app/reducers/location-index.ts
@@ -297,36 +297,6 @@ export const actions = {
console.warn('Resolution is faled!', e);
});
},
- // loadDirectoryIndex: (
- // directoryPath: string,
- // isCurrentLocation: boolean = true
- // ) => (dispatch: (actions: Object) => void) => {
- // dispatch(actions.startDirectoryIndexing());
- // dispatch(
- // AppActions.showNotification(i18n.t('core:loadingIndex'), 'default', true)
- // );
- // if (Pro && Pro.Indexer.loadIndex) {
- // Pro.Indexer.loadIndex(directoryPath, PlatformIO.getDirSeparator())
- // .then(directoryIndex => {
- // if (isCurrentLocation) {
- // // Load index only if current location
- // GlobalSearch.index = directoryIndex;
- // }
- // dispatch(actions.indexDirectorySuccess());
- // return true;
- // })
- // .catch(err => {
- // dispatch(actions.indexDirectoryFailure(err));
- // dispatch(
- // AppActions.showNotification(
- // i18n.t('core:loadingIndexFailed'),
- // 'warning',
- // true
- // )
- // );
- // });
- // }
- // },
clearDirectoryIndex: () => ({
type: types.INDEX_DIRECTORY_CLEAR
}),
@@ -386,12 +356,6 @@ export const actions = {
) {
const currentPath = getLocationPath(currentLocation);
console.log('Start creating index for : ' + currentPath);
- /* if (currentLocation.persistIndex && Pro && Pro.Indexer.loadIndex) {
- GlobalSearch.index = await Pro.Indexer.loadIndex( // TODO move this
- currentPath,
- PlatformIO.getDirSeparator()
- );
- } else { */
GlobalSearch.index = await createDirectoryIndex(
{
path: currentPath,