Skip to content
Open
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
ba5a466
Merge pull request #1 from CPSECapstone/main
cayalame Oct 1, 2020
9f55063
Merge pull request #2 from CPSECapstone/master
cayalame Oct 21, 2020
5c6c336
Merge branch 'develop' of https://github.com/CPSECapstone/Turtle into…
cayalame Oct 21, 2020
a85ad39
deve
cayalame Oct 22, 2020
ce0eb64
finished merge
cayalame Oct 22, 2020
af06a1b
updated
cayalame Oct 27, 2020
6835691
package
cayalame Oct 27, 2020
ae759ef
deleted extra prettier
cayalame Oct 27, 2020
dc935d6
Merge branch 'develop' of https://github.com/CPSECapstone/Turtle into…
cayalame Oct 29, 2020
a896397
Merge branch 'develop' of https://github.com/CPSECapstone/Turtle into…
cayalame Oct 29, 2020
cb45f1c
Merge branch 'develop' of https://github.com/CPSECapstone/Turtle into…
cayalame Oct 29, 2020
4560398
Mer:ge branch 'develop' of https://github.com/CPSECapstone/Turtle int…
cayalame Nov 5, 2020
069a435
Merge branch 'develop' of https://github.com/CPSECapstone/Turtle into…
cayalame Nov 5, 2020
f957178
package
cayalame Nov 5, 2020
8c4c52c
force
cayalame Nov 5, 2020
ec0632e
made newPage on start
cayalame Nov 10, 2020
325312e
Merge pull request #3 from cayalame/TUR-35n
cayalame Nov 10, 2020
888a723
erge branch 'develop' of https://github.com/CPSECapstone/Turtle into …
cayalame Nov 19, 2020
74a45a0
Initial Home.jsx change
cayalame Nov 4, 2020
91d5a75
changed folder name to EmptyPage
cayalame Nov 4, 2020
716d4e0
commented code
cayalame Nov 5, 2020
354c4e1
fixed routes
cayalame Nov 10, 2020
e135b3a
Update README.md
cayalame Nov 5, 2020
7a13f0a
removed commented code on index.js
cayalame Nov 10, 2020
713bebb
working test table
cayalame Nov 12, 2020
68c8a49
deleted leftover merge files
cayalame Nov 19, 2020
4f40142
switched default route to login
cayalame Nov 29, 2020
c26ead2
put background image
cayalame Nov 30, 2020
e4a78c0
added styled nav bar
cayalame Dec 1, 2020
2c772da
finished nav
cayalame Dec 2, 2020
edf2abf
fixed some things on login like spacing
cayalame Dec 2, 2020
eaa765c
finished login and register
cayalame Dec 3, 2020
28a2361
started mission statement
cayalame Dec 3, 2020
d87697b
Merge pull request #5 from cayalame/TUR-41
cayalame Dec 3, 2020
b351046
removed comments
cayalame Dec 3, 2020
7381b51
Merge branch 'develop' of https://github.com/CPSECapstone/Turtle into…
cayalame Dec 3, 2020
c65c8ab
merge conflicts fix
cayalame Mar 9, 2021
31d58d6
merge
cayalame Mar 9, 2021
53f8ca2
Merge branch 'develop' of https://github.com/CPSECapstone/Turtle into…
cayalame Mar 9, 2021
2a11309
started drop down menu
cayalame Mar 10, 2021
b5896e5
finished main working menu
cayalame Mar 10, 2021
b0c7e2f
fixed some of the menu
cayalame Mar 11, 2021
202a06d
fixed code review
cayalame Mar 11, 2021
7049a79
dropdown fix wasnt working
cayalame Mar 11, 2021
3e02715
fixed pull request except in dropdown menu
cayalame Mar 11, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ https://app.circleci.com/pipelines/github/CPSECapstone

## Glossary

**UserInterface-as-a-Service** Date and UI compenents that can be effortlessly inserted into any apllications UI
**UserInterface-as-a-Service** Date and UI components that can be effortlessly inserted into any apllications UI

**Tokenization** The process of turning sensitive pieces of data into a non-sensitive random string of characters that has no value if breached.

Expand Down
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"prop-types": "^15.7.2",
"react": "^16.13.1",
"react-bootstrap": "^1.0.1",
"react-chat-plugin": "^0.1.17",
"react-dom": "^16.13.1",
"react-icons": "^4.2.0",
"react-redux": "^7.2.0",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if (localStorage.jwtToken) {
}

