forked from gusrb3164/DSC_web_frontend
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from r4k0nb4k0n/EnterRoom#3
Enter room#3
- Loading branch information
Showing
13 changed files
with
261 additions
and
34 deletions.
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
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 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
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,55 @@ | ||
import React from 'react'; | ||
import Button from '@material-ui/core/Button'; | ||
import TextField from '@material-ui/core/TextField'; | ||
import Dialog from '@material-ui/core/Dialog'; | ||
import DialogActions from '@material-ui/core/DialogActions'; | ||
import DialogContent from '@material-ui/core/DialogContent'; | ||
import DialogTitle from '@material-ui/core/DialogTitle'; | ||
import Typography from '@material-ui/core/Typography'; | ||
import { Header } from '../../UI'; | ||
|
||
const Nickname = () => { | ||
return ( | ||
<> | ||
<Header /> | ||
<Dialog | ||
open={true} | ||
aria-labelledby="formDialogTitle" | ||
className="dialogNickname" | ||
BackdropProps={{ | ||
className: 'backdrop', | ||
}} | ||
PaperProps={{ | ||
className: 'paper', | ||
}} | ||
> | ||
<DialogTitle | ||
id="formDialogTitle" | ||
disableTypography={true} | ||
className="title" | ||
> | ||
<Typography variant="h4">... And your nickname?</Typography> | ||
</DialogTitle> | ||
<DialogContent className="content"> | ||
<TextField | ||
autoFocus | ||
required | ||
id="nickname" | ||
label="Nickname" | ||
fullWidth | ||
className="field" | ||
InputLabelProps={{ className: 'label', shrink: true }} | ||
InputProps={{ className: 'input' }} | ||
/> | ||
</DialogContent> | ||
<DialogActions className="actions"> | ||
<Button variant="contained" className="button" fullWidth> | ||
Enter | ||
</Button> | ||
</DialogActions> | ||
</Dialog> | ||
</> | ||
); | ||
}; | ||
|
||
export default Nickname; |
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,68 @@ | ||
import React from 'react'; | ||
import Button from '@material-ui/core/Button'; | ||
import TextField from '@material-ui/core/TextField'; | ||
import Dialog from '@material-ui/core/Dialog'; | ||
import DialogActions from '@material-ui/core/DialogActions'; | ||
import DialogContent from '@material-ui/core/DialogContent'; | ||
import DialogTitle from '@material-ui/core/DialogTitle'; | ||
import Typography from '@material-ui/core/Typography'; | ||
import { useHistory } from 'react-router-dom'; | ||
import { Header } from '../../UI'; | ||
|
||
const Pin = () => { | ||
const history = useHistory(); | ||
|
||
const handleButton = (e) => { | ||
history.push({ | ||
pathname: '/play/nickname', | ||
}); | ||
}; | ||
return ( | ||
<> | ||
<Header /> | ||
<Dialog | ||
open={true} | ||
aria-labelledby="formDialogTitle" | ||
className="dialogPin" | ||
BackdropProps={{ | ||
className: 'backdrop', | ||
}} | ||
PaperProps={{ | ||
className: 'paper', | ||
}} | ||
> | ||
<DialogTitle | ||
id="formDialogTitle" | ||
disableTypography={true} | ||
className="title" | ||
> | ||
<Typography variant="h4">Join Raccoon with given PIN</Typography> | ||
</DialogTitle> | ||
<DialogContent className="content"> | ||
<TextField | ||
autoFocus | ||
required | ||
id="pin" | ||
label="PIN Code" | ||
fullWidth | ||
className="field" | ||
InputLabelProps={{ className: 'label', shrink: true }} | ||
InputProps={{ className: 'input' }} | ||
/> | ||
</DialogContent> | ||
<DialogActions className="actions"> | ||
<Button | ||
variant="contained" | ||
className="button" | ||
fullWidth | ||
onClick={handleButton} | ||
> | ||
Enter | ||
</Button> | ||
</DialogActions> | ||
</Dialog> | ||
</> | ||
); | ||
}; | ||
|
||
export default Pin; |
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,2 @@ | ||
export { default as Pin } from './Pin'; | ||
export { default as Nickname } from './Nickname'; |
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,5 +1,4 @@ | ||
export { default as CreateRoom } from './CreateRoom'; | ||
export { default as EnterRoom } from './EnterRoom'; | ||
export { default as ColorPalette } from './ColorPalette'; | ||
export { default as Main } from './Main'; | ||
export { default as RaccoonList } from './RaccoonList'; |
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 |
---|---|---|
@@ -1,8 +1,31 @@ | ||
.main { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
.main-button { | ||
font-size: 1.3rem; | ||
flex-direction: column; | ||
height: 100%; | ||
.buttons { | ||
flex: 1; | ||
max-width: 100%; | ||
margin: auto auto; | ||
display: flex; | ||
justify-content: space-evenly; | ||
align-items: center; | ||
.button { | ||
width: 4em; | ||
height: 22.5vh; | ||
border: medium solid $main-white-main; | ||
border-radius: 30px; | ||
font-size: 3rem; | ||
letter-spacing: 3pt; | ||
} | ||
.createButton { | ||
@extend .button; | ||
background-color: $primary-main; | ||
color: $primary-contrastText; | ||
} | ||
.playButton { | ||
@extend .button; | ||
background-color: $accent1-main; | ||
color: $accent1-contrastText; | ||
} | ||
} | ||
} |
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,40 @@ | ||
.dialogNickname { | ||
.backdrop { | ||
opacity: 0 !important; | ||
} | ||
.paper { | ||
background-color: $primary-main !important; | ||
color: $main-white-main !important; | ||
border: medium solid $main-white-main !important; | ||
border-radius: 30px !important; | ||
font-size: 3rem !important; | ||
padding: 10px; | ||
} | ||
.title { | ||
text-align: center; | ||
} | ||
.content { | ||
padding-left: 50px; | ||
padding-right: 50px; | ||
.field { | ||
padding-top: 0.1em; | ||
.label { | ||
color: $main-white-main; | ||
font-size: 0.5em; | ||
} | ||
.input { | ||
background-color: $main-white-main; | ||
color: $main-white-contrastText; | ||
font-size: 0.75em; | ||
} | ||
} | ||
} | ||
.actions { | ||
padding-left: 50px; | ||
padding-right: 50px; | ||
.button { | ||
background-color: $accent1-main; | ||
color: $accent1-contrastText; | ||
} | ||
} | ||
} |
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,40 @@ | ||
.dialogPin { | ||
.backdrop { | ||
opacity: 0 !important; | ||
} | ||
.paper { | ||
background-color: $primary-main !important; | ||
color: $main-white-main !important; | ||
border: medium solid $main-white-main !important; | ||
border-radius: 30px !important; | ||
font-size: 3rem !important; | ||
padding: 10px; | ||
} | ||
.title { | ||
text-align: center; | ||
} | ||
.content { | ||
padding-left: 50px; | ||
padding-right: 50px; | ||
.field { | ||
padding-top: 0.1em; | ||
.label { | ||
color: $main-white-main; | ||
font-size: 0.5em; | ||
} | ||
.input { | ||
background-color: $main-white-main; | ||
color: $main-white-contrastText; | ||
font-size: 0.75em; | ||
} | ||
} | ||
} | ||
.actions { | ||
padding-left: 50px; | ||
padding-right: 50px; | ||
.button { | ||
background-color: $accent1-main; | ||
color: $accent1-contrastText; | ||
} | ||
} | ||
} |
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