-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Frontend - Login #27
Merged
Merged
Frontend - Login #27
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
316e196
Basic UI Layout for Login Page
WishingWell13 7151948
Changed material UI error component to native one
WishingWell13 cb98393
Migrated away from material ui text fields
WishingWell13 57e09bd
Replaced material link with custom made one
WishingWell13 c265504
Revert mui material changes
WishingWell13 9c0cd9f
Deleted old comments
WishingWell13 40c6781
Attempt to revert lock file
WishingWell13 4666a5c
Fixing linting errors
WishingWell13 b9c7eb7
Updated color of error and window stretching
WishingWell13 d39c0af
Background image scuffed way works
WishingWell13 6d53f7c
Moved inline CSS to external CSS
WishingWell13 8ee3265
Merge branch 'main' into andy/login
WishingWell13 6e84073
Linted dashboard status
WishingWell13 c1a81b6
Merge branch 'main' into andy/login
WishingWell13 28be561
update yarn lock
WishingWell13 8d05647
Update yarn lock attempt 2
WishingWell13 bcaddf2
Update readme, get rid of unused lock file
WishingWell13 d6bae9e
Remove yarn integrity
WishingWell13 74a90b5
Update client/src/app/login/page.tsx
WishingWell13 8684a15
Moved readme items
WishingWell13 bb87549
Removed extra line
WishingWell13 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,51 @@ | ||
import Card from '@/components/Card'; | ||
import styles from '../page.module.scss'; | ||
import Heading from '@/components/Heading'; | ||
import Button from '@/components/Button'; | ||
import Typography from '@/components/Typography'; | ||
import TextField from '@/components/TextField'; | ||
import Link from 'next/link'; | ||
import Alert from '@/components/Alert'; | ||
import Binary from '@/../public/assets/binary.png'; | ||
|
||
export default function LoginPage() { | ||
return ( | ||
<main className={`${styles.main}`}> | ||
<div className={`${styles.login}`}> | ||
<Card gap={1}> | ||
<Heading centered>Log In</Heading> | ||
|
||
<Alert marginBottom={0}> | ||
<p>Oops, incorrect email or password.</p> | ||
</Alert> | ||
|
||
<TextField | ||
id="outlined-basic" | ||
variant="outlined" | ||
label={'Email Address'} | ||
defaultText={'Enter Email Address'} | ||
/> | ||
|
||
<TextField | ||
id="outlined-basic" | ||
variant="outlined" | ||
label="Password" | ||
defaultText={'Enter Password'} | ||
/> | ||
|
||
<Link href="/forgot-password">Forgot your password?</Link> | ||
|
||
<Button variant="primary">Apply Now</Button> | ||
|
||
<Typography variant="label/medium" component="p"> | ||
Don’t have an account?{' '} | ||
<Link href="/register" className="link"> | ||
{' '} | ||
Sign up! | ||
</Link>{' '} | ||
</Typography> | ||
</Card> | ||
</div> | ||
</main> | ||
); | ||
} |
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,21 @@ | ||
import styles from './style.module.scss'; | ||
import Error from '../../../public/assets/error.svg'; | ||
import { PropsWithChildren } from 'react'; | ||
|
||
interface AlertProps { | ||
marginBottom: 0 | 1 | 1.5 | 2; | ||
} | ||
|
||
const Alert = ({ marginBottom, children }: PropsWithChildren<AlertProps>) => { | ||
return ( | ||
<div className={styles.alert} style={{ marginBottom: `${marginBottom}rem` }}> | ||
<div className="error"> | ||
<Error /> | ||
</div> | ||
|
||
{children} | ||
</div> | ||
); | ||
}; | ||
|
||
export default Alert; | ||
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,20 @@ | ||
@use '@/styles/vars.scss' as vars; | ||
|
||
.error { | ||
flex: none; | ||
} | ||
.alert { | ||
display: inline flex; | ||
border-radius: 2rem; | ||
gap: 0.5rem; | ||
align-items: flex-start; | ||
justify-content: flex-start; | ||
color: vars.$btn-text; | ||
// Corresponds to diamond-theme/label/small | ||
font-weight: 500; | ||
letter-spacing: 0.5px; | ||
|
||
color: vars.$error-red; | ||
|
||
flex-flow: row nowrap; | ||
} |
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 |
---|---|---|
|
@@ -33,3 +33,5 @@ $side-padding-mobile: 1rem; | |
|
||
$card-padding: 2rem; | ||
$card-padding-mobile: 1rem; | ||
|
||
$error-red: #ffb3b4; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're doing font stuff here might as well just use Typography. Also, what's the difference between this and useToast from portal-v2? If it's similar, let's just use toasts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the Figma it doesn't look like a pop up? Let me know if toasts can be non popup or if we want to change the error to a pop up