mirror of
https://gitlab.com/MrFry/qmining-page
synced 2025-04-01 20:23:44 +02:00
user files rename
This commit is contained in:
parent
ff13eebfe1
commit
9ef2c10af1
5 changed files with 31 additions and 17 deletions
|
@ -115,12 +115,9 @@ export default function Layout({
|
||||||
const userId = globalData.userId
|
const userId = globalData.userId
|
||||||
const userSpecificMotd = globalData.userSpecificMotd
|
const userSpecificMotd = globalData.userSpecificMotd
|
||||||
|
|
||||||
useEffect(
|
useEffect(() => {
|
||||||
() => {
|
setDonateShowing(!!router.query.donate)
|
||||||
setDonateShowing(!!router.query.donate)
|
}, [router.query.donate])
|
||||||
},
|
|
||||||
[router.query.donate]
|
|
||||||
)
|
|
||||||
|
|
||||||
let href = router.route
|
let href = router.route
|
||||||
if (href === '/' || href === '') {
|
if (href === '/' || href === '') {
|
||||||
|
@ -181,9 +178,7 @@ export default function Layout({
|
||||||
border: 'none',
|
border: 'none',
|
||||||
margin: '1px',
|
margin: '1px',
|
||||||
}}
|
}}
|
||||||
src={`${
|
src={`${constants.siteUrl}img/frylabs-logo_small_transparent.png`}
|
||||||
constants.siteUrl
|
|
||||||
}img/frylabs-logo_small_transparent.png`}
|
|
||||||
alt="FryLabs"
|
alt="FryLabs"
|
||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
|
@ -195,6 +190,10 @@ export default function Layout({
|
||||||
<div id="sideBarLinks" className={styles.sidebarLinks}>
|
<div id="sideBarLinks" className={styles.sidebarLinks}>
|
||||||
{Object.keys(tabs).map((key) => {
|
{Object.keys(tabs).map((key) => {
|
||||||
const item = tabs[key]
|
const item = tabs[key]
|
||||||
|
if (item.seperator) {
|
||||||
|
return <hr key={key} />
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Link href={item.href} key={key}>
|
<Link href={item.href} key={key}>
|
||||||
<a
|
<a
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebarLinks > * {
|
.sidebarLinks > a {
|
||||||
display: block;
|
display: block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: black;
|
color: black;
|
||||||
|
|
|
@ -3,6 +3,9 @@
|
||||||
"href": "/",
|
"href": "/",
|
||||||
"text": "Főoldal"
|
"text": "Főoldal"
|
||||||
},
|
},
|
||||||
|
"s1": {
|
||||||
|
"seperator": true
|
||||||
|
},
|
||||||
"script": {
|
"script": {
|
||||||
"href": "/script",
|
"href": "/script",
|
||||||
"text": "Script"
|
"text": "Script"
|
||||||
|
@ -11,10 +14,17 @@
|
||||||
"href": "/allQuestions",
|
"href": "/allQuestions",
|
||||||
"text": "Kérdések és tárgyak"
|
"text": "Kérdések és tárgyak"
|
||||||
},
|
},
|
||||||
"userFiles": {
|
"userfiles": {
|
||||||
"href": "/userFiles",
|
"href": "/userfiles",
|
||||||
"text": "Tanulás segédanyagok"
|
"text": "Tanulás segédanyagok"
|
||||||
},
|
},
|
||||||
|
"s2": {
|
||||||
|
"seperator": true
|
||||||
|
},
|
||||||
|
"pwRequest": {
|
||||||
|
"href": "/pwRequest",
|
||||||
|
"text": "Jelszó generálás"
|
||||||
|
},
|
||||||
"contribute": {
|
"contribute": {
|
||||||
"href": "/contribute",
|
"href": "/contribute",
|
||||||
"text": "Teendők"
|
"text": "Teendők"
|
||||||
|
@ -23,10 +33,6 @@
|
||||||
"href": "/ranklist",
|
"href": "/ranklist",
|
||||||
"text": "Ranklista"
|
"text": "Ranklista"
|
||||||
},
|
},
|
||||||
"pwRequest": {
|
|
||||||
"href": "/pwRequest",
|
|
||||||
"text": "Jelszó generálás"
|
|
||||||
},
|
|
||||||
"faq": {
|
"faq": {
|
||||||
"href": "/faq",
|
"href": "/faq",
|
||||||
"text": "GYIK"
|
"text": "GYIK"
|
||||||
|
@ -34,5 +40,8 @@
|
||||||
"contact": {
|
"contact": {
|
||||||
"href": "/contact",
|
"href": "/contact",
|
||||||
"text": "Kapcsolat"
|
"text": "Kapcsolat"
|
||||||
|
},
|
||||||
|
"s3": {
|
||||||
|
"seperator": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ import LoadingIndicator from '../components/LoadingIndicator'
|
||||||
import Modal from '../components/modal'
|
import Modal from '../components/modal'
|
||||||
import SearchBar from '../components/searchBar'
|
import SearchBar from '../components/searchBar'
|
||||||
|
|
||||||
import styles from './userFiles.module.css'
|
import styles from './userfiles.module.css'
|
||||||
import constants from '../constants.json'
|
import constants from '../constants.json'
|
||||||
|
|
||||||
function listUserDir(subdir) {
|
function listUserDir(subdir) {
|
||||||
|
@ -168,6 +168,12 @@ export default function UserFiles({ router, globalData }) {
|
||||||
|
|
||||||
const currDir = router.query.dir ? decodeURIComponent(router.query.dir) : ''
|
const currDir = router.query.dir ? decodeURIComponent(router.query.dir) : ''
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
router.replace(`${router.asPath.replace('.html', '')}`, undefined, {
|
||||||
|
shallow: true,
|
||||||
|
})
|
||||||
|
}, [])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const dir = router.query.dir ? decodeURIComponent(router.query.dir) : ''
|
const dir = router.query.dir ? decodeURIComponent(router.query.dir) : ''
|
||||||
setDirs(null)
|
setDirs(null)
|
Loading…
Add table
Add a link
Reference in a new issue