mirror of
https://gitlab.com/MrFry/qmining-page
synced 2025-04-01 20:23:44 +02:00
User specific motd changes (again)
This commit is contained in:
parent
23dc6197ad
commit
179c1f0079
2 changed files with 7 additions and 8 deletions
|
@ -106,8 +106,11 @@ export default function Layout({
|
||||||
<div className="userStatus">
|
<div className="userStatus">
|
||||||
<div
|
<div
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
if (!userSpecificMotd) {
|
||||||
|
return
|
||||||
|
}
|
||||||
setShowMotdModal(true)
|
setShowMotdModal(true)
|
||||||
if (userSpecificMotd && userSpecificMotd.seen) {
|
if (userSpecificMotd.seen) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
fetch(constants.apiUrl + 'infos', {
|
fetch(constants.apiUrl + 'infos', {
|
||||||
|
@ -128,7 +131,7 @@ export default function Layout({
|
||||||
refetchGlobalData()
|
refetchGlobalData()
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
style={{ cursor: 'pointer' }}
|
style={{ cursor: userSpecificMotd ? 'pointer' : 'default' }}
|
||||||
title={
|
title={
|
||||||
userSpecificMotd && !userSpecificMotd.seen
|
userSpecificMotd && !userSpecificMotd.seen
|
||||||
? "You've got Mail!"
|
? "You've got Mail!"
|
||||||
|
@ -145,9 +148,7 @@ export default function Layout({
|
||||||
setShowMotdModal(false)
|
setShowMotdModal(false)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div style={{ textAlign: 'center' }}>
|
<div style={{ textAlign: 'center' }}>Üzenet admintól:</div>
|
||||||
Üzenet az oldal készítőjétől:
|
|
||||||
</div>
|
|
||||||
<div>{userSpecificMotd.msg}</div>
|
<div>{userSpecificMotd.msg}</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
|
@ -134,9 +134,7 @@ export default function Index(props) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<hr />
|
<hr />
|
||||||
<div className={styles.subtitle}>
|
<div className={styles.subtitle}>Üzenet admintól:</div>
|
||||||
Üzenet az oldal készítőjétől (ezt csak te látod):
|
|
||||||
</div>
|
|
||||||
{userSpecificMotd ? (
|
{userSpecificMotd ? (
|
||||||
<div
|
<div
|
||||||
className={styles.motd}
|
className={styles.motd}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue