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
  • -
  • not set - show "Jump to" dialog
  • +
  • not set - show "Jump to" dialog
  • not set - scroll to active note
  • Backspace - jump to parent note
  • not set - collapse whole note tree
  • @@ -61,7 +61,7 @@ const TPL = `
    • not set - create new note after the active note
    • not set - create new sub-note into active note
    • -
    • not set - edit prefix of active note clone
    • +
    • not set - edit prefix of active note clone

    @@ -78,7 +78,7 @@ const TPL = `
  • not set, not set - multi-select note above/below
  • not set - select all notes in the current level
  • Shift+click - select note
  • -
  • not set - copy active note (or current selection) into clipboard (used for cloning)
  • +
  • not set - copy active note (or current selection) into clipboard (used for cloning)
  • not set - cut current (or current selection) note into clipboard (used for moving notes)
  • not set - paste note(s) as sub-note into active note (which is either move or clone depending on whether it was copied or cut into clipboard)
  • not set - delete note / sub-tree
  • @@ -107,7 +107,7 @@ const TPL = `
    -
    Markdown-like autoformatting
    +
    Markdown-like autoformatting

      diff --git a/src/public/app/widgets/shared_info.js b/src/public/app/widgets/shared_info.js index 72429272e..560b4866a 100644 --- a/src/public/app/widgets/shared_info.js +++ b/src/public/app/widgets/shared_info.js @@ -13,7 +13,7 @@ const TPL = ` } - . For help visit wiki. + . For help visit wiki.
    `; export default class SharedInfoWidget extends NoteContextAwareWidget { diff --git a/src/public/app/widgets/type_widgets/book.js b/src/public/app/widgets/type_widgets/book.js index 4c6c54c33..5b7d615f2 100644 --- a/src/public/app/widgets/type_widgets/book.js +++ b/src/public/app/widgets/type_widgets/book.js @@ -13,7 +13,7 @@ const TPL = `
    - 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.
    `; diff --git a/src/public/app/widgets/type_widgets/options/etapi.js b/src/public/app/widgets/type_widgets/options/etapi.js index a1e399711..b96fd7b8b 100644 --- a/src/public/app/widgets/type_widgets/options/etapi.js +++ b/src/public/app/widgets/type_widgets/options/etapi.js @@ -8,7 +8,7 @@ const TPL = `

    ETAPI

    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.

    diff --git a/src/public/app/widgets/type_widgets/options/password.js b/src/public/app/widgets/type_widgets/options/password.js index 783154718..ca18cc248 100644 --- a/src/public/app/widgets/type_widgets/options/password.js +++ b/src/public/app/widgets/type_widgets/options/password.js @@ -37,7 +37,7 @@ const TPL = `

    Protected Session Timeout

    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.

    diff --git a/src/public/app/widgets/type_widgets/render.js b/src/public/app/widgets/type_widgets/render.js index 46784db37..9c694385f 100644 --- a/src/public/app/widgets/type_widgets/render.js +++ b/src/public/app/widgets/type_widgets/render.js @@ -12,7 +12,7 @@ const TPL = `

    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