Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Commit 9bf7be0

Browse files
Gimleuxqvalentin
andauthored
Feature/fe structure (#20)
* changed favicon & logos * Added Console comments to index.html * Streched ui to 100% * Manage CSS for NavBar, Main & Footer * WIP * Removed code smell * trying to save to world aka restore wrong PR * deleted warning * Fixed missing catch in Health * Deleted outdated Health.tsx * Update README.md * Added Submit Runner * Added classes instead of inline styles to submit runner * Added NavBar * Added Footer * Fixed wrong bootstrap in NavBar * fixed expansion of navbar on mobile * minpr fixes * added link to file * use selfhosted corsanywhere Co-authored-by: qvalentin <[email protected]>
1 parent 624187f commit 9bf7be0

File tree

24 files changed

+315
-181
lines changed

24 files changed

+315
-181
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ Frontend Web Application for FileFighter.
55
![CodeFactor](https://www.codefactor.io/repository/github/filefighter/webapp/badge)
66
![Docker Release](https://img.shields.io/github/v/release/filefighter/webapp?color=dark-green&label=Stable%20Version&logo=docker&style=for-the-badge)
77
![Docker Pulls](https://img.shields.io/docker/pulls/filefighter/frontend?logo=docker&style=for-the-badge)
8-
[![Quality Gate Status](http://filefighter.ddns.net:9000/api/project_badges/measure?project=de.filefighter.frontend&metric=alert_status)](http://filefighter.ddns.net:9000/dashboard?id=de.filefighter.frontend)
8+
[![Code Smells](http://filefighter.ddns.net:9000/api/project_badges/measure?project=de.filefighter.frontend&metric=code_smells)](http://filefighter.ddns.net:9000/dashboard?id=de.filefighter.frontend)
99
[![Lines of Code](http://filefighter.ddns.net:9000/api/project_badges/measure?project=de.filefighter.frontend&metric=ncloc)](http://filefighter.ddns.net:9000/dashboard?id=de.filefighter.frontend)
1010
[![Security Rating](http://filefighter.ddns.net:9000/api/project_badges/measure?project=de.filefighter.frontend&metric=security_rating)](http://filefighter.ddns.net:9000/dashboard?id=de.filefighter.frontend)
1111
[![Bugs](http://filefighter.ddns.net:9000/api/project_badges/measure?project=de.filefighter.frontend&metric=bugs)](http://filefighter.ddns.net:9000/dashboard?id=de.filefighter.frontend)
12-
[![Code Smells](http://filefighter.ddns.net:9000/api/project_badges/measure?project=de.filefighter.frontend&metric=code_smells)](http://filefighter.ddns.net:9000/dashboard?id=de.filefighter.frontend)
1312
[![Duplicated Lines Density](http://filefighter.ddns.net:9000/api/project_badges/measure?project=de.filefighter.frontend&metric=duplicated_lines_density)](http://filefighter.ddns.net:9000/dashboard?id=de.filefighter.frontend)
1413

1514
## Deployment

webapp_frontend/package-lock.json

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

webapp_frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"react-toastify": "^6.1.0",
2828
"redux": "^4.0.5",
2929
"redux-types": "^2.0.3",
30+
"super-tiny-icons": "^0.4.0",
3031
"typescript": "^3.8.3"
3132
},
3233
"scripts": {

webapp_frontend/public/favicon.ico

-984 Bytes
Binary file not shown.

webapp_frontend/public/index.html

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html lang="en">
2+
<html lang="en" class="h-100">
33
<head>
44
<meta charset="utf-8" />
55
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
@@ -24,20 +24,25 @@
2424
work correctly both with client-side routing and a non-root public URL.
2525
Learn how to configure a non-root public URL by running `npm run build`.
2626
-->
27-
<title>React App</title>
27+
<title>FileFighter</title>
2828
</head>
29-
<body>
29+
<body class="h-100">
3030
<noscript>You need to enable JavaScript to run this app.</noscript>
31-
<div id="root"></div>
32-
<!--
33-
This HTML file is a template.
34-
If you open it directly in the browser, you will see an empty page.
35-
36-
You can add webfonts, meta tags, or analytics to this file.
37-
The build step will place the bundled scripts into the <body> tag.
38-
39-
To begin the development, run `npm start` or `yarn start`.
40-
To create a production bundle, use `npm run build` or `yarn build`.
41-
-->
31+
<div id="root" class="d-flex flex-column h-100"></div>
32+
<!--Black Lives Matter!-->
33+
<!--Queer Lives Matter!-->
34+
<!-- ################### -->
35+
<!-- ._____..._..._.........._____..._..........._......._................. -->
36+
<!-- |..___|.(_).|.|...___..|..___|.(_)...____..|.|__...|.|_....___...____. -->
37+
<!-- |.|_....|.|.|.|../._.\.|.|_....|.|../._\`|.|.'_.\..|.__|../._.\.|.'__| -->
38+
<!-- |.._|...|.|.|.|.|..__/.|.._|...|.|.|.(_|.|.|.|.|.|.|.|_..|..__/.|.|... -->
39+
<!-- |_|.....|_|.|_|..\___|.|_|.....|_|..\__,.|.|_|.|_|..\__|..\___|.|_|... -->
40+
<!-- ------------------------------------|___/----------------------------- -->
41+
<!-- FileFighter's documentation & code: https://filefighter.github.io/-->
42+
<!-- ################### -->
43+
<!-- Made with <3 by: -->
44+
<!-- https://github.com/Gimleux -->
45+
<!-- https://github.com/open-schnick -->
46+
<!-- https://github.com/qvalentin -->
4247
</body>
4348
</html>

webapp_frontend/public/logo192.png

-2.47 KB
Loading

webapp_frontend/public/logo512.png

-4.83 KB
Loading
1.56 KB
Loading

webapp_frontend/src/background/constants.tsx renamed to webapp_frontend/src/background/constants.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ const prod: constants = {
1111

1212
const dev: constants = {
1313
url: {
14-
API_URL: 'http://filefighter.ddns.net:1081/http://filefighter.ddns.net:3001',
14+
API_URL: 'http://filefighter.ddns.net:1081/http://filefighter.ddns.net:3001',
15+
// API_URL: 'https://cors-anywhere.herokuapp.com/http://filefighter.ddns.net:3001',
1516
// API_URL: 'http://localhost:8080',
1617
}
1718
};
Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
const internRedirect = (history: any, path: string, event?: { preventDefault: () => void; }): void => {
2-
if (event) event.preventDefault();
3-
if (path) {
4-
const element = document.getElementById(path)
5-
if (element) {
6-
element.scrollIntoView()
7-
}
1+
const scrollToElement = (history: { push: (path:string) => void; }, id: string, event?: { preventDefault: () => void; }): void => {
2+
//Replaces anchor for React
3+
console.log("Scrolled to " + id)
4+
event?.preventDefault();
5+
if (id) {
6+
const element = document.getElementById(id)
7+
element?.scrollIntoView()
88
}
99
};
10-
const externRedirect = (event: { preventDefault: () => void; }, history: any[], path: string): void => {
11-
event.preventDefault();
12-
history.push(path);
10+
const redirect = (history:{ push: (path:string) => void; } , path: string, event?: { preventDefault: () => void; }): void => {
11+
console.log("Redirected to " + path)
12+
event?.preventDefault();
13+
if (path !== window.location.pathname) history.push(path);
1314
};
1415

15-
export {externRedirect, internRedirect}
16+
export {redirect, scrollToElement}

0 commit comments

Comments
 (0)