Itt vannak hogy hogy lehet kontaktolni
{Object.keys(contactMethods).map((key) => {
diff --git a/src/pages/contact.module.css b/src/pages/contact.module.css
index 2d8434b..d5dc5b9 100644
--- a/src/pages/contact.module.css
+++ b/src/pages/contact.module.css
@@ -23,3 +23,16 @@
.contactsContainer > div > div:nth-child(2) {
flex: 1;
}
+
+.feedback {
+ color: var(--text-color);
+ background-color: var(--background-color);
+ font-size: 14px;
+ width: 100%;
+ box-sizing: border-box;
+ height: 60px;
+}
+
+.inputArea {
+ display: flex;
+}
diff --git a/src/pages/contribute.js b/src/pages/contribute.js
index a20d28e..c04026e 100644
--- a/src/pages/contribute.js
+++ b/src/pages/contribute.js
@@ -1,4 +1,4 @@
-import React, { useState } from 'react'
+import React from 'react'
import Head from 'next/head'
import Sleep from '../components/sleep'
@@ -9,57 +9,6 @@ import styles from './contribute.module.css'
import repos from '../data/repos.json'
export default function contribute() {
- const [newTask, setNewTask] = useState('')
-
- const submitNewTask = async () => {
- if (!newTask) {
- return
- }
-
- fetch(constants.apiUrl + 'postfeedback', {
- method: 'POST',
- credentials: 'include',
- headers: {
- Accept: 'application/json',
- 'Content-Type': 'application/json',
- },
- body: JSON.stringify({
- newTask: newTask,
- from: 'contribute',
- }),
- })
- .then((resp) => {
- return resp.json()
- })
- .then((resp) => {
- if (resp.success) {
- alert('ElkĂĽldve')
- setNewTask('')
- } else {
- alert('Hiba küldés közben')
- }
- })
- .catch((err) => {
- alert('Hiba küldés közben')
- console.error(err)
- })
- }
-
- const renderNewTaskArea = () => {
- return (
-
-
- )
- }
-
return (
@@ -88,7 +37,6 @@ export default function contribute() {
Itt Ărhatsz Ăşj todo-ra ötleteket, vagy jelezhetsz hogy egyikben
segĂtenĂ©l
- {renderNewTaskArea()}
diff --git a/src/pages/contribute.module.css b/src/pages/contribute.module.css
index ca49b87..7b23547 100644
--- a/src/pages/contribute.module.css
+++ b/src/pages/contribute.module.css
@@ -12,28 +12,6 @@
text-align: center;
}
-.feedback {
- color: var(--text-color);
- background-color: var(--background-color);
- font-size: 14px;
- width: 100%;
- box-sizing: border-box;
- height: 60px;
-}
-
-.button {
- background-color: var(--text-color);
- border: none;
- padding: 5px 15px;
- margin: 5px;
- color: white;
- width: 200px;
-}
-
-.inputArea {
- display: flex;
-}
-
.title {
color: var(--text-color);
font-size: 30px;
diff --git a/src/pages/manual.js b/src/pages/faq.js
similarity index 65%
rename from src/pages/manual.js
rename to src/pages/faq.js
index a8ca062..dd973b3 100644
--- a/src/pages/manual.js
+++ b/src/pages/faq.js
@@ -1,116 +1,11 @@
-import React from 'react'
+import React, { useState } from 'react'
import Sleep from '../components/sleep'
import Head from 'next/head'
-export default function Manual() {
- return
{renderMaual()}
-}
-
-function renderMaual() {
+function PasswordSection() {
return (
-
-
-
Manual - Qmining | Frylabs.net
-
-
-
-
Manual
-
-
- Ha az oldalt vagy a scriptet használod: akármikor észrevehetik,
- leállhat a szerver, és rossz lehet az összes válasz!
-
-
- ValĂłszĂnűleg semmi baj nem lesz, de Ă©n szĂłltam. Ha emiatt aggĂłdsz,
- olvasd el a kockázatok részt.
-
-
-
-
-
-
- A userscript használata
-
-
-
-
- Ez a userscript Moodle/Elearnig/KMOOC tesztek megoldása során
- segĂtsĂ©get jelenĂt meg.
-
-
- -
- Tölts le egy userscript futtatĂł kiegĂ©szĂtĹ‘t a böngĂ©szĹ‘dhöz: pl. a{' '}
-
- Tampermonkey
-
- -t.
-
- -
-
- Kattints ide hogy felrakd a scriptet
- {' '}
-
- -
- A script ezt követően udvariasan megkér, hogy hadd beszélgessen a
- szerverrel, mert mással nem tud, ezért ezt engedélyezd neki.
-
- -
- A kitöltendő teszt oldalán a kérdésre a választ kell látnod felül
- egy lebegő ablakban.
-
- -
- Teszt ellenőrzés oldalon a script beküldi a szervernek a helyes
- válaszokat, az lementi az új kérdéseket, amik ezután azonnal
- elérhetők lesznek (neked, és másoknak is)
-
-
- Egyéb fontos tudnivalók:
-
-
-
-

-
-
-
-
-
- Jelszavak
-
-
+ <>
Ha ezt olvasod valszeg már neked is van. Azért lett bevezetve, hogy
@@ -161,9 +56,13 @@ function renderMaual() {
-
- Gyakran Ismételt Kérdések
-
+ >
+ )
+}
+
+function FAQSection() {
+ return (
+ <>
-
@@ -204,12 +103,13 @@ function renderMaual() {
-
-
-
- Kockázatok
-
-
+ >
+ )
+}
+
+function RiskSection() {
+ return (
+ <>
-
Bármikor észrevehetik hogy használod a scriptet
@@ -248,9 +148,13 @@ function renderMaual() {
-
- Weboldal lementése
-
+ >
+ )
+}
+
+function WebsiteSaveSection() {
+ return (
+ <>
Ha hibát észlesz, kérlek jelents. Hogy a hibákat a saját gépemen
reprodukálni tudjam, Ă©s könnyen ki bĂrjam javĂtani, sokszor jĂłl jön, ha
@@ -274,10 +178,13 @@ function renderMaual() {
hatĂ©konyan tesztelni a scriptet. EzĂ©rt hatalmas segĂtsĂ©g ha feltöltöd
azt az oldalt amin hibával találkozol.
-
-
- Script ĂşjratelepĂtĂ©se
-
+ >
+ )
+}
+
+function ScriptReinstallSection() {
+ return (
+ <>
Jelenleg kĂ©t helyrĹ‘l lehet telepĂteni a scriptet: greasyforkrĂłl Ă©s a
weboldalrĂłl. A greasyforkos telepĂtĂ©si lehetĹ‘sĂ©g meg fog szűnni, Ăgy ha
@@ -313,6 +220,55 @@ function renderMaual() {
Ezzel semmi adat nem vész el, régi jelszó ugyanolyan jó marad (csak ne
felejtsd azt el)
+ >
+ )
+}
+
+const pages = {
+ faq: { name: 'GYIK', component: FAQSection },
+ pw: { name: 'Jelszavak', component: PasswordSection },
+ risk: { name: 'Kockázatok', component: RiskSection },
+ websitedl: { name: 'Weboldal letöltése', component: WebsiteSaveSection },
+ reinstall: {
+ name: 'Script ĂşjratelepĂtĂ©se',
+ component: ScriptReinstallSection,
+ },
+}
+
+export default function FAQ() {
+ const [currPage, setCurrPage] = useState(pages.faq)
+
+ const renderCurrPage = (page) => {
+ if (page) {
+ return
+ } else {
+ return null
+ }
+ }
+
+ return (
+
+
+
GYIK - Qmining | Frylabs.net
+
+
+ {Object.keys(pages).map((key) => {
+ const page = pages[key]
+ return (
+
{
+ setCurrPage(page)
+ }}
+ >
+ {page.name}
+
+ )
+ })}
+
+ {renderCurrPage(currPage)}
+
)
diff --git a/src/pages/index.js b/src/pages/index.js
index 8a4e27e..fe4e635 100644
--- a/src/pages/index.js
+++ b/src/pages/index.js
@@ -1,36 +1,15 @@
import React, { useState, useEffect } from 'react'
import fetch from 'unfetch'
import Head from 'next/head'
-import Link from 'next/link'
import LoadingIndicator from '../components/LoadingIndicator'
import Sleep from '../components/sleep'
import NewsEntry from '../components/newsEntry'
import Composer from '../components/composer'
-import DbSelector from '../components/dbSelector.js'
import styles from './index.module.css'
import constants from '../constants.json'
-const links = {
- install: {
- href: '/install',
- text: 'Install',
- },
- manual: {
- href: '/manual',
- text: 'A script használata',
- },
- post: {
- href: '/',
- text: 'BejegyzĂ©s Ărása...',
- },
- dataeditor: {
- href: '/dataeditor',
- text: 'Kérdés szerkesztő',
- },
-}
-
function fetchNews() {
return new Promise((resolve) => {
fetch(`${constants.apiUrl}news.json`, {
@@ -115,7 +94,6 @@ export default function Index({ globalData }) {
const userId = globalData.userId
const motd = globalData.motd
const [news, setNews] = useState(null)
- const [allQrSelector, setAllQrSelector] = useState(null)
// const userSpecificMotd = props.globalData.userSpecificMotd
useEffect(() => {
@@ -299,66 +277,15 @@ export default function Index({ globalData }) {
)
}
- const renderDbSelector = () => {
- if (allQrSelector) {
- return (
-
{
- setAllQrSelector(null)
- }}
- onDbSelect={(selectedDb) => {
- if (allQrSelector === 'txt') {
- if (selectedDb === 'all') {
- window.open(`${constants.apiUrl}allqr.txt`, '_blank')
- } else {
- window.open(
- `${constants.apiUrl}allqr.txt?db=${selectedDb.name}`,
- '_blank'
- )
- }
- } else if (allQrSelector === 'json') {
- window.open(`${constants.apiUrl}${selectedDb.path}`, '_blank')
- }
- }}
- />
- )
- } else {
- return null
- }
- }
-
return (
Qmining | Frylabs.net
-
{renderMotd()}
{/*{userSpecificMotd && renderUserSpecificMotd()} */}
{renderNews()}
- {renderDbSelector()}
)
}
diff --git a/src/pages/index.module.css b/src/pages/index.module.css
index 375fa60..a5a220d 100644
--- a/src/pages/index.module.css
+++ b/src/pages/index.module.css
@@ -1,33 +1,3 @@
-.buttonContainer {
- display: flex;
-}
-
-.button {
- color: white;
- background-color: #313131;
- margin: 0px 4px;
- padding: 15px 4px;
- max-width: 100%;
- text-align: center;
- font-size: 16px;
- cursor: pointer;
- word-wrap: break-word;
- text-decoration: none;
- transition: width 0.5s, height 0.5s, ease-in 0.5s;
- flex: 1;
- display: flex;
- flex-direction: column;
- justify-content: center;
- user-select: none;
-}
-
-.button:hover {
- background-color: #555;
- color: var(--text-color);
- transition: width 0.5s, height 0.5s, ease-out 0.5s;
- text-shadow: 2px 1.5px 8px black;
-}
-
.hr {
width: 100%;
}
diff --git a/src/pages/pwRequest.js b/src/pages/pwRequest.js
index 82b4744..ea59edc 100644
--- a/src/pages/pwRequest.js
+++ b/src/pages/pwRequest.js
@@ -131,10 +131,8 @@ export default function PwRequest(props) {
-
-
- Jelszó kérése
-
+
{result ? (
diff --git a/src/pages/pwRequest.module.css b/src/pages/pwRequest.module.css
index fd2a10a..a443af3 100644
--- a/src/pages/pwRequest.module.css
+++ b/src/pages/pwRequest.module.css
@@ -1,33 +1,3 @@
-.buttonContainer {
- padding: 10px;
- display: flex;
- align-items: center;
- justify-content: center;
-}
-
-.button {
- background-color: #f2cb05;
- border: none;
- color: black;
- padding: 15px 30px;
- font-weight: bold;
- font-size: 15px;
- margin: 8px 2px 2px 2px;
- cursor: pointer;
- text-shadow: 1px 1px 8px black;
- transition: width 0.5s, height 0.5s, ease-in 0.5s;
-}
-
-.button:active {
- transform: translateY(2.5px);
-}
-
-.button:hover {
- text-shadow: 2px 2px 8px black;
- transition: width 0.5s, height 0.5s, ease-out 0.5s;
- background-color: #a38c1a;
-}
-
.text {
text-align: center;
font-size: 18px;
diff --git a/src/pages/script.js b/src/pages/script.js
new file mode 100644
index 0000000..692a140
--- /dev/null
+++ b/src/pages/script.js
@@ -0,0 +1,109 @@
+import React from 'react'
+
+import Sleep from '../components/sleep'
+import Head from 'next/head'
+
+import ExternalLinkIcon from '../components/externalLinkIcon'
+
+export default function Script() {
+ return (
+
+
+
Manual - Qmining | Frylabs.net
+
+
+
+ {renderManual()}
+
+ )
+}
+
+function renderManual() {
+ return (
+ <>
+
+ A userscript használata
+
+
+
+ Ez a userscript Moodle/Elearnig/KMOOC tesztek megoldása során
+ segĂtsĂ©get jelenĂt meg.
+
+
+ -
+ Tölts le egy userscript futtatĂł kiegĂ©szĂtĹ‘t a böngĂ©szĹ‘dhöz: pl. a{' '}
+
+ Tampermonkey
+
+ -t.
+
+ -
+
+ Kattints ide hogy felrakd a scriptet
+ {' '}
+
+ -
+ A script ezt követően udvariasan megkér, hogy hadd beszélgessen a
+ szerverrel, mert mással nem tud, ezért ezt engedélyezd neki.
+
+ -
+ A kitöltendő teszt oldalán a kérdésre a választ kell látnod felül
+ egy lebegő ablakban.
+
+ -
+ Teszt ellenőrzés oldalon a script beküldi a szervernek a helyes
+ válaszokat, az lementi az új kérdéseket, amik ezután azonnal
+ elérhetők lesznek (neked, és másoknak is)
+
+
+ Egyéb fontos tudnivalók:
+
+
+
+

+
+ >
+ )
+}
diff --git a/src/pages/script.module.css b/src/pages/script.module.css
new file mode 100644
index 0000000..e69de29