Skip to content

Commit

Permalink
Update info banner (#491)
Browse files Browse the repository at this point in the history
* update info banner

* update snapshots
  • Loading branch information
fsimonjetz authored Jul 15, 2024
1 parent 06cd80b commit 9200ac4
Show file tree
Hide file tree
Showing 12 changed files with 862 additions and 213 deletions.
31 changes: 21 additions & 10 deletions src/InfoBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ import Alert from 'react-bootstrap/Alert'
import './Header.css'
import { Container } from 'react-bootstrap'
import { set as setCookie, get as getCookie } from 'es-cookie'
import ExternalLink from 'common/ExternalLink'

function InfoBanner(): JSX.Element | null {
const initialState = getCookie('eblShowInfoBanner') !== 'false'
const key = 'eblShowUpdateBanner'
const initialState = getCookie(key) !== 'false'
const [show, setShow] = useState(initialState)

const midnight = new Date()
Expand All @@ -14,20 +16,29 @@ function InfoBanner(): JSX.Element | null {
return show ? (
<Container fluid className="Header__info-banner">
<Alert
variant="warning"
variant="primary"
onClose={() => {
setShow(false)
setCookie('eblShowInfoBanner', 'false', { expires: midnight })
setCookie(key, 'false', { expires: midnight })
}}
dismissible
>
<strong>Scheduled Maintenance Notice:</strong> On{' '}
<strong>Monday, July 15, 2024, from 10:00 AM to 12:00 PM CEST</strong>,
the eBL servers will be undergoing scheduled maintenance. During this
time, you will not be able to log in or make any changes to records. The
maintenance may also cause temporary service interruptions. Registered
users will receive an email notification once the maintenance is
complete.
<strong>Update:</strong> On Monday, July 15, the eBL servers were
successfully migrated to new infrastructure. From now on, eBL can be
accessed either from{' '}
<ExternalLink href="https://www.ebl.lmu.de">
https://www.ebl.lmu.de
</ExternalLink>{' '}
or{' '}
<ExternalLink href="https://www.ebl.badw.de">
https://www.ebl.badw.de
</ExternalLink>
. Please note that it will not be possible to login at www.ebl.lmu.de
until July 16, but you can already access eBL via the new url at
<ExternalLink href="https://www.ebl.badw.de">
https://www.ebl.badw.de
</ExternalLink>
.
</Alert>
</Container>
) : null
Expand Down
36 changes: 29 additions & 7 deletions src/about/ui/__snapshots__/about.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ exports[`Snapshot 1`] = `
class="Header__info-banner container-fluid"
>
<div
class="fade alert alert-warning alert-dismissible show"
class="fade alert alert-primary alert-dismissible show"
role="alert"
>
<button
Expand All @@ -31,14 +31,36 @@ exports[`Snapshot 1`] = `
</span>
</button>
<strong>
Scheduled Maintenance Notice:
Update:
</strong>
On
On Monday, July 15, the eBL servers were successfully migrated to new infrastructure. From now on, eBL can be accessed either from
<strong>
Monday, July 15, 2024, from 10:00 AM to 12:00 PM CEST
</strong>
, the eBL servers will be undergoing scheduled maintenance. During this time, you will not be able to log in or make any changes to records. The maintenance may also cause temporary service interruptions. Registered users will receive an email notification once the maintenance is complete.
<a
href="https://www.ebl.lmu.de"
rel="noopener noreferrer"
target="_blank"
>
https://www.ebl.lmu.de
</a>
or
<a
href="https://www.ebl.badw.de"
rel="noopener noreferrer"
target="_blank"
>
https://www.ebl.badw.de
</a>
. Please note that it will not be possible to login at www.ebl.lmu.de until July 16, but you can already access eBL via the new url at
<a
href="https://www.ebl.badw.de"
rel="noopener noreferrer"
target="_blank"
>
https://www.ebl.badw.de
</a>
.
</div>
</div>
<header
Expand Down
Loading

0 comments on commit 9200ac4

Please sign in to comment.