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
|
||||
onClick={() => {
|
||||
if (!userSpecificMotd) {
|
||||
return
|
||||
}
|
||||
setShowMotdModal(true)
|
||||
if (userSpecificMotd && userSpecificMotd.seen) {
|
||||
if (userSpecificMotd.seen) {
|
||||
return
|
||||
}
|
||||
fetch(constants.apiUrl + 'infos', {
|
||||
|
@ -128,7 +131,7 @@ export default function Layout({
|
|||
refetchGlobalData()
|
||||
})
|
||||
}}
|
||||
style={{ cursor: 'pointer' }}
|
||||
style={{ cursor: userSpecificMotd ? 'pointer' : 'default' }}
|
||||
title={
|
||||
userSpecificMotd && !userSpecificMotd.seen
|
||||
? "You've got Mail!"
|
||||
|
@ -145,9 +148,7 @@ export default function Layout({
|
|||
setShowMotdModal(false)
|
||||
}}
|
||||
>
|
||||
<div style={{ textAlign: 'center' }}>
|
||||
Üzenet az oldal készítőjétől:
|
||||
</div>
|
||||
<div style={{ textAlign: 'center' }}>Üzenet admintól:</div>
|
||||
<div>{userSpecificMotd.msg}</div>
|
||||
</Modal>
|
||||
) : null}
|
||||
|
|
|
@ -134,9 +134,7 @@ export default function Index(props) {
|
|||
return (
|
||||
<div>
|
||||
<hr />
|
||||
<div className={styles.subtitle}>
|
||||
Üzenet az oldal készítőjétől (ezt csak te látod):
|
||||
</div>
|
||||
<div className={styles.subtitle}>Üzenet admintól:</div>
|
||||
{userSpecificMotd ? (
|
||||
<div
|
||||
className={styles.motd}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue