Commit graph

194 commits

Author SHA1 Message Date
Tilman Vatteroth
cba8d917ed refactor: move apply-dark-mode hook into other directory
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-05-07 21:02:34 +02:00
Tilman Vatteroth
33629b945d fix(frontend): use standalone output only in production build
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-05-05 15:07:42 +02:00
Tilman Vatteroth
a5e12b9ad0 fix(backend): fix extraction body values in permission controllers
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-05-04 14:54:37 +02:00
Tilman Vatteroth
3dea91523d feat(frontend): increase reconnect timeout with every try
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-26 20:27:35 +02:00
Tilman Vatteroth
07dd196bff fix: height of loading screen
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-24 12:00:38 +02:00
Tilman Vatteroth
43a85f54ca feat: use css vars in sidebar
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2023-04-23 22:18:14 +02:00
Erik Michelson
b454e3be03 enhancement(sidebar): move note info modal into sidebar
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2023-04-23 22:18:14 +02:00
Erik Michelson
e3a9f70965 refactor(sidebar): move sidebar entries to the sidebar
Previously, many sidebar items were still in the document-bar structure from the past, where we had an additional document bar.
This commit reorganizes all sidebar entries with their attached modals into the specific-sidebar-entries directory within the sidebar module.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2023-04-23 22:18:14 +02:00
Erik Michelson
7e4f2f8778 enhancement(sidebar): enlarge sidebar width
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2023-04-23 22:18:14 +02:00
Tilman Vatteroth
927193e4b9 fix: sticky position of toc sidebar
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-23 20:46:35 +02:00
Tilman Vatteroth
c71bcb70db fix: render toc button only if toc is available
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-23 20:12:14 +02:00
Avinash
9bf8f57475 enhancement(frontend): inlined buttons
Signed-off-by: Avinash <avinash.kumar.cs92@gmail.com>
2023-04-20 22:20:18 +02:00
SHAN michel
63f7d94b7c feat(revision): only show non-guest users in the revision sidebar
Signed-off-by: SHAN michel <yuplasmas@gmail.com>

Only show non-guest users in the sidebar #2953 + frontend/json modificated

Signed-off-by: SHAN michel <yuplasmas@gmail.com>

Only show non-guest users in the sidebar #2953 + frontend/json modificated

