diff --git a/packages/client/src/pages/Home/Section/Filter/index.js b/packages/client/src/pages/Home/Section/Filter/index.js index 99e5d57c34..0cdf9dd3e6 100644 --- a/packages/client/src/pages/Home/Section/Filter/index.js +++ b/packages/client/src/pages/Home/Section/Filter/index.js @@ -313,6 +313,7 @@ const SectionFilterContent = ({ isTrash, userId, isPersonalRoom, + isIndexing, providers, @@ -2655,6 +2656,7 @@ const SectionFilterContent = ({ isPeopleAccounts={isPeopleAccounts} isGroupsAccounts={isGroupsAccounts} isInsideGroup={isInsideGroup} + isIndexing={isIndexing} /> ); }; @@ -2672,6 +2674,7 @@ export default inject( userStore, settingsStore, currentQuotaStore, + indexingStore, }) => { const { filter, @@ -2711,6 +2714,7 @@ export default inject( const { isVisible: infoPanelVisible } = infoPanelStore; const { showStorageInfo, isDefaultRoomsQuotaSet } = currentQuotaStore; + const { isIndexing } = indexingStore; const { filterStore, @@ -2750,6 +2754,7 @@ export default inject( isRooms, isTrash, isArchiveFolder, + isIndexing, setIsLoading: clientLoadingStore.setIsSectionBodyLoading, showFilterLoader: clientLoadingStore.showFilterLoader, diff --git a/packages/client/src/store/IndexingStore.js b/packages/client/src/store/IndexingStore.js index 3b06179988..f503f73012 100644 --- a/packages/client/src/store/IndexingStore.js +++ b/packages/client/src/store/IndexingStore.js @@ -27,12 +27,19 @@ import { makeAutoObservable } from "mobx"; class IndexingStore { + selectedFolderStore; + isIndexEditingMode = false; - constructor() { + constructor(selectedFolderStore) { + this.selectedFolderStore = selectedFolderStore; makeAutoObservable(this); } + get isIndexing() { + return this.selectedFolderStore?.indexing; + } + setIsIndexEditingMode = (mode) => { this.isIndexEditingMode = mode; }; diff --git a/packages/client/src/store/index.js b/packages/client/src/store/index.js index b99d85cc87..7482af8ba9 100644 --- a/packages/client/src/store/index.js +++ b/packages/client/src/store/index.js @@ -105,7 +105,7 @@ const setupStore = new SettingsSetupStore( const confirmStore = new ConfirmStore(); const backupStore = new BackupStore(); const commonStore = new CommonStore(settingsStore); -const indexingStore = new IndexingStore(); +const indexingStore = new IndexingStore(selectedFolderStore); const ssoStore = new SsoFormStore(); diff --git a/packages/shared/components/filter/Filter.types.ts b/packages/shared/components/filter/Filter.types.ts index fe47e461a2..db514bcd3b 100644 --- a/packages/shared/components/filter/Filter.types.ts +++ b/packages/shared/components/filter/Filter.types.ts @@ -231,6 +231,7 @@ export interface FilterProps { isPeopleAccounts: boolean; isGroupsAccounts: boolean; isInsideGroup: boolean; + isIndexing: boolean; filterTitle: string; sortByTitle: string; diff --git a/packages/shared/components/filter/index.tsx b/packages/shared/components/filter/index.tsx index e998fec783..203ea47067 100644 --- a/packages/shared/components/filter/index.tsx +++ b/packages/shared/components/filter/index.tsx @@ -71,6 +71,7 @@ const FilterInput = React.memo( isPeopleAccounts, isGroupsAccounts, isInsideGroup, + isIndexing, filterTitle, sortByTitle, @@ -223,25 +224,27 @@ const FilterInput = React.memo( title={filterTitle} userId={userId} /> - - + {!isIndexing && ( + + )} {viewSettings && + !isIndexing && currentDeviceType === DeviceType.desktop && viewSelectorVisible && (