TagSpaces is an offline, open source, document manager with tagging support
chore: deactivating location chooser in the folder container
Ilian Sapundshievc02550a8d67f
diff --git a/app/components/FolderContainer.tsx b/app/components/FolderContainer.tsxindex b0c7ead83..1ad913e38 100644--- a/app/components/FolderContainer.tsx+++ b/app/components/FolderContainer.tsx@@ -600,7 +600,7 @@ function FolderContainer(props: Props) {<CircularProgressWithLabel value={getProgressValue()} /></IconButton>)}- {isDesktopMode && <LocationMenu />}+ {/* {isDesktopMode && <LocationMenu />} */}<PathBreadcrumbscurrentDirectoryPath={currentDirectoryPath}currentLocationPath={currentLocationPath}diff --git a/app/components/SearchAutocomplete.tsx b/app/components/SearchAutocomplete.tsxindex edd35e6a6..bf73a325a 100644--- a/app/components/SearchAutocomplete.tsx+++ b/app/components/SearchAutocomplete.tsx@@ -419,10 +419,7 @@ function SearchAutocomplete(props: Props) {forceUpdate();}} else if (event.key === 'Backspace' || event.keyCode === 8) {- if (- props.textQuery.length === 0 &&- actionValues.current.length > 0- ) {+ if (props.textQuery.length === 0 && actionValues.current.length > 0) {actionValues.current = actionValues.current.slice(0, -1);resetActions(actionValues.current);isOpen.current = true;diff --git a/app/perspectives/grid-perspective/components/MainContainer.tsx b/app/perspectives/grid-perspective/components/MainContainer.tsxindex 7d9adee2e..a3f88f89a 100644--- a/app/perspectives/grid-perspective/components/MainContainer.tsx+++ b/app/perspectives/grid-perspective/components/MainContainer.tsx@@ -183,7 +183,9 @@ function GridPerspective(props: Props) {: defaultSettings.orderBy);const sortedDirContent = useRef<Array<TS.FileSystemEntry>>(- !props.lastSearchTimestamp ? props.directoryContent : GlobalSearch.getInstance().getResults()+ !props.lastSearchTimestamp+ ? props.directoryContent+ : GlobalSearch.getInstance().getResults());const layoutType = useRef<string>(settings && settings.layoutType@@ -326,16 +328,20 @@ function GridPerspective(props: Props) {if (orderBy.current) {sortedDirContent.current = GlobalSearch.getInstance().getResults();} else {- sortedDirContent.current = [...GlobalSearch.getInstance().getResults()].reverse();+ sortedDirContent.current = [+ ...GlobalSearch.getInstance().getResults()+ ].reverse();}} else {sortedDirContent.current = sortByCriteria(props.searchFilter- ? GlobalSearch.getInstance().getResults().filter(entry =>- entry.name- .toLowerCase()- .includes(props.searchFilter.toLowerCase())- )+ ? GlobalSearch.getInstance()+ .getResults()+ .filter(entry =>+ entry.name+ .toLowerCase()+ .includes(props.searchFilter.toLowerCase())+ ): GlobalSearch.getInstance().getResults(),sortBy.current,orderBy.currentdiff --git a/app/perspectives/list/components/MainContainer.tsx b/app/perspectives/list/components/MainContainer.tsxindex 7fd444dbc..f2e6bf415 100644--- a/app/perspectives/list/components/MainContainer.tsx+++ b/app/perspectives/list/components/MainContainer.tsx@@ -183,7 +183,9 @@ function GridPerspective(props: Props) {: defaultSettings.orderBy);const sortedDirContent = useRef<Array<TS.FileSystemEntry>>(- !props.lastSearchTimestamp ? props.directoryContent : GlobalSearch.getInstance().getResults()+ !props.lastSearchTimestamp+ ? props.directoryContent+ : GlobalSearch.getInstance().getResults());const layoutType = useRef<string>(settings && settings.layoutType@@ -326,16 +328,20 @@ function GridPerspective(props: Props) {if (orderBy.current) {sortedDirContent.current = GlobalSearch.getInstance().getResults();} else {- sortedDirContent.current = [...GlobalSearch.getInstance().getResults()].reverse();+ sortedDirContent.current = [+ ...GlobalSearch.getInstance().getResults()+ ].reverse();}} else {sortedDirContent.current = sortByCriteria(props.searchFilter- ? GlobalSearch.getInstance().getResults().filter(entry =>- entry.name- .toLowerCase()- .includes(props.searchFilter.toLowerCase())- )+ ? GlobalSearch.getInstance()+ .getResults()+ .filter(entry =>+ entry.name+ .toLowerCase()+ .includes(props.searchFilter.toLowerCase())+ ): GlobalSearch.getInstance().getResults(),sortBy.current,orderBy.currentdiff --git a/app/reducers/app.ts b/app/reducers/app.tsindex 87ab62e2e..119137ae3 100644--- a/app/reducers/app.ts+++ b/app/reducers/app.ts@@ -2377,7 +2377,7 @@ export const actions = {path,lastSelectedEntry ? lastSelectedEntry.path : undefined,getState().app.searchMode- ? GlobalSearch.results+ ? GlobalSearch.getInstance().getResults(): getState().app.currentDirectoryEntries);if (nextFile !== undefined) {@@ -2396,7 +2396,7 @@ export const actions = {path,lastSelectedEntry ? lastSelectedEntry.path : undefined,getState().app.searchMode- ? GlobalSearch.results+ ? GlobalSearch.getInstance().getResults(): getState().app.currentDirectoryEntries);if (prevFile !== undefined) {diff --git a/app/reducers/location-index.ts b/app/reducers/location-index.tsindex 99e84542d..2810c40ff 100644--- a/app/reducers/location-index.ts+++ b/app/reducers/location-index.ts@@ -415,9 +415,7 @@ export const actions = {if (searchQuery.forceIndexing ||(!currentLocation.disableIndexing &&- (!index ||- index.length < 1 ||- indexAge > maxIndexAge))+ (!index || index.length < 1 || indexAge > maxIndexAge))) {const currentPath = PlatformIO.getLocationPath(currentLocation);console.log('Start creating index for : ' + currentPath);@@ -436,11 +434,7 @@ export const actions = {if (newIndex && newIndex.length > 0) {GlobalSearch.getInstance().setIndexLoadedOn(new Date().getTime());}- } else if (- isCloudLocation ||- !index ||- index.length === 0- ) {+ } else if (isCloudLocation || !index || index.length === 0) {const newIndex = await loadIndex({path: PlatformIO.getLocationPath(currentLocation),@@ -452,7 +446,10 @@ export const actions = {);GlobalSearch.getInstance().setIndex(newIndex);}- Search.searchLocationIndex(GlobalSearch.getInstance().getIndex(), searchQuery)+ Search.searchLocationIndex(+ GlobalSearch.getInstance().getIndex(),+ searchQuery+ ).then(searchResults => {if (isCloudLocation) {searchResults.forEach((entry: TS.FileSystemEntry) => {diff --git a/app/services/search-index.ts b/app/services/search-index.tsindex 16b2c3a78..ada7b77a9 100644--- a/app/services/search-index.ts+++ b/app/services/search-index.ts@@ -22,7 +22,7 @@results: []};*/-const GlobalSearch = function() {+const GlobalSearch = (function() {let instance;function init() {@@ -55,5 +55,5 @@ const GlobalSearch = function() {return instance;}};-}();+})();export default GlobalSearch;diff --git a/tests/e2e/perspective-grid-right-button.pw.e2e.js b/tests/e2e/perspective-grid-right-button.pw.e2e.jsindex 45745ca10..78c98116d 100644--- a/tests/e2e/perspective-grid-right-button.pw.e2e.js+++ b/tests/e2e/perspective-grid-right-button.pw.e2e.js@@ -295,7 +295,10 @@ test.describe('TST50** - Right button on a file', () => {await gridElement.click();await AddRemoveTagsToSelectedFiles('grid', tags, false);for (let i = 0; i < tags.length; i++) {- await expectElementExist('[data-tid=tagContainer_' + tags[i] + ']', false);+ await expectElementExist(+ '[data-tid=tagContainer_' + tags[i] + ']',+ false+ );}/*gridElement = await global.client.waitForSelector(getGridFileSelector(fileName + '.' + fileExt)diff --git a/tests/e2e/tag.helpers.js b/tests/e2e/tag.helpers.jsindex d7d26a477..141ce6e7a 100644--- a/tests/e2e/tag.helpers.js+++ b/tests/e2e/tag.helpers.js@@ -1,4 +1,4 @@-import { clickOn, setInputKeys } from "./general.helpers";+import { clickOn, setInputKeys } from './general.helpers';export const testTagName = 'testTag';export const newTagName = 'newTagName';