Reify
This commit is contained in:
@@ -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")}
|
||||
|
||||
@@ -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" && (
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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={{
|
||||
|
||||
@@ -62,9 +62,7 @@ const ExportPendingList = (props: Iprops) => {
|
||||
PaperProps={{
|
||||
sx: { maxWidth: "444px" },
|
||||
}}
|
||||
attributes={{
|
||||
title: t("PENDING_ITEMS"),
|
||||
}}
|
||||
title={t("PENDING_ITEMS")}
|
||||
>
|
||||
<ItemList
|
||||
maxHeight={240}
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user