-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dashboard): finish settings page and handle login errors with to…
…asts (#32)
- Loading branch information
Showing
30 changed files
with
434 additions
and
161 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.input { | ||
font-size: 14px; | ||
|
||
label { | ||
padding-bottom: 4px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { | ||
type TextInputProps, | ||
TextInput as MantineTextInput, | ||
type PasswordInputProps, | ||
PasswordInput as MantinePasswordInput, | ||
} from '@mantine/core'; | ||
|
||
import classes from './Input.module.css'; | ||
|
||
export const TextInput = (props: TextInputProps) => ( | ||
<MantineTextInput {...props} className={classes.input} /> | ||
); | ||
|
||
export const PasswordInput = (props: PasswordInputProps) => ( | ||
<MantinePasswordInput {...props} className={classes.input} /> | ||
); |
7 changes: 7 additions & 0 deletions
7
...p/components/settings/Settings.module.css → ...app/components/settings/Layout.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
.wrapper { | ||
width: 100%; | ||
padding: 16px; | ||
|
||
align-items: stretch; | ||
gap: 16px; | ||
|
||
background-color: var(--me-color-bg-grey); | ||
|
||
border-radius: 8px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Group, Stack } from '@mantine/core'; | ||
|
||
import { Sidebar } from './Sidebar'; | ||
|
||
import classes from './Layout.module.css'; | ||
|
||
interface SettingsLayoutProps { | ||
children: React.ReactNode; | ||
} | ||
|
||
export const SettingsLayout = ({ children }: SettingsLayoutProps) => { | ||
return ( | ||
<Group className={classes.wrapper}> | ||
<Sidebar /> | ||
<Stack flex={1}>{children}</Stack> | ||
</Group> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
.wrapper { | ||
width: 100%; | ||
padding: 32px 24px 8px 24px; | ||
background-color: var(--me-color-bg-light); | ||
|
||
display: flex; | ||
flex-direction: row; | ||
align-items: stretch; | ||
|
||
border-radius: 8px 8px 0-0; | ||
} | ||
|
||
.title { | ||
padding: 8px; | ||
flex: 1; | ||
|
||
h3 { | ||
font-weight: 600; | ||
font-size: 18px; | ||
} | ||
|
||
p { | ||
font-size: 14px; | ||
font-weight: 400px; | ||
} | ||
} | ||
|
||
.form { | ||
padding: 8px; | ||
flex: 1; | ||
gap: 16px; | ||
} | ||
|
||
.divider { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
justify-content: space-between; | ||
|
||
padding: 15px 24px; | ||
|
||
background-color: var(--me-color-bg-light); | ||
border-radius: 0 0 8px 8px; | ||
} | ||
|
||
.submit { | ||
height: 40px; | ||
|
||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
|
||
font-size: 14px; | ||
|
||
padding: 0 16px; | ||
color: var(--me-color-text-light); | ||
background-color: var(--me-color-bg-grey-blue); | ||
border: 1px solid var(--me-color-bg-grey-blue); | ||
border-radius: 8px; | ||
cursor: pointer; | ||
|
||
&:hover { | ||
background-color: var(--me-color-bg-grey-blue-dark); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { Stack, Text, Title, UnstyledButton } from '@mantine/core'; | ||
|
||
import classes from './Section.module.css'; | ||
import { Form } from '@remix-run/react'; | ||
|
||
interface SectionProps { | ||
title: string; | ||
description: string; | ||
submitDescription?: string; | ||
|
||
children: React.ReactNode; | ||
onSubmit: () => void; | ||
} | ||
|
||
export const Section = ({ | ||
title, | ||
description, | ||
submitDescription, | ||
children, | ||
onSubmit, | ||
}: SectionProps) => { | ||
return ( | ||
<Form onSubmit={onSubmit}> | ||
<div className={classes.wrapper}> | ||
<div className={classes.title}> | ||
<Title order={3}>{title}</Title> | ||
<Text mt="xs">{description}</Text> | ||
</div> | ||
<Stack className={classes.form}>{children}</Stack> | ||
</div> | ||
<div className={classes.divider}> | ||
<Text>{submitDescription}</Text> | ||
<UnstyledButton className={classes.submit} type="submit"> | ||
Save | ||
</UnstyledButton> | ||
</div> | ||
</Form> | ||
); | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,28 @@ | ||
.wrapper { | ||
width: 250px; | ||
padding: 20px; | ||
height: 100%; | ||
padding: 8px; | ||
gap: 8px; | ||
|
||
align-items: stretch; | ||
background-color: var(--me-color-bg-light); | ||
|
||
background-color: var(--me-color-bg-grey); | ||
border-radius: 8px; | ||
|
||
a { | ||
padding: 10px 16px; | ||
align-items: center; | ||
|
||
border-radius: 8px; | ||
|
||
font-size: 14px; | ||
|
||
&:hover { | ||
background-color: var(--me-color-bg-grey); | ||
} | ||
|
||
&[data-active="true"] { | ||
background-color: var(--me-color-bg-grey); | ||
font-weight: 600; | ||
} | ||
} | ||
} |
Oops, something went wrong.