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