From 743fee27838c8eff9809fffe2115fd4519ca4f84 Mon Sep 17 00:00:00 2001
From: Elian Doran
Date: Tue, 6 Aug 2024 18:44:19 +0300
Subject: [PATCH 01/48] electron: Fix alt+left, alt+right navigation
Broken due to a change in Electron API:
https://github.com/electron/electron/pull/41577/files
---
src/public/app/components/entrypoints.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/public/app/components/entrypoints.js b/src/public/app/components/entrypoints.js
index 6b281911f..6a375d5af 100644
--- a/src/public/app/components/entrypoints.js
+++ b/src/public/app/components/entrypoints.js
@@ -102,7 +102,7 @@ export default class Entrypoints extends Component {
if (utils.isElectron()) {
// standard JS version does not work completely correctly in electron
const webContents = utils.dynamicRequire('@electron/remote').getCurrentWebContents();
- const activeIndex = parseInt(webContents.getActiveIndex());
+ const activeIndex = parseInt(webContents.navigationHistory.getActiveIndex());
webContents.goToIndex(activeIndex - 1);
}
@@ -115,7 +115,7 @@ export default class Entrypoints extends Component {
if (utils.isElectron()) {
// standard JS version does not work completely correctly in electron
const webContents = utils.dynamicRequire('@electron/remote').getCurrentWebContents();
- const activeIndex = parseInt(webContents.getActiveIndex());
+ const activeIndex = parseInt(webContents.navigationHistory.getActiveIndex());
webContents.goToIndex(activeIndex + 1);
}
From c1fcb10bc0718ff89a2bbf6d4286e89c926cf2c8 Mon Sep 17 00:00:00 2001
From: Elian Doran
Date: Tue, 6 Aug 2024 20:12:13 +0300
Subject: [PATCH 02/48] docs: Change reference to search.md
---
src/etapi/etapi.openapi.yaml | 2 +-
src/public/app/services/frontend_script_api.js | 4 ++--
src/services/backend_script_api.ts | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/etapi/etapi.openapi.yaml b/src/etapi/etapi.openapi.yaml
index 61eb1a6cf..b53bfb01c 100644
--- a/src/etapi/etapi.openapi.yaml
+++ b/src/etapi/etapi.openapi.yaml
@@ -48,7 +48,7 @@ paths:
- name: search
in: query
required: true
- description: search query string as described in https://github.com/zadam/trilium/wiki/Search
+ description: search query string as described in https://github.com/TriliumNext/Docs/blob/main/Wiki/search.md
schema:
type: string
examples:
diff --git a/src/public/app/services/frontend_script_api.js b/src/public/app/services/frontend_script_api.js
index 989a49879..b03125370 100644
--- a/src/public/app/services/frontend_script_api.js
+++ b/src/public/app/services/frontend_script_api.js
@@ -249,7 +249,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
/**
* This is a powerful search method - you can search by attributes and their values, e.g.:
- * "#dateModified =* MONTH AND #log". See full documentation for all options at: https://github.com/zadam/trilium/wiki/Search
+ * "#dateModified =* MONTH AND #log". See full documentation for all options at: https://github.com/TriliumNext/Docs/blob/main/Wiki/search.md
*
* @method
* @param {string} searchString
@@ -261,7 +261,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
/**
* This is a powerful search method - you can search by attributes and their values, e.g.:
- * "#dateModified =* MONTH AND #log". See full documentation for all options at: https://github.com/zadam/trilium/wiki/Search
+ * "#dateModified =* MONTH AND #log". See full documentation for all options at: https://github.com/TriliumNext/Docs/blob/main/Wiki/search.md
*
* @method
* @param {string} searchString
diff --git a/src/services/backend_script_api.ts b/src/services/backend_script_api.ts
index 5180e4739..1c7c14e36 100644
--- a/src/services/backend_script_api.ts
+++ b/src/services/backend_script_api.ts
@@ -114,13 +114,13 @@ interface Api {
/**
* This is a powerful search method - you can search by attributes and their values, e.g.:
- * "#dateModified =* MONTH AND #log". See {@link https://github.com/zadam/trilium/wiki/Search} for full documentation for all options
+ * "#dateModified =* MONTH AND #log". See {@link https://github.com/TriliumNext/Docs/blob/main/Wiki/search.md} for full documentation for all options
*/
searchForNotes(query: string, searchParams: SearchParams): BNote[];
/**
* This is a powerful search method - you can search by attributes and their values, e.g.:
- * "#dateModified =* MONTH AND #log". See {@link https://github.com/zadam/trilium/wiki/Search} for full documentation for all options
+ * "#dateModified =* MONTH AND #log". See {@link https://github.com/TriliumNext/Docs/blob/main/Wiki/search.md} for full documentation for all options
*/
searchForNote(query: string, searchParams: SearchParams): BNote | null;
From 85eaf0cb52e02627f53dff93a54ded98a617dbee Mon Sep 17 00:00:00 2001
From: Elian Doran
Date: Tue, 6 Aug 2024 20:18:19 +0300
Subject: [PATCH 03/48] docs: Fix the remainder of hard-coded links to wiki
---
src/public/app/services/frontend_script_api.js | 2 +-
.../app/widgets/attribute_widgets/attribute_detail.js | 2 +-
src/public/app/widgets/dialogs/help.js | 8 ++++----
src/public/app/widgets/shared_info.js | 2 +-
src/public/app/widgets/type_widgets/book.js | 2 +-
src/public/app/widgets/type_widgets/options/etapi.js | 2 +-
.../options/other/revisions_snapshot_interval.js | 2 +-
src/public/app/widgets/type_widgets/options/password.js | 2 +-
src/public/app/widgets/type_widgets/render.js | 2 +-
src/services/backend_script_api.ts | 2 +-
10 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/public/app/services/frontend_script_api.js b/src/public/app/services/frontend_script_api.js
index b03125370..f0e8cc30b 100644
--- a/src/public/app/services/frontend_script_api.js
+++ b/src/public/app/services/frontend_script_api.js
@@ -558,7 +558,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
this.getYearNote = dateNotesService.getYearNote;
/**
- * Hoist note in the current tab. See https://github.com/zadam/trilium/wiki/Note-hoisting
+ * Hoist note in the current tab. See https://github.com/TriliumNext/Docs/blob/main/Wiki/note-hoisting.md
*
* @method
* @param {string} noteId - set hoisted note. 'root' will effectively unhoist
diff --git a/src/public/app/widgets/attribute_widgets/attribute_detail.js b/src/public/app/widgets/attribute_widgets/attribute_detail.js
index 0ffac8fd7..9cecf6bdc 100644
--- a/src/public/app/widgets/attribute_widgets/attribute_detail.js
+++ b/src/public/app/widgets/attribute_widgets/attribute_detail.js
@@ -245,7 +245,7 @@ const ATTR_HELP = {
Log for \${now.format('YYYY-MM-DD HH:mm:ss')}
- See wiki with details, API docs for parentNote and now for details.`,
+ See wiki with details, API docs for parentNote and now for details.`,
"template": "This note will appear in the selection of available template when creating new note",
"toc": "#toc or #toc=show will force the Table of Contents to be shown, #toc=hide will force hiding it. If the label doesn't exist, the global setting is observed",
"color": "defines color of the note in note tree, links etc. Use any valid CSS color value like 'red' or #a13d5f",
diff --git a/src/public/app/widgets/dialogs/help.js b/src/public/app/widgets/dialogs/help.js
index d3f8ecf4f..2b39ef5c3 100644
--- a/src/public/app/widgets/dialogs/help.js
+++ b/src/public/app/widgets/dialogs/help.js
@@ -23,7 +23,7 @@ const TPL = `
UP, DOWN - go up/down in the list of notes
LEFT, RIGHT - collapse/expand node
not set, not set - go back / forwards in the history
- This note of type Book doesn't have any child notes so there's nothing to display. See wiki for details.
+ This note of type Book doesn't have any child notes so there's nothing to display. See wiki for details.
ETAPI is a REST API used to access Trilium instance programmatically, without UI.
- See more details on wiki and ETAPI OpenAPI spec.
+ See more details on wiki and ETAPI OpenAPI spec.
diff --git a/src/public/app/widgets/type_widgets/options/other/revisions_snapshot_interval.js b/src/public/app/widgets/type_widgets/options/other/revisions_snapshot_interval.js
index 7bd6315c6..a959c5b7b 100644
--- a/src/public/app/widgets/type_widgets/options/other/revisions_snapshot_interval.js
+++ b/src/public/app/widgets/type_widgets/options/other/revisions_snapshot_interval.js
@@ -4,7 +4,7 @@ const TPL = `
Note Revisions Snapshot Interval
-
Note revision snapshot time interval is time in seconds after which a new note revision will be created for the note. See wiki for more info.
+
Note revision snapshot time interval is time in seconds after which a new note revision will be created for the note. See wiki for more info.
Protected session timeout is a time period after which the protected session is wiped from
- the browser's memory. This is measured from the last interaction with protected notes. See wiki for more info.
+ the browser's memory. This is measured from the last interaction with protected notes. See wiki for more info.
This help note is shown because this note of type Render HTML doesn't have required relation to function properly.
-
Render HTML note type is used for scripting. In short, you have a HTML code note (optionally with some JavaScript) and this note will render it. To make it work, you need to define a relation called "renderNote" pointing to the HTML note to render.
+
Render HTML note type is used for scripting. In short, you have a HTML code note (optionally with some JavaScript) and this note will render it. To make it work, you need to define a relation called "renderNote" pointing to the HTML note to render.
diff --git a/src/services/backend_script_api.ts b/src/services/backend_script_api.ts
index 1c7c14e36..0147cbec9 100644
--- a/src/services/backend_script_api.ts
+++ b/src/services/backend_script_api.ts
@@ -251,7 +251,7 @@ interface Api {
*/
sortNotes(parentNoteId: string, sortConfig: {
/** 'title', 'dateCreated', 'dateModified' or a label name
- * See {@link https://github.com/zadam/trilium/wiki/Sorting} for details. */
+ * See {@link https://github.com/TriliumNext/Docs/blob/main/Wiki/sorting.md} for details. */
sortBy?: string;
reverse?: boolean;
foldersFirst?: boolean;
From c3b742df3bef9d19cdee298a20f1b24036894661 Mon Sep 17 00:00:00 2001
From: Elian Doran
Date: Tue, 6 Aug 2024 20:38:35 +0300
Subject: [PATCH 04/48] docs: Fix dynamic references to wiki
---
src/public/app/services/glob.js | 2 +-
src/public/app/services/utils.js | 2 +-
src/public/app/widgets/attribute_widgets/attribute_detail.js | 4 ++--
src/public/app/widgets/dialogs/add_link.js | 2 +-
src/public/app/widgets/dialogs/branch_prefix.js | 2 +-
src/public/app/widgets/dialogs/clone_to.js | 2 +-
src/public/app/widgets/dialogs/protected_session_password.js | 2 +-
src/public/app/widgets/dialogs/revisions.js | 2 +-
src/public/app/widgets/search_options/search_string.js | 2 +-
src/public/app/widgets/shared_switch.js | 2 +-
src/public/app/widgets/type_widgets/attachment_detail.js | 2 +-
src/public/app/widgets/type_widgets/attachment_list.js | 2 +-
src/public/app/widgets/type_widgets/options/sync.js | 2 +-
13 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/public/app/services/glob.js b/src/public/app/services/glob.js
index f2ef87128..925feaf82 100644
--- a/src/public/app/services/glob.js
+++ b/src/public/app/services/glob.js
@@ -27,7 +27,7 @@ function setupGlobs() {
window.glob.importMarkdownInline = async () => appContext.triggerCommand("importMarkdownInline");
window.glob.SEARCH_HELP_TEXT = `
- Search tips - also see
+ Search tips - also see
Just enter any text for full text search
diff --git a/src/public/app/services/utils.js b/src/public/app/services/utils.js
index 9e17f1c38..7802ff128 100644
--- a/src/public/app/services/utils.js
+++ b/src/public/app/services/utils.js
@@ -330,7 +330,7 @@ function initHelpDropdown($el) {
initHelpButtons($dropdownMenu);
}
-const wikiBaseUrl = "https://github.com/zadam/trilium/wiki/";
+const wikiBaseUrl = "https://github.com/TriliumNext/Docs/blob/main/Wiki/";
function openHelp($button) {
const helpPage = $button.attr("data-help-page");
diff --git a/src/public/app/widgets/attribute_widgets/attribute_detail.js b/src/public/app/widgets/attribute_widgets/attribute_detail.js
index 9cecf6bdc..fa4dc724d 100644
--- a/src/public/app/widgets/attribute_widgets/attribute_detail.js
+++ b/src/public/app/widgets/attribute_widgets/attribute_detail.js
@@ -211,8 +211,8 @@ const ATTR_HELP = {
"cssClass": "value of this label is then added as CSS class to the node representing given note in the tree. This can be useful for advanced theming. Can be used in template notes.",
"iconClass": "value of this label is added as a CSS class to the icon on the tree which can help visually distinguish the notes in the tree. Example might be bx bx-home - icons are taken from boxicons. Can be used in template notes.",
"pageSize": "number of items per page in note listing",
- "customRequestHandler": 'see Custom request handler',
- "customResourceProvider": 'see Custom request handler',
+ "customRequestHandler": 'see Custom request handler',
+ "customResourceProvider": 'see Custom request handler',
"widget": "marks this note as a custom widget which will be added to the Trilium component tree",
"workspace": "marks this note as a workspace which allows easy hoisting",
"workspaceIconClass": "defines box icon CSS class which will be used in tab when hoisted to this note",
diff --git a/src/public/app/widgets/dialogs/add_link.js b/src/public/app/widgets/dialogs/add_link.js
index 117bc052f..0c7772fc8 100644
--- a/src/public/app/widgets/dialogs/add_link.js
+++ b/src/public/app/widgets/dialogs/add_link.js
@@ -10,7 +10,7 @@ const TPL = `