Add logo, login, signup form and perform login

master
Tanner Collin 4 years ago
parent aeafe10f0e
commit ab750aa8ba
  1. 3
      webclient/package.json
  2. BIN
      webclient/public/.index.html.swp
  3. 2
      webclient/public/index.html
  4. BIN
      webclient/src/.App.js.swp
  5. BIN
      webclient/src/.light.css.swp
  6. BIN
      webclient/src/.utils.js.swp
  7. 139
      webclient/src/App.js
  8. 5
      webclient/src/light.css
  9. 147
      webclient/src/logo.svg
  10. 56
      webclient/src/utils.js
  11. 113
      webclient/yarn.lock

@ -8,7 +8,8 @@
"@testing-library/user-event": "^7.1.2",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-scripts": "3.3.0"
"react-scripts": "3.3.0",
"semantic-ui-react": "^0.88.2"
},
"scripts": {
"start": "react-scripts start",

Binary file not shown.

@ -25,6 +25,8 @@
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css" />
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -1,11 +1,142 @@
import React from 'react';
import React, { useState } from 'react';
import './light.css';
import Logo from './logo.svg';
import { Container, Divider, Form, Grid, Header, Menu, Message } from 'semantic-ui-react';
import { requester } from './utils.js';
function LoginForm() {
const [input, setInput] = useState({})
const [error, setError] = useState({})
const handleChange = (e) => setInput({
...input,
[e.currentTarget.name]: e.currentTarget.value
});
const handleSubmit = (e) => {
requester('/rest-auth/login/', 'POST', input)
.then(res => {
console.log(res);
setError({});
})
.catch(err => {
console.log(err);
setError(err.data);
});
};
return (
<Form onSubmit={handleSubmit}>
<Form.Input
label='Username'
name='username'
placeholder='first.last'
onChange={handleChange}
error={error.username}
/>
<Form.Input
label='Password'
name='password'
type='password'
onChange={handleChange}
error={error.password}
/>
<Form.Button error={error.non_field_errors}>
Login
</Form.Button>
</Form>
);
}
function SignupForm() {
const [input, setInput] = useState({})
const handleChange = (e) => setInput({
...input,
[e.currentTarget.name]: e.currentTarget.value
});
const handleSubmit = (e) => {
console.log(input);
}
return (
<Form onSubmit={handleSubmit}>
<Form.Group widths='equal'>
<Form.Input
label='First Name'
name='firstname'
onChange={handleChange}
/>
<Form.Input
label='Last Name'
name='lastname'
onChange={handleChange}
/>
</Form.Group>
<Form.Input
label='Password'
name='password1'
type='password'
onChange={handleChange}
/>
<Form.Input
label='Confirm Password'
name='password2'
type='password'
onChange={handleChange}
/>
<Form.Input
label='Email'
name='email'
onChange={handleChange}
/>
<Form.Button>Sign Up</Form.Button>
</Form>
);
}
function App() {
return (
<div>
<header>
Hello world
</header>
<Container>
<header className='header'>
<img src={Logo} className='logo' />
</header>
</Container>
<Menu>
<Container>
<Menu.Item
content='Home'
/>
<Menu.Item
content='About'
/>
<Menu.Item
content='Contact'
/>
</Container>
</Menu>
<Container>
<Grid stackable padded columns={2}>
<Grid.Column>
<Header size='medium'>Login to Spaceport</Header>
<LoginForm />
<Divider section horizontal>Or</Divider>
<Header size='medium'>Sign Up</Header>
<SignupForm />
</Grid.Column>
<Grid.Column>
<p>two</p>
</Grid.Column>
</Grid>
</Container>
</div>
);
}

@ -0,0 +1,5 @@
.header .logo {
max-width: 100%;
display: block;
margin: 1.5rem auto;
}

@ -0,0 +1,147 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="120.34605mm"
height="8.4772501mm"
viewBox="0 0 120.34605 8.4772501"
version="1.1"
id="svg8"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="logo.svg">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.979899"
inkscape:cx="267.5924"
inkscape:cy="26.230935"
inkscape:document-units="mm"
inkscape:current-layer="flowRoot10"
showgrid="false"
inkscape:window-width="3840"
inkscape:window-height="2096"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-13.153719,-114.80657)">
<g
aria-label="PROTOSPACE PORTAL"
transform="scale(0.26458333)"
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
id="flowRoot10">
<path
d="m 51.274844,465.5546 q -0.68,0 -1.12,-0.44 -0.44,-0.44 -0.44,-1.12 v -28.12 q 0,-0.68 0.44,-1.12 0.44,-0.44 1.12,-0.44 h 8 q 2.96,0 5.24,1.32 2.28,1.28 3.56,3.56 1.28,2.28 1.28,5.28 0,2.92 -1.28,5.2 -1.28,2.24 -3.56,3.56 -2.28,1.28 -5.24,1.28 h -6.44 v 9.48 q 0,0.68 -0.44,1.12 -0.44,0.44 -1.12,0.44 z m 1.56,-14.04 h 6.44 q 2.04,0 3.64,-0.88 1.6,-0.92 2.48,-2.52 0.92,-1.6 0.92,-3.64 0,-2.12 -0.92,-3.72 -0.88,-1.6 -2.48,-2.52 -1.6,-0.92 -3.64,-0.92 h -6.44 z"
style="fill:#999999"
id="path24"
inkscape:connector-curvature="0" />
<path
d="m 75.727969,465.5546 q -0.68,0 -1.12,-0.44 -0.44,-0.44 -0.44,-1.12 v -28.12 q 0,-0.68 0.44,-1.12 0.44,-0.44 1.12,-0.44 h 7.48 q 2.92,0 5.2,1.24 2.28,1.2 3.56,3.4 1.32,2.16 1.32,5 0,2.72 -1.32,4.84 -1.28,2.12 -3.56,3.32 -2.28,1.2 -5.2,1.2 h -5.92 v 10.68 q 0,0.68 -0.44,1.12 -0.44,0.44 -1.12,0.44 z m 16.72,0 q -0.52,0 -0.84,-0.2 -0.28,-0.2 -0.52,-0.6 l -7.68,-12.24 3.12,-0.8 7.16,11.44 q 0.6,0.96 0.2,1.68 -0.36,0.72 -1.44,0.72 z m -15.16,-15.24 h 5.92 q 2.04,0 3.6,-0.8 1.6,-0.84 2.52,-2.28 0.92,-1.44 0.92,-3.28 0,-1.96 -0.92,-3.44 -0.92,-1.52 -2.52,-2.36 -1.56,-0.84 -3.6,-0.84 h -5.92 z"
style="fill:#999999"
id="path26"
inkscape:connector-curvature="0" />
<path
d="m 113.29547,465.9546 q -3.48,0 -6.4,-1.2 -2.92,-1.2 -5.08,-3.36 -2.120001,-2.16 -3.320001,-5.08 -1.16,-2.92 -1.16,-6.4 0,-3.44 1.16,-6.36 1.2,-2.92 3.320001,-5.08 2.16,-2.16 5.08,-3.36 2.92,-1.2 6.4,-1.2 3.44,0 6.36,1.2 2.92,1.2 5.08,3.36 2.16,2.16 3.32,5.08 1.2,2.92 1.2,6.36 0,3.48 -1.2,6.4 -1.16,2.92 -3.32,5.08 -2.16,2.16 -5.08,3.36 -2.92,1.2 -6.36,1.2 z m 0,-2.96 q 2.76,0 5.12,-0.96 2.36,-1 4.08,-2.76 1.76,-1.8 2.72,-4.16 0.96,-2.4 0.96,-5.2 0,-2.76 -0.96,-5.12 -0.96,-2.4 -2.72,-4.16 -1.72,-1.8 -4.08,-2.76 -2.36,-1 -5.12,-1 -2.8,0 -5.16,1 -2.36,0.96 -4.12,2.76 -1.72,1.76 -2.68,4.16 -0.96,2.36 -0.96,5.12 0,2.8 0.96,5.2 0.96,2.36 2.68,4.16 1.76,1.76 4.12,2.76 2.36,0.96 5.16,0.96 z"
style="fill:#999999"
id="path28"
inkscape:connector-curvature="0" />
<path
d="m 142.38859,465.5546 q -0.64,0 -1.12,-0.44 -0.44,-0.48 -0.44,-1.12 v -29.68 h 3.12 v 29.68 q 0,0.64 -0.44,1.12 -0.44,0.44 -1.12,0.44 z m -11.04,-28.4 q -0.64,0 -1.04,-0.4 -0.4,-0.4 -0.4,-1 0,-0.64 0.4,-1.04 0.4,-0.4 1.04,-0.4 h 22.12 q 0.64,0 1.04,0.4 0.4,0.4 0.4,1.04 0,0.6 -0.4,1 -0.4,0.4 -1.04,0.4 z"
style="fill:#999999"
id="path30"
inkscape:connector-curvature="0" />
<path
d="m 171.88922,465.9546 q -3.48,0 -6.4,-1.2 -2.92,-1.2 -5.08,-3.36 -2.12,-2.16 -3.32,-5.08 -1.16,-2.92 -1.16,-6.4 0,-3.44 1.16,-6.36 1.2,-2.92 3.32,-5.08 2.16,-2.16 5.08,-3.36 2.92,-1.2 6.4,-1.2 3.44,0 6.36,1.2 2.92,1.2 5.08,3.36 2.16,2.16 3.32,5.08 1.2,2.92 1.2,6.36 0,3.48 -1.2,6.4 -1.16,2.92 -3.32,5.08 -2.16,2.16 -5.08,3.36 -2.92,1.2 -6.36,1.2 z m 0,-2.96 q 2.76,0 5.12,-0.96 2.36,-1 4.08,-2.76 1.76,-1.8 2.72,-4.16 0.96,-2.4 0.96,-5.2 0,-2.76 -0.96,-5.12 -0.96,-2.4 -2.72,-4.16 -1.72,-1.8 -4.08,-2.76 -2.36,-1 -5.12,-1 -2.8,0 -5.16,1 -2.36,0.96 -4.12,2.76 -1.72,1.76 -2.68,4.16 -0.96,2.36 -0.96,5.12 0,2.8 0.96,5.2 0.96,2.36 2.68,4.16 1.76,1.76 4.12,2.76 2.36,0.96 5.16,0.96 z"
style="fill:#999999"
id="path32"
inkscape:connector-curvature="0" />
<path
d="m 204.12422,465.9546 q -2.56,0 -4.84,-0.76 -2.24,-0.8 -3.92,-2.2 -1.68,-1.44 -2.52,-3.28 -0.36,-0.76 0,-1.4 0.4,-0.68 1.32,-0.88 0.64,-0.16 1.28,0.2 0.68,0.32 1,1 0.52,1.08 1.64,1.96 1.12,0.84 2.68,1.36 1.6,0.52 3.36,0.52 2,0 3.6,-0.64 1.64,-0.64 2.6,-1.84 1,-1.2 1,-2.96 0,-2.24 -1.72,-3.92 -1.68,-1.72 -5.48,-2.16 -4.88,-0.52 -7.68,-2.92 -2.76,-2.4 -2.76,-5.92 0,-2.6 1.4,-4.4 1.44,-1.84 3.88,-2.8 2.48,-0.96 5.56,-0.96 2.36,0 4.16,0.68 1.8,0.68 3.16,1.88 1.36,1.16 2.32,2.72 0.48,0.8 0.36,1.52 -0.08,0.72 -0.72,1.12 -0.72,0.4 -1.52,0.16 -0.8,-0.28 -1.2,-0.96 -0.6,-1.08 -1.52,-1.88 -0.92,-0.8 -2.2,-1.28 -1.24,-0.48 -2.96,-0.48 -3,-0.04 -5,1.2 -1.96,1.2 -1.96,3.6 0,1.28 0.64,2.4 0.68,1.08 2.32,1.92 1.68,0.8 4.68,1.12 4.84,0.56 7.4,2.96 2.6,2.4 2.6,6.28 0,2.24 -0.88,3.92 -0.88,1.68 -2.44,2.84 -1.52,1.12 -3.52,1.72 -1.96,0.56 -4.12,0.56 z"
style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-family:Comfortaa;-inkscape-font-specification:'Comfortaa Semi-Bold'"
id="path34"
inkscape:connector-curvature="0" />
<path
d="m 223.43172,465.5546 q -0.84,0 -1.4,-0.52 -0.52,-0.56 -0.52,-1.4 v -27.4 q 0,-0.84 0.52,-1.36 0.56,-0.56 1.4,-0.56 h 8 q 2.96,0 5.28,1.32 2.32,1.32 3.6,3.64 1.28,2.28 1.28,5.32 0,2.96 -1.28,5.24 -1.28,2.24 -3.6,3.52 -2.32,1.28 -5.28,1.28 h -6.12 v 9 q 0,0.84 -0.52,1.4 -0.52,0.52 -1.36,0.52 z m 1.88,-14.48 h 6.12 q 1.88,0 3.36,-0.8 1.48,-0.84 2.28,-2.32 0.84,-1.48 0.84,-3.36 0,-2 -0.84,-3.48 -0.8,-1.52 -2.28,-2.36 -1.48,-0.88 -3.36,-0.88 h -6.12 z"
style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-family:Comfortaa;-inkscape-font-specification:'Comfortaa Semi-Bold'"
id="path36"
inkscape:connector-curvature="0" />
<path
d="m 243.70547,465.5546 q -1.04,0 -1.6,-0.88 -0.52,-0.92 -0.08,-1.88 l 11.4,-27.2 q 0.56,-1.28 1.8,-1.28 1.32,0 1.8,1.28 l 11.48,27.28 q 0.4,1 -0.16,1.84 -0.52,0.84 -1.56,0.84 -0.56,0 -1.08,-0.28 -0.48,-0.32 -0.72,-0.88 l -10.28,-25.32 h 1.16 l -10.4,25.32 q -0.24,0.56 -0.76,0.88 -0.48,0.28 -1,0.28 z m 2.28,-7.08 1.48,-3.16 h 15.88 l 1.44,3.16 z"
style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-family:Comfortaa;-inkscape-font-specification:'Comfortaa Semi-Bold'"
id="path38"
inkscape:connector-curvature="0" />
<path
d="m 286.44922,465.9546 q -3.24,0 -6.08,-1.2 -2.8,-1.24 -4.92,-3.44 -2.08,-2.2 -3.28,-5.12 -1.2,-2.92 -1.2,-6.28 0,-3.32 1.16,-6.2 1.2,-2.92 3.32,-5.12 2.12,-2.2 4.92,-3.44 2.8,-1.24 6.08,-1.24 3.04,0 5.28,0.84 2.28,0.8 4.52,2.64 0.32,0.24 0.44,0.56 0.16,0.28 0.12,0.56 0,0.28 -0.08,0.6 -0.04,0.6 -0.52,1 -0.44,0.36 -1.12,0.4 -0.64,0.04 -1.24,-0.44 -1.52,-1.32 -3.2,-2 -1.64,-0.68 -4.2,-0.68 -2.44,0 -4.6,1 -2.12,1 -3.76,2.72 -1.6,1.72 -2.52,4 -0.92,2.24 -0.92,4.8 0,2.6 0.92,4.88 0.92,2.28 2.52,4 1.64,1.72 3.76,2.68 2.16,0.96 4.6,0.96 2.12,0 3.96,-0.68 1.88,-0.72 3.6,-2 0.64,-0.48 1.28,-0.4 0.64,0.04 1.08,0.52 0.48,0.44 0.48,1.24 0,0.4 -0.16,0.76 -0.12,0.32 -0.44,0.6 -2.12,1.8 -4.6,2.64 -2.48,0.84 -5.2,0.84 z"
style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-family:Comfortaa;-inkscape-font-specification:'Comfortaa Semi-Bold'"
id="path40"
inkscape:connector-curvature="0" />
<path
d="m 305.38484,465.5546 q -0.84,0 -1.4,-0.52 -0.52,-0.56 -0.52,-1.4 v -27.4 q 0,-0.84 0.52,-1.36 0.56,-0.56 1.4,-0.56 h 18.28 q 0.84,0 1.36,0.52 0.52,0.48 0.52,1.28 0,0.76 -0.52,1.28 -0.52,0.48 -1.36,0.48 h -16.4 v 10.16 h 11.84 q 0.84,0 1.36,0.52 0.52,0.48 0.52,1.28 0,0.76 -0.52,1.28 -0.52,0.48 -1.36,0.48 h -11.84 v 10.4 h 16.4 q 0.84,0 1.36,0.52 0.52,0.48 0.52,1.24 0,0.8 -0.52,1.32 -0.52,0.48 -1.36,0.48 z"
style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-family:Comfortaa;-inkscape-font-specification:'Comfortaa Semi-Bold'"
id="path42"
inkscape:connector-curvature="0" />
<path
d="m 344.99422,465.5546 q -0.84,0 -1.4,-0.52 -0.52,-0.56 -0.52,-1.4 v -27.4 q 0,-0.84 0.52,-1.36 0.56,-0.56 1.4,-0.56 h 8 q 2.96,0 5.28,1.32 2.32,1.32 3.6,3.64 1.28,2.28 1.28,5.32 0,2.96 -1.28,5.24 -1.28,2.24 -3.6,3.52 -2.32,1.28 -5.28,1.28 h -6.12 v 9 q 0,0.84 -0.52,1.4 -0.52,0.52 -1.36,0.52 z m 1.88,-14.48 h 6.12 q 1.88,0 3.36,-0.8 1.48,-0.84 2.28,-2.32 0.84,-1.48 0.84,-3.36 0,-2 -0.84,-3.48 -0.8,-1.52 -2.28,-2.36 -1.48,-0.88 -3.36,-0.88 h -6.12 z"
style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-family:Comfortaa;-inkscape-font-specification:'Comfortaa Semi-Bold'"
id="path44"
inkscape:connector-curvature="0" />
<path
d="m 382.27984,465.9546 q -3.52,0 -6.44,-1.16 -2.92,-1.2 -5.04,-3.36 -2.08,-2.16 -3.28,-5.08 -1.16,-2.92 -1.16,-6.44 0,-3.48 1.16,-6.4 1.2,-2.92 3.28,-5.08 2.12,-2.16 5.04,-3.32 2.92,-1.2 6.44,-1.2 3.48,0 6.4,1.2 2.92,1.16 5.04,3.32 2.12,2.16 3.28,5.08 1.2,2.92 1.2,6.4 0,3.52 -1.2,6.44 -1.16,2.92 -3.28,5.08 -2.12,2.16 -5.04,3.36 -2.92,1.16 -6.4,1.16 z m 0,-3.48 q 2.64,0 4.88,-0.96 2.24,-0.96 3.88,-2.64 1.68,-1.72 2.56,-4 0.88,-2.28 0.88,-4.96 0,-2.64 -0.88,-4.92 -0.88,-2.32 -2.56,-4 -1.64,-1.72 -3.88,-2.64 -2.24,-0.96 -4.88,-0.96 -2.68,0 -4.92,0.96 -2.24,0.92 -3.88,2.64 -1.6,1.68 -2.52,4 -0.92,2.28 -0.92,4.92 0,2.68 0.92,4.96 0.92,2.28 2.52,4 1.64,1.68 3.88,2.64 2.24,0.96 4.92,0.96 z"
style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-family:Comfortaa;-inkscape-font-specification:'Comfortaa Semi-Bold'"
id="path46"
inkscape:connector-curvature="0" />
<path
d="m 406.63484,465.5546 q -0.84,0 -1.4,-0.52 -0.52,-0.56 -0.52,-1.4 v -27.4 q 0,-0.84 0.52,-1.36 0.56,-0.56 1.4,-0.56 h 7.28 q 2.96,0 5.28,1.24 2.32,1.24 3.6,3.44 1.32,2.2 1.32,5.08 0,2.72 -1.32,4.84 -1.28,2.12 -3.6,3.32 -2.32,1.2 -5.28,1.2 h -5.4 v 10.2 q 0,0.84 -0.52,1.4 -0.52,0.52 -1.36,0.52 z m 16.64,0 q -0.56,0 -0.96,-0.2 -0.4,-0.24 -0.72,-0.72 l -7.36,-11.84 3.76,-1.04 6.76,10.88 q 0.68,1.08 0.2,2 -0.48,0.92 -1.68,0.92 z m -14.76,-15.68 h 5.4 q 1.92,0 3.36,-0.72 1.48,-0.76 2.32,-2.08 0.84,-1.32 0.84,-3 0,-1.8 -0.84,-3.2 -0.84,-1.44 -2.32,-2.2 -1.44,-0.8 -3.36,-0.8 h -5.4 z"
style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-family:Comfortaa;-inkscape-font-specification:'Comfortaa Semi-Bold'"
id="path48"
inkscape:connector-curvature="0" />
<path
d="m 438.95297,465.5546 q -0.76,0 -1.32,-0.56 -0.56,-0.56 -0.56,-1.36 v -29.32 h 3.8 v 29.32 q 0,0.8 -0.56,1.36 -0.52,0.56 -1.36,0.56 z m -10.8,-27.72 q -0.8,0 -1.28,-0.48 -0.48,-0.52 -0.48,-1.28 0,-0.8 0.48,-1.28 0.48,-0.48 1.28,-0.48 h 21.64 q 0.8,0 1.28,0.48 0.48,0.48 0.48,1.28 0,0.76 -0.48,1.28 -0.48,0.48 -1.28,0.48 z"
style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-family:Comfortaa;-inkscape-font-specification:'Comfortaa Semi-Bold'"
id="path50"
inkscape:connector-curvature="0" />
<path
d="m 454.40109,465.5546 q -0.92,0 -1.32,-0.76 -0.4,-0.76 -0.08,-1.48 l 11.76,-27.92 q 0.44,-1.08 1.52,-1.08 1.04,0 1.48,1.08 l 11.8,27.96 q 0.36,0.76 -0.12,1.48 -0.44,0.72 -1.28,0.72 -0.48,0 -0.88,-0.24 -0.36,-0.24 -0.6,-0.72 l -11,-26.68 h 1.24 l -11.08,26.68 q -0.2,0.48 -0.6,0.72 -0.36,0.24 -0.84,0.24 z m 2.64,-7.44 1.2,-2.68 h 16.24 l 1.2,2.68 z"
style="fill:#999999"
id="path52"
inkscape:connector-curvature="0" />
<path
d="m 485.80609,465.5546 q -0.64,0 -1.12,-0.44 -0.44,-0.44 -0.44,-1.12 v -28.12 q 0,-0.64 0.44,-1.08 0.48,-0.48 1.12,-0.48 0.64,0 1.08,0.48 0.48,0.44 0.48,1.08 v 26.72 h 15.64 q 0.64,0 1.08,0.44 0.48,0.4 0.48,1.04 0,0.64 -0.48,1.08 -0.44,0.4 -1.08,0.4 z"
style="fill:#999999"
id="path54"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 13 KiB

@ -0,0 +1,56 @@
var siteUrl, apiUrl;
if (process.env.NODE_ENV !== 'production') {
siteUrl = 'http://spaceport.dns.t0.vc';
apiUrl = 'http://spaceport-api.dns.t0.vc';
} else {
siteUrl = 'https://' + window.location.hostname;
apiUrl = 'https://api.' + window.location.hostname;
}
export const requester = (route, method, data) => {
var options;
if (method == 'GET') {
options = {};
} else if (method == 'POST') {
const formData = new FormData();
Object.keys(data).forEach(key =>
formData.append(key, data[key])
);
options = {
method: 'POST',
body: formData,
};
} else {
return 'Method not supported';
}
const customError = (data) => {
const error = new Error(JSON.stringify(data));
error.data = data;
return error;
}
return fetch(apiUrl + route, options)
.then(response => {
if (!response.ok) {
throw customError(response);
}
return response.json();
})
.catch(error => {
const code = error.data.status;
if (code == 413) {
throw customError({non_field_errors: ['File too big']});
} else if (code == 400) {
return error.data.json()
.then(result => {
throw customError(result);
});
} else {
throw customError({non_field_errors: ['Network Error']});
}
});
}

@ -828,7 +828,7 @@
dependencies:
regenerator-runtime "^0.13.2"
"@babel/runtime@^7.5.1", "@babel/runtime@^7.6.2", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6":
"@babel/runtime@^7.1.2", "@babel/runtime@^7.5.1", "@babel/runtime@^7.6.2", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6":
version "7.7.7"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.7.7.tgz#194769ca8d6d7790ec23605af9ee3e42a0aa79cf"
integrity sha512-uCnC2JEVAu8AKB5do1WRIsvrdJ0flYx/A/9f/6chdacnEZ7LmavjdsDXr5ksYBegxtuTPR5Va9/+13QF/kFkCA==
@ -1079,11 +1079,36 @@
resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b"
integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==
"@semantic-ui-react/event-stack@^3.1.0":
version "3.1.1"
resolved "https://registry.yarnpkg.com/@semantic-ui-react/event-stack/-/event-stack-3.1.1.tgz#3263d17511db81a743167fe45281a24b3eb6b3c8"
integrity sha512-SA7VOu/tY3OkooR++mm9voeQrJpYXjJaMHO1aFCcSouS2xhqMR9Gnz0LEGLOR0h9ueWPBKaQzKIrx3FTTJZmUQ==
dependencies:
exenv "^1.2.2"
prop-types "^15.6.2"
"@sheerun/mutationobserver-shim@^0.3.2":
version "0.3.2"
resolved "https://registry.yarnpkg.com/@sheerun/mutationobserver-shim/-/mutationobserver-shim-0.3.2.tgz#8013f2af54a2b7d735f71560ff360d3a8176a87b"
integrity sha512-vTCdPp/T/Q3oSqwHmZ5Kpa9oI7iLtGl3RQaA/NyLHikvcrPxACkkKVr/XzkSPJWXHRhKGzVvb0urJsbMlRxi1Q==
"@stardust-ui/react-component-event-listener@~0.38.0":
version "0.38.0"
resolved "https://registry.yarnpkg.com/@stardust-ui/react-component-event-listener/-/react-component-event-listener-0.38.0.tgz#1787faded94b40ad41226e6289baf13e701c6e7f"
integrity sha512-sIP/e0dyOrrlb8K7KWumfMxj/gAifswTBC4o68Aa+C/GA73ccRp/6W1VlHvF/dlOR4KLsA+5SKnhjH36xzPsWg==
dependencies:
"@babel/runtime" "^7.1.2"
prop-types "^15.7.2"
"@stardust-ui/react-component-ref@~0.38.0":
version "0.38.0"
resolved "https://registry.yarnpkg.com/@stardust-ui/react-component-ref/-/react-component-ref-0.38.0.tgz#52d555f2d5edd213c923c93a106f7de940e427ef"
integrity sha512-xjs6WnvJVueSIXMWw0C3oWIgAPpcD03qw43oGOjUXqFktvpNkB73JoKIhS4sCrtQxBdct75qqr4ZL6JiyPcESw==
dependencies:
"@babel/runtime" "^7.1.2"
prop-types "^15.7.2"
react-is "^16.6.3"
"@svgr/babel-plugin-add-jsx-attribute@^4.2.0":
version "4.2.0"
resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-4.2.0.tgz#dadcb6218503532d6884b210e7f3c502caaa44b1"
@ -2573,6 +2598,11 @@ class-utils@^0.3.5:
isobject "^3.0.0"
static-extend "^0.1.1"
classnames@^2.2.6:
version "2.2.6"
resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce"
integrity sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==
clean-css@4.2.x:
version "4.2.1"
resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.1.tgz#2d411ef76b8569b6d0c84068dabe85b0aa5e5c17"
@ -2942,6 +2972,14 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4:
safe-buffer "^5.0.1"
sha.js "^2.4.8"
create-react-context@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/create-react-context/-/create-react-context-0.3.0.tgz#546dede9dc422def0d3fc2fe03afe0bc0f4f7d8c"
integrity sha512-dNldIoSuNSvlTJ7slIKC/ZFGKexBMBrrcc+TTe1NdmROnaASuLPvqpwj9v4XS4uXZ8+YPu0sNmShX2rXI5LNsw==
dependencies:
gud "^1.0.0"
warning "^4.0.3"
cross-spawn@6.0.5, cross-spawn@^6.0.0, cross-spawn@^6.0.5:
version "6.0.5"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
@ -3258,7 +3296,7 @@ decode-uri-component@^0.2.0:
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
deep-equal@^1.0.1:
deep-equal@^1.0.1, deep-equal@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a"
integrity sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==
@ -3961,6 +3999,11 @@ execa@^1.0.0:
signal-exit "^3.0.0"
strip-eof "^1.0.0"
exenv@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/exenv/-/exenv-1.2.2.tgz#2ae78e85d9894158670b03d47bec1f03bd91bb9d"
integrity sha1-KueOhdmJQVhnCwPUe+wfA72Ru50=
exit@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
@ -4579,6 +4622,11 @@ growly@^1.3.0:
resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081"
integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=
gud@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/gud/-/gud-1.0.0.tgz#a489581b17e6a70beca9abe3ae57de7a499852c0"
integrity sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw==
gzip-size@5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-5.1.1.tgz#cb9bee692f87c0612b232840a873904e4c135274"
@ -5997,6 +6045,11 @@ jsx-ast-utils@^2.2.1:
array-includes "^3.0.3"
object.assign "^4.1.0"
keyboard-key@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/keyboard-key/-/keyboard-key-1.0.4.tgz#52d8fa07b7e17757072aa22a67fb4ae85e4c46b0"
integrity sha512-my04dE6BCwPpwoe4KYKfPxWiwgDYQOHrVmtzn1CfzmoEsGG/ef4oZGaXCzi1+iFhG7CN5JkOuxmei5OABY8/ag==
killable@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.1.tgz#4c8ce441187a061c7474fb87ca08e2a638194892"
@ -7401,6 +7454,11 @@ pnp-webpack-plugin@1.5.0:
dependencies:
ts-pnp "^1.1.2"
popper.js@^1.14.4:
version "1.16.0"
resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.16.0.tgz#2e1816bcbbaa518ea6c2e15a466f4cb9c6e2fbb3"
integrity sha512-+G+EkOPoE5S/zChTpmBSSDYmhXJ5PsW8eMhH8cP/CQHMFPBG/kC9Y5IIw6qNYgdJ+/COf0ddY2li28iHaZRSjw==
portfinder@^1.0.25:
version "1.0.25"
resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.25.tgz#254fd337ffba869f4b9d37edc298059cb4d35eca"
@ -8150,7 +8208,7 @@ prompts@^2.0.1:
kleur "^3.0.3"
sisteransi "^1.0.3"
prop-types@^15.6.2, prop-types@^15.7.2:
prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2:
version "15.7.2"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"
integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==
@ -8371,11 +8429,24 @@ react-error-overlay@^6.0.4:
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.4.tgz#0d165d6d27488e660bc08e57bdabaad741366f7a"
integrity sha512-ueZzLmHltszTshDMwyfELDq8zOA803wQ1ZuzCccXa1m57k1PxSHfflPD5W9YIiTXLs0JTLzoj6o1LuM5N6zzNA==
react-is@^16.8.1, react-is@^16.8.4:
react-is@^16.6.3, react-is@^16.8.1, react-is@^16.8.4, react-is@^16.8.6:
version "16.12.0"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.12.0.tgz#2cc0fe0fba742d97fd527c42a13bec4eeb06241c"
integrity sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q==
react-popper@^1.3.4:
version "1.3.7"
resolved "https://registry.yarnpkg.com/react-popper/-/react-popper-1.3.7.tgz#f6a3471362ef1f0d10a4963673789de1baca2324"
integrity sha512-nmqYTx7QVjCm3WUZLeuOomna138R1luC4EqkW3hxJUrAe+3eNz3oFCLYdnPwILfn0mX1Ew2c3wctrjlUMYYUww==
dependencies:
"@babel/runtime" "^7.1.2"
create-react-context "^0.3.0"
deep-equal "^1.1.1"
popper.js "^1.14.4"
prop-types "^15.6.1"
typed-styles "^0.0.7"
warning "^4.0.2"
react-scripts@3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/react-scripts/-/react-scripts-3.3.0.tgz#f26a21f208f20bd04770f43e50b5bbc151920c2a"
@ -8964,6 +9035,23 @@ selfsigned@^1.10.7:
dependencies:
node-forge "0.9.0"
semantic-ui-react@^0.88.2:
version "0.88.2"
resolved "https://registry.yarnpkg.com/semantic-ui-react/-/semantic-ui-react-0.88.2.tgz#3d4b54f8b799769b412435c8531475fd34aa4149"
integrity sha512-+02kN2z8PuA/cMdvDUsHhbJmBzxxgOXVHMFr9XK7zGb0wkW9A6OPQMFokWz7ozlVtKjN6r7zsb+Qvjk/qq1OWw==
dependencies:
"@babel/runtime" "^7.1.2"
"@semantic-ui-react/event-stack" "^3.1.0"
"@stardust-ui/react-component-event-listener" "~0.38.0"
"@stardust-ui/react-component-ref" "~0.38.0"
classnames "^2.2.6"
keyboard-key "^1.0.4"
lodash "^4.17.15"
prop-types "^15.7.2"
react-is "^16.8.6"
react-popper "^1.3.4"
shallowequal "^1.1.0"
"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0:
version "5.7.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
@ -9081,6 +9169,11 @@ shallow-clone@^3.0.0:
dependencies:
kind-of "^6.0.2"
shallowequal@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8"
integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==
shebang-command@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
@ -9869,6 +9962,11 @@ type@^2.0.0:
resolved "https://registry.yarnpkg.com/type/-/type-2.0.0.tgz#5f16ff6ef2eb44f260494dae271033b29c09a9c3"
integrity sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow==
typed-styles@^0.0.7:
version "0.0.7"
resolved "https://registry.yarnpkg.com/typed-styles/-/typed-styles-0.0.7.tgz#93392a008794c4595119ff62dde6809dbc40a3d9"
integrity sha512-pzP0PWoZUhsECYjABgCGQlRGL1n7tOHsgwYv3oIiEpJwGhFTuty/YNeduxQYzXXa3Ge5BdT6sHYIQYpl4uJ+5Q==
typedarray@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
@ -10129,6 +10227,13 @@ walker@^1.0.7, walker@~1.0.5:
dependencies:
makeerror "1.0.x"
warning@^4.0.2, warning@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.3.tgz#16e9e077eb8a86d6af7d64aa1e05fd85b4678ca3"
integrity sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==
dependencies:
loose-envify "^1.0.0"
watchpack@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.0.tgz#4bc12c2ebe8aa277a71f1d3f14d685c7b446cd00"

Loading…
Cancel
Save