Skip to content

armgit / ente

Public Imported from GitHub
0

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

Reify

Manav Rathi2cede3a46fb3
diff --git a/web/apps/photos/src/components/AuthenticateUserModal.tsx b/web/apps/photos/src/components/AuthenticateUserModal.tsx
index e8d3c76626..0002760a82 100644
--- a/web/apps/photos/src/components/AuthenticateUserModal.tsx
+++ b/web/apps/photos/src/components/AuthenticateUserModal.tsx
@@ -102,9 +102,7 @@ export default function AuthenticateUserModal({
open={open}
onClose={onClose}
sx={{ position: "absolute" }}
- attributes={{
- title: t("password"),
- }}
+ title={t("password")}
>
<VerifyMasterPasswordForm
buttonText={t("AUTHENTICATE")}
diff --git a/web/apps/photos/src/components/Collections/AlbumCastDialog.tsx b/web/apps/photos/src/components/Collections/AlbumCastDialog.tsx
index 109620b880..a3f56c6ca6 100644
--- a/web/apps/photos/src/components/Collections/AlbumCastDialog.tsx
+++ b/web/apps/photos/src/components/Collections/AlbumCastDialog.tsx
@@ -138,7 +138,7 @@ export const AlbumCastDialog: React.FC<AlbumCastDialogProps> = ({
<DialogBoxV2
open={open}
onClose={onClose}
- attributes={{ title: t("cast_album_to_tv") }}
+ title={t("cast_album_to_tv")}
sx={{ zIndex: 1600 }}
>
{view == "choose" && (
diff --git a/web/apps/photos/src/components/Collections/CollectionNamer.tsx b/web/apps/photos/src/components/Collections/CollectionNamer.tsx
index 7294b44ed6..0374b8dc14 100644
--- a/web/apps/photos/src/components/Collections/CollectionNamer.tsx
+++ b/web/apps/photos/src/components/Collections/CollectionNamer.tsx
@@ -42,9 +42,7 @@ export default function CollectionNamer({ attributes, ...props }: Props) {
<DialogBoxV2
open={props.show}
onClose={props.onHide}
- attributes={{
- title: attributes.title,
- }}
+ title={attributes.title}
>
<SingleInputForm
callback={onSubmit}
diff --git a/web/apps/photos/src/components/DeleteAccountModal.tsx b/web/apps/photos/src/components/DeleteAccountModal.tsx
index fa4e6d5ae7..ba2d6488f1 100644
--- a/web/apps/photos/src/components/DeleteAccountModal.tsx
+++ b/web/apps/photos/src/components/DeleteAccountModal.tsx
@@ -143,9 +143,7 @@ const DeleteAccountModal = ({ open, onClose }: Iprops) => {
open={open}
onClose={onClose}
fullScreen={isMobile}
- attributes={{
- title: t("delete_account"),
- }}
+ title={t("delete_account")}
>
<Formik<FormValues>
initialValues={{
diff --git a/web/apps/photos/src/components/ExportPendingList.tsx b/web/apps/photos/src/components/ExportPendingList.tsx
index 99690b2c61..667926afdd 100644
--- a/web/apps/photos/src/components/ExportPendingList.tsx
+++ b/web/apps/photos/src/components/ExportPendingList.tsx
@@ -62,9 +62,7 @@ const ExportPendingList = (props: Iprops) => {
PaperProps={{
sx: { maxWidth: "444px" },
}}
- attributes={{
- title: t("PENDING_ITEMS"),
- }}
+ title={t("PENDING_ITEMS")}
>
<ItemList
maxHeight={240}
diff --git a/web/apps/photos/src/components/PhotoViewer/FileInfo/FileNameEditDialog.tsx b/web/apps/photos/src/components/PhotoViewer/FileInfo/FileNameEditDialog.tsx
index b69570c4d3..b21a3ac58d 100644
--- a/web/apps/photos/src/components/PhotoViewer/FileInfo/FileNameEditDialog.tsx
+++ b/web/apps/photos/src/components/PhotoViewer/FileInfo/FileNameEditDialog.tsx
@@ -27,9 +27,7 @@ export const FileNameEditDialog = ({
sx={{ zIndex: 1600 }}
open={isInEditMode}
onClose={closeEditMode}
- attributes={{
- title: t("rename_file"),
- }}
+ title={t("rename_file")}
>
<SingleInputForm
initialValue={filename}
diff --git a/web/packages/base/components/MiniDialog.tsx b/web/packages/base/components/MiniDialog.tsx
index 849c4fddbd..3419693fdc 100644
--- a/web/packages/base/components/MiniDialog.tsx
+++ b/web/packages/base/components/MiniDialog.tsx
@@ -221,22 +221,18 @@ export function MiniDialog({
// }
// }
-export interface DialogBoxV2Attributes {
- /**
- * The dialog's title.
- *
- * Usually this will be a string, but it can be any {@link ReactNode}. Note
- * that it always gets wrapped in a Typography element to set the font
- * style, so if your ReactNode wants to do its own thing, it'll need to
- * reset or override these customizations.
- */
- title?: React.ReactNode;
-}
-
type DialogBoxV2Props = React.PropsWithChildren<
Omit<DialogProps, "onClose"> & {
onClose: () => void;
- attributes?: DialogBoxV2Attributes;
+ /**
+ * The dialog's title.
+ *
+ * Usually this will be a string, but it can be any {@link ReactNode}. Note
+ * that it always gets wrapped in a Typography element to set the font
+ * style, so if your ReactNode wants to do its own thing, it'll need to
+ * reset or override these customizations.
+ */
+ title?: React.ReactNode;
}
>;
@@ -248,16 +244,12 @@ type DialogBoxV2Props = React.PropsWithChildren<
* API for the notify/confirm case separately.
*/
export function DialogBoxV2({
- attributes,
+ title,
children,
open,
onClose,
...props
}: DialogBoxV2Props) {
- if (!attributes) {
- return <></>;
- }
-
const { PaperProps, ...rest } = props;
return (
@@ -276,11 +268,9 @@ export function DialogBoxV2({
>
<Stack spacing={"36px"} p={"16px"}>
<Stack spacing={"19px"}>
- {attributes.title && (
- <Typography variant="large" fontWeight={"bold"}>
- {attributes.title}
- </Typography>
- )}
+ <Typography variant="large" fontWeight={"bold"}>
+ {title}
+ </Typography>
{children}
</Stack>
</Stack>