Commit graph

4686 commits

Author SHA1 Message Date
Renovate Bot
e527763234 Update dependency i18next to v19.8.2 2020-10-10 09:48:36 +02:00
Renovate Bot
8f4b36e189 Update dependency uuid to v8.3.1 2020-10-10 09:47:55 +02:00
Erik Michelson
729ad652b3
Added markdown-file import (#645)
* Added markdown-file import

* Reset file input after read, don't add unnecessary blank lines

* Add cypress-file-upload dependency

* Add cypress tests for md file importing

* Added CHANGELOG entry
2020-10-09 21:26:04 +02:00
Philip Molares
c1d4ac1014
Markmap make mouse input toggle (#655)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-10-09 19:32:06 +02:00
Philip Molares
0670cddb0b
markdown-it-configurator (#626)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Co-authored-by: Erik Michelson <github@erik.michelson.eu>
2020-10-08 22:24:42 +02:00
Erik Michelson
89968387c2
Enforce no warnings during linting (#654) 2020-10-08 21:15:39 +02:00
renovate[bot]
07364ff07b
Update dependency markmap-lib to v0.9.1 (#637)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: mrdrogdrog <mr.drogdrog@gmail.com>
2020-10-07 12:21:03 +02:00
Philip Molares
b094fe1de6
added js as an extra highlighted language (#646) 2020-10-06 14:20:23 +02:00
Philip Molares
9f7a106834
added markdown export (#627) 2020-10-06 12:43:17 +02:00
Philip Molares
4984008aff
fixed help modal width (#644)
after we added tabs in the help modal, the modal doesn't need to be xl anymore as it has way to much empty space that way.
2020-10-06 12:41:47 +02:00
Erik Michelson
9b6fca29e8
Add common download helper (#628)
* Refactor download functions into a common helper function

* Removed unused import
2020-10-03 22:38:46 +02:00
renovate[bot]
c0d05904b2
Update dependency i18next to v19.8.1 (#643)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-10-03 22:27:29 +02:00
Philip Molares
460aef6ffe
added 'gitlab snippet' item to import and export menus (#624) 2020-10-03 20:38:22 +02:00
David Mehren
520046f8d4
Remove NoteUtils class, as the planned parsing logic is not needed anymore
Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-03 17:36:01 +02:00
David Mehren
a04d5b29f9
Add missing TagRepository provider in unit tests
Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-03 17:24:42 +02:00
David Mehren
9152f05c61
Add E2E tests for note metadata routes
Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-03 16:45:04 +02:00
David Mehren
67cd8cb0f6
NotesController: Add PUT :noteIdOrAlias/metadata route
Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-03 15:53:30 +02:00
David Mehren
08fd070bcb
NotesService: Implement updateNoteMetadata
Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-03 15:52:49 +02:00
David Mehren
6541cfda4e
NoteEntity: Enable eager loading and cascades for tags
Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-03 15:37:57 +02:00
David Mehren
99ab9f04c2
NotesService: Get metadata from database
Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-03 11:27:15 +02:00
David Mehren
7d5dddaaaf
Add note metadata properties and Tag entity.
These were planned to be parsed at runtime from the note-content in the database, but having to run a markdown parser in the backend was found to be a bad idea. Now the frontend (that already implements the parsing logic) has to set title, description and tags.

Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-03 11:17:07 +02:00
David Mehren
990742e569
Note.alias should be optional in db schema
Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-03 11:14:41 +02:00
renovate[bot]
4d28ebe21f
Update definitelyTyped (#630)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-10-03 11:04:16 +02:00
renovate[bot]
51612a5286
Update dependency i18next to v19.8.0 (#636)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-10-03 11:03:03 +02:00
David Mehren
566e95f95d
Add note metadata to db schema
Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-03 11:02:03 +02:00
David Mehren
e30b16d91d
Public API: Cleanup history schemas
Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-24 19:39:34 +02:00
David Mehren
d43bca69b8
Public API: NoteRevisionsMetadata is not an array
Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-24 19:39:05 +02:00
David Mehren
2302667787
Public API: Remove PUT /notes/{note}/metadata
The note metadata will be automatically extracted from the note content and cannot be updated separately.

Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-24 19:25:15 +02:00
David Mehren
c685bd8e50
Public API: Fix PUT /notes/{note}/permissions response
This route should return a full `NotePermissions` object instead of only `NotePermissionsUpdate`

Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-03 18:08:31 +02:00
David Mehren
cae430f25f
Public API: Update description of /notes/{note} POST and PUT routes.
Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-03 14:51:22 +02:00
David Mehren
ad676ce6ff
NoteMetadataDto: Rename permission to permissions
Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-03 14:45:04 +02:00
David Mehren
fe5f9bc9c3
Public API: Successful POST requests should result in a 201.
Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-03 14:40:51 +02:00
David Mehren
ee0d85bc85
Public API: Simplify PUT /me/history/{note}
Previously, one had to send a complete `NoteMetadata` object when updating the pinned status of a note. A new `HistoryUpdateObject` type was introduced, that only contains the pinned status boolean.

Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-03 12:49:50 +02:00
David Mehren
2c9ccad8e5
Public API: Split-out a /notes/{note}/permissions route to set only permissions
Previously, the metadata route was used to both update note metadata (like title, description and tags) and the permissions. Additionally, one had to send many unchangeable properties. In this commit, a /notes/{note}/permissions route is introduced, that only changes permissions. Additionally, PUT /notes/{note}/metadata now needs only the properties that are actually changeable.

Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-03 12:46:28 +02:00
David Mehren
713e2ada31
Update NotePermissionsUpdate DTOs to be aware of groups
The NotePermissionsUpdateDto was not updated when group permissions were introduced.

Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-03 12:42:14 +02:00
David Mehren
2980f3a244
Update dependencies
Signed-off-by: David Mehren <git@herrmehren.de>
2020-10-24 23:02:05 +02:00
David Mehren
7563eb703d
Public API: Add routes to get uploads by user or note
Co-authored-by: Yannick Bungers <git@innay.de>
Signed-off-by: David Mehren <git@herrmehren.de>
2020-10-24 21:48:29 +02:00
David Mehren
4f60a79e4b
Use unique sqlite file for every E2E test
Previously, this lead to locking errors, when multiple test runners accessed the same database and tried to clear it or tried to insert new test data.

Signed-off-by: David Mehren <git@herrmehren.de>
2020-10-24 12:30:23 +02:00
David Mehren
ff0651e659
FilesystemBackend: Ensure uploads directory exists
Signed-off-by: David Mehren <git@herrmehren.de>
2020-10-24 12:28:52 +02:00
David Mehren
fff46f0255
Add E2E tests for the /media route
Signed-off-by: David Mehren <git@herrmehren.de>
2020-10-24 11:50:45 +02:00
David Mehren
ac2646a74a
AppModule: Remove unused imports
Signed-off-by: David Mehren <git@herrmehren.de>
2020-10-24 11:49:19 +02:00
David Mehren
2b23dcc5a9
MediaService: Simplify saveFile signature
As the `saveFile` method only really uses the files `Buffer`, this commit changes the signature so it directly gets a `Buffer` instead of a complicated `MulterFile` object. This also simplifies testing.

Signed-off-by: David Mehren <git@herrmehren.de>
2020-10-24 11:49:01 +02:00
David Mehren
53fbe82b6a
UserEntity: Fix column types for create/update dates
Signed-off-by: David Mehren <git@herrmehren.de>
2020-10-24 11:34:49 +02:00
David Mehren
558addf83e
UsersService: Improve logging in getNoteByIdOrAlias
Signed-off-by: David Mehren <git@herrmehren.de>
2020-10-24 11:34:16 +02:00
David Mehren
15db6a9b2a
Use useStaticAssets instead of @nestjs/serve-static
`serve-static` does not work with `createTestingModule` and is not recommended when "just" serving a few images.

See https://github.com/nestjs/serve-static/issues/240

Signed-off-by: David Mehren <git@herrmehren.de>
2020-10-24 11:32:23 +02:00
David Mehren
bd1a6e528e
Public API: Add media deletion
Signed-off-by: David Mehren <git@herrmehren.de>
2020-10-17 21:55:05 +02:00
David Mehren
490e4cac69
MediaController: Add DELETE /{filename} route
Signed-off-by: David Mehren <git@herrmehren.de>
2020-10-17 21:54:44 +02:00
David Mehren
eeb3f6f5a7
MediaService: Implement delete feature
Signed-off-by: David Mehren <git@herrmehren.de>
2020-10-17 21:54:08 +02:00
David Mehren
5262a58639
FilesystemBackend: ESLint fixes
Signed-off-by: David Mehren <git@herrmehren.de>
2020-10-17 21:53:34 +02:00
David Mehren
16dfbdd42d
UsersService: Wait for the DB to find a user
Signed-off-by: David Mehren <git@herrmehren.de>
2020-10-17 21:52:59 +02:00