Commit graph

349 commits

Author SHA1 Message Date
yamashu
8b6bedab39
refactor(test): Replace inline snapshot with file snapshot (#5830) 2024-10-08 21:13:27 +00:00
Erik Michelson
1c73e99b0a enhancement(note-deletion): allow to keep uploads
This adds support for keeping the uploads attached to a note when
deleting the same note. This is done by a simple checkbox that can be
clicked in the DeletionModal.

To do this, some parts of the note deletion had to be refactored,
especially in the case of the history page. Both the note deletion and
history removal methods used the same modal, which isn't applicable now
anymore. Additionally, there was a bug that the modal checked for
ownership in the frontend before allowing the note deletion. However, in
the context of the history page, the ownership couldn't be evaluated
since the backend API didn't include that information. This is now fixed
as well.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2024-09-18 18:37:39 +02:00
Erik Michelson
ebf8e3a759 fix(permissions): show guest avatar when note owner is anonymous
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2024-09-18 18:11:44 +02:00
Erik Michelson
62dfe4df72 fix(avatars): show correct profile picture of users
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2024-09-18 18:11:44 +02:00
Erik Michelson
7195c1bdc0 fix(styles): use correct dark-mode selector in css
The dark-mode selector changed from the class "dark" attached to the
body element to a data-attribute with some react-bootstrap upgrade.
This commit reflects this change in our custom css.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2024-09-18 18:11:02 +02:00
Erik Michelson
157a0fe278 refactor(media): store filenames, use pre-signed s3/azure URLs, UUIDs
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2024-09-12 14:49:17 +02:00
Erik Michelson
7f665fae4b feat(auth): refactor auth, add oidc
Thanks to all HedgeDoc team members for the time discussing,
helping with weird Nest issues, providing feedback
and suggestions!

Co-authored-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2024-09-11 21:29:49 +02:00
Philip Molares
1609f3e01f fix(frontend): first heading will be cleared
If all headings are deleted the note title will be deleted and not be kept to the last value.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2024-09-11 20:46:38 +02:00
Philip Molares
02a5f62d27 fix: frontmatter headline
If one wrote a frontmatter the incomplete ending dashes where interpreted as a headline and therefore the last line in the frontmatter was handled as the first heading of the document.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2024-09-11 20:46:38 +02:00
Philip Molares
48ced674e7 fix: prevent emoji autocomplete
Add an empty entry to the emoji autocompletion which allows us to press enter to continue without any random emojis in the note where we did not intend them.

Fixes #5251

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2024-09-01 18:04:22 +02:00
Philip Molares
4d7621c45f fix: avatar url
With the recent dicebear update we don't need to use the sync method anymore as toDataUri now is sync.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2024-09-01 12:36:23 +02:00
renovate[bot]
cf51c7572a fix: remove explicit typing
Apparently this is not need anymore and the linter does not like it.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2024-08-30 11:58:32 +02:00
Philip Molares
170fea8be0 fix: linting errors
Updates created some new complaints

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2024-08-30 10:07:01 +02:00
Erik Michelson
f9b6f6851b feat(editor): re-add editor mode buttons (edit/both/view)
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2024-08-23 18:13:58 +02:00
Erik Michelson
9cbd78f622 fix(frontend): do not hardcode example.org, do not prebuild motd
The motd.md is user-supplied and should therefore not be prebuild during
the HedgeDoc build process. As that required the presence of the base
URL which is also not available in the build context, it fell back to
our fallback value example.org, thus breaking offline builds.
By removing the example.org domains and disabling the prebuild for the
motd, this seems fixed.

Co-authored-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2024-08-07 21:28:17 +02:00
Erik Michelson
6bb2452705 feat(sidebar): add media browser
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2024-04-18 22:11:49 +02:00
Erik Michelson
8693edbf6a refactor(media): add media redirection endpoint
Previous versions of HedgeDoc suffered from the problem
that changing the media backend required manipulation of
the media links in all created notes. We discussed in
#3704 that it's favourable to have an endpoint that
redirects to the image's original URL. When changing the
media backend, the link stays the same but just the
redirect changes.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2024-04-18 22:11:49 +02:00
Erik Michelson
f7c70ebee1 test(utils): add tests for updateObject util
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2024-04-09 10:55:38 +02:00
Erik Michelson
d840a6f0b1 refactor(redux): migrate to RTK2 store definition
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2024-04-09 10:55:38 +02:00
Erik Michelson
0db5a0856b feat(sidebar): add gitlab snippet and github gist export
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2024-04-04 00:36:48 +02:00
Erik Michelson
5fd8c02637 enhancement(sidebar): remove useless import from clipboard btn
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2024-04-04 00:36:48 +02:00
Erik Michelson
2473075a33 fix(notifications): use translation hook to eval replacements
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2024-04-04 00:36:48 +02:00
Erik Michelson
1f60a7dedf enhancement(notifications): add possibility to show catched error message
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2024-04-04 00:36:48 +02:00
Erik Michelson
4755af4ac5 enhancement(sidebar): hide note deletion button when not being owner
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2024-04-04 00:36:48 +02:00
Erik Michelson
4b8f6da78a enhancement(renderer): custom uri protocols in links except scripts
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2024-04-03 23:45:40 +02:00
Erik Michelson
9d55c5ee53 fix(sidebar): remove double borders from sidebar menus
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2024-04-03 23:44:42 +02:00
Erik Michelson
1fd6e4e1b1 fix(loading-screen): do not show empty errorMessage when being null
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2024-04-03 23:44:42 +02:00
yamashush
c5d8341c45 fix(frontend): improves UI/UX of aliases modal
Signed-off-by: yamashush <38120991+yamashush@users.noreply.github.com>
2024-03-01 18:33:02 +01:00
Erik Michelson
38e2fe24a4 fix(types): fix types for markdown-it-emoji
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2024-02-12 00:46:57 +01:00
Tilman Vatteroth
8388793a77 test: update snapshot of abc-frame
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2024-02-10 18:00:34 +01:00
yamashush
1f2c78831d improve accessibility on permission modal
Signed-off-by: yamashush <38120991+yamashush@users.noreply.github.com>
2024-02-10 16:17:27 +01:00
yamashush
dea13bfa90 delete baseURL args
Signed-off-by: yamashush <38120991+yamashush@users.noreply.github.com>
2024-01-28 17:05:53 +01:00
yamashush
744f96852c refactor: use provider for baseURL
Signed-off-by: yamashush <38120991+yamashush@users.noreply.github.com>
2024-01-28 17:05:53 +01:00
yamashush
8aa913c179 change not to update state object
Signed-off-by: yamashush <38120991+yamashush@users.noreply.github.com>
2024-01-21 15:30:39 +01:00
Tilman Vatteroth
f80dd7f0e7 fix(deps): migrate to next 14
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2024-01-18 19:12:46 +01:00
Tilman Vatteroth
07162b7807 fix(deps): replace flexsearch-ts with orama
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2024-01-18 19:12:46 +01:00
yamashush
cf766fb4a6 set color-thema
Signed-off-by: yamashush <38120991+yamashush@users.noreply.github.com>
2024-01-12 16:54:17 +01:00
David Mehren
e35fa06dc3 fix(deps): update dependency abcjs to v6.2.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: David Mehren <git@herrmehren.de>
2023-12-07 18:49:51 +00:00
Philip Molares
f701f8d05f refactor: remove show-if in favour of conditionals
This prevents a problem where show-if can trigger an error if a value is checked to exist with it.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2023-11-30 21:14:01 +01:00
Philip Molares
20f0a497ce refactor: use reduce generic type instead of type cast
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2023-11-30 21:03:21 +01:00
Erik Michelson
0a64b32024 fix(settings): use correct name instead of hardcoded 'dark-mode'
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2023-11-27 13:54:02 +01:00
Erik Michelson
395305dcb7 feat(settings): add editor settings for indentation
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2023-11-27 13:54:02 +01:00
Erik Michelson
3bc9708871 fix(settings): re-add spellcheck setting
This was included in the old editor preferences dialog,
which got removed altogether with the document-bar.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2023-11-27 13:54:02 +01:00
Philip Molares
d8fdee8f41 fix(pin-button): add loading state
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2023-11-12 21:58:05 +01:00
Philip Molares
217b42d76a fix(newPage): replace show if with inline condition
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2023-11-12 21:57:31 +01:00
Tilman Vatteroth
dfbd45301c fix(frontend): fix motd e2e test
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-10-24 13:49:12 +02:00
Tilman Vatteroth
7037c9f6ca fix(frontend): improve mock api error message for source ip
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-10-24 13:49:12 +02:00
Tilman Vatteroth
e953a5115a fix(frontend): improve expected origin error message
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-10-24 13:49:12 +02:00
Tilman Vatteroth
a0bc8e98d0 feat(motd): read motd in RSC and provide via context
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-10-24 13:49:12 +02:00
Philip Molares
723f3f611c feat(realtime): add disconnect reason
The frontend now doesn't try to reconnect, when the disconnection happened because of a lack of permissions

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2023-10-23 22:39:21 +02:00