Skip to content

Commit 40dd198

Browse files
committed
Google login
1 parent 610a00b commit 40dd198

File tree

36 files changed

+9748
-10947
lines changed

36 files changed

+9748
-10947
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,5 @@ fabric.properties
118118
/target
119119
**/*.rs.bk
120120

121-
enigma-types.h
121+
enigma-types.h
122+
UIcode/client/.env.development

UIcode/client/.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
REACT_APP_API_URL=
2+
REACT_APP_GOOGLE_CLIENT_ID=

UIcode/client/jsconfig.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"compilerOptions": {
3+
"baseUrl": "src"
4+
},
5+
"include": ["src"]
6+
}

UIcode/client/package-lock.json

Lines changed: 9219 additions & 10653 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UIcode/client/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6-
"axios": "^0.18.0",
6+
"axios": "^0.18.1",
77
"bootstrap": "^4.4.1",
8+
"js-cookie": "^2.2.1",
89
"react": "^16.8.6",
910
"react-bootstrap": "^1.0.0",
1011
"react-dom": "^16.8.6",
12+
"react-google-login": "^5.1.2",
1113
"react-router": "^5.1.2",
1214
"react-router-dom": "^4.1.2",
13-
"react-scripts": "2.1.8"
15+
"react-scripts": "^3.4.1",
16+
"styled-components": "^5.0.1"
1417
},
1518
"scripts": {
1619
"start": "react-scripts start",

UIcode/client/src/App.css

Lines changed: 0 additions & 67 deletions
This file was deleted.

UIcode/client/src/App.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

UIcode/client/src/App/App.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.centeralign {
2+
margin-top: 29px;
3+
padding-left: 106px;
4+
}

UIcode/client/src/App/index.jsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import React from "react";
2+
import "./App.css";
3+
import { BrowserRouter as Router, Switch } from "react-router-dom";
4+
import DefaultLayout from "Layouts/Default";
5+
import Home from "Pages/Home";
6+
import API from "Pages/API";
7+
import Contribute from "Pages/Contribute";
8+
9+
const App = () => {
10+
return (
11+
<Router>
12+
<Switch>
13+
<DefaultLayout exact path="/" component={Home} />
14+
<DefaultLayout exact path="/API" component={API} />
15+
<DefaultLayout exact path="/contribute" component={Contribute} />
16+
</Switch>
17+
</Router>
18+
);
19+
};
20+
21+
export default App;
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import React from "react";
2+
import styled, { css } from "styled-components";
3+
import colors from "Theme/colors";
4+
5+
const colorStyles = {
6+
primary: css`
7+
background-color: ${colors.primary.main};
8+
color: white;
9+
&:hover {
10+
background-color: ${colors.primary.light};
11+
}
12+
&:active {
13+
background-color: ${colors.primary.dark};
14+
}
15+
`,
16+
secondary: css`
17+
background-color: white;
18+
color: ${colors.primary.main};
19+
border-color: ${colors.grey.light};
20+
&:hover {
21+
border-color: ${colors.primary.main};
22+
}
23+
`
24+
};
25+
26+
const StyledButton = styled.button`
27+
height: ${props =>
28+
props.size === "big" ? "56px" : props.size === "default" ? "48px" : "32px"};
29+
font-size: 24px;
30+
border-width: 1px;
31+
border-style: solid;
32+
outline: none;
33+
padding: auto 24px;
34+
min-width: 200px;
35+
transition: 0.5s;
36+
box-sizing: content-box;
37+
cursor: pointer;
38+
font-weight: bold;
39+
margin: 0 9px;
40+
41+
${props => colorStyles[props.color]}
42+
`;
43+
44+
const Button = ({
45+
children,
46+
color = "secondary",
47+
size = "default",
48+
...restProps
49+
}) => {
50+
return (
51+
<StyledButton color={color} size={size} {...restProps}>
52+
{children}
53+
</StyledButton>
54+
);
55+
};
56+
57+
export default Button;

0 commit comments

Comments
 (0)