Adds an info banner to the app (#190)

* added info-banner component to show the banner.text, we got from the backend config. This banner is shown on top of the landing page (intro, history, login/signup and profile) and also on top of the editor and links to `/n/banner`
* added banner to backendConfig Redux state
* added BannerState to the ApplicationState with that the showing of the banner is globally controlled, the banner text is given to the banner component and the timestamp to acknowledge a banner was read by the user
* the timestamp of a dismissed note is saved in the browsers localStorage to determine in the future if the banner should be shown

Signed-off-by: Philip Molares <philip.molares@udo.edu>
Co-authored-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
Philip Molares 2020-06-15 21:54:20 +02:00 committed by GitHub
parent 75aa8b38af
commit e014eb36b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 144 additions and 15 deletions

View file

@ -13,6 +13,10 @@
"email": true,
"openid": true
},
"banner": {
"text": "This is the test banner text",
"timestamp": "2020-05-22T20:46:08.962Z"
},
"customAuthNames": {
"ldap": "FooBar",
"oauth2": "Olaf2",

View file

@ -0,0 +1,14 @@
{
"id": "ABC123",
"alias": "banner",
"lastChange": {
"userId": "snskxnksnxksnxksnx",
"username": "testy",
"timestamp": 123456789
},
"viewcount": 0,
"createtime": "2020-05-22T20:46:08.962Z",
"content": "This is the test banner text",
"authorship": [],
"preVersionTwoNote": true
}

View file

@ -10,5 +10,5 @@
"createtime": "2020-05-22T20:46:08.962Z",
"content": "test123",
"authorship": [],
"preVersionTwoNote": true
"preVersionTwoNote": false
}