Added repos tab, merged feedback/test sender, added irc link, other improvements

This commit is contained in:
MrFry 2020-03-19 16:32:30 +01:00
parent c1f019956a
commit b8f87452b9
8 changed files with 61 additions and 48 deletions

View file

@ -16,7 +16,6 @@ export default function Layout (props) {
const closeSideBar = () => { const closeSideBar = () => {
if (typeof window !== 'undefined') { if (typeof window !== 'undefined') {
console.log('window.innerWidth', window.innerWidth)
if (window.innerWidth < constants.mobileWindowWidth) { if (window.innerWidth < constants.mobileWindowWidth) {
setSidebarOpen(false) setSidebarOpen(false)
} }
@ -53,9 +52,12 @@ export default function Layout (props) {
</Link> </Link>
) )
})} })}
<a href={constants.serverUrl + 'donate'}> <a href='/donate'>
Donate Donate
</a> </a>
<a href='/irc'>
IRC chat
</a>
</div> </div>
: null} : null}
</div> </div>

View file

@ -1,5 +1,4 @@
{ {
"apiUrl": "http://api.frylabs.net/", "apiUrl": "http://api.frylabs.net/",
"serverUrl": "http://qmining.frylabs.net/",
"mobileWindowWidth": 700 "mobileWindowWidth": 700
} }

View file

@ -11,12 +11,12 @@
"href": "/allQuestions", "href": "/allQuestions",
"text": "All question" "text": "All question"
}, },
"repos": {
"href": "/repos",
"text": "Repos"
},
"feedback": { "feedback": {
"href": "/feedback", "href": "/feedback",
"text": "Feedback" "text": "Feedback"
},
"testSender": {
"href": "/testSender",
"text": "Test Sender"
} }
} }

View file

@ -2,7 +2,7 @@ export default function Custom404 () {
return ( return (
<center> <center>
<h1>404</h1> <h1>404</h1>
<iframe width='660' height='465' src='https://www.youtube-nocookie.com/embed/GOzwOeONBhQ' frameborder='0' allow='accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture' allowfullscreen /> <iframe width='660' height='465' src='https://www.youtube-nocookie.com/embed/GOzwOeONBhQ' frameBorder='0' allow='accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture' allowFullScreen />
</center> </center>
) )
} }

View file

@ -3,7 +3,7 @@ function Error ({ statusCode }) {
return ( return (
<center> <center>
<h1>404</h1> <h1>404</h1>
<iframe width='100%' height='465' src='https://www.youtube-nocookie.com/embed/GOzwOeONBhQ' frameborder='0' allow='accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture' allowfullscreen /> <iframe width='100%' height='465' src='https://www.youtube-nocookie.com/embed/GOzwOeONBhQ' frameBorder='0' allow='accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture' allowFullScreen />
</center> </center>
) )
} }

View file

@ -3,6 +3,29 @@ import constants from '../constants.json'
export default function Feedback (props) { export default function Feedback (props) {
// TODO: textarea style to css // TODO: textarea style to css
// TODO: response to user that msg is sucessfully sent // TODO: response to user that msg is sucessfully sent
const renderTestSender = () => {
return (
<div>
Hibát kiváltó teszt feltöltése
<br />
<form action={constants.apiUrl + 'badtestsender'} encType='multipart/form-data' method='post'>
<input type='file' name='dasfile' />
<input type='submit' value='Upload' />
</form>
<p />
Ha egy kérdésre mindig helytelenül talál választ a userscript (vagy egyéb hibát észlelsz), akkor
azon az oldalon nyomj egy ctrl-s -t. Ez lementi a weboldalt úgy ahogy van egy mappába, és egy
html fájlba. Ezt a kettőt ha berakod egy .zip-be, és ide feltöltöd, akkor ránézek mi lehet a
hiba, és kijavítom. <b> Max 10 MB! </b> Ha több, elég a .html. Bónusz ha mellékelsz egy
readme-t, hogy mit csináljak.
</div>
)
}
const renderFeedback = () => {
return ( return (
<div> <div>
<form action={constants.apiUrl + 'postfeedback'} method='post'> <form action={constants.apiUrl + 'postfeedback'} method='post'>
@ -23,3 +46,14 @@ export default function Feedback (props) {
</div> </div>
) )
} }
return (
<div>
{renderFeedback()}
<p />
<hr />
<p />
{renderTestSender()}
</div>
)
}

View file

@ -94,7 +94,7 @@ export default function Index (props) {
key={key} key={key}
> >
<a <a
href={constants.serverUrl + link.href} href={link.href}
> >
{link.text} {link.text}
</a> </a>

View file

@ -1,22 +0,0 @@
import constants from '../constants.json'
export default function TestSender (props) {
return (
<div>
Hibát kiváltó teszt feltöltése
<br />
<form action={constants.serverUrl + 'badtestsender'} encType='multipart/form-data' method='post'>
<input type='file' name='dasfile' />
<input type='submit' value='Upload' />
</form>
<p />
Ha egy kérdésre mindig helytelenül talál választ a userscript (vagy egyéb hibát észlelsz), akkor
azon az oldalon nyomj egy ctrl-s -t. Ez lementi a weboldalt úgy ahogy van egy mappába, és egy
html fájlba. Ezt a kettőt ha berakod egy .zip-be, és ide feltöltöd, akkor ránézek mi lehet a
hiba, és kijavítom. <b> Max 10 MB! </b> Ha több, elég a .html. Bónusz ha mellékelsz egy
readme-t, hogy mit csináljak.
</div>
)
}