Compare commits
2 Commits
e45036dec3
...
f13cfdb032
| Author | SHA1 | Date | |
|---|---|---|---|
| f13cfdb032 | |||
| 028ea11c18 |
@@ -25,6 +25,7 @@ export default function Guard({ children }: PropsWithChildren) {
|
|||||||
<div className="h-dvh w-dvw blur-2xl">
|
<div className="h-dvh w-dvw blur-2xl">
|
||||||
<Modal>
|
<Modal>
|
||||||
<Modal.Backdrop
|
<Modal.Backdrop
|
||||||
|
variant="blur"
|
||||||
isDismissable={false}
|
isDismissable={false}
|
||||||
isKeyboardDismissDisabled
|
isKeyboardDismissDisabled
|
||||||
isOpen
|
isOpen
|
||||||
|
|||||||
@@ -1,4 +1,15 @@
|
|||||||
import { Modal, Button, InputGroup, Input, TextField } from "@heroui/react";
|
import {
|
||||||
|
Modal,
|
||||||
|
Button,
|
||||||
|
InputGroup,
|
||||||
|
Input,
|
||||||
|
TextField,
|
||||||
|
Form,
|
||||||
|
Fieldset,
|
||||||
|
Description,
|
||||||
|
Label,
|
||||||
|
Typography,
|
||||||
|
} from "@heroui/react";
|
||||||
import type { Dispatch, SetStateAction } from "react";
|
import type { Dispatch, SetStateAction } from "react";
|
||||||
import { useAuth } from "~/hooks/auth";
|
import { useAuth } from "~/hooks/auth";
|
||||||
|
|
||||||
@@ -14,28 +25,58 @@ export function Settings({
|
|||||||
<div>
|
<div>
|
||||||
<Modal isOpen={show}>
|
<Modal isOpen={show}>
|
||||||
<Modal.Backdrop
|
<Modal.Backdrop
|
||||||
|
variant="blur"
|
||||||
shouldCloseOnInteractOutside={(_element) => {
|
shouldCloseOnInteractOutside={(_element) => {
|
||||||
setShow(false);
|
setShow(false);
|
||||||
return true;
|
return true;
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Modal.Container>
|
<Modal.Container size="lg">
|
||||||
<Modal.Dialog>
|
<Modal.Dialog>
|
||||||
<Modal.CloseTrigger
|
<Modal.CloseTrigger
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
setShow(false);
|
setShow(false);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Modal.Header>
|
|
||||||
<Modal.Heading>Account settings</Modal.Heading>
|
|
||||||
</Modal.Header>
|
|
||||||
<Modal.Body>
|
<Modal.Body>
|
||||||
<InputGroup>
|
<Form className="w-full">
|
||||||
<InputGroup.Prefix>Username</InputGroup.Prefix>
|
<Fieldset>
|
||||||
<InputGroup.Input defaultValue={user?.name}></InputGroup.Input>
|
<Typography.Heading level={3}>
|
||||||
</InputGroup>
|
Account settings.
|
||||||
</Modal.Body>
|
</Typography.Heading>
|
||||||
<Modal.Footer>
|
<Typography.Paragraph size="sm">
|
||||||
|
Update your profile information
|
||||||
|
either manually or from Steam.{" "}
|
||||||
|
<br />
|
||||||
|
Change several settings concerning
|
||||||
|
some functionnalities of the app.
|
||||||
|
</Typography.Paragraph>
|
||||||
|
<Fieldset.Group>
|
||||||
|
<TextField name="username">
|
||||||
|
<Label>Username</Label>
|
||||||
|
<Input
|
||||||
|
placeholder={user?.name}
|
||||||
|
variant="secondary"
|
||||||
|
></Input>
|
||||||
|
</TextField>
|
||||||
|
<TextField name="avatar">
|
||||||
|
<Label>Avatar URL</Label>
|
||||||
|
<Input
|
||||||
|
placeholder={user?.avatar}
|
||||||
|
variant="secondary"
|
||||||
|
></Input>
|
||||||
|
<Description>
|
||||||
|
The URL must be a valid
|
||||||
|
image url.
|
||||||
|
</Description>
|
||||||
|
</TextField>
|
||||||
|
</Fieldset.Group>
|
||||||
|
<Fieldset.Actions className="flex justify-end">
|
||||||
|
<div className="flex-1">
|
||||||
|
<Button variant="tertiary">
|
||||||
|
Load from Steam
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
<Button
|
<Button
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
@@ -44,8 +85,11 @@ export function Settings({
|
|||||||
>
|
>
|
||||||
Cancel
|
Cancel
|
||||||
</Button>
|
</Button>
|
||||||
<Button>Save</Button>
|
<Button type="submit">Save</Button>
|
||||||
</Modal.Footer>
|
</Fieldset.Actions>
|
||||||
|
</Fieldset>
|
||||||
|
</Form>
|
||||||
|
</Modal.Body>
|
||||||
</Modal.Dialog>
|
</Modal.Dialog>
|
||||||
</Modal.Container>
|
</Modal.Container>
|
||||||
</Modal.Backdrop>
|
</Modal.Backdrop>
|
||||||
|
|||||||
Reference in New Issue
Block a user