2958 Commits

Author SHA1 Message Date
Elian Doran
eb1af98830
Merge pull request #880 from pano9000/refactor_data_dir
refactor(data_dir): simplify logic and make code robust and testable
2025-01-14 20:20:32 +02:00
Elian Doran
1807b2b031
chore(types): missing import type for JS imports 2025-01-13 23:18:10 +02:00
Panagiotis Papadopoulos
5373ef509b chore(prettier): fix code style 2025-01-13 08:28:12 +01:00
Panagiotis Papadopoulos
6818b2d54c style: move "important" funcs to top of file 2025-01-13 08:26:07 +01:00
Panagiotis Papadopoulos
c47522eb50 refactor(data_dir): pass DIR_NAME as argument to getTriliumDir
makes it a bit cleaner and easier to test in the future,
as it is one thing less that'd need mocking :-)
2025-01-13 08:26:07 +01:00
Panagiotis Papadopoulos
94b8bcf8c9 refactor(data_dir): export functions to allow for testing 2025-01-13 08:26:07 +01:00
Panagiotis Papadopoulos
8b1071c459 refactor(data_dir): export dirs as frozen readonly object
previously exported object allowed the values to be changed
accidentally at runtime and buildtime
2025-01-13 08:26:07 +01:00
Panagiotis Papadopoulos
759d24855b style(data_dir): fix indentation 2025-01-13 08:26:07 +01:00
Panagiotis Papadopoulos
7a1e8714af refactor(data_dir): logically order/split cases in getTriliumDataDir
- the blocks now clearly follow the intended logic described in the comments
- I renamed the `getAppDataDir` to more specific `getPlatformAppDataDir`
2025-01-13 08:25:53 +01:00
Panagiotis Papadopoulos
3481c8ba84 refactor(data_dir): use path.join for safer joins
https://nodejs.org/api/path.html#pathjoinpaths
2025-01-13 08:24:04 +01:00
Panagiotis Papadopoulos
8826021c63 refactor(data_dir): add createDirIfNotExisting function
removes some code duplication
2025-01-13 08:24:04 +01:00
Panagiotis Papadopoulos
61a19d5628 refactor(data_dir): add FOLDER_PERMISSION const
gets rid of previously "magic number"
2025-01-13 08:24:01 +01:00
Elian Doran
9db9d412d9
feat(import/markdown): preserve language tags when possible 2025-01-11 15:22:36 +02:00
Elian Doran
0e67078256
feat(export/md): rewrite JavaScript code block languages 2025-01-11 14:11:18 +02:00
Elian Doran
05529b84ab
chore(client/ts): port options 2025-01-11 11:45:06 +02:00
Elian Doran
e2628c58c5
chore(test): move spec to source dir 2025-01-10 22:04:04 +02:00
Elian Doran
36387deb0d
chore(test): add test for markdown import 2025-01-10 22:03:08 +02:00
Elian Doran
f026706e25
chore(test): fix typing errors in parser 2025-01-10 21:21:32 +02:00
Elian Doran
180af2ce30
fix(search): limit from UI not applied (closes #920) 2025-01-10 20:10:41 +02:00
Elian Doran
7ea324bc5b
chore(test): fix circular reference in backend tests 2025-01-10 20:09:49 +02:00
Elian Doran
324696bc54
refactor(ts): enable verbatim module syntax 2025-01-09 18:36:24 +02:00
Elian Doran
4cbb529fd4
chore(prettier): fix all files 2025-01-09 18:07:02 +02:00
Elian Doran
fd7b653534
Merge pull request #891 from 0Raptor/develop
Added support for RFC 5870 geo-URIs
2025-01-05 17:08:15 +02:00
Raptor
93af02942a Added support for RFC 5870 geo-URIs 2025-01-05 13:54:19 +01:00
Elian Doran
57ed133c7f
feat(mobile): bring jump to note to mobile 2025-01-04 23:43:15 +02:00
Elian Doran
5250a6d8da
style(mobile): center launcher buttons 2025-01-04 22:49:11 +02:00
Elian Doran
de7248b7ce
feat(mobile): add back/forward buttons to launch bar 2025-01-04 22:43:51 +02:00
Elian Doran
100a80c17d
feat(server): add subtree for mobile launchers 2025-01-04 21:46:22 +02:00
Elian Doran
bf4decb4fb
fix(server): compile errors after refactoring 2025-01-04 11:52:40 +02:00
Elian Doran
80af0899b8
chore(types): font families 2025-01-03 20:08:58 +02:00
Elian Doran
428ffa7826
chore(client/ts): port options_widget 2025-01-03 18:40:52 +02:00
Elian Doran
b6e97c1ae9
refactor(server): typed options 2025-01-03 18:32:09 +02:00
Elian Doran
2590a4cb05
Merge branch 'develop' of ssh://github.com/TriliumNext/Notes into develop 2025-01-03 17:52:30 +02:00
Panagiotis Papadopoulos
6da656cd67 refactor(formatDownloadTitle): simplify function
I've kept the "extension determination process" in a nested function,
that reuses the formatDownloadTitle arguments,
however it could also be refactored into an own util function later,
if it is ever required.

The for loop got replaced by the built functions in `mimeType`
2025-01-03 14:17:30 +01:00
Elian Doran
16aa27b1c6
Merge remote-tracking branch 'origin/develop' into develop 2025-01-03 01:16:57 +02:00
Elian Doran
a9ea3c8b63
refactor(server): typed keyboard action names 2025-01-03 00:59:38 +02:00
Elian Doran
6825fe2e03
Merge pull request #875 from pano9000/refactor_isMac_isWin
refactor(utils): add isMac and isWindows util functions
2025-01-02 20:05:07 +02:00
Panagiotis Papadopoulos
ac77d20aaf refactor: use isMac and isWindows util funcs 2025-01-02 18:47:41 +01:00
Panagiotis Papadopoulos
13235a25b1 refactor(utils): add isMac and isWindows as util func 2025-01-02 18:45:41 +01:00
Panagiotis Papadopoulos
1053da3e40 refactor(sanitizeAttributeNames): use a ternary operator 2025-01-02 18:25:09 +01:00
Panagiotis Papadopoulos
afb91f82e1 refactor(sanitizeAttributeNames): directly export function
no need to wrap the exported function in an object first
2025-01-02 18:25:09 +01:00
Elian Doran
2556d51870
Merge pull request #873 from pano9000/refactor_use_Set
refactor(services): use Set instead of Arrays for faster lookups
2025-01-02 17:50:35 +02:00
Panagiotis Papadopoulos
baea3bdcdd refactor(services): use Set instead of Arrays for faster lookups 2025-01-02 14:59:26 +01:00
Panagiotis Papadopoulos
728037075f refactor(services): use named imports from utils
had rename the imports due to name clashes
2025-01-02 13:48:18 +01:00
Panagiotis Papadopoulos
7fe23c7ac2 refactor(services): use named imports from utils 2025-01-02 13:47:44 +01:00
Panagiotis Papadopoulos
3814621e1c reafctor(services/utils): export functions individually 2025-01-02 13:26:25 +01:00
Panagiotis Papadopoulos
79887d1ce0 refactor(session_secret): use existing randomSecureToken function
this also improves secret security,
as it uses a larger charset size
than the UPPERCASED HEX secret before
2024-12-31 11:22:18 +01:00
Panagiotis Papadopoulos
256853a6f8 i18n: make duplicate notes suffix translatable 2024-12-28 22:41:40 +01:00
Elian Doran
b321d99076
chore(code): fix editorconfig for src/public 2024-12-22 15:42:15 +02:00
Elian Doran
301e4b6ea9
feat(i18n): translate new note title 2024-12-21 21:08:34 +02:00