Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

ui

Manav Rathiac3fbf8cb154
diff --git a/web/packages/base/locales/en-US/translation.json b/web/packages/base/locales/en-US/translation.json
index b02af77522..16cf16cb3e 100644
--- a/web/packages/base/locales/en-US/translation.json
+++ b/web/packages/base/locales/en-US/translation.json
@@ -223,10 +223,9 @@
"terms_and_conditions": "I agree to the <a>terms</a> and <b>privacy policy</b>",
"people": "People",
"indexing_scheduled": "Indexing is scheduled...",
- "indexing_photos": "Indexing photos ({{nSyncedFiles, number}} / {{nTotalFiles, number}})",
- "indexing_fetching": "Fetching indexes ({{nSyncedFiles, number}} / {{nTotalFiles, number}})",
- "indexing_people": "Indexing people in {{nSyncedFiles, number}} photos...",
- "indexing_done": "Indexed {{nSyncedFiles, number}} photos",
+ "indexing_photos": "Updating indexes...",
+ "indexing_fetching": "Syncing indexes...",
+ "indexing_people": "Syncing people...",
"syncing_wait": "Syncing...",
"people_empty_too_few": "People will be shown here when there are sufficient photos of a person",
"unnamed_person": "Unnamed person",
diff --git a/web/packages/new/photos/components/SearchBar.tsx b/web/packages/new/photos/components/SearchBar.tsx
index 7798a94463..f8ec976d9f 100644
--- a/web/packages/new/photos/components/SearchBar.tsx
+++ b/web/packages/new/photos/components/SearchBar.tsx
@@ -375,7 +375,8 @@ const shouldShowEmptyState = (inputValue: string) => {
if (!isMLSupported) return false;
const status = mlStatusSnapshot();
- if (!status || status.phase == "disabled") return false;
+ if (!status || status.phase == "disabled" || status.phase == "done")
+ return false;
// Show it otherwise.
return true;
@@ -391,7 +392,7 @@ const EmptyState: React.FC<
const mlStatus = useMLStatusSnapshot();
const people = usePeopleStateSnapshot()?.visiblePeople;
- if (!mlStatus || mlStatus.phase == "disabled") {
+ if (!mlStatus || mlStatus.phase == "disabled" || mlStatus.phase == "done") {
// The preflight check should've prevented us from coming here.
assertionFailed();
return <></>;
@@ -403,16 +404,13 @@ const EmptyState: React.FC<
label = t("indexing_scheduled");
break;
case "indexing":
- label = t("indexing_photos", mlStatus);
+ label = t("indexing_photos");
break;
case "fetching":
- label = t("indexing_fetching", mlStatus);
+ label = t("indexing_fetching");
break;
case "clustering":
- label = t("indexing_people", mlStatus);
- break;
- case "done":
- label = t("indexing_done", mlStatus);
+ label = t("indexing_people");
break;
}
diff --git a/web/packages/new/photos/components/sidebar/MLSettings.tsx b/web/packages/new/photos/components/sidebar/MLSettings.tsx
index a85d174021..94a1d61483 100644
--- a/web/packages/new/photos/components/sidebar/MLSettings.tsx
+++ b/web/packages/new/photos/components/sidebar/MLSettings.tsx
@@ -264,12 +264,8 @@ const ManageML: React.FC<ManageMLProps> = ({ mlStatus, onDisableML }) => {
break;
}
- // When clustering, show the progress as a percentage instead of the
- // potentially confusing total counts during incremental updates.
- const processed =
- phase == "clustering"
- ? `${Math.round((100 * nSyncedFiles) / nTotalFiles)}%`
- : `${nSyncedFiles} / ${nTotalFiles}`;
+ // Show processed as percentages instead of potentially confusing counts.
+ const processed = `${Math.round((100 * nSyncedFiles) / nTotalFiles)}%`;
const confirmDisableML = () =>
showMiniDialog({