function App () {
return (
return (
<Provider store={store}>
<Router>
<Container>
Expand Down
44 changes: 44 additions & 0 deletions frontend/src/components/DropDownMenu/DropDownMenu.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import React, { Component, useState } from "react";
import {
Container,
DropDownHeader,
DropDownListContainer,
DropDownList,
ListItem
} from "./DropDownMenu.styled";

const options = ["Apps", "Account", "Questions"];

export default function DropDownMenu() {
const [isOpen, setIsOpen] = useState(false);

const [selectedOption, setSelectedOption] = useState(null);

const toggling = () => setIsOpen(!isOpen);

const onOptionClicked = value => () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as for david

const functionName = (values) => {
body
}

setSelectedOption(value);
setIsOpen(false);
console.log(selectedOption);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove comments

};


return (
<Container>
<DropDownHeader onClick={toggling}>
{selectedOption || "Welcome, Joe!"}
</DropDownHeader>
{isOpen && (
<DropDownListContainer>
<DropDownList>
{options.map(option => (
<ListItem onClick={onOptionClicked(option)} key={Math.random()}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

call onOptionClicked with arrow function

{option}
</ListItem>
))}
</DropDownList>
</DropDownListContainer>
)}
</Container>
);
}
46 changes: 46 additions & 0 deletions frontend/src/components/DropDownMenu/DropDownMenu.styled.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import styled from 'styled-components';


export const Container = styled.div`
padding-top: 12px;
flex: 1;
background-color: transparent;

&:hover {
cursor: pointer;
}
`;

export const DropDownHeader = styled("div")`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why ("div") instead of div

margin-bottom: 10px;
padding: 5px 16px 5px 20px;
font-weight: 500;
font-size: 20px;
color: #3faffa;
background: #ffffff;
`;

export const DropDownListContainer = styled("div")`
width: 160px;
margin: 0 auto;
`;

export const DropDownList = styled("ul")`
padding: 0;
margin: 0;
padding-left: 0px;
background: #ffffff;
border: 2px solid #e5e5e5;
box-sizing: border-box;
color: #3faffa;
font-size: 20px;
font-weight: 600;
&:first-child {
padding-top: 8px;
}
`;

export const ListItem = styled("ul")`
list-style: none;
margin-bottom: 8px;
`;
4 changes: 3 additions & 1 deletion frontend/src/components/NavBar/NavBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { Component } from "react";
import { withRouter } from "react-router-dom";
import PropTypes from "prop-types";
import { connect } from "react-redux";
import DropDownMenu from "../DropDownMenu/DropDownMenu";
import { logoutUser } from "../../actions/authActions";
import {
Container,
Expand Down Expand Up @@ -33,7 +34,8 @@ class NavBar extends Component {

{auth.isAuthenticated ? (
<UserRow>
<Name key={3}>{`Logged in as: ${userName}`}</Name>
{/* <Name key={3}>{`Logged in as: ${userName}`}</Name> */}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove comments

<DropDownMenu></DropDownMenu>
<Button onClick={logoutUser}>Sign out</Button>
</UserRow>
) : (
Expand Down
50 changes: 50 additions & 0 deletions frontend/src/components/NewPage/NewPage.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import React, { Component } from "react";

class NewPage extends Component {

constructor(props) {
super(props);
this.state = {
students: [
{ id: 1, name: 'Joe', age: 21, email: '[email protected]'},
{ id: 2, name: 'Bob', age: 22, email: '[email protected]'}
]
}
}

returnTableData() {
return this.state.students.map((student, index) => {
let col = Object.keys(student)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this can by a const

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im removing NewPage. Never used

return (
<tr key={student.id}>
{col.map((val, index) => {
return <td key={index}>{student[col[index]]}</td>
})}
</tr>
)
})
}

renderTableHeader() {
let header = Object.keys(this.state.students[0])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const here too

return header.map((key, index) => {
return <th key={index}>{key.toUpperCase()}</th>
})
}

render() {
return (
<div>
<h1 id='title'>TESTING TABLE PAGE</h1>
<table id='students'>
<tbody>
<tr>{this.renderTableHeader()}</tr>
{this.returnTableData()}
</tbody>
</table>
</div>
)
}
}

export default NewPage;
2 changes: 2 additions & 0 deletions frontend/src/components/NewPage/NewPage.styled.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import styled from 'styled-components';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this and other empty files in NewPage

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and empty images


Empty file.
Binary file added frontend/src/images/gray.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/images/real.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/images/test.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/images/testLOGO.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
103 changes: 103 additions & 0 deletions frontend/src/pages/Login/Login.styled.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
import styled from 'styled-components'
import gray from '../../images/gray.jpg';

export const MainHeader = styled.h1`
position: absolute;
font-family: 'Trebuchet MS', sans-serif;
text-align: center;
left: 27%;
color: white;
top: 1%;
`;


export const TextWrapper = styled.body`
position: absolute;
top: 50%;
left: 35%;
width: 900px;
height: 600px;
padding: 40px;
padding-top: 50px;
box-sizing: border-box;
transform: translate(-50%, -50%);
box-shadow: 0 1px 15px;
color: #FFFFE0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see if you can use palette in styles folder for colors

border-radius: 20px;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clean up spacing

`;


export const Button = styled.button`
/* This renders the buttons above... Edit me! */
display: inline-block;
font-family: 'Trebuchet MS', sans-serif;
border-radius: 20px; //button shape
padding: 8px;
margin: 10px 60px;
width: 150px;
color: black;
border: 2px solid black;
background-color: #A9A9A9;
:hover {
cursor: pointer;
background: #FFFFE0;
transition: 0.2s ease-in-out;
}
`;

export const Input = styled.input`
display: block;
text-align: left;
font-family: 'Trebuchet MS', sans-serif;
width: 200px;
padding: 10px 10px; //inside padding
margin: 20px auto;
background: transparent;
border: 2px solid #FFFFE0
;
color: white;
cursor: pointer;
font-size: 15px;
border-radius: 20px;
outline: none;
::placeholder {
font-family: 'Trebuchet MS', sans-serif;
}

`;

export const Label = styled.label`
position: absolute;
top: 5%;
left: 34%;
margin: 0 0 30px;
font-family: 'Trebuchet MS', sans-serif;
color: white;
text-align: center;
font-size: 30px;
font-weight: bold;
`;



export const LoginWrapper = styled.body`
position: absolute;
top: 50%;
left: 80%;
width: 350px;
height: 270px;
padding: 40px;
padding-top: 50px;
box-sizing: border-box;
transform: translate(-50%, -50%);
box-shadow: 0 15px 25px rgba(0,0,0,1);
border-radius: 20px;
`;

export const LoginContainer = styled.div`
background-image: url(${gray});
height: 100vh;
background-position: center;
background-size: cover;
`;
Empty file.
77 changes: 77 additions & 0 deletions frontend/src/pages/Register/Register.styled.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import styled from 'styled-components'
import gray from '../../images/gray.jpg';


export const Button = styled.button`
/* This renders the buttons above... Edit me! */
display: inline-block;
font-family: 'Trebuchet MS', sans-serif;
border-radius: 20px; //button shape
padding: 8px;
margin: 10px 60px;
width: 150px;
color: black;
border: 2px solid black;
background-color: #A9A9A9;
:hover {
cursor: pointer;
background: #FFFFE0;
transition: 0.2s ease-in-out;
}
`;

export const Input = styled.input`
display: block;
text-align: left;
font-family: 'Trebuchet MS', sans-serif;
width: 200px;
padding: 10px 10px; //inside padding
margin: 20px auto;
background: transparent;
border: 2px solid #FFFFE0
;
color: white;
cursor: pointer;
font-size: 15px;
border-radius: 20px;
outline: none;
::placeholder {
font-family: 'Trebuchet MS', sans-serif;
}

`;

export const Label = styled.label`
position: absolute;
top: 5%;
left: 34%;
margin: 0 0 30px;
font-family: 'Trebuchet MS', sans-serif;
color: white;
text-align: center;
font-size: 30px;
font-weight: bold;
`;



export const Wrapper = styled.body`
position: absolute;
top: 40%;
left: 50%;
width: 350px;
height: 400px;
padding: 40px;
padding-top: 50px;
box-sizing: border-box;
transform: translate(-50%, -50%);
box-shadow: 0 15px 25px rgba(0,0,0,1);
border-radius: 20px;
`;

export const LoginContainer = styled.div`
background-image: url(${gray});
height: 100vh;
background-position: center;
background-size: cover;
`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clean up spacing. You can keep empty test files

Empty file.