Commit graph

12 commits

Author SHA1 Message Date
mrdrogdrog
fc2ba5fb07
Replace gravatar image with local image (#433)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-08-19 21:28:53 +02:00
Erik Michelson
dbce0181a4
Add register via username and refactor email-login to username-login (#313)
* Added config option to enable/disable the email signup

* Added register API call

* Added register button and error handling

* Show register button only if enabled in config

* Renamed login handler, added dir-attribute, removed obsolete css class

* Added separate registration page, changed email-login to internal-login

As an username is sufficient for registration, this commit changes the email-login into an username-based login. This login method is now called "internal" in the code.
This commit also introduces a new registration page instead of using the same form as for login.

* Added information texts below form fields

* Added error differentiation

* Added CHANGELOG entry

* Replace "magic string" with Enum representation

* Removed password-field to DOM rewrite

With the value attribute set, the password would be written to the DOM while typing. That's bad practise as attackers could read that password (e.g. with dirty CSS-hacks).

* Fixed backendConfig to config renaming

* Fixed links on register page being external links

* Refactored error handling to use string-enum that corresponds with i18n keys

* Fix chrome warnings regarding autocomplete and duplicated id

* Refactor login action buttons to use callbacks and handle promises directly

* Remove unnecessary async function

* Added promise chaining
2020-08-04 23:13:12 +02:00
Jakob Klepp
fe2f7403aa
Add plantuml support (#327)
* Add plantuml support
* Enable PlantUML rendering only if plantumlServer config is set
* Show warning box when plantuml is enabled but no server is configured
2020-08-04 11:15:23 +02:00
Erik Michelson
c21503848f
Fix me-API-request to use fetch-config and API-path (#381)
* Move mocked me-API-response into API dir

* Update me-API request to use API path and fetch-config
2020-08-03 23:40:04 +02:00
Philip Molares
d0fc96b929
rework how the frontend is started (#361)
renamed frontend-config to api-url
renamed backend-config to config
removed api call to set frontend-config as the frontend either know where the backend is as it is delivered by it or get's this information via the enviroment variable REACT_APP_BACKEND
always start the client on Port 3001 as the backend will run on 3000 during development. changed the port on multiple occasions to accommodate for this
added package.json script 'start:dev'
changed README to better explain how to run backend and frontend side-by-side
2020-07-29 22:58:01 +02:00
Erik Michelson
9c19bb1d9d
Add support for image-proxies by (optional) piping of image urls through the backend (#315)
* Added config property for image proxies

* Added API call and image url replacing

* Added comment explaining why a local function is needed inside the useEffect

* Added CHANGELOG entry

* Changed wording of the CHANGELOG sentence

* Changed CHANGELOG entry

Co-Authored-By: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Removed fallback to original src

* Removed unnecessary API call for empty src URLs

* Simplify image url fetching

* Refactored imageframe to avoid rerendering of images

Co-Authored-By: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Renamed config property to useImageProxy

Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-07-29 22:28:32 +02:00
Philip Molares
f0fe7f5ac2
added e2e tests (#298)
- added e2e tests for
  - banner
  - history
  - intro
  - language
  - link
- added e2e workflow
- added cypress badge to README
2020-07-16 11:22:53 +02:00
Philip Molares
b23a73ac51
added branding option (#301)
added branding option via '@ <logo>' or '@ <name>' after the CodiMD logo and text.

This was a user can personalize their CodiMD instance

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Co-authored-by: Erik Michelson <github@erik.michelson.eu>
Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-07-01 23:20:00 +02:00
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
Philip Molares
c679f5524c
added redirector component (#199)
* added redirector component
    * it will redirect every request to /$something that is not handled otherwise (/intro, /login and such) to /n/$something
* added getNote API Call
* added NotFound component
* added LandingLayout around the NotFound component, so users can easily navigate away from the component

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-06-13 00:29:39 +02:00
Philip Molares
7b5b73a289
show local and remote History (#128)
* added history toolbar functionality for local and remote history
2020-06-07 01:09:04 +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