Signed-off-by: SHAN michel <yuplasmas@gmail.com>
2023-04-20 16:00:37 +02:00
Tilman Vatteroth
3face3a3b8 fix: add missing legacy sequence diagram app extension
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-17 22:12:11 +02:00
Tilman Vatteroth
393d408dfe chore: fix typos in docs
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-17 22:12:11 +02:00
Tilman Vatteroth
a95b2d7d7d feat: add priorities for replacers
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-17 22:12:11 +02:00
Tilman Vatteroth
1e4709c087 refactor: organize app extensions
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-16 21:27:45 +02:00
Tilman Vatteroth
8cddc96881 fix: exclude first headline extraction from simple renderer
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-16 21:27:45 +02:00
Tilman Vatteroth
f12cadbbb7 feat: add renderer type to MarkdownRendererExtensionOptions
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-16 21:27:45 +02:00
Tilman Vatteroth
0809e01b2d refactor: rename "optional app extensions" into "all app extensions"
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-16 21:27:45 +02:00
Tilman Vatteroth
c39561f8e2 refactor: extract third party integration extensions into separate array
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-16 21:27:45 +02:00
Tilman Vatteroth
6b3743e6a3 refactor: reorganize props and locations of markdown renderers
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-16 20:29:45 +02:00
Tilman Vatteroth
7abbe79ec9 fix: correct docs
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-16 20:29:45 +02:00
Tilman Vatteroth
d792fd3987 refactor: rename iframe-markdown-renderer to render-page-content
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-16 20:29:45 +02:00
Tilman Vatteroth
6f17b2f554 fix: typo in render page docs
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-16 20:29:45 +02:00
Tilman Vatteroth
29d137afbe fix: send "new lines as breaks" option to the renderer
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-16 20:29:45 +02:00
Tilman Vatteroth
6c55da4e79 refactor: rename "dark mode" iframe message to "additional configuration"
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-16 20:29:45 +02:00
Tilman Vatteroth
1e9e04f829 fix: forced dark mode for iframe
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-16 20:29:45 +02:00
Tilman Vatteroth
419069376a chore: reformat code
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-16 20:29:45 +02:00
Tilman Vatteroth
2e18f7f775 fix: send scroll state if current renderer is ready instead of main renderer
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-16 20:29:45 +02:00
Tilman Vatteroth
86276b0753 refactor: move mockI18n
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-16 20:29:45 +02:00
Tilman Vatteroth
3962cafa5d feat: move title extraction into commons package
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-16 20:05:24 +02:00
Tilman Vatteroth
8de8a50bec feat: move first heading title extraction into an app extension
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-16 20:05:24 +02:00
Tilman Vatteroth
220bb31f0c fix: disconnect message transporter on editor leave
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-16 18:12:12 +02:00
Tilman Vatteroth
e70d1fabc9 fix: missing wait for element in copy-to-clipboard-button.spec.tsx
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-13 18:24:17 +02:00
Tilman Vatteroth
16bf5bb2af fix: missing wait for element in blockquote-extra-tag-markdown-extension.spec.tsx
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-13 18:24:17 +02:00
Tilman Vatteroth
b763413108 fix: invalid DOM element nesting in katex tests
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-13 18:24:17 +02:00
Tilman Vatteroth
eaea86c17d fix: invalid bootstrap icon in bootstrap-icon-markdown-extension.spec.tsx
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-13 18:24:17 +02:00
Tilman Vatteroth
2abc697e6a fix: unsupported tag name in markdown-to-react.spec.tsx
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-13 18:24:17 +02:00
Tilman Vatteroth
8402ef13f3 fix: missing key error in html-to-react.spec.tsx
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-13 18:24:17 +02:00
Tilman Vatteroth
d7108ba522 fix: fix permissions in mocked feature page
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-11 11:25:23 +02:00
Tilman Vatteroth
2bec7027ae fix: fix comma separated value detection in x-forwarded-proto parsing
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-11 08:30:15 +02:00
Tilman Vatteroth
7f20da0510 fix: use callback hook in checkbox editor component to cache function
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-08 19:45:42 +02:00
Tilman Vatteroth
37e1482c46 feat(renderer): Add intermediate class for markdown renderer extensions with event emitter
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-08 18:47:01 +02:00
Tilman Vatteroth
e368203e16 feat: add setting for line wrapping
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-06 22:59:40 +02:00
Philip Molares
2fc89a7de5 feat: don't let read-only users send their cursors or selections
This was done as it may be used to distract or annoy other users either intentionally or unintentionally.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-06 22:54:50 +02:00
Philip Molares
7636480d8a feat(frontend): if user can't write toolbar is being removed
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2023-04-06 22:54:50 +02:00
Philip Molares
c2f41118b6 feat: check permissions in realtime code and frontend
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-06 22:54:50 +02:00
Tilman Vatteroth
24f1b2a361 feat: fetch frontend config in server side rendering
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-06 22:54:32 +02:00
Tilman Vatteroth
312d1adf6f fix: make logger in BaseUrlFromEnvExtractor readonly
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-06 22:54:32 +02:00
Tilman Vatteroth
9771ffcf00 fix: expected origin boundary works now with initial props
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-06 22:54:32 +02:00
Tilman Vatteroth
8977100830 feat: extend api request builder with custom base url
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-06 22:54:32 +02:00
Tilman Vatteroth
bd8a5861e7 feat: log error in note-loading-boundary
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-05 12:02:54 +02:00
Tilman Vatteroth
6786e6d6d3 fix: correct test note in cypress environment
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-05 12:02:54 +02:00
Tilman Vatteroth
c0d4d233da fix: configure luxon
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-04 22:46:37 +02:00
Erik Michelson
bced0c478b enhancement: remove frontend version
As frontend and backend are managed inside a monorepo and distributed together, there is no sense in keeping separate frontend and backend version information.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2023-04-03 20:11:03 +02:00
Erik Michelson
43568f6907 test(errors): add tests for ErrorToI18nKeyMapper
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2023-03-31 16:46:40 +02:00
Erik Michelson
5e1e773859 fix(profile): show correct error messages
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2023-03-31 16:46:40 +02:00
Erik Michelson
a6671772f2 fix(logout): redirect to login page
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2023-03-30 22:19:45 +02:00
Erik Michelson
4e3c1ede0e misc: remove features page buttons
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2023-03-29 21:25:09 +02:00
Tilman Vatteroth
598fc8ee11 feat(realtime): synchronize and show realtime activity state
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-29 01:16:43 +02:00
Tilman Vatteroth
9497726a7c feat(frontend): show indicator in document title for background changes
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-29 01:16:43 +02:00
Erik Michelson
336e621bc4 fix(cursor): cursor text being hidden when at start of line
Addiotionally, the cursor's font was not defined and therefore was styled in the browser's default font

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-29 01:16:09 +02:00
Tilman Vatteroth
972ec8c9c5 feat(realtime): disconnect user on user login status change
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-28 21:05:12 +02:00
Tilman Vatteroth
9b9eafc948 feature: add button to open cheatsheet in a new tab
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-28 20:38:25 +02:00
Erik Michelson
ca9836d691 enhancement(auth): better error message handling
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2023-03-26 15:43:39 +02:00
Philip Molares
8e57188ab5 refactor(common): extract frontmatter code into commons
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-26 14:58:38 +02:00
Philip Molares
8bd7fd1be8 refactor(common): extract frontmatter code into commons
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2023-03-26 14:58:38 +02:00
Tilman Vatteroth
b4f73c0f49 fix: convert realtime connection dialog into alert
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-25 16:41:25 +01:00
Erik Michelson
97389fe0c4 fix: useTranslation hook in react components
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2023-03-25 16:14:03 +01:00
Philip Molares
8d497bcfc5 feat(frontend): show own user in UsersOnlineSidebarMenu
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2023-03-25 15:27:38 +01:00
Erik Michelson
61032cb745 feat(editor): add basic codemirror autocompletion suggestions
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2023-03-25 15:13:24 +01:00
Philip Molares
4956a99ced refactor(frontend/commons): rename .test files to .spec
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2023-03-25 15:02:29 +01:00
Tilman Vatteroth
24b7514e25 feat: submit own style index on realtime user state set
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-25 13:11:40 +01:00
Philip Molares
759c906506 feat(frontend): deactivate delete note button if user is not owner
This button and its functionality only works if the user is the owner, so it doesn't make sense to make it possible to press it otherwise…

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2023-03-25 12:59:58 +01:00
Philip Molares
e7e81cf670 feat(frontend): deactivate permissions buttons if user is not owner
These buttons and their functionality only work if the user is the owner, so it doesn't make sense to make it possible to press them otherwise…

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2023-03-25 12:59:58 +01:00
Philip Molares
09e56a418e feat(frontend): deactivate alias buttons if user is not owner
These buttons and their functionality only work if the user is the owner, so it doesn't make sense to make it possible to press them otherwise…

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2023-03-25 12:59:58 +01:00
Philip Molares
107ec7a522 feat(frontend): add isOwner hook
This hook is used to determine if the current user is the owner of the note

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2023-03-25 12:59:58 +01:00
Erik Michelson
b9f7e12c38 fix(landing-layout): links in the user-dropdown not working
We use a custom component for rendering the link (Dropdown.Item), therefore we need to set both passHref and legacyBehavior

See: https://nextjs.org/docs/api-reference/next/link#if-the-child-is-a-custom-component-that-wraps-an-a-tag
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2023-03-25 11:32:55 +01:00
Tilman Vatteroth
a826677225 refactor: save ydoc state in the database, so it can be restored easier
By storing the ydoc state in the database we can reconnect lost clients easier
and enable offline editing because we continue using the crdt data that has been
used by the client before the connection loss.

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-24 16:03:55 +01:00
Tilman Vatteroth
c1a816be36 fix: prevent splitter panels from being selected when resizing
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-24 14:45:57 +01:00
Tilman Vatteroth
e97a426680 refactor: split avatar component to handle displaynames
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-24 14:06:03 +01:00
Tilman Vatteroth
3a06f84af1 refactor: reimplement realtime-communication
This commit refactors a lot of things that are not easy to separate.
It replaces the binary protocol of y-protocols with json.
It introduces event based message processing.
It implements our own code mirror plugins for synchronisation of content and remote cursors

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-24 14:06:03 +01:00
Tilman Vatteroth
c37cafb635 fix: exclude the link icon from the first heading extraction text
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-20 10:21:17 +01:00
Tilman Vatteroth
f78fd69bf4 fix: replace bootstrap icon html with utf-8 icon
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-19 21:02:19 +01:00
Tilman Vatteroth
083da302af fix: fix missing key in meta og:title
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-19 21:00:54 +01:00
Tilman Vatteroth
24b0070909 fix(cheatsheet): refactor cheatsheet to use app extensions as source
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-16 17:51:21 +01:00
Tilman Vatteroth
9d49401b4d fix(renderer): merge similar renderer types
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-16 17:51:21 +01:00
Tilman Vatteroth
958b23e25a refactor(renderer): convert html/markdown-to-react converters from hooks to components
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-16 08:28:37 +01:00
Tilman Vatteroth
aa6bd2a884 fix: deduplicate different buttons
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-08 21:23:48 +01:00
Tilman Vatteroth
160f0f8297 fix: fixes sizing problems of icon buttons
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-08 21:23:48 +01:00
Tilman Vatteroth
e0a80cf06a fix(frontend): fix loading screen animation
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-08 21:23:48 +01:00
Tilman Vatteroth
70d1df7fb7 fix(frontend): increase visibility of text in click shield
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-08 21:23:48 +01:00
Tilman Vatteroth
11b48edca1 fix(frontend): extract codemirror extension for ref update into hook
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-08 18:30:10 +01:00
Tilman Vatteroth
f8e35e6746 feat(frontend): add size property to wait spinner component
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-08 17:44:39 +01:00
Tilman Vatteroth
a50ac40ae6 feat(editor): extract the spell check codemirror extension into separate hook
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-08 17:43:34 +01:00
Tilman Vatteroth
eb3340d735 fix(frontend): migrate mermaid chart
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-02-26 13:06:47 +01:00
Philip Molares
1c16e25e14 feat(frontend): replace forkawesome with bootstrap icons
These icon replace fork awesome. A linter informs the user about the deprecation.

See https://github.com/hedgedoc/hedgedoc/issues/2929

Co-authored-by: Philip Molares <philip.molares@udo.edu>
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>
2023-02-24 14:31:17 +01:00
Tilman Vatteroth
34b6308cee fix(frontend): replace blockquote extra cypress test with jest test
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-02-22 10:16:24 +01:00
Tilman Vatteroth
eac2a7b23e fix(frontend): use "action" prop in revisions list
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-02-21 11:17:48 +01:00