Commit graph

2 commits

Author SHA1 Message Date
Philip Molares
e014eb36b5
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>
2020-06-15 21:54:20 +02:00
Erik Michelson
8c4621ec97 Changed API path to v2 instead of v2.0
We discussed whether the minor-version is relevant for the API base-path and came to the conclusion, that it's not really needed as breaking API changes need a new major version anyway.
This commit also removes the trailing slash from the URL which is returned by `getBackendUrl`. This is needed as we composed the API routes in our implementation always with a starting slash thus leading to double slashes.

Example of old behaviour:
getBackendUrl() + '/config'
=> example.com/api/v2.0//config

Example of new behaviuor:
getBackendUrl() + '/config'
=> example.com/api/v2/config
2020-06-07 00:55:46 +02:00
Renamed from public/api/v2.0/config (Browse further)