Commit graph

28 commits

Author SHA1 Message Date
Erik Michelson
0aae1f70d2
Add prettier for codestyle and re-format everything (#1294) 2021-06-06 23:14:00 +02:00
Tilman Vatteroth
2c5a03b3ee
Restructures + New Evironment Variables (#1230)
* Use document base uri for react router

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Rename getAndSetUser to fetchAndSetUser

Getter should be reserved for simple get functions.
Everything that does a bit more logic should use a more meaningful verb.

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Rename getFrontPageContent to fetchFrontPageContent

Getter should be reserved for simple get functions.
Everything that does a bit more logic should use a more meaningful verb.

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Reformat code

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Use PUBLIC_URL env var in index.html

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Introduce new environment variables

For better testing (especially if you have multiple endpoints) this commit introduces
REACT_APP_BACKEND_BASE_URL, REACT_APP_FRONTEND_ASSETS_URL and REACT_APP_CUSTOMIZE_ASSETS_URL

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Remove redundant license information

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Remove redundant license information

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Fix rebase issues

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Remove unused file

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Correct parameter

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Fix run tasks

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Force use of bash

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Fix link to cypress picture

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* revert change

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* fix url

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Remove license info

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Revert rebase issues

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Add missing banner code

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Fix test url

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Useless change to trigger github

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Don't set backend base url because this break the mock mode detection

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

Co-authored-by: Philip Molares <philip.molares@udo.edu>
2021-05-02 22:38:43 +02:00
Philip Molares
9cf7980334
Fix Communication between frontend and backend (#1201)
Co-authored-by: Tilman Vatteroth <git@tilmanvatteroth.de>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-05-01 21:01:42 +00:00
Tilman Vatteroth
d9292e4db0
Merge basic and full markdown renderer (#1040)
The original idea of the basic-markdown-renderer and the full-markdown-renderer was to reduce the complexity. The basic markdown renderer should just render markdown code and the full markdown renderer should implement all the special hedgedoc stuff like the embeddings.
While developing other aspects of the software I noticed, that it makes more sense to split the markdown-renderer by the view and not by the features. E.g.: The slide markdown renderer must translate <hr> into <sections> for the slides and the document markdown renderer must provide precise scroll positions. But both need e.g. the ability to show a youtube video.

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2021-02-17 21:58:21 +00:00
Tilman Vatteroth
e12dc523f8
Adjust editor config (#976)
* Adjust editor config

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Co-authored-by: Erik Michelson <github@erik.michelson.eu>
2021-02-03 22:13:04 +01:00
Tilman Vatteroth
123f959fb3
Move and rename files (2/4) (#987)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2021-02-02 00:03:47 +01:00
Tilman Vatteroth
1b7abf9f27
Reorganize redux and hooks (1/4) (#985)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2021-02-01 22:55:49 +01:00
Tilman Vatteroth
586969f368
Wrap markdown rendering in iframe (#837)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2021-01-24 20:50:51 +01:00
Tilman Vatteroth
3db6bcf892
Improve tests (#944)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2021-01-11 22:22:11 +00:00
Tilman Vatteroth
28600d6508
Change copyright year from 2020 to 2021 (#917)
* Change copyright year from 2020 to 2021

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Change copyright year in jetbrains copyright template

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2021-01-06 21:37:59 +01:00
Tilman Vatteroth
dfc2524bd7
Add test mode (#898)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-12-29 17:13:07 +01:00
Philip Molares
f3bf7cd105
Added reuse information (#782)
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-11-22 21:50:07 +01:00
mrdrogdrog
460badb97b
Update multiple packages (#719)
* Update multiple packages

- @typescript-eslint/eslint-plugin
- @typescript-eslint/parser
- eslint-config-react-app
- eslint-config-standard
- react-scripts

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* fix type

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* deduplicate code

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Disable test because it doesn't work

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* repair service worker

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Lazy load mermaid

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* use show error

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* fix tsconfig in cypress

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* fix import integration test

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-10-25 21:17:59 +01:00
Erik Michelson
9e9108ec9a
Add read-only view (/s/note) (#563)
* Update Link classes to allow tooltips/titles

* Added read-only-view, Move note title extraction into separate file

(cherry picked from commit be23083ca3966f26b1b841d5cf4f21e299c8a55a)
(cherry picked from commit cbc595d3fc336b0a649c396dfae30fa08082384c)

* Optimized look of document-infobar

(cherry picked from commit 0176668b156da3fd7c534161a839ca0e3495119c)

# Conflicts:
#	src/components/editor/document-bar/document-info/document-info-time-line.tsx

* Show help-button only in Editor-variant of AppBar

(cherry picked from commit 3c26e1619c774fe162cb3d8fae9e79ced92c9c3e)

* Update CHANGELOG

(cherry picked from commit d0d29e7d408515cc8f86df45d13fff60d741873e)

* Move motd-banner to top of page

(cherry picked from commit 43a9a274bf5da3fdf640ec905ab38153c81b014b)

* Refactor isInline to size property

(cherry picked from commit cb4ee74b7c97ec9711946f28924e9c890b752ea3)

# Conflicts:
#	src/components/editor/document-bar/document-info/document-info-time-line.tsx

* Add size attribute to user-avatar

(cherry picked from commit 9629b58911b9d4f3aed81ef8c271fbc8e5a15aa4)

* Add mode-enum to app-bar

(cherry picked from commit 08f95be58974468c1e2897b475e5e3235b79c230)

* Split DocumentRenderPane into scrollable- and non-scrollable variant

(cherry picked from commit 44dd27edfd967745c548f7ae1fd2047e812cdc22)

* Removed unnecessary className
2020-10-12 21:58:00 +02:00
mrdrogdrog
101292da92
Feature/lazy load components (#590) 2020-09-26 09:54:17 +02:00
Philip Molares
44637c753e
Add dark mode (#554) 2020-09-13 18:04:02 +02:00
Philip Molares
2d3d587c78
added error boundary (#540)
added error boundary
this prevents any faulty components to completely crash the app and instead shows this page with some help about what to do and where to report bugs.
2020-09-07 20:18:03 +02:00
mrdrogdrog
0fadc09f2b
Restructure repository (#426)
organized repository 

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Co-authored-by: Philip Molares <git@molar.es>
2020-08-16 16:02:26 +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
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
mrdrogdrog
c949b6950e
Sort components (#163)
* Move common components to the `common` directory
* rename style directory
* Move ForkAwesome to common
* Move initializers and restructure application-loader.tsx
2020-06-07 21:29:09 +02:00
Philip Molares
c8e42eebd4
Replace font awesome with fork awesome (#114)
* added fork-awesome-icon
* removed fontAwesome
* changed FontAwesomeIcon to ForkAwesomeIcon

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-05-31 22:21:32 +02:00
Erik Michelson
747d9686fa
User profile page (#102)
* Added mock profile page

* Added translations

* Modularized page, added LoginProvider, started validation

* Re-adding profile route after router refactoring

* Added API calls for password and name change

* Added user deletion modal

* Refactored translations in profile-page to match new locales

* Fixed merge-conflicted locales/de.json

* Removed values for password fields

* Fixed capitalization of LoginProvider

* Fixed codestyle method declarations

* Fix names of methods and started countdown

* Fix countdown

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-05-31 21:56:39 +02:00
Philip Molares
d035ff26a5 moved style folder
added index.scss to index.tsx

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-05-31 13:27:20 +02:00
Philip Molares
e2155e735d
Editor Basics (#43)
Add basic editor
2020-05-29 15:44:45 +02:00
Philip Molares
eba59ae622
better linting (#72)
Improve linting and fix linting errors

Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-05-27 15:43:28 +02:00
mrdrogdrog
a490e1240b
Frontend config and Loader component (#12)
* Add FrontendConfig and Loader

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Merge more setup into the application loader

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Rename config files

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Remove blank line

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Fix url

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Make strings more specific

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Restructure store use

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* split methods and actions

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* extract code

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* remove actions.ts

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* add reason and rename component

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* remove unused call

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Use redux store in api

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* activate email in backend config

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* add new line

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* reduce code

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Make error more specific

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Use expectedResponseCode

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Update src/redux/backend-config/types.ts

Co-authored-by: Philip Molares <git@molar.es>

* Update src/components/application-loader/application-loader.tsx

Co-authored-by: Philip Molares <git@molar.es>

* Update src/components/application-loader/application-loader.tsx

Co-authored-by: Philip Molares <git@molar.es>

* Update src/components/application-loader/application-loader.tsx

Co-authored-by: Philip Molares <git@molar.es>

* Use fragment

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

Co-authored-by: Philip Molares <git@molar.es>
2020-05-15 23:10:12 +02:00
Philip Molares
93ce059577 imported current state of the mockup into the public repo
Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-05-14 15:41:38 +02:00