From f650cca6523d8cb5c75437c6762f672ae2eab360 Mon Sep 17 00:00:00 2001
From: Jin <22962980+JYC333@users.noreply.github.com>
Date: Wed, 4 Jun 2025 09:47:05 +0200
Subject: [PATCH 01/21] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20replace=20subs?=
=?UTF-8?q?tr=20with=20substring?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
apps/server/src/services/notes.ts | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/apps/server/src/services/notes.ts b/apps/server/src/services/notes.ts
index f06e07ed8..4c82c0e8c 100644
--- a/apps/server/src/services/notes.ts
+++ b/apps/server/src/services/notes.ts
@@ -76,7 +76,7 @@ function deriveMime(type: string, mime?: string) {
function copyChildAttributes(parentNote: BNote, childNote: BNote) {
for (const attr of parentNote.getAttributes()) {
if (attr.name.startsWith("child:")) {
- const name = attr.name.substr(6);
+ const name = attr.name.substring(6);
const hasAlreadyTemplate = childNote.hasRelation("template");
if (hasAlreadyTemplate && attr.type === "relation" && name === "template") {
@@ -472,7 +472,7 @@ async function downloadImage(noteId: string, imageUrl: string) {
if (imageUrl.toLowerCase().startsWith("file://")) {
imageBuffer = await new Promise((res, rej) => {
- const localFilePath = imageUrl.substr("file://".length);
+ const localFilePath = imageUrl.substring("file://".length);
return fs.readFile(localFilePath, (err, data) => {
if (err) {
@@ -521,14 +521,14 @@ function downloadImages(noteId: string, content: string) {
const inlineImageMatch = /^data:image\/[a-z]+;base64,/.exec(url);
if (inlineImageMatch) {
- const imageBase64 = url.substr(inlineImageMatch[0].length);
+ const imageBase64 = url.substring(inlineImageMatch[0].length);
const imageBuffer = Buffer.from(imageBase64, "base64");
const attachment = imageService.saveImageToAttachment(noteId, imageBuffer, "inline image", true, true);
const encodedTitle = encodeURIComponent(attachment.title);
- content = `${content.substr(0, imageMatch.index)}${title}${content.substr(attachmentMatch.index + attachmentMatch[0].length)}`;
+ content = `${content.substring(0, attachmentMatch.index)}${title}${content.substring(attachmentMatch.index + attachmentMatch[0].length)}`;
}
// removing absolute references to server to keep it working between instances,
From 48ad381a509773e50f4341164d4017feae1c993c Mon Sep 17 00:00:00 2001
From: Jin <22962980+JYC333@users.noreply.github.com>
Date: Wed, 4 Jun 2025 10:33:40 +0200
Subject: [PATCH 02/21] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20Add=20typing?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
apps/server/src/services/date_notes.ts | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/apps/server/src/services/date_notes.ts b/apps/server/src/services/date_notes.ts
index 764c33700..afec6c882 100644
--- a/apps/server/src/services/date_notes.ts
+++ b/apps/server/src/services/date_notes.ts
@@ -266,7 +266,7 @@ function getMonthNote(dateStr: string, _rootNote: BNote | null = null): BNote {
return monthNote;
}
- let monthParentNote;
+ let monthParentNote: BNote | null;
if (rootNote.hasLabel("enableQuarterNote")) {
monthParentNote = getQuarterNote(getQuarterNumberStr(dayjs(dateStr)), rootNote);
@@ -296,7 +296,7 @@ function getMonthNote(dateStr: string, _rootNote: BNote | null = null): BNote {
function getWeekStartDate(date: Dayjs): Dayjs {
const day = date.day();
- let diff;
+ let diff: number;
if (optionService.getOption("firstDayOfWeek") === "0") { // Sunday
diff = date.date() - day + (day === 0 ? -6 : 1); // adjust when day is sunday
@@ -456,7 +456,7 @@ function getDayNote(dateStr: string, _rootNote: BNote | null = null): BNote {
return dateNote;
}
- let dateParentNote;
+ let dateParentNote: BNote | null;
if (rootNote.hasLabel("enableWeekNote")) {
dateParentNote = getWeekNote(getWeekNumberStr(dayjs(dateStr)), rootNote);
From deacd7f3405cc30cdf1ec1de689c3fa44892c14e Mon Sep 17 00:00:00 2001
From: Jin <22962980+JYC333@users.noreply.github.com>
Date: Wed, 4 Jun 2025 10:52:19 +0200
Subject: [PATCH 03/21] =?UTF-8?q?docs:=20=E2=9C=8F=EF=B8=8F=20Update=20day?=
=?UTF-8?q?=20note=20docs?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Advanced Showcases/Day Notes.html | 12 +++
.../Keyboard Shortcuts.html | 2 +-
.../User Guide/Note Types/Geo Map.html | 11 ++-
.../Note Types/Text/Keyboard shortcuts.html | 11 ++-
docs/User Guide/!!!meta.json | 79 ++++++++++---------
.../Advanced Showcases/Day Notes.md | 9 +++
.../Note Types/Text/Keyboard shortcuts.md | 2 +-
7 files changed, 80 insertions(+), 46 deletions(-)
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.html
index 9b1b80b2b..28c1a2376 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.html
@@ -49,6 +49,18 @@
month or date, it will take a look at the root and attach a corresponding ~template relation
to the newly created role. Using this, you can e.g. create your daily template
with e.g. checkboxes for daily routine etc.
+
Migrate from old template usage
+
If you have been using Journal prior to version v0.93.0, the previous
+ template pattern likely used was ~child:template=.
+ To transition to the new system:
+
+
Set up the new template pattern in the Calendar root note.
+
Use Bulk Actions to
+ remove child:template and child:child:template from
+ all notes under the Journal (calendar root).
+
Ensure that all old template patterns are fully removed to prevent conflicts
+ with the new setup.
+
Naming pattern
You can customize the title of generated journal notes by defining a #datePattern, #weekPattern, #monthPattern, #quarterPattern and #yearPattern attribute
on a root calendar note (identified by #calendarRoot label).
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Keyboard Shortcuts.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Keyboard Shortcuts.html
index ddd6b647d..a9c2d7c65 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Keyboard Shortcuts.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Keyboard Shortcuts.html
@@ -77,7 +77,7 @@
class="reference-link" href="#root/_help_QrtTYPmdd1qq">Markdown-like formatting.
-
Enter in tree pane switches from tree pane into note title.
+
Enter in tree pane switches from tree pane into note title.
Enter from note title switches focus to text editor. Ctrl+. switches
back from editor to tree pane.
Ctrl+. - jump away from the editor to tree pane and
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Geo Map.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Geo Map.html
index 674422cad..b85d13a7c 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Geo Map.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Geo Map.html
@@ -39,6 +39,7 @@
+
Repositioning the map
Click and drag the map in order to move across the map.
@@ -102,12 +103,11 @@
+
How the location of the markers is stored
The location of a marker is stored in the #geolocation attribute
of the child notes:
-
-
-
+
This value can be added manually if needed. The value of the attribute
is made up of the latitude and longitude separated by a comma.
Repositioning markers
@@ -210,6 +210,7 @@
+
Adding from OpenStreetMap
Similarly to the Google Maps approach:
@@ -259,6 +260,7 @@
+
Adding GPS tracks (.gpx)
Trilium has basic support for displaying GPS tracks on the geo map.
-
Grid-like artifacts on the map
+
+
Grid-like artifacts on the map
This occurs if the application is not at 100% zoom which causes the pixels
of the map to not render correctly due to fractional scaling. The only
possible solution is to set the UI zoom at 100% (default keyboard shortcut
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text/Keyboard shortcuts.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text/Keyboard shortcuts.html
index df312d7bf..f26061d1c 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text/Keyboard shortcuts.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text/Keyboard shortcuts.html
@@ -60,7 +60,7 @@