mirror of
https://gitlab.com/MrFry/qmining-page
synced 2025-04-01 20:23:44 +02:00
refactors, dynamic constants (lol)
This commit is contained in:
parent
755891710a
commit
d4553896af
25 changed files with 323 additions and 312 deletions
16
constants.js
Normal file
16
constants.js
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
const useLocalhost = process && process.env.NODE_ENV === 'development'
|
||||||
|
|
||||||
|
const constants = {
|
||||||
|
siteUrl: !useLocalhost ? 'http://frylabs.net/' : 'http://localhost:8080/',
|
||||||
|
apiUrl: !useLocalhost
|
||||||
|
? 'http://frylabs.net/api/'
|
||||||
|
: 'http://localhost:8080/api/',
|
||||||
|
chatUrl: !useLocalhost ? 'http://frylabs.net/' : 'http://localhost:8080/',
|
||||||
|
mobileWindowWidth: 700,
|
||||||
|
maxQuestionsToRender: 250,
|
||||||
|
imageExts: ['gif', 'png', 'jpeg', 'jpg'],
|
||||||
|
videoExts: ['mp4', 'mkv', 'webm'],
|
||||||
|
}
|
||||||
|
|
||||||
|
export default constants
|
|
@ -2,7 +2,7 @@ import React from 'react'
|
||||||
|
|
||||||
import Questions from './Questions'
|
import Questions from './Questions'
|
||||||
|
|
||||||
import constants from '../constants.json'
|
import constants from '../constants'
|
||||||
|
|
||||||
const countReducer = (acc, subj) => {
|
const countReducer = (acc, subj) => {
|
||||||
return acc + subj.Questions.length
|
return acc + subj.Questions.length
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React, { useState, useEffect } from 'react'
|
import React, { useState, useEffect } from 'react'
|
||||||
|
|
||||||
import constants from '../constants.json'
|
import constants from '../constants'
|
||||||
|
|
||||||
const soundCount = 7
|
const soundCount = 7
|
||||||
function GetRandom(min, max) {
|
function GetRandom(min, max) {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import React, { useState } from 'react'
|
||||||
import Modal from './modal'
|
import Modal from './modal'
|
||||||
|
|
||||||
import styles from './composer.module.css'
|
import styles from './composer.module.css'
|
||||||
import constants from '../constants.json'
|
import constants from '../constants'
|
||||||
|
|
||||||
export default function Composer({ onSubmit, allowFile, fileOnly }) {
|
export default function Composer({ onSubmit, allowFile, fileOnly }) {
|
||||||
const [editorShowing, setEditorShowing] = useState(false)
|
const [editorShowing, setEditorShowing] = useState(false)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { useState, useEffect } from 'react'
|
import React, { useState, useEffect } from 'react'
|
||||||
|
|
||||||
import Modal from './modal'
|
import Modal from './modal'
|
||||||
import constants from '../constants.json'
|
import constants from '../constants'
|
||||||
|
|
||||||
import styles from './dbSelector.module.css'
|
import styles from './dbSelector.module.css'
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { useState } from 'react'
|
import React, { useState } from 'react'
|
||||||
|
|
||||||
import styles from './feedbackArea.module.css'
|
import styles from './feedbackArea.module.css'
|
||||||
import constants from '../constants.json'
|
import constants from '../constants'
|
||||||
|
|
||||||
function FileUploader({ onChange }) {
|
function FileUploader({ onChange }) {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -8,7 +8,7 @@ import Header from '../components/header'
|
||||||
import Modal from '../components/modal'
|
import Modal from '../components/modal'
|
||||||
|
|
||||||
import styles from './forum.module.css'
|
import styles from './forum.module.css'
|
||||||
import constants from '../constants.json'
|
import constants from '../constants'
|
||||||
|
|
||||||
const forumPostPerPage = 5
|
const forumPostPerPage = 5
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ const Snowfall = dynamic(() => import('react-snowfall'), { ssr: false })
|
||||||
|
|
||||||
import LogoutIcon from './logoutIcon'
|
import LogoutIcon from './logoutIcon'
|
||||||
import Modal from './modal'
|
import Modal from './modal'
|
||||||
import constants from '../constants.json'
|
import constants from '../constants'
|
||||||
import BB from './b'
|
import BB from './b'
|
||||||
|
|
||||||
import styles from './layout.module.css'
|
import styles from './layout.module.css'
|
||||||
|
@ -67,36 +67,35 @@ function TopBar({
|
||||||
unreads,
|
unreads,
|
||||||
userId,
|
userId,
|
||||||
}) {
|
}) {
|
||||||
return <>
|
return (
|
||||||
|
<>
|
||||||
<MenuIcon setSidebarOpen={setSidebarOpen} sidebarOpen={sidebarOpen} />
|
<MenuIcon setSidebarOpen={setSidebarOpen} sidebarOpen={sidebarOpen} />
|
||||||
<Link href="/">
|
<Link href="/">
|
||||||
|
|
||||||
<img
|
<img
|
||||||
src={`${constants.siteUrl}img/frylabs-logo_small_transparent.png`}
|
src={`${constants.siteUrl}img/frylabs-logo_small_transparent.png`}
|
||||||
alt="FryLabs"
|
alt="FryLabs"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</Link>
|
</Link>
|
||||||
<div className={styles.topBarLinks}>
|
<div className={styles.topBarLinks}>
|
||||||
{Object.keys(topBarLinks).map((key) => {
|
{Object.keys(topBarLinks).map((key) => {
|
||||||
const item = topBarLinks[key]
|
const item = topBarLinks[key]
|
||||||
|
|
||||||
return (
|
return (
|
||||||
(<Link
|
<Link
|
||||||
key={key}
|
key={key}
|
||||||
href={item.href}
|
href={item.href}
|
||||||
onClick={closeSideBar}
|
onClick={closeSideBar}
|
||||||
className={href.includes(key) ? styles.active : undefined}>
|
className={href.includes(key) ? styles.active : undefined}
|
||||||
|
>
|
||||||
{item.text}
|
{item.text}
|
||||||
|
</Link>
|
||||||
</Link>)
|
)
|
||||||
);
|
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
<div className={'seperator'} />
|
<div className={'seperator'} />
|
||||||
<UserStatus onClick={closeSideBar} unreads={unreads} userId={userId} />
|
<UserStatus onClick={closeSideBar} unreads={unreads} userId={userId} />
|
||||||
</>;
|
</>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function SideBar({ sidebarOpen, closeSideBar, href, setDonateShowing }) {
|
function SideBar({ sidebarOpen, closeSideBar, href, setDonateShowing }) {
|
||||||
|
@ -110,17 +109,16 @@ function SideBar({ sidebarOpen, closeSideBar, href, setDonateShowing }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
(<Link
|
<Link
|
||||||
href={item.href}
|
href={item.href}
|
||||||
key={key}
|
key={key}
|
||||||
onClick={closeSideBar}
|
onClick={closeSideBar}
|
||||||
className={href.includes(key) ? styles.active : undefined}
|
className={href.includes(key) ? styles.active : undefined}
|
||||||
id={item.id || undefined}>
|
id={item.id || undefined}
|
||||||
|
>
|
||||||
{item.text}
|
{item.text}
|
||||||
|
</Link>
|
||||||
</Link>)
|
)
|
||||||
);
|
|
||||||
})}
|
})}
|
||||||
<a
|
<a
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
@ -132,7 +130,7 @@ function SideBar({ sidebarOpen, closeSideBar, href, setDonateShowing }) {
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
) : null;
|
) : null
|
||||||
}
|
}
|
||||||
|
|
||||||
function Donate() {
|
function Donate() {
|
||||||
|
@ -187,11 +185,10 @@ function UserStatus({ userId, unreads, onClick }) {
|
||||||
href="/chat"
|
href="/chat"
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
title={`Chat${unreadCount ? ' (' + unreadCount + ' új üzenet)' : ''}`}
|
title={`Chat${unreadCount ? ' (' + unreadCount + ' új üzenet)' : ''}`}
|
||||||
className={styles.unreadNotification}>
|
className={styles.unreadNotification}
|
||||||
|
>
|
||||||
<span>💬</span>
|
<span>💬</span>
|
||||||
{unreadCount ? <div>{unreadCount}</div> : null}
|
{unreadCount ? <div>{unreadCount}</div> : null}
|
||||||
|
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
@ -215,7 +212,7 @@ function UserStatus({ userId, unreads, onClick }) {
|
||||||
<LogoutIcon size={28} />
|
<LogoutIcon size={28} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function MenuIcon({ setSidebarOpen, sidebarOpen }) {
|
function MenuIcon({ setSidebarOpen, sidebarOpen }) {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import ReactButton from './reactButton'
|
||||||
import Comments from './comments'
|
import Comments from './comments'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
|
|
||||||
import constants from '../constants.json'
|
import constants from '../constants'
|
||||||
|
|
||||||
import styles from './newsEntry.module.css'
|
import styles from './newsEntry.module.css'
|
||||||
|
|
||||||
|
@ -95,9 +95,9 @@ export default function NewsEntry({
|
||||||
<Link
|
<Link
|
||||||
href={`/chat?user=${user}`}
|
href={`/chat?user=${user}`}
|
||||||
title={`Chat #${user}-el`}
|
title={`Chat #${user}-el`}
|
||||||
className={'userId'}>
|
className={'userId'}
|
||||||
|
>
|
||||||
User #{user}
|
User #{user}
|
||||||
|
|
||||||
</Link>
|
</Link>
|
||||||
<div className={styles.newsDate} title={dateObj.toLocaleString()}>
|
<div className={styles.newsDate} title={dateObj.toLocaleString()}>
|
||||||
@
|
@
|
||||||
|
@ -145,5 +145,5 @@ export default function NewsEntry({
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import constants from '../constants.json'
|
import constants from '../constants'
|
||||||
|
|
||||||
export default function Sleep() {
|
export default function Sleep() {
|
||||||
const hours = new Date().getHours()
|
const hours = new Date().getHours()
|
||||||
|
|
15
src/constants.js
Normal file
15
src/constants.js
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
const useLocalhost = process && process.env.NODE_ENV === 'development'
|
||||||
|
|
||||||
|
const constants = {
|
||||||
|
siteUrl: !useLocalhost ? 'http://frylabs.net/' : 'http://localhost:8080/',
|
||||||
|
apiUrl: !useLocalhost
|
||||||
|
? 'http://frylabs.net/api/'
|
||||||
|
: 'http://localhost:8080/api/',
|
||||||
|
chatUrl: !useLocalhost ? 'http://frylabs.net/' : 'http://localhost:8080/',
|
||||||
|
mobileWindowWidth: 700,
|
||||||
|
maxQuestionsToRender: 250,
|
||||||
|
imageExts: ['gif', 'png', 'jpeg', 'jpg'],
|
||||||
|
videoExts: ['mp4', 'mkv', 'webm'],
|
||||||
|
}
|
||||||
|
export default constants
|
|
@ -1,8 +0,0 @@
|
||||||
{
|
|
||||||
"siteUrl": "http://localhost:8080/",
|
|
||||||
"apiUrl": "http://localhost:8080/",
|
|
||||||
"mobileWindowWidth": 700,
|
|
||||||
"maxQuestionsToRender": 250,
|
|
||||||
"imageExts": ["gif", "png", "jpeg", "jpg"],
|
|
||||||
"videoExts": ["mp4", "mkv", "webm"]
|
|
||||||
}
|
|
|
@ -5,7 +5,7 @@ import Head from 'next/head'
|
||||||
import Layout from '../components/layout'
|
import Layout from '../components/layout'
|
||||||
|
|
||||||
import '../defaultStyles.css'
|
import '../defaultStyles.css'
|
||||||
import constants from '../constants.json'
|
import constants from '../constants'
|
||||||
|
|
||||||
export const queryClient = new QueryClient({
|
export const queryClient = new QueryClient({
|
||||||
defaultOptions: {
|
defaultOptions: {
|
||||||
|
|
|
@ -10,7 +10,7 @@ import SearchBar from '../components/searchBar'
|
||||||
|
|
||||||
import styles from './allQuestions.module.css'
|
import styles from './allQuestions.module.css'
|
||||||
|
|
||||||
import constants from '../constants.json'
|
import constants from '../constants'
|
||||||
|
|
||||||
const countReducer = (acc, subj) => {
|
const countReducer = (acc, subj) => {
|
||||||
return acc + subj.Questions.length
|
return acc + subj.Questions.length
|
||||||
|
|
|
@ -2,7 +2,7 @@ import React from 'react'
|
||||||
import io from 'socket.io-client'
|
import io from 'socket.io-client'
|
||||||
import linkifyString from 'linkify-string'
|
import linkifyString from 'linkify-string'
|
||||||
|
|
||||||
import constants from '../constants.json'
|
import constants from '../constants'
|
||||||
import LoadingIndicator from '../components/LoadingIndicator'
|
import LoadingIndicator from '../components/LoadingIndicator'
|
||||||
import { queryClient } from '../pages/_app'
|
import { queryClient } from '../pages/_app'
|
||||||
import Header from '../components/header'
|
import Header from '../components/header'
|
||||||
|
@ -202,7 +202,7 @@ export default class Chat extends React.Component {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// https://socket.io/docs/v4/handling-cors/#Configuration
|
// https://socket.io/docs/v4/handling-cors/#Configuration
|
||||||
const socket = io(`${constants.apiUrl}`, {
|
const socket = io(`${constants.chatUrl}`, {
|
||||||
withCredentials: true,
|
withCredentials: true,
|
||||||
extraHeaders: {
|
extraHeaders: {
|
||||||
'qmining-chat': 'qmining-chat',
|
'qmining-chat': 'qmining-chat',
|
||||||
|
|
|
@ -3,7 +3,7 @@ import Link from 'next/link'
|
||||||
|
|
||||||
import Header from '../components/header'
|
import Header from '../components/header'
|
||||||
import FeedbackArea from '../components/feedbackArea'
|
import FeedbackArea from '../components/feedbackArea'
|
||||||
import constants from '../constants.json'
|
import constants from '../constants'
|
||||||
import LoadingIndicator from '../components/LoadingIndicator'
|
import LoadingIndicator from '../components/LoadingIndicator'
|
||||||
|
|
||||||
import styles from './contact.module.css'
|
import styles from './contact.module.css'
|
||||||
|
@ -62,13 +62,10 @@ export default function Contact({ globalState, setGlobalState }) {
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
{contacts ? (
|
{contacts ? (
|
||||||
<>
|
<>
|
||||||
<div>
|
|
||||||
<div className={'subtitle'}>Alternatív módok</div>
|
|
||||||
<div className={styles.text}>
|
<div className={styles.text}>
|
||||||
TODO: remove this Az alábbi módokat is nyugodtan használhatod, a
|
Figyelem! A szerver üzemeltetőjének kontaktját a
|
||||||
nevedet, e-mail címedet, illetve semmilyen egyéb adatot nem adok
|
<Link href="/p2pinfo">{'"P2P infó"'}</Link>
|
||||||
ki harmadik fél számára. (egyedül én fogom látni)
|
részlegen találod!
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.contactsContainer}>
|
<div className={styles.contactsContainer}>
|
||||||
{Object.keys(contacts).map((key) => {
|
{Object.keys(contacts).map((key) => {
|
||||||
|
@ -78,8 +75,7 @@ export default function Contact({ globalState, setGlobalState }) {
|
||||||
<div>{description}</div>
|
<div>{description}</div>
|
||||||
{href ? (
|
{href ? (
|
||||||
<a target="blank" rel="noreferrer" href={href}>
|
<a target="blank" rel="noreferrer" href={href}>
|
||||||
{' '}
|
{value}
|
||||||
{value}{' '}
|
|
||||||
</a>
|
</a>
|
||||||
) : (
|
) : (
|
||||||
<div>{value}</div>
|
<div>{value}</div>
|
||||||
|
|
|
@ -3,7 +3,7 @@ import Link from 'next/link'
|
||||||
|
|
||||||
import Header from '../components/header'
|
import Header from '../components/header'
|
||||||
|
|
||||||
import constants from '../constants.json'
|
import constants from '../constants'
|
||||||
import styles from './faq.module.css'
|
import styles from './faq.module.css'
|
||||||
|
|
||||||
function PasswordSection() {
|
function PasswordSection() {
|
||||||
|
@ -90,11 +90,7 @@ function FAQSection() {
|
||||||
(így nicknevek sem kellenek), és még IP cím sincs sehol letárolva
|
(így nicknevek sem kellenek), és még IP cím sincs sehol letárolva
|
||||||
szerver oldalon.
|
szerver oldalon.
|
||||||
<br />
|
<br />
|
||||||
Több infó a{' '}
|
Több infó a <Link href="/faq?tab=risk">kockázatok résznél</Link>.
|
||||||
<Link href="/faq?tab=risk">
|
|
||||||
kockázatok résznél
|
|
||||||
</Link>
|
|
||||||
.
|
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<b>Ki és miért csinálja ezt a weboldalt?</b>
|
<b>Ki és miért csinálja ezt a weboldalt?</b>
|
||||||
|
@ -108,11 +104,12 @@ function FAQSection() {
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function RiskSection() {
|
function RiskSection() {
|
||||||
return <>
|
return (
|
||||||
|
<>
|
||||||
Itt {'"én"'} alatt a szerver, weboldal és script egyedüli üzemeltetője
|
Itt {'"én"'} alatt a szerver, weboldal és script egyedüli üzemeltetője
|
||||||
értendő, az egyetlen személy, aki hozzáfér akármilyen szolgáltatással
|
értendő, az egyetlen személy, aki hozzáfér akármilyen szolgáltatással
|
||||||
kapcsolatos adathoz, pl.: szerver statisztikák, szerver operációs
|
kapcsolatos adathoz, pl.: szerver statisztikák, szerver operációs
|
||||||
|
@ -181,11 +178,13 @@ function RiskSection() {
|
||||||
Pl.: ha a script rosszul menti le, vagy rossz kérdésre ad választ
|
Pl.: ha a script rosszul menti le, vagy rossz kérdésre ad választ
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</>;
|
</>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function WebsiteSaveSection() {
|
function WebsiteSaveSection() {
|
||||||
return <>
|
return (
|
||||||
|
<>
|
||||||
<p>
|
<p>
|
||||||
Ha hibát találsz, kérlek jelents. Hogy a hibákat a saját gépemen
|
Ha hibát találsz, 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
|
reprodukálni tudjam, és könnyen ki bírjam javítani, sokszor jól jön, ha
|
||||||
|
@ -216,14 +215,10 @@ function WebsiteSaveSection() {
|
||||||
nevedre, majd (csak a neved, ne a sort) töröld ki, és mentsd el. Nem
|
nevedre, majd (csak a neved, ne a sort) töröld ki, és mentsd el. Nem
|
||||||
szoktam megnézni a neveket, nem is tudok velük mit kezdeni, és nem is
|
szoktam megnézni a neveket, nem is tudok velük mit kezdeni, és nem is
|
||||||
adom ki soha. Amit beküldesz, azt csak én látom.{' '}
|
adom ki soha. Amit beküldesz, azt csak én látom.{' '}
|
||||||
<Link href="/faq?tab=risk">
|
<Link href="/faq?tab=risk">Több infó itt</Link>{' '}
|
||||||
Több infó itt
|
|
||||||
</Link>{' '}
|
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<Link href="/contact">
|
<Link href="/contact">Ide tudod feltölteni</Link>{' '}
|
||||||
Ide tudod feltölteni
|
|
||||||
</Link>{' '}
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>
|
<p>
|
||||||
|
@ -231,7 +226,8 @@ function WebsiteSaveSection() {
|
||||||
hatékonyan tesztelni a scriptet. Ezért hatalmas segítség ha feltöltöd
|
hatékonyan tesztelni a scriptet. Ezért hatalmas segítség ha feltöltöd
|
||||||
azt az oldalt amin hibával találkozol.
|
azt az oldalt amin hibával találkozol.
|
||||||
</p>
|
</p>
|
||||||
</>;
|
</>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function ScriptSection() {
|
function ScriptSection() {
|
||||||
|
@ -240,9 +236,7 @@ function ScriptSection() {
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<b>Hogy kell a scriptet telepíteni, és milyen oldalakon működik? </b>
|
<b>Hogy kell a scriptet telepíteni, és milyen oldalakon működik? </b>
|
||||||
<Link href="/script">
|
<Link href="/script">Ezen az oldalon van leírva</Link>{' '}
|
||||||
Ezen az oldalon van leírva
|
|
||||||
</Link>{' '}
|
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<b>Hogyan működik a script?</b>
|
<b>Hogyan működik a script?</b>
|
||||||
|
@ -258,10 +252,7 @@ function ScriptSection() {
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
Más felhasználóknak köszönhetően már valószínűleg lesznek
|
Más felhasználóknak köszönhetően már valószínűleg lesznek
|
||||||
megoldások a tesztjeidhez.{' '}
|
megoldások a tesztjeidhez. <Link href="/allQuestions">Itt</Link>{' '}
|
||||||
<Link href="/allQuestions">
|
|
||||||
Itt
|
|
||||||
</Link>{' '}
|
|
||||||
meg tudod tekinteni, hogy vannak-e válaszok a tárgyadhoz.
|
meg tudod tekinteni, hogy vannak-e válaszok a tárgyadhoz.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -378,11 +369,12 @@ function ScriptSection() {
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function AddSite() {
|
function AddSite() {
|
||||||
return <>
|
return (
|
||||||
|
<>
|
||||||
Jelenleg az, hogy a script melyik oldalakon fut bele van égetve a script
|
Jelenleg az, hogy a script melyik oldalakon fut bele van égetve a script
|
||||||
forráskódjába. Ez itt látható:{' '}
|
forráskódjába. Ez itt látható:{' '}
|
||||||
<a
|
<a
|
||||||
|
@ -403,9 +395,7 @@ function AddSite() {
|
||||||
Egyetem moodle oldalának hozzáadása a scripthez kézzel:
|
Egyetem moodle oldalának hozzáadása a scripthez kézzel:
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<Link href="/script">
|
<Link href="/script">Először telepítsd a scriptet rendesen</Link>{' '}
|
||||||
Először telepítsd a scriptet rendesen
|
|
||||||
</Link>{' '}
|
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
Böngészőben nyisd meg a Tampermonkey bővítményt <br />
|
Böngészőben nyisd meg a Tampermonkey bővítményt <br />
|
||||||
|
@ -442,13 +432,11 @@ function AddSite() {
|
||||||
Ha a tesztek közben mégsem megy, akkor ellenőrizd, hogy a beírt moodle
|
Ha a tesztek közben mégsem megy, akkor ellenőrizd, hogy a beírt moodle
|
||||||
cím egyezik-e a teszt közbenivel. Ha kell egy kis segítség, kérdésed
|
cím egyezik-e a teszt közbenivel. Ha kell egy kis segítség, kérdésed
|
||||||
van, nem működik valami, vagy éppen működik, de alapból nincs
|
van, nem működik valami, vagy éppen működik, de alapból nincs
|
||||||
hozzáadva:{' '}
|
hozzáadva: <Link href="/contact">írj a kapcsolat oldalon!</Link>
|
||||||
<Link href="/contact">
|
|
||||||
írj a kapcsolat oldalon!
|
|
||||||
</Link>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</>;
|
</>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
const pages = {
|
const pages = {
|
||||||
|
|
|
@ -9,7 +9,7 @@ import Composer from '../components/composer'
|
||||||
import Modal from '../components/modal'
|
import Modal from '../components/modal'
|
||||||
|
|
||||||
import styles from './memes.module.css'
|
import styles from './memes.module.css'
|
||||||
import constants from '../constants.json'
|
import constants from '../constants'
|
||||||
|
|
||||||
const forumPostPerPage = 5
|
const forumPostPerPage = 5
|
||||||
const frontpageForumName = 'memes'
|
const frontpageForumName = 'memes'
|
||||||
|
|
|
@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
|
|
||||||
import Header from '../components/header'
|
import Header from '../components/header'
|
||||||
import constants from '../constants.json'
|
import constants from '../constants'
|
||||||
import LoadingIndicator from '../components/LoadingIndicator'
|
import LoadingIndicator from '../components/LoadingIndicator'
|
||||||
|
|
||||||
import styles from './p2pinfo.module.css'
|
import styles from './p2pinfo.module.css'
|
||||||
|
@ -36,15 +36,15 @@ const infos = [
|
||||||
key: 'questionCount',
|
key: 'questionCount',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: 'Script version',
|
||||||
|
key: 'scriptVersion',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: 'Szerver build time',
|
title: 'Szerver build time',
|
||||||
key: 'serverBuildTime',
|
key: 'serverBuildTime',
|
||||||
type: 'date',
|
type: 'date',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: 'Script version',
|
|
||||||
key: 'scriptVersion',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: 'Weboldal build time',
|
title: 'Weboldal build time',
|
||||||
key: 'qminingPageBuildTime',
|
key: 'qminingPageBuildTime',
|
||||||
|
@ -116,10 +116,17 @@ export default function P2PInfo({ globalState, setGlobalState }) {
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
<Header title={'P2P infó'} />
|
<Header title={'P2P infó'} />
|
||||||
A weboldal peer to peer (p2p) megoldást implementál, így több szerverrel
|
<div style={{ textAlign: 'center' }}>
|
||||||
együtt tud működni, és a más szerveren hozzáadott adatokat időközönként
|
A weboldal peer to peer (p2p) megoldást implementál, folyamatosan
|
||||||
elkéri, és hozzáadja a helyileg tárolt adatokhoz. Vagy valami ilyesmi
|
megosztja az új kérdéseket a lent megadott regisztrált szerverekkel,
|
||||||
TODO: normális duma
|
és hozzáadja a kapott új kérdéseket a helyi adatbázishoz.
|
||||||
|
<p />
|
||||||
|
Ha az egyik szerver kiesne, a script a megadott szerverek közül
|
||||||
|
választ egy újat. A felhasználók is szinkronizálva vannak, így a
|
||||||
|
jelenlegi jelszavaddal bármelyik másik oldalra be tudsz lépni
|
||||||
|
<p />A szervert akár te is hostolhatod, érdeklődj a lentebb megadott
|
||||||
|
kontakton
|
||||||
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
<div className={styles.title}>Szerver P2P információja:</div>
|
<div className={styles.title}>Szerver P2P információja:</div>
|
||||||
<br />
|
<br />
|
||||||
|
@ -166,6 +173,11 @@ export default function P2PInfo({ globalState, setGlobalState }) {
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
|
{p2pInfo.myPeers.length === 0 && (
|
||||||
|
<div className={styles.peerContainer}>
|
||||||
|
Ennél a szervernél jelenleg nincs peer regisztrálva
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,7 +4,7 @@ import Link from 'next/link'
|
||||||
import Header from '../components/header'
|
import Header from '../components/header'
|
||||||
|
|
||||||
import styles from './pwRequest.module.css'
|
import styles from './pwRequest.module.css'
|
||||||
import constants from '../constants.json'
|
import constants from '../constants'
|
||||||
|
|
||||||
function fetchAvailablePWS() {
|
function fetchAvailablePWS() {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
|
@ -107,10 +107,7 @@ export default function PwRequest({ globalData, globalState, setGlobalState }) {
|
||||||
Minden felhasználó egyedi jelszót kap. Ne használjatok többen egy
|
Minden felhasználó egyedi jelszót kap. Ne használjatok többen egy
|
||||||
jelszót, mert egy idő után -biztonsági okokból- kidob a rendszer,
|
jelszót, mert egy idő után -biztonsági okokból- kidob a rendszer,
|
||||||
ha ugyan az a felhasználó több helyen is belépve marad. A
|
ha ugyan az a felhasználó több helyen is belépve marad. A
|
||||||
jelszavakról bővebben a{' '}
|
jelszavakról bővebben a <Link href="/faq?tab=pw">GYIK</Link>{' '}
|
||||||
<Link href="/faq?tab=pw">
|
|
||||||
GYIK
|
|
||||||
</Link>{' '}
|
|
||||||
vonatkozó részében olvashatsz.
|
vonatkozó részében olvashatsz.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -191,5 +188,5 @@ export default function PwRequest({ globalData, globalState, setGlobalState }) {
|
||||||
</div>
|
</div>
|
||||||
</center>
|
</center>
|
||||||
</div>
|
</div>
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ import Header from '../components/header'
|
||||||
import LoadingIndicator from '../components/LoadingIndicator'
|
import LoadingIndicator from '../components/LoadingIndicator'
|
||||||
|
|
||||||
import styles from './ranklist.module.css'
|
import styles from './ranklist.module.css'
|
||||||
import constants from '../constants.json'
|
import constants from '../constants'
|
||||||
|
|
||||||
const selectOptions = {
|
const selectOptions = {
|
||||||
newQuestions: { name: 'Beküldött új kérdések' },
|
newQuestions: { name: 'Beküldött új kérdések' },
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { useQuery } from 'react-query'
|
||||||
import Header from '../components/header'
|
import Header from '../components/header'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
|
|
||||||
import constants from '../constants.json'
|
import constants from '../constants'
|
||||||
import ExternalLinkIcon from '../components/externalLinkIcon'
|
import ExternalLinkIcon from '../components/externalLinkIcon'
|
||||||
|
|
||||||
import styles from './script.module.css'
|
import styles from './script.module.css'
|
||||||
|
@ -102,13 +102,9 @@ export default function Script() {
|
||||||
<li>
|
<li>
|
||||||
Ha be vagy jelentkezve, akkor a teszt oldalakon a megoldásokat
|
Ha be vagy jelentkezve, akkor a teszt oldalakon a megoldásokat
|
||||||
kellene látnod egy felugró ablakban felül. Ha nem, akkor{' '}
|
kellene látnod egy felugró ablakban felül. Ha nem, akkor{' '}
|
||||||
<Link href="/faq">
|
<Link href="/faq">GYIK</Link>
|
||||||
GYIK
|
|
||||||
</Link>
|
|
||||||
-be olvass bele, vagy{' '}
|
-be olvass bele, vagy{' '}
|
||||||
<Link href="/contact">
|
<Link href="/contact">írj üzenetet mi nem működik</Link>
|
||||||
írj üzenetet mi nem működik
|
|
||||||
</Link>
|
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
<b>Példa felugró ablakokra:</b>
|
<b>Példa felugró ablakokra:</b>
|
||||||
|
@ -161,5 +157,5 @@ export default function Script() {
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import styles from './thanks.module.css'
|
import styles from './thanks.module.css'
|
||||||
import constants from '../constants.json'
|
import constants from '../constants'
|
||||||
import Head from 'next/head'
|
import Head from 'next/head'
|
||||||
|
|
||||||
export default function Thanks() {
|
export default function Thanks() {
|
||||||
|
|
|
@ -8,7 +8,7 @@ import UpDownVote from '../components/upDownVote'
|
||||||
import Header from '../components/header'
|
import Header from '../components/header'
|
||||||
|
|
||||||
import styles from './userfiles.module.css'
|
import styles from './userfiles.module.css'
|
||||||
import constants from '../constants.json'
|
import constants from '../constants'
|
||||||
|
|
||||||
function vote(to, item) {
|
function vote(to, item) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
@ -382,7 +382,11 @@ export default function UserFiles({
|
||||||
<div className={`${styles.tableContainer} ${styles.rows}`}>
|
<div className={`${styles.tableContainer} ${styles.rows}`}>
|
||||||
{currDir && (
|
{currDir && (
|
||||||
<div
|
<div
|
||||||
style={{ height: 40, justifyContent: "center", display: "flex" }}
|
style={{
|
||||||
|
height: 40,
|
||||||
|
justifyContent: 'center',
|
||||||
|
display: 'flex',
|
||||||
|
}}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
goBack()
|
goBack()
|
||||||
}}
|
}}
|
||||||
|
@ -482,13 +486,14 @@ export default function UserFiles({
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
}}
|
}}
|
||||||
className={'userId'}>
|
className={'userId'}
|
||||||
|
>
|
||||||
{`#${user}`}
|
{`#${user}`}
|
||||||
</Link>
|
</Link>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
)
|
||||||
})}
|
})}
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
|
@ -513,7 +518,7 @@ export default function UserFiles({
|
||||||
<LoadingIndicator />
|
<LoadingIndicator />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -535,10 +540,8 @@ export default function UserFiles({
|
||||||
vállalás nincs.
|
vállalás nincs.
|
||||||
</b>{' '}
|
</b>{' '}
|
||||||
Ha valami nem idevalót látsz, azt a{' '}
|
Ha valami nem idevalót látsz, azt a{' '}
|
||||||
<Link href="/contact">
|
<Link href="/contact">Kapcsolat</Link> oldalon jelezd kérlek. Tudatos
|
||||||
Kapcsolat
|
károkozásért ban jár.
|
||||||
</Link>{' '}
|
|
||||||
oldalon jelezd kérlek. Tudatos károkozásért ban jár.
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -602,5 +605,5 @@ export default function UserFiles({
|
||||||
</Modal>
|
</Modal>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ import React, { useState, useEffect } from 'react'
|
||||||
import Header from '../components/header'
|
import Header from '../components/header'
|
||||||
|
|
||||||
import styles from './validation.module.css'
|
import styles from './validation.module.css'
|
||||||
import constants from '../constants.json'
|
import constants from '../constants'
|
||||||
|
|
||||||
function fetchValidation() {
|
function fetchValidation() {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
|
@ -37,8 +37,7 @@ export default function Validation() {
|
||||||
<center>
|
<center>
|
||||||
<div className={styles.descrip}>
|
<div className={styles.descrip}>
|
||||||
Különböző okokból kellhet, hogy bizonyítsd hogy az oldalhoz van
|
Különböző okokból kellhet, hogy bizonyítsd hogy az oldalhoz van
|
||||||
hozzáférésed. Ebben az esetben ezzel a tokennel tudod: TODO: normális
|
hozzáférésed. Ebben az esetben ezzel a tokennel tudod:
|
||||||
duma
|
|
||||||
</div>
|
</div>
|
||||||
{token && <div className={styles.tokenContainer}>{token}</div>}
|
{token && <div className={styles.tokenContainer}>{token}</div>}
|
||||||
</center>
|
</center>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue