-
Notifications
You must be signed in to change notification settings - Fork 2
Implement 1 to master #52
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
base: master
Are you sure you want to change the base?
Changes from all commits
d20372b
4f6dd95
8df2f04
e7a6924
6d34e4b
c8b70e7
05f091d
d4ec7f9
c033884
3bce1f2
1c72e61
26f6ec0
b35995b
1e5d8b5
0768f6a
d3ba71b
ae7cd29
30fd455
4e146b6
1afc181
d1557ca
bc952ee
ae26ff6
cbd73d1
40b7349
c3b5330
3c75005
6b4f2bb
65e51e7
4d7ff2b
6d630e2
df9d450
2e5c28c
dad3231
f089403
bbf33fb
97fe39c
51dc954
0ca4a5f
5135459
e306384
8f57896
7f6cc9b
62ab1de
87b5066
34bb0b0
4827511
8703320
50953b9
69195bf
f2ec084
0a178e7
92f0f03
23088c9
c00c4cb
793d984
b8d96ce
3d8dcf0
afe1cbc
586ae23
7b4748c
5ac3ded
2545618
15cadf8
32c0d92
c145eeb
f56a198
721d052
0d9bd78
4f2155d
b0dfee3
be980d4
13a5911
f2f654c
926d6ea
ee55590
6602447
54be426
2183f59
bc2f970
73418ce
056335a
db4de44
5ed37b6
aea8b57
6956621
6847042
53d8c69
399cbfb
3de85cc
0202449
41b19e7
9c5e48c
eeef25e
9c07f76
742c3c1
0dd48c4
c6759fc
426685d
eeb58e1
d1ea36a
365c589
d67b0dc
f891a58
f76adf2
be3b9f8
0bc78b8
c696cd8
421da95
67f7bef
27705e4
bd269f8
1c6a968
6b0ca3f
6455e6c
4548fd0
cf9f25d
63d488c
3fdfaeb
1c7d15b
11ce7b8
8b65ce7
42f6728
4d9268d
0332ee5
04a17b3
3765de6
b316569
d29918f
d8bf12d
46cfbd8
2f14735
7b1c67a
9442410
475eea3
3fb02d6
950f632
808753e
245eecf
8348757
390153a
79ef8ba
971d3ae
31ac934
cc4b97b
f81b03d
bc8c9f8
b8a022c
ac82913
1707c85
0506258
17db562
52b81f9
d80c715
72aeebe
1913941
5b89291
0f41ce0
daeb624
60c53eb
9f5b9b7
8ccf8cc
d5793ac
1c776ab
eef3053
060aa20
b916bcd
67cd870
158a5c8
a24d8cf
582cfa5
d30f511
4fe5507
7eebc4a
532224d
1308d04
261c350
afa8237
f4f71fe
cabe83b
0973e70
3ba02c2
789a6df
8211648
80e1305
dcfeca9
9b895a3
6357341
f70bdbd
abcae21
8469dc0
0034279
f20e71c
d71bb28
98302bf
d2d0e08
c01d1d6
2e6d448
bfd64b3
bc0eb01
427b3d2
068d3d4
d52b5d2
0a0104f
867d119
077f8d7
c760d08
9b266b0
b25638c
405e92b
4dd861b
0420699
af1d870
2189d45
79a66cd
4537036
9f81ba8
bd4b0b6
3482741
c5732c5
16929ad
a1aee46
e3a47fd
557f528
abef6e4
178bed8
8675a80
30ffbce
80e34a5
a232190
a211884
86bd865
60ca2d0
295a598
9b136f6
a4a6659
a818308
c5f229e
95ee4a4
04f1c1d
329a03a
2b7921c
f4244c9
d96297f
7453587
4fb4215
411adea
6b952cb
616984f
8e5a7ee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
REACT_APP_ANONYMOUS_USER=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | ||
REACT_APP_VERSION=$npm_package_version |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,4 +31,4 @@ mdb* | |
*.log* | ||
|
||
# SPDX-License-Identifier: (EUPL-1.2) | ||
# Copyright © Simon Prast | ||
# Copyright © 2019-2020 Simon Prast |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ | |
"trailingComma": "es5", | ||
"arrowParens": "always", | ||
"tabWidth": 2, | ||
"singleQuote": false, | ||
"singleQuote": false | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<!-- | ||
SPDX-License-Identifier: (EUPL-1.2) | ||
Copyright © 2019-2020 Simon Prast | ||
--> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>SNEK - Social Network</title> | ||
<script type="text/javascript"> | ||
// Single Page Apps for GitHub Pages | ||
// https://github.com/rafrex/spa-github-pages | ||
// Copyright (c) 2016 Rafael Pedicini, licensed under the MIT License | ||
// ---------------------------------------------------------------------- | ||
// This script takes the current url and converts the path and query | ||
// string into just a query string, and then redirects the browser | ||
// to the new url with only a query string and hash fragment, | ||
// e.g. http://www.foo.tld/one/two?a=b&c=d#qwe, becomes | ||
// http://www.foo.tld/?p=/one/two&q=a=b~and~c=d#qwe | ||
// Note: this 404.html file must be at least 512 bytes for it to work | ||
// with Internet Explorer (it is currently > 512 bytes) | ||
|
||
// If you're creating a Project Pages site and NOT using a custom domain, | ||
// then set segmentCount to 1 (enterprise users may need to set it to > 1). | ||
// This way the code will only replace the route part of the path, and not | ||
// the real directory in which the app resides, for example: | ||
// https://username.github.io/repo-name/one/two?a=b&c=d#qwe becomes | ||
// https://username.github.io/repo-name/?p=/one/two&q=a=b~and~c=d#qwe | ||
// Otherwise, leave segmentCount as 0. | ||
var segmentCount = 0; | ||
|
||
var l = window.location; | ||
|
||
l.replace( | ||
l.protocol + | ||
"//" + | ||
l.hostname + | ||
(l.port ? ":" + l.port : "") + | ||
l.pathname | ||
.split("/") | ||
.slice(0, 1 + segmentCount) | ||
.join("/") + | ||
"/?p=/" + | ||
l.pathname | ||
.slice(1) | ||
.split("/") | ||
.slice(segmentCount) | ||
.join("/") | ||
.replace(/&/g, "~and~") + | ||
(l.search ? "&q=" + l.search.slice(1).replace(/&/g, "~and~") : "") + | ||
l.hash | ||
); | ||
</script> | ||
</head> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
snek.at |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<browserconfig><msapplication><tile><square70x70logo src="/ms-icon-70x70.png"/><square150x150logo src="/ms-icon-150x150.png"/><square310x310logo src="/ms-icon-310x310.png"/><TileColor>#ffffff</TileColor></tile></msapplication></browserconfig> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"name": "App", | ||
"icons": [ | ||
{ | ||
"src": "/android-icon-36x36.png", | ||
"sizes": "36x36", | ||
"type": "image/png", | ||
"density": "0.75" | ||
}, | ||
{ | ||
"src": "/android-icon-48x48.png", | ||
"sizes": "48x48", | ||
"type": "image/png", | ||
"density": "1.0" | ||
}, | ||
{ | ||
"src": "/android-icon-72x72.png", | ||
"sizes": "72x72", | ||
"type": "image/png", | ||
"density": "1.5" | ||
}, | ||
{ | ||
"src": "/android-icon-96x96.png", | ||
"sizes": "96x96", | ||
"type": "image/png", | ||
"density": "2.0" | ||
}, | ||
{ | ||
"src": "/android-icon-144x144.png", | ||
"sizes": "144x144", | ||
"type": "image/png", | ||
"density": "3.0" | ||
}, | ||
{ | ||
"src": "/android-icon-192x192.png", | ||
"sizes": "192x192", | ||
"type": "image/png", | ||
"density": "4.0" | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,67 @@ | ||
//#region > Imports | ||
//> React | ||
// Contains all the functionality necessary to define React components | ||
import React from "react"; | ||
import React, { useEffect } from "react"; | ||
// DOM bindings for React Router | ||
import { BrowserRouter as Router } from "react-router-dom"; | ||
import { withRouter } from "react-router-dom"; | ||
//> Redux | ||
// Allows to React components read data from a Redux store, and dispatch actions | ||
// to the store to update data. | ||
import { useDispatch } from "react-redux"; | ||
// Allows to manually display a LoadingBar | ||
import LoadingBarContainer from "react-redux-loading-bar"; | ||
|
||
//> Actions | ||
// Functions to send data from the application to the store | ||
import { loginAction } from "./store/actions/authActions"; | ||
//> Components | ||
/** | ||
* Footer: Global Footer | ||
* Navbar: Global navigation bar | ||
*/ | ||
//import { Footer, Navbar } from "./components/molecules"; | ||
|
||
import { Footer, Navbar } from "./components/molecules"; | ||
// Starts the page on top when reloaded or redirected | ||
import { ScrollToTop } from "./components/atoms"; | ||
//> Routes | ||
import Routes from "./Routes"; | ||
//#endregion | ||
|
||
//#region > Components | ||
class App extends React.Component { | ||
render() { | ||
return ( | ||
<Router> | ||
/** | ||
* @class Root component which loads all other components | ||
pinterid marked this conversation as resolved.
Show resolved
Hide resolved
|
||
*/ | ||
Comment on lines
+26
to
+28
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There should be some kind of index and I think Authentication methods... 49 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Has to be discussed in a meeting, for now I will leave this request open as a reminder. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It sould be discussed, if a folder for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think this is a good way to go. But is this relevant to v0.1.0? @snek-at/frontend There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would certainly appreciate this being part of a very early version to keep building on that solid base, yes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
After merging #63 I will add it. |
||
function App() { | ||
const dispatch = useDispatch(); | ||
|
||
useEffect(() => { | ||
dispatch(loginAction()); | ||
}, []); | ||
|
||
return ( | ||
<> | ||
<header className="loading"> | ||
<LoadingBarContainer className="loading" maxProgress={35} /> | ||
</header> | ||
<ScrollToTop> | ||
<div className="flyout"> | ||
{/* | ||
<Navbar /> | ||
*/} | ||
<main> | ||
<Routes /> | ||
</main> | ||
{/* | ||
<Footer /> | ||
*/} | ||
</div> | ||
</Router> | ||
); | ||
} | ||
</ScrollToTop> | ||
</> | ||
); | ||
} | ||
//#endregion | ||
|
||
//#region > Exports | ||
export default App; | ||
//> Default Component | ||
/** | ||
* Got access to the history object’s properties and the closest | ||
* <Route>'s match. | ||
*/ | ||
export default withRouter(App); | ||
pinterid marked this conversation as resolved.
Show resolved
Hide resolved
|
||
//#endregion | ||
|
||
/** | ||
* SPDX-License-Identifier: (EUPL-1.2) | ||
* Copyright © Simon Prast | ||
* Copyright © 2019-2020 Simon Prast | ||
*/ |
Uh oh!
There was an error while loading. Please reload this page.