mirror of
https://github.com/movie-web/movie-web.git
synced 2024-11-14 09:15:08 +01:00
Merge pull request #730 from robertsspaceindustries/dev
Add profile picture preview
This commit is contained in:
commit
d13eb07bb6
@ -1,6 +1,7 @@
|
|||||||
import { useCallback, useState } from "react";
|
import { useCallback, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
|
import { Avatar } from "@/components/Avatar";
|
||||||
import { Button } from "@/components/buttons/Button";
|
import { Button } from "@/components/buttons/Button";
|
||||||
import { ColorPicker, initialColor } from "@/components/form/ColorPicker";
|
import { ColorPicker, initialColor } from "@/components/form/ColorPicker";
|
||||||
import { IconPicker, initialIcon } from "@/components/form/IconPicker";
|
import { IconPicker, initialIcon } from "@/components/form/IconPicker";
|
||||||
@ -55,7 +56,13 @@ export function AccountCreatePart(props: AccountCreatePartProps) {
|
|||||||
return (
|
return (
|
||||||
<LargeCard>
|
<LargeCard>
|
||||||
<LargeCardText
|
<LargeCardText
|
||||||
icon={<Icon icon={Icons.USER} />}
|
icon={
|
||||||
|
<Avatar
|
||||||
|
profile={{ colorA, colorB, icon: userIcon }}
|
||||||
|
iconClass="text-3xl"
|
||||||
|
sizeClass="w-16 h-16"
|
||||||
|
/>
|
||||||
|
}
|
||||||
title={t("auth.register.information.title") ?? undefined}
|
title={t("auth.register.information.title") ?? undefined}
|
||||||
>
|
>
|
||||||
{t("auth.register.information.header")}
|
{t("auth.register.information.header")}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
|
import { Avatar } from "@/components/Avatar";
|
||||||
import { Button } from "@/components/buttons/Button";
|
import { Button } from "@/components/buttons/Button";
|
||||||
import { ColorPicker } from "@/components/form/ColorPicker";
|
import { ColorPicker } from "@/components/form/ColorPicker";
|
||||||
import { IconPicker } from "@/components/form/IconPicker";
|
import { IconPicker } from "@/components/form/IconPicker";
|
||||||
@ -24,9 +25,20 @@ export function ProfileEditModal(props: ProfileEditModalProps) {
|
|||||||
return (
|
return (
|
||||||
<Modal id={props.id}>
|
<Modal id={props.id}>
|
||||||
<ModalCard>
|
<ModalCard>
|
||||||
<Heading2 className="!mt-0">
|
<div className="flex justify-between items-center mb-9">
|
||||||
|
<Heading2 className="!mt-0 !mb-0">
|
||||||
{t("settings.account.profile.title")}
|
{t("settings.account.profile.title")}
|
||||||
</Heading2>
|
</Heading2>
|
||||||
|
<Avatar
|
||||||
|
profile={{
|
||||||
|
colorA: props.colorA,
|
||||||
|
colorB: props.colorB,
|
||||||
|
icon: props.userIcon,
|
||||||
|
}}
|
||||||
|
iconClass="text-2xl"
|
||||||
|
sizeClass="w-12 h-12"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<div className="space-y-6">
|
<div className="space-y-6">
|
||||||
<ColorPicker
|
<ColorPicker
|
||||||
label={t("settings.account.profile.firstColor")}
|
label={t("settings.account.profile.firstColor")}
|
||||||
|
Loading…
Reference in New Issue
Block a user