Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit a8e37b5

Browse files
committed
Merge branch 'develop' into feature/MFA
2 parents 02c4a26 + d84e8c3 commit a8e37b5

File tree

20 files changed

+104
-93
lines changed

20 files changed

+104
-93
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
package-lock.json linguist-generated=true
22
**/package-lock.json linguist-generated=true
33
src/public/app/doc_notes/en/User[[:space:]]Guide/** linguist-generated=true
4+
src/public/app/doc_notes/en/User[[:space:]]Guide/**/*.md eol=lf
45
libraries/** linguist-vendored

docs/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ Trilium has some special support for day notes in the form of [backend Script AP
5757

5858
Day (and year, month) notes are created with a label - e.g. `#dateNote="2018-08-16"` this can then be used by other scripts to add new notes to day note etc.
5959

60-
Journal also has relation `child:child:child:template=Day template` (see \[\[attribute inheritance\]\]) which effectively adds \[\[template\]\] to day notes (grand-grand-grand children of Journal).
60+
Journal also has relation `child:child:child:template=Day template` (see \[\[attribute inheritance\]\]) which effectively adds \[\[template\]\] to day notes (grand-grand-grand children of Journal).

docs/User Guide/User Guide/Basic Concepts/Zen mode.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ Screenshot of the Zen Mode option in the global menu.
1313

1414
The Zen Mode can be activated by accessing the global menu and selecting the “Zen Mode” option:
1515

16-
Aside from the global menu, it's also possible to activate this mode by using a keyboard shortcut which is <kbd>Alt</kbd>+<kbd>Z</kbd> by default. Look for `toggleZenMode` in the shortcut configuration.
16+
Aside from the global menu, it's also possible to activate this mode by using a keyboard shortcut (which is <kbd>F9</kbd> since TriliumNext 0.92.5 and <kbd>Alt</kbd>+<kbd>Z</kbd> for older versions). Look for `toggleZenMode` in the shortcut configuration.
1717

18-
Once Zen Mode is activated, all the UI elements of the application will be hidden away, including the global menu. In that case, the Zen Mode can be deactivated either by pressing the ![](Zen%20mode_image.png)icon in the top-right corner of the window or by pressing the keyboard combination again.
18+
Once Zen Mode is activated, all the UI elements of the application will be hidden away, including the global menu. In that case, the Zen Mode can be deactivated either by pressing the ![](Zen%20mode_image.png) icon in the top-right corner of the window or by pressing the keyboard combination again.
1919

2020
Do note that, by design, activating or deactivating the Zen Mode applies only to the current window. Restarting the application will also disable the Zen Mode.
2121

libraries/ckeditor/ckeditor.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libraries/ckeditor/ckeditor.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 30 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@
125125
"katex": "0.16.21",
126126
"leaflet": "1.9.4",
127127
"leaflet-gpx": "2.1.2",
128-
"mark.js": "8.11.1",
129128
"marked": "15.0.7",
130129
"mermaid": "11.6.0",
131130
"mime-types": "3.0.1",
@@ -149,7 +148,6 @@
149148
"tmp": "0.2.3",
150149
"turndown": "7.2.0",
151150
"unescape": "1.0.1",
152-
"vanilla-js-wheel-zoom": "9.0.4",
153151
"ws": "8.18.1",
154152
"xml2js": "0.6.2",
155153
"yauzl": "3.2.0"
@@ -231,6 +229,7 @@
231229
"jsdoc": "4.0.4",
232230
"knockout": "3.5.1",
233231
"lorem-ipsum": "2.0.8",
232+
"mark.js": "8.11.1",
234233
"mind-elixir": "4.4.3",
235234
"mini-css-extract-plugin": "2.9.2",
236235
"nodemon": "3.1.9",
@@ -241,6 +240,7 @@
241240
"rimraf": "6.0.1",
242241
"sass": "1.86.0",
243242
"sass-loader": "16.0.5",
243+
"script-loader": "0.7.2",
244244
"split.js": "1.6.5",
245245
"supertest": "7.1.0",
246246
"svg-pan-zoom": "3.6.2",
@@ -251,6 +251,7 @@
251251
"typedoc": "0.28.1",
252252
"typescript": "5.8.2",
253253
"typescript-eslint": "8.28.0",
254+
"vanilla-js-wheel-zoom": "9.0.4",
254255
"vitest": "3.0.9",
255256
"webpack": "5.98.0",
256257
"webpack-cli": "6.0.1",

src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Zen mode.html

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/public/app/services/content_renderer.ts

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { loadElkIfNeeded, postprocessMermaidSvg } from "./mermaid.js";
1515
import { normalizeMimeTypeForCKEditor } from "./mime_type_definitions.js";
1616
import renderDoc from "./doc_renderer.js";
1717
import { t } from "i18next";
18-
import type { Mermaid } from "mermaid";
18+
import WheelZoom from 'vanilla-js-wheel-zoom';
1919

2020
let idCounter = 1;
2121

@@ -150,13 +150,19 @@ function renderImage(entity: FNote | FAttachment, $renderedContent: JQuery<HTMLE
150150
$renderedContent.append($img);
151151

152152
if (options.imageHasZoom) {
153-
libraryLoader.requireLibrary(libraryLoader.WHEEL_ZOOM).then(() => {
154-
WZoom.create(`#${$img.attr("id")}`, {
155-
maxScale: 50,
156-
speed: 1.3,
157-
zoomOnClick: false
158-
});
159-
});
153+
const initZoom = async () => {
154+
const element = document.querySelector(`#${$img.attr("id")}`);
155+
if (element) {
156+
WheelZoom.create(`#${$img.attr("id")}`, {
157+
maxScale: 50,
158+
speed: 1.3,
159+
zoomOnClick: false
160+
});
161+
} else {
162+
requestAnimationFrame(initZoom);
163+
}
164+
};
165+
initZoom();
160166
}
161167

162168
imageContextMenuService.setupContextMenu($img);

src/public/app/services/library_loader.ts

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,11 @@ const CODE_MIRROR: Library = {
4242
css: ["node_modules/codemirror/lib/codemirror.css", "node_modules/codemirror/addon/lint/lint.css"]
4343
};
4444

45-
const CALENDAR_WIDGET: Library = {
46-
css: ["stylesheets/calendar.css"]
47-
};
48-
4945
const KATEX: Library = {
5046
js: ["node_modules/katex/dist/katex.min.js", "node_modules/katex/dist/contrib/mhchem.min.js", "node_modules/katex/dist/contrib/auto-render.min.js"],
5147
css: ["node_modules/katex/dist/katex.min.css"]
5248
};
5349

54-
const WHEEL_ZOOM: Library = {
55-
js: ["node_modules/vanilla-js-wheel-zoom/dist/wheel-zoom.min.js"]
56-
};
57-
58-
const MARKJS: Library = {
59-
js: ["node_modules/mark.js/dist/jquery.mark.es6.min.js"]
60-
};
61-
6250
const HIGHLIGHT_JS: Library = {
6351
js: () => {
6452
const mimeTypes = mimeTypesService.getMimeTypes();
@@ -85,10 +73,6 @@ const HIGHLIGHT_JS: Library = {
8573
}
8674
};
8775

88-
const LEAFLET: Library = {
89-
css: ["node_modules/leaflet/dist/leaflet.css"]
90-
};
91-
9276
async function requireLibrary(library: Library) {
9377
if (library.css) {
9478
library.css.map((cssUrl) => requireCss(cssUrl));
@@ -174,10 +158,6 @@ export default {
174158
loadHighlightingTheme,
175159
CKEDITOR,
176160
CODE_MIRROR,
177-
CALENDAR_WIDGET,
178161
KATEX,
179-
WHEEL_ZOOM,
180-
MARKJS,
181-
HIGHLIGHT_JS,
182-
LEAFLET
162+
HIGHLIGHT_JS
183163
};

0 commit comments

Comments
 (0)