Skip to content

armgit / ente

Public Imported from GitHub
0

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

Promote

Manav Rathi9f97814027d9
diff --git a/web/packages/new/photos/components/AddPersonDialog.tsx b/web/packages/new/photos/components/AddPersonDialog.tsx
index 0a4b3a8f96..07306130a7 100644
--- a/web/packages/new/photos/components/AddPersonDialog.tsx
+++ b/web/packages/new/photos/components/AddPersonDialog.tsx
@@ -16,7 +16,7 @@ import {
DialogCloseIconButton,
type DialogVisibilityProps,
} from "./mui/Dialog";
-import { SingleInputDialog } from "./SingleInputFormV2";
+import { SingleInputDialog } from "./SingleInputForm";
import {
ItemCard,
LargeTileButton,
@@ -119,7 +119,7 @@ export const AddPersonDialog: React.FC<AddPersonDialogProps> = ({
placeholder={t("enter_name")}
autoComplete="name"
autoFocus
- submitButtonTitle={pt("Add person")}
+ submitButtonTitle={t("add")}
onSubmit={handleAddPersonWithName}
/>
</>
diff --git a/web/packages/new/photos/components/Gallery/PeopleHeader.tsx b/web/packages/new/photos/components/Gallery/PeopleHeader.tsx
index 1e02c8e65b..4a985a9fb9 100644
--- a/web/packages/new/photos/components/Gallery/PeopleHeader.tsx
+++ b/web/packages/new/photos/components/Gallery/PeopleHeader.tsx
@@ -29,6 +29,7 @@ import type { NewAppContextPhotos } from "../../types/context";
import { AddPersonDialog } from "../AddPersonDialog";
import { SpaceBetweenFlex } from "../mui";
import { NameInputDialog } from "../NameInputDialog";
+import { SingleInputDialog } from "../SingleInputForm";
import type { GalleryBarImplProps } from "./BarImpl";
import { GalleryItemsHeaderAdapter, GalleryItemsSummary } from "./ListHeader";
@@ -174,11 +175,14 @@ const CGroupPersonOptions: React.FC<CGroupPersonOptionsProps> = ({
</OverflowMenuOption>
</OverflowMenu>
- <NameInputDialog
+ <SingleInputDialog
open={openAddNameInput}
onClose={() => setOpenAddNameInput(false)}
title={pt("Rename person") /* TODO-Cluster pt()'s */}
+ label={pt("Name")}
placeholder={t("enter_name")}
+ autoComplete="name"
+ autoFocus
initialValue={cgroup.data.name ?? ""}
submitButtonTitle={t("rename")}
onSubmit={renamePersonUsingName}
diff --git a/web/packages/new/photos/components/SingleInputFormV2.tsx b/web/packages/new/photos/components/SingleInputForm.tsx
similarity index 97%
rename from web/packages/new/photos/components/SingleInputFormV2.tsx
rename to web/packages/new/photos/components/SingleInputForm.tsx
index b1c40f461f..1943e72470 100644
--- a/web/packages/new/photos/components/SingleInputFormV2.tsx
+++ b/web/packages/new/photos/components/SingleInputForm.tsx
@@ -59,7 +59,7 @@ type SingleInputFormProps = Pick<
* disabled and a loading indicator is shown. Errors during submission are shown
* as the helper text associated with the text field.
*/
-export const SingleInputFormV2: React.FC<SingleInputFormProps> = ({
+export const SingleInputForm: React.FC<SingleInputFormProps> = ({
initialValue,
submitButtonTitle,
onCancel,
@@ -134,7 +134,7 @@ type SingleInputDialogProps = DialogVisibilityProps &
/**
* A dialog that can be used to ask for a single text input using a
- * {@link SingleInputFormV2}.
+ * {@link SingleInputForm}.
*
* If the submission handler provided to this component resolves successfully,
* then the dialog is closed.
@@ -163,7 +163,7 @@ export const SingleInputDialog: React.FC<SingleInputDialogProps> = ({
>
<DialogTitle>{title}</DialogTitle>
<DialogContent sx={{ "&&&": { paddingBlockStart: 0 } }}>
- <SingleInputFormV2
+ <SingleInputForm
onCancel={onClose}
onSubmit={handleSubmit}
{...rest}