Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
client: add support for peeking the tree pane on vertical toolbar layout
Adorian Doran99af3b7670f2
diff --git a/apps/client/src/layouts/desktop_layout.tsx b/apps/client/src/layouts/desktop_layout.tsxindex b26c3044a6..d2fe3b6719 100644--- a/apps/client/src/layouts/desktop_layout.tsx+++ b/apps/client/src/layouts/desktop_layout.tsx@@ -86,7 +86,7 @@ export default class DesktopLayout {.css("flex-grow", "1").id("horizontal-main-container").optChild(!launcherPaneIsHorizontal, launcherPane)- .optChild(launcherPaneIsHorizontal, <LeftPanePeekButton />)+ .child(<LeftPanePeekButton />).child(new LeftPaneContainer(launcherPaneIsHorizontal).optChild(!launcherPaneIsHorizontal, <QuickSearch />)diff --git a/apps/client/src/services/resizer.spec.ts b/apps/client/src/services/resizer.spec.tsindex 01e01fa044..6ac53f8e0d 100644--- a/apps/client/src/services/resizer.spec.ts+++ b/apps/client/src/services/resizer.spec.ts@@ -216,6 +216,45 @@ describe("setupLeftPaneResizer", () => {expect(config.minSize).toEqual([ 150, 300 ]);});+ it("in the vertical layout, reserves the peek button while it shows", async () => {+ setLauncherPaneWidth(120);+ const { resizer } = await loadResizer({ layoutOrientation: "vertical", leftPaneWidth: 30 });+ const peekButton = document.createElement("button");+ peekButton.className = "left-pane-peek-button";+ document.body.append(peekButton);+ let peekButtonWidth = 12;+ Object.defineProperty(peekButton, "offsetWidth", { get: () => peekButtonWidth });++ resizer.setupLeftPaneResizer("closed");+ expect($("#rest-pane").css("width")).toBe(`${100 - (132 / window.innerWidth) * 100}%`);++ // Docked, the button is not displayed.+ peekButtonWidth = 0;+ resizer.setupLeftPaneResizer("docked");+ flushRaf();+ const [ , restWidth ] = SplitMock.mock.calls[0][1].sizes;+ expect(restWidth).toBeCloseTo(100 - 30 - (120 / window.innerWidth) * 100);+ });++ it("in the vertical layout, peeks the pane as wide as it docks", async () => {+ setLauncherPaneWidth(120);+ const { resizer, options } = await loadResizer({+ layoutOrientation: "vertical", leftPaneWidth: 30+ });++ resizer.setupLeftPaneResizer("peek");+ flushRaf();++ // The host starts after the launcher pane, so the pane takes a larger share of it.+ const scale = 100 / (100 - (120 / window.innerWidth) * 100);+ const { sizes, onDragEnd } = SplitMock.mock.calls[0][1];+ expect(sizes[0]).toBeCloseTo(30 * scale);+ expect(sizes[0] + sizes[1]).toBeCloseTo(100);++ onDragEnd([ 40 * scale, 100 - 40 * scale ]);+ expect(options.save).toHaveBeenCalledWith("leftPaneWidth", 40);+ });+it("drops a split still waiting for its frame when the mode changes again", async () => {const { resizer } = await loadResizer({layoutOrientation: "horizontal", leftPaneWidth: 30diff --git a/apps/client/src/services/resizer.ts b/apps/client/src/services/resizer.tsindex f856a45b43..4fb1abb56d 100644--- a/apps/client/src/services/resizer.ts+++ b/apps/client/src/services/resizer.ts@@ -6,7 +6,6 @@ import options from "./options.js";export const DEFAULT_GUTTER_SIZE = 5;let leftPaneWidth: number;-let reservedPx: number;let layoutOrientation: string;let leftInstance: ReturnType<typeof Split> | null;let leftRafId: number | undefined;@@ -18,7 +17,7 @@ let splitNoteContainer: HTMLElement | undefined;/*** Sizes the left pane for its mode. Docked, a Split sizes `#left-pane-host` against `#rest-pane`;* peeking, the host covers `#rest-pane` and a Split sizes `#left-pane` against the host's spacer.- * Both share the `leftPaneWidth` option.+ * Both share the `leftPaneWidth` option, a percentage of `#horizontal-main-container`.*/function setupLeftPaneResizer(mode: PaneMode) {if (leftRafId !== undefined) {@@ -31,7 +30,12 @@ function setupLeftPaneResizer(mode: PaneMode) {}layoutOrientation = layoutOrientation ?? options.get("layoutOrientation");- reservedPx = reservedPx ?? (layoutOrientation === "vertical" ? ($("#launcher-pane").outerWidth() || 0) : 0);+ // `.left-pane-peek-button` follows `#launcher-pane` in the vertical layout, and is not+ // displayed while the pane is docked.+ const reservedPx = layoutOrientation === "vertical"+ ? ($("#launcher-pane").outerWidth() || 0)+ + ($(".left-pane-peek-button").get(0)?.offsetWidth ?? 0)+ : 0;// Window resizing causes `window.innerWidth` to change, so `reservedWidth` needs to be recalculated each time.const reservedWidth = reservedPx / window.innerWidth * 100;if (mode !== "docked") {@@ -50,20 +54,23 @@ function setupLeftPaneResizer(mode: PaneMode) {const elements = isDocked? [ "#left-pane-host", "#rest-pane" ]: [ "#left-pane", "#left-pane-host > .peek-pane-spacer" ];- const otherWidth = isDocked ? 100 - leftPaneWidth - reservedWidth : 100 - leftPaneWidth;+ // The peeking host starts after the launcher pane, so the pane takes a larger share of it.+ const scale = isDocked ? 1 : 100 / (100 - reservedWidth);+ const size = leftPaneWidth * scale;+ const otherWidth = isDocked ? 100 - size - reservedWidth : 100 - size;// Deferred a frame so that Split.js measures #left-pane once it is laid out; otherwise// `minSize` has no effect.leftRafId = requestAnimationFrame(() => {leftRafId = undefined;leftInstance = Split(elements, {- sizes: [ leftPaneWidth, otherWidth ],+ sizes: [ size, otherWidth ],gutterSize: DEFAULT_GUTTER_SIZE,minSize: [ 150, 300 ],rtl: glob.isRtl,onDragEnd: (sizes) => {- leftPaneWidth = Math.round(sizes[0]);- options.save("leftPaneWidth", Math.round(sizes[0]));+ leftPaneWidth = Math.round(sizes[0] / scale);+ options.save("leftPaneWidth", leftPaneWidth);}});});diff --git a/apps/client/src/stylesheets/theme-next/shell.css b/apps/client/src/stylesheets/theme-next/shell.cssindex 89f75fef59..a4012ffa92 100644--- a/apps/client/src/stylesheets/theme-next/shell.css+++ b/apps/client/src/stylesheets/theme-next/shell.css@@ -122,19 +122,16 @@ body.background-effects.theme-supports-background-effects #center-pane .note-spl--note-split-bottom-border-radius: var(--center-pane-border-radius);}-/* Matches when the left pane is collapsed */-#horizontal-main-container.left-pane-hidden {- --note-split-top-border-radius: 0;-}-/* Matches when a status bar panel is open */#horizontal-main-container:has(#rest-pane > .status-bar.status-bar-panel-open) {--note-split-bottom-border-radius: 0;}-/* Add a border to the vertical launch bar if collapsed. */-body.layout-vertical #horizontal-main-container.left-pane-hidden #launcher-pane.vertical {- border-inline-end: 2px solid var(--left-pane-collapsed-border-color);+/* Draws the launch bar's border in the gap between the peek button and the peeked tree. The+ offset is physical, since the button is mirrored in RTL. */+body.layout-vertical #horizontal-main-container > .left-pane-peek-button.peek-pane-button-action-collapse {+ box-shadow: 2px 0 var(--left-pane-collapsed-border-color),+ 2px 0 var(--launcher-pane-vert-background-color);}/*diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.jsonindex 347cf0e2f2..9c957f9433 100644--- a/apps/client/src/translations/en/translation.json+++ b/apps/client/src/translations/en/translation.json@@ -1207,7 +1207,7 @@"left_pane_toggle": {"show_panel": "Show panel","hide_panel": "Hide panel",- "peek_panel": "Peek panel"+ "peek_panel": "Peek tree panel"},"move_pane_button": {"move_left": "Move left",diff --git a/apps/client/src/widgets/buttons/left_pane_toggle.tsx b/apps/client/src/widgets/buttons/left_pane_toggle.tsxindex 1bcbeaa7e2..36442b144d 100644--- a/apps/client/src/widgets/buttons/left_pane_toggle.tsx+++ b/apps/client/src/widgets/buttons/left_pane_toggle.tsx@@ -30,7 +30,10 @@ export default function LeftPaneToggle({ isHorizontalLayout }: { isHorizontalLay);}-/** The edge button that peeks the note tree over the content, in the horizontal layout. */+/**+ * The edge button that peeks the note tree over the content. It runs along the window's start edge+ * in the horizontal layout, and beside `#launcher-pane` in the vertical one.+ */export function LeftPanePeekButton() {const mode = useLeftPaneMode();const parentComponent = useContext(ParentComponent);@@ -44,6 +47,7 @@ export function LeftPanePeekButton() {onToggle={peek}hideText={t("left_pane_toggle.hide_panel")}peekText={t("left_pane_toggle.peek_panel")}+ keyboardAction="peekLeftPane"/>);}diff --git a/apps/client/src/widgets/containers/left_pane_container.css b/apps/client/src/widgets/containers/left_pane_container.cssindex 16ab7770c6..f7f8a4bd46 100644--- a/apps/client/src/widgets/containers/left_pane_container.css+++ b/apps/client/src/widgets/containers/left_pane_container.css@@ -4,6 +4,7 @@--left-pane-peek-border-radius: 8px;--left-pane-peek-button-collapse-background-color: var(--left-pane-background-color);+ --left-pane-peek-button-vertical-background-color: transparent;}#left-pane {@@ -25,10 +26,36 @@ body.layout-horizontal #horizontal-main-container {--peek-button-collapse-background-color: var(--left-pane-peek-button-collapse-background-color);}-body.desktop.background-effects #horizontal-main-container:has(.note-split.visible.bgfx:not(.visible ~ .visible)) > .left-pane-peek-button {+body.desktop.background-effects.layout-horizontal #horizontal-main-container:has(.note-split.visible.bgfx:not(.visible ~ .visible)) > .left-pane-peek-button {--peek-button-expand-background-color: var(--center-pane-background-color-bgfx, var(--main-background-color));}+body.layout-vertical #horizontal-main-container {+ --left-pane-peek-button-width: 12px;+ --left-pane-peek-button-gutter: calc(var(--left-pane-peek-button-width) + 2px);++ position: relative;++ > .left-pane-peek-button {+ --peek-button-expand-background-color: var(--left-pane-peek-button-vertical-background-color);++ flex: none;+ position: relative;+ }++ &:not(.left-pane-hidden) > .left-pane-peek-button {+ display: none;+ }++ /* The Next theme sets the launcher's `--launcher-pane-size` from `--launcher-pane-vert-size`. */+ > #left-pane-host.peek {+ inset-inline-start: calc(+ var(--launcher-pane-vert-size, var(--launcher-pane-size))+ + var(--left-pane-peek-button-gutter)+ );+ }+}+#left-pane-host.peek {inset-inline-start: var(--left-pane-peek-button-gutter, 0);inset-inline-end: 0;diff --git a/apps/client/src/widgets/containers/left_pane_container.spec.ts b/apps/client/src/widgets/containers/left_pane_container.spec.tsindex 27c62fe542..f0ada5d3ec 100644--- a/apps/client/src/widgets/containers/left_pane_container.spec.ts+++ b/apps/client/src/widgets/containers/left_pane_container.spec.ts@@ -68,21 +68,29 @@ describe("LeftPaneContainer", () => {);});- it("starts docked where the option says so", () => {+ it("starts docked where the option says so, and its peek edge hides it", () => {mount(true);expect(container.$widget.hasClass("hidden-int")).toBe(false);expect(parent.$widget.hasClass("left-pane-hidden")).toBe(false);expect(setupLeftPaneResizer).toHaveBeenLastCalledWith("docked");++ container.peekLeftPaneEvent();+ expect(container.$widget.hasClass("hidden-int")).toBe(true);+ expect(save).toHaveBeenCalledWith("leftPaneVisible", "false");});- it("does not peek where the layout cannot", () => {- mount(false, false);+ it("peeks only a hidden pane in the vertical layout", () => {+ mount(true, false);container.peekLeftPaneEvent();- expect(container.$widget.hasClass("hidden-int")).toBe(true);+ expect(container.$widget.hasClass("hidden-int")).toBe(false);expect(container.$widget.hasClass("peek")).toBe(false);expect(triggerEvent).not.toHaveBeenCalled();++ container.setLeftPaneVisibilityEvent({ leftPaneVisible: false });+ container.peekLeftPaneEvent();+ expect(container.$widget.hasClass("peek")).toBe(true);});it("dismisses a peek on a press outside the tree and its buttons, or on Escape", () => {@@ -168,9 +176,9 @@ describe("LeftPaneContainer", () => {expect(host.hasClass("hidden-int")).toBe(false);});- function mount(docked: boolean, isPeekable = true) {+ function mount(docked: boolean, isHorizontalLayout = true) {options.set("leftPaneVisible", docked.toString());- container = new LeftPaneContainer(isPeekable);+ container = new LeftPaneContainer(isHorizontalLayout);container.child(new FlexContainer("column").class("tree-stub"));parent = new FlexContainer<LeftPaneContainer>("row").child(container);document.body.append(parent.render()[0]);diff --git a/apps/client/src/widgets/containers/left_pane_container.ts b/apps/client/src/widgets/containers/left_pane_container.tsindex de86305a32..03ca984086 100644--- a/apps/client/src/widgets/containers/left_pane_container.ts+++ b/apps/client/src/widgets/containers/left_pane_container.ts@@ -15,15 +15,18 @@ import Container from "./container.js";*/export default class LeftPaneContainer extends Container<Component> {- private readonly isPeekable: boolean;+ private readonly isHorizontalLayout: boolean;private mode: PaneMode;private stopPeekDismiss?: () => void;- /** @param isPeekable whether the pane can peek, which only the horizontal layout supports. */- constructor(isPeekable: boolean) {+ /**+ * @param isHorizontalLayout whether the layout is horizontal, where the peek edge also hides a+ * docked pane. The vertical layout shows the peek edge only while the pane is hidden.+ */+ constructor(isHorizontalLayout: boolean) {super();- this.isPeekable = isPeekable;+ this.isHorizontalLayout = isHorizontalLayout;this.mode = options.is("leftPaneVisible") ? "docked" : "closed";this.id("left-pane-host");@@ -54,7 +57,7 @@ export default class LeftPaneContainer extends Container<Component> {}peekLeftPaneEvent() {- if (this.isPeekable) {+ if (this.isHorizontalLayout || this.mode !== "docked") {this.changeMode("togglePeek");}}diff --git a/apps/client/src/widgets/react/PeekPaneButton.css b/apps/client/src/widgets/react/PeekPaneButton.cssindex 5dc3391a24..f34c198bf0 100644--- a/apps/client/src/widgets/react/PeekPaneButton.css+++ b/apps/client/src/widgets/react/PeekPaneButton.css@@ -39,10 +39,6 @@transform: scaleX(-1);}- body.layout-vertical & {- border-bottom: 1px solid var(--status-bar-border-color);- }-&.peek-pane-button-action-expand {background: var(--peek-button-expand-background-color);diff --git a/apps/client/src/widgets/react/PeekPaneButton.spec.tsx b/apps/client/src/widgets/react/PeekPaneButton.spec.tsxindex d897b15386..00584da73f 100644--- a/apps/client/src/widgets/react/PeekPaneButton.spec.tsx+++ b/apps/client/src/widgets/react/PeekPaneButton.spec.tsx@@ -3,9 +3,10 @@ import { act } from "preact/test-utils";import { afterEach, describe, expect, it, vi } from "vitest";// Bootstrap's tooltip machinery is not what is under test here.+const useStaticTooltipWithKeyboardShortcut = vi.hoisted(() => vi.fn());vi.mock("./hooks", async (importOriginal) => ({...(await importOriginal<typeof import("./hooks")>()),- useStaticTooltip: vi.fn()+ useStaticTooltipWithKeyboardShortcut}));import PeekPaneButton, { type PaneSide } from "./PeekPaneButton";@@ -28,6 +29,9 @@ describe("PeekPaneButton", () => {const onToggle = vi.fn();const button = renderButton("start", false, onToggle);expect(button.getAttribute("aria-label")).toBe("Peek");+ expect(useStaticTooltipWithKeyboardShortcut).toHaveBeenLastCalledWith(+ expect.anything(), "Peek", "peekLeftPane", expect.anything()+ );expect(button.classList.contains("my-peek-button")).toBe(true);expect(button.classList.contains("side-start")).toBe(true);expect(button.classList.contains("peek-pane-button-action-expand")).toBe(true);@@ -56,6 +60,7 @@ describe("PeekPaneButton", () => {className="my-peek-button"hideText="Hide"peekText="Peek"+ keyboardAction="peekLeftPane"/>,host));diff --git a/apps/client/src/widgets/react/PeekPaneButton.tsx b/apps/client/src/widgets/react/PeekPaneButton.tsxindex eafc67b9d2..071e524080 100644--- a/apps/client/src/widgets/react/PeekPaneButton.tsx+++ b/apps/client/src/widgets/react/PeekPaneButton.tsx@@ -1,10 +1,11 @@import "./PeekPaneButton.css";+import type { KeyboardActionNames } from "@triliumnext/commons";import { Tooltip } from "bootstrap";import clsx from "clsx";import { useCallback, useMemo, useRef } from "preact/hooks";-import { useStaticTooltip } from "./hooks";+import { useStaticTooltipWithKeyboardShortcut } from "./hooks";// Gap (px) between the peek button and its tooltip, so the tooltip can't overlap the button.const TOOLTIP_MARGIN_PX = 8;@@ -24,6 +25,8 @@ interface PeekPaneButtonProps {hideText: string;/** The label while the pane is closed (a click peeks it). */peekText: string;+ /** The keyboard action that does what a click does, whose shortcut the tooltip shows. */+ keyboardAction?: KeyboardActionNames;}/**@@ -31,7 +34,7 @@ interface PeekPaneButtonProps {* the pane's container reserves (see `PeekPaneButton.css`).*/export default function PeekPaneButton(props: PeekPaneButtonProps) {- const { side, isOpen, onToggle, className, hideText, peekText } = props;+ const { side, isOpen, onToggle, className, hideText, peekText, keyboardAction } = props;const buttonRef = useRef<HTMLButtonElement>(null);// Pointer's vertical position captured once on hover; null until the mouse enters// (e.g. on keyboard focus) so the tooltip falls back to the button's centre.@@ -55,16 +58,15 @@ export default function PeekPaneButton(props: PeekPaneButtonProps) {// is only updated on mouse enter, and the offset is recomputed from it on show.// The `distance` (second value) keeps the tooltip clear of the button so it can't// overlap it and cause hover flicker.- const tooltipConfig = useMemo(() => ({- title: label,+ const tooltipOptions = useMemo(() => ({placement: side === "end" ? "left" as const : "right" as const,offset: (): [number, number] => {const rect = buttonRef.current?.getBoundingClientRect();if (!rect || pointerY.current === null) return [ 0, TOOLTIP_MARGIN_PX ];return [ pointerY.current - (rect.top + rect.height / 2), TOOLTIP_MARGIN_PX ];}- }), [ label, side ]);- useStaticTooltip(buttonRef, tooltipConfig);+ }), [ side ]);+ useStaticTooltipWithKeyboardShortcut(buttonRef, label, keyboardAction, tooltipOptions);// The arrow points the way the pane moves: inward to peek it, outward to hide it.const pointsRight = (side === "start") !== isOpen;diff --git a/apps/client/src/widgets/react/hooks.tsx b/apps/client/src/widgets/react/hooks.tsxindex 8d6b8265e7..e5c7a65704 100644--- a/apps/client/src/widgets/react/hooks.tsx+++ b/apps/client/src/widgets/react/hooks.tsx@@ -1517,12 +1517,14 @@ export function useStaticTooltipWithKeyboardShortcut(opts?: Omit<Partial<Tooltip.Options>, "title">) {const [ keyboardShortcut, setKeyboardShortcut ] = useState<string[]>();- useStaticTooltip(elRef, {+ // Memoized, since `useStaticTooltip` recreates the tooltip whenever its config changes.+ const config = useMemo(() => ({title: keyboardShortcut?.length? `${title} (${keyboardShortcut.map((shortcut) => joinShortcut(formatShortcut(shortcut))).join(", ")})`: title,...opts- });+ }), [ title, keyboardShortcut, opts ]);+ useStaticTooltip(elRef, config);useEffect(() => {if (actionName) {diff --git a/apps/client/src/widgets/sidebar/RightPanelContainer.css b/apps/client/src/widgets/sidebar/RightPanelContainer.cssindex f1e0c03768..cd9697c3e7 100644--- a/apps/client/src/widgets/sidebar/RightPanelContainer.css+++ b/apps/client/src/widgets/sidebar/RightPanelContainer.css@@ -25,6 +25,10 @@ body.layout-horizontal #vertical-main-container {--right-pane-peek-button-gutter: calc(var(--right-pane-peek-button-width) + 2px);}+body.layout-vertical .right-pane-peek-button {+ border-bottom: 1px solid var(--status-bar-border-color);+}+/* The button follows the translucency of the rightmost split. */body.desktop.background-effects #center-pane:has(.note-split.last-visible.bgfx) ~ .right-pane-peek-button {--peek-button-expand-background-color: var(--center-pane-background-color-bgfx, var(--main-background-color));diff --git a/apps/server/src/assets/help/help_content.json b/apps/server/src/assets/help/help_content.jsonindex c78c50e850..5760e887cc 100644--- a/apps/server/src/assets/help/help_content.json+++ b/apps/server/src/assets/help/help_content.json@@ -35,9 +35,9 @@"_help_ODY7qQn5m2FT": "<p>Trilium supports simple backup scheme where it saves copy of the <a class=\"reference-link\" href=\"#root/_help_wX4HbRucYSDD\">Database</a> on these events:</p><ul><li>once a day</li><li>once a week</li><li>once a month</li><li>before DB migration to newer version</li></ul><p>So in total you'll have at most 4 backups from different points in time which should protect you from various problems. These backups are stored by default in <code>backup</code> directory placed in the <a href=\"#root/_help_tAassRL4RSQL\">data directory</a>.</p><p>This is only very basic backup solution, and you're encouraged to add some better backup solution - e.g. backing up the <a class=\"reference-link\" href=\"#root/_help_wX4HbRucYSDD\">Database</a> to cloud / different computer etc.</p><p>Note that <a class=\"reference-link\" href=\"#root/_help_cbkrhQjrkKrh\">Synchronization</a> provides also some backup capabilities by its nature of distributing the data to other computers.</p><h2>Creating a backup</h2><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><span class=\"tn-icon bx bx-desktop\"></span> On the desktop app & web client</p><div class=\"trilium-tab-panel\"><ol><li>Go to <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Backup</em> and press the <em>Backup now</em> button.</li><li>The backup creation process may take a few moments, especially for larger databases. A notification will inform you when the backup is complete.</li><li>The backup will be saved as <code>backup-now</code> in the <em>Existing backups</em> list, where you can download it.</li></ol></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><span class=\"tn-icon bx bx-globe\"></span> On the standalone client</p><div class=\"trilium-tab-panel\"><ol><li>Go to <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Backup</em> and press the <em>Download backup</em> button.</li><li>You will be prompted to restart the app. Confirm, and the app will restart automatically.</li><li>Set a <em>backup name</em> or <em>password</em> (both optional), then press <em>Continue</em>.</li><li>Press the <em>Generate and download</em> button and wait for the download to complete.</li><li>Once you confirm the download is saved on your device, press <em>Finish</em> to complete</li></ol></div></section></div><h2>Downloading a backup</h2><ul><li><strong>Desktop and web client</strong>: to download an existing backup, navigate to <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Backup</em> → <em>Existing backups</em> and select <em>Download</em> (<span class=\"tn-icon bx bx-download\"></span>).</li><li><strong>Standalone client</strong>: automatic backups are not supported in this version. You can manually create and download a backup by going to <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Backup</em> → <em>Download backup</em>.</li></ul><h2>Restoring a backup</h2><ul><li><strong>For a new Trilium instance</strong>: When setting up a new Trilium instance, use the <em>Restore from backup</em> option in the setup menu to guide you through restoring your existing backup.</li><li><strong>For an existing Trilium instance</strong>: To restore a backup and replace your current database, go to <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Backup</em> and click <em>Restore a backup</em>. You will be prompted to restart the app for the restoration process to begin. After restarting, you can choose to back up the existing database before overwriting it. Note: For the web client, use the Start Over feature ( <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Database</em> → <em>Start over</em> (<span class=\"tn-icon bx bx-reset\"></span>)) to switch to the setup screen and restore a backup.</li></ul><p>Next, select the backup file (.db or .tnbackup) from your device. The web client is optimized for handling large backups and is resilient to unstable network conditions, similar to the desktop application.</p><p>If your database is encrypted, you will be prompted to enter the password used for encrypting the backup file. Without the correct password, decryption and restoration cannot proceed.</p><p>Restoring a backup may take some time, depending on its size. Once it completes, Trilium will open the freshly restored database.</p><h3>The alternative way for restoring a backup</h3><p>Let's assume you want to restore the weekly backup (only in .db format, .tnbackup files are not supported by this method), here's how to do it:</p><ul><li>find <a href=\"#root/_help_tAassRL4RSQL\">data directory</a> Trilium uses - easy way is to open \"About Trilium Notes\" (<span class=\"tn-icon bx bx-info-circle\"></span>) from \"Menu\" in upper left corner and looking at \"data directory\"<ul><li>I'll refer to <code>~/trilium-data</code> as data directory from now on</li></ul></li><li>find <code>~/trilium-data/backup/backup-weekly.db</code> - this is the <a class=\"reference-link\" href=\"#root/_help_wX4HbRucYSDD\">Database</a> backup.</li><li>at this point stop/kill Trilium</li><li>delete <code>~/trilium-data/document.db</code>, <code>~/trilium-data/document.db-wal</code> and <code>~/trilium-data/document.db-shm</code> (latter two files are auto generated)</li><li>copy and rename this <code>~/trilium-data/backup/backup-weekly.db</code> to <code>~/trilium-data/document.db</code></li><li>make sure that the file is writable, e.g. with <code>chmod 600 document.db</code></li><li>start Trilium again</li></ul><aside class=\"admonition warning\"><p>If you have configured sync then you need to do it across all members of the sync cluster, otherwise older version (restored backup) of the document will be detected and synced to the newer version.</p></aside><h2>Changing the backup location in Trilium (desktop only)</h2><p>Starting with version 0.105, the Trilium desktop client allows users to change the directory where backups are stored. Follow these steps to specify a custom backup directory:</p><ol><li>Navigate to <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Backup</em> → <em>Backup location</em>.</li><li>Click the <em>Select location</em> button.</li><li>Choose any writable directory on your file system. This could include network shares, depending on your operating system.</li></ol><p>Once you set a custom directory, all manual and automatic backups will be saved there. If the selected directory becomes unavailable, backups may fail or revert to the default location.</p><aside class=\"admonition tip\"><p>For better privacy when using unsafe backup locations, you can enable backup encryption, which makes the backup file unreadable without the correct password.</p></aside><h2>Backup encryption</h2><p>Trilium can secure the entire content of the database backup, ensuring it remains unreadable unless the correct password is provided. This is particularly useful for storing backups in unsecured locations, like network shares, unencrypted external drives, or cloud services. </p><p>Encrypted database backups use the Trilium Backup Container (.tnbackup) format, which relies on AES-256-GCM. This authenticated encryption mode scrambles the data and generates a tag confirming it hasn't been altered. The password itself isn't directly used as the key; it's processed through scrypt, a key derivation function designed to be slow and memory-intensive, making brute-force password guessing difficult even with powerful hardware. Each backup also receives a random 16-byte salt, ensuring that the same password never produces the same encryption key twice. Additionally, critical metadata such as chunk order, length, and header flags are cryptographically bound into the encryption (via \"additional authenticated data\"), preventing undetected tampering like reorder, truncate, or splice operations.</p><h3>Enabling backup encryption</h3><p>To enable encryption for automatic backups in the Desktop application:</p><ol><li>Go to <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Backup</em> → <em>Backup options</em>.</li><li>Click on <em>Turn on encryption</em> and set a password.</li></ol><p>Once encryption is enabled, all newly created backups (both automatic and manual) will be encrypted with the specified password. Backups created prior to enabling encryption will remain unsecured.</p><p>You can change the password anytime using the <em>Change password</em> button. The new password will apply to backups created after the change.</p><p>To disable encryption, uncheck <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Backup</em> → <em>Enable encryption</em>.</p><aside class=\"admonition note\"><p>On some systems, a keyring may not be available for Trilium to securely store the encryption password. In such cases, the encryption option is disabled.</p></aside><h2>Backup compression</h2><p>Database backups can be optionally compressed to minimize storage footprint. This method is effective primarily when the database consists largely of text content. However, media files (images, videos, audio), along with PDF, ODF, and DOCX files, are already compressed in their original formats and won't benefit from further compression.</p><p>Compressed backups are stored using the Trilium Backup Container (.tnbackup), employing RFC 1952 GZIP compression.</p><aside class=\"admonition warning\"><p><strong>Note:</strong> Compression increases the time required for backup creation and restoration. It may also lead to higher CPU usage during automatic backups, potentially draining the battery faster on battery-powered devices. Enable this option only if necessary.</p></aside><h3>Enabling Backup Compression (Desktop Only)</h3><p>To enable compression for new automatic and manual backups, navigate to <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Backup</em> → <em>Backup options</em> and toggle <em>Enable compression</em> to on.</p><h2>Disabling backup</h2><p>Although this is not recommended, it is possible to disable backup in <code>config.ini</code> in the <a href=\"#root/_help_tAassRL4RSQL\">data directory</a>:</p><pre><code class=\"language-text-x-trilium-auto\">[General]\n... some other configs\n# set to true to disable backups (e.g. because of limited space on server)\nnoBackup=true</code></pre><p>You can also review the <a href=\"#root/_help_Gzjqa934BdH4\">configuration</a> file to provide all <code>config.ini</code> values as environment variables instead.</p><p>See <a href=\"https://github.com/TriliumNext/Trilium/blob/master/config-sample.ini\">sample config</a>.</p>","_help_tAassRL4RSQL": "<p>Data directory contains:</p><ul><li><code>document.db</code> - <a href=\"#root/_help_wX4HbRucYSDD\">database</a></li><li><code>config.ini</code> - instance level settings like port on which the Trilium application runs</li><li><code>backup</code> - contains automatically <a href=\"#root/_help_ODY7qQn5m2FT\">backup</a> of documents</li><li><code>log</code> - contains application log files</li></ul><h2>Location of the data directory</h2><p>Easy way how to find out which data directory Trilium uses is to look at the \"About Trilium Notes\" dialog (from \"Menu\" in upper left corner):</p><p><img src=\"{{helpAssets}}/User%20Guide/Installation%20%26%20Setup/Data%20directory_image.jpg\"></p><p>Here's how the location is decided:</p><p>Data directory is normally named <code>trilium-data</code> and it is stored in:</p><ul><li><code>/home/[user]/.local/share</code> for Linux</li><li><code>/home/[user]/.var/app/org.triliumnotes.Trilium/data</code> for the Flathub version on Linux</li><li><code>C:\\Users\\[user]\\AppData\\Roaming</code> for Windows Vista and up</li><li><code>/Users/[user]/Library/Application Support</code> for Mac OS</li><li>user's home is a fallback if some of the paths above don't exist</li><li>user's home is also a default setup for [[docker|Docker server installation]]</li></ul><p>If you want to back up your Trilium data, just backup this single directory - it contains everything you need.</p><h3>Changing the location of data directory</h3><p>If you want to use some other location for the data directory than the default one, you may change it via <code>TRILIUM_DATA_DIR</code> environment variable to some other location:</p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><span class=\"tn-icon bx bxl-windows\"></span> Windows</p><div class=\"trilium-tab-panel\"><ol><li>Press the <span class=\"tn-icon bx bxl-windows\"></span> key on your keyboard.</li><li>Search and select <em>Edit the system variables</em>.</li><li>Press the <em>Environment Variables…</em> button in the bottom-right of the newly opened screen.</li><li>On the top section (<em>User variables for [user]</em>), press the <em>New…</em> button.</li><li>In the <em>Variable name</em> field insert <code>TRILIUM_DATA_DIR</code>.</li><li>Press the <em>Browse Directory…</em> button and select the new directory where to store the database.</li><li>Close all the windows by pressing the <em>OK</em> button for each of them.</li></ol></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><span class=\"tn-icon bx bxl-tux\"></span> Linux</p><div class=\"trilium-tab-panel\"><p>Trilium reads <code>TRILIUM_DATA_DIR</code> when it starts, so the variable must be set in the environment that launches it.</p><aside class=\"admonition note\"><p>Setting the variable does not move existing notes. To keep them, close Trilium and copy the old data directory to the new location first. Trilium creates the last folder of the path if it is missing, but not its parent folders.</p></aside><p><strong>Desktop application (.deb, .rpm, AppImage or .zip)</strong></p><p>To use the new location however Trilium is started (from the application menu, a desktop shortcut, at login or from a terminal), set the variable for the whole session:</p><ol><li><p>Create the file <code>~/.config/environment.d/trilium.conf</code> with the following content, using the full path (<code>~</code> is not expanded in this file):</p><pre><code class=\"language-text-x-trilium-auto\">TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data</code></pre></li><li><p>Log out and log back in.</p></li></ol><p>This works on desktops started by <code>systemd</code>, which covers most distributions running GNOME or KDE Plasma. On other systems, add the following line to <code>~/.profile</code> instead, then log out and log back in:</p><pre><code class=\"language-text-x-sh\">export TRILIUM_DATA_DIR=\"$HOME/data/my-trilium-data\"</code></pre><p>The same line in <code>~/.bashrc</code> (or your shell's equivalent) only applies when Trilium is started from a terminal, not from the application menu.</p><p><strong>Flatpak (Flathub)</strong></p><p>The Flathub version runs in a sandbox that cannot see the rest of the file system, so it needs access to the folder as well as the variable:</p><pre><code class=\"language-text-x-sh\">flatpak override --user \\\n --env=TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data \\\n --filesystem=/home/myuser/data/my-trilium-data:create \\\n org.triliumnotes.Trilium</code></pre><p>To return to the default location, run <code>flatpak override --user --reset org.triliumnotes.Trilium</code>. This also removes any other overrides set for Trilium.</p><p><strong>Server running as a systemd service</strong></p><p>Add an <code>Environment=</code> line to the <code>[Service]</code> section of the unit file described in <a class=\"reference-link\" href=\"#root/_help_3tW6mORuTHnB\">Packaged version for Linux</a>:</p><pre><code class=\"language-text-x-trilium-auto\">[Service]\nEnvironment=TRILIUM_DATA_DIR=/var/lib/trilium-data</code></pre><p>Then reload and restart the service:</p><pre><code class=\"language-text-x-sh\">sudo systemctl daemon-reload\nsudo systemctl restart trilium</code></pre><p>The user set in <code>User=</code> must be able to write to the folder. For Docker, see <a class=\"reference-link\" href=\"#root/_help_rWX5eY045zbE\">Using Docker</a> instead.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><span class=\"tn-icon bx bxl-apple\"></span> macOS</p><div class=\"trilium-tab-panel\"><p>You need to create a <code>.plist</code> file under <code>~/Library/LaunchAgents</code> to load it properly each login.</p><p>To load it manually, you need to use <code>launchctl setenv TRILIUM_DATA_DIR <yourpath></code></p><p>Here is a pre-defined template, where you just need to add your path to:</p><pre><code class=\"language-text-xml\"><?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n <key>Label</key>\n <string>set.trilium.env</string>\n <key>RunAtLoad</key>\n <true/>\n <key>ProgramArguments</key>\n <array>\n <string>/bin/launchctl</string>\n <string>setenv</string>\n <string>TRILIUM_DATA_DIR</string>\n <string>/Users/YourUserName/Library/Application Support/trilium-data</string>\n </array>\n</dict>\n</plist>\n</code></pre></div></section></div><h3>Create a script to run with specific data directory</h3><p>An alternative to globally setting environment variable is to run only the Trilium Notes with this environment variable. This then allows for different setup styles like two <a href=\"#root/_help_wX4HbRucYSDD\">database</a> instances or \"portable\" installation.</p><p>To do this in Unix-based systems simply run <code>trilium</code> like this:</p><pre><code class=\"language-text-x-trilium-auto\">TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data trilium</code></pre><p>You can then save the above command as a shell script on your path for convenience.</p><h2>Electron user data directory (desktop only)</h2><p>When running the desktop application, Electron stores internal data (caches, spell-check dictionaries, session storage, etc.) separately from the Trilium data directory. By default this goes to the system's application data folder (e.g. <code>%APPDATA%</code> on Windows), which may be undesirable in corporate environments with roaming profiles or when running in portable mode.</p><p>To keep Electron data out of the system's roaming profile, set the <code>TRILIUM_ELECTRON_DATA_DIR</code> environment variable to an explicit path. The <code>trilium-portable</code> script does this automatically, pointing it to <code>trilium-electron-data/</code> next to the application.</p><h2>Fine-grained directory/path location</h2><p>Apart from the data directory, some of the subdirectories of it can be moved elsewhere by changing an environment variable:</p><figure class=\"table\"><table><thead><tr><th>Environment variable</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><td><code>TRILIUM_DOCUMENT_PATH</code></td><td><code>${TRILIUM_DATA_DIR}/document.db</code></td><td>Path to the <a class=\"reference-link\" href=\"#root/_help_wX4HbRucYSDD\">Database</a> (storing all notes and metadata).</td></tr><tr><td><code>TRILIUM_BACKUP_DIR</code></td><td><code>${TRILIUM_DATA_DIR}/backup</code></td><td>Directory where automated <a class=\"reference-link\" href=\"#root/_help_ODY7qQn5m2FT\">Backup</a> databases are stored.</td></tr><tr><td><code>TRILIUM_LOG_DIR</code></td><td><code>${TRILIUM_DATA_DIR}/log</code></td><td>Directory where daily <a class=\"reference-link\" href=\"#root/_help_bnyigUA2UK7s\">Backend (server) logs</a> are stored.</td></tr><tr><td><code>TRILIUM_TMP_DIR</code></td><td><code>${TRILIUM_DATA_DIR}/tmp</code></td><td>Directory where temporary files are stored (for example when opening in an external app).</td></tr><tr><td><code>TRILIUM_ANONYMIZED_DB_DIR</code></td><td><code>${TRILIUM_DATA_DIR}/anonymized-db</code></td><td>Directory where a <a class=\"reference-link\" href=\"#root/_help_x59R8J8KV5Bp\">Anonymized Database</a> is stored.</td></tr><tr><td><code>TRILIUM_RESOURCES_DIR</code></td><td><code>${TRILIUM_DATA_DIR}/resources</code></td><td>Directory where <a class=\"reference-link\" href=\"#root/_help_ebyr7ES2SwOW\">Downloaded resources</a> are stored, such as the speech recognition models.</td></tr><tr><td><code>TRILIUM_CONFIG_INI_PATH</code></td><td><code>${TRILIUM_DATA_DIR}/config.ini</code></td><td>Path to <a class=\"reference-link\" href=\"#root/_help_Gzjqa934BdH4\">Configuration (config.ini or environment variables)</a> file.</td></tr><tr><td><code>TRILIUM_ELECTRON_DATA_DIR</code></td><td>System appData</td><td>Directory for Electron internal data (caches, spell-check dictionaries, etc.). Set this in portable mode to avoid writing to the system profile (desktop only).</td></tr></tbody></table></figure>","_help_ebyr7ES2SwOW": "<p>Downloaded resources are large files that some features need but that do not ship with Trilium, such as the speech recognition models used to transcribe meetings. Trilium downloads them the first time a feature needs them, and keeps them on the device for later use.</p><p>Currently, only <a class=\"reference-link\" href=\"#root/_help_Y84QCbArmK3z\">Meeting transcription</a> on the desktop application uses downloaded resources:</p><figure class=\"table\"><table><thead><tr><th>Resource</th><th>Size</th><th>License</th><th>Used for</th></tr></thead><tbody><tr><td>Parakeet TDT 0.6B v3 (standard)</td><td>0.6 GB</td><td>CC-BY-4.0</td><td>Recognizing speech, with the <em>Standard</em> model.</td></tr><tr><td>Parakeet TDT 0.6B v3 (high accuracy)</td><td>2.4 GB</td><td>CC-BY-4.0</td><td>Recognizing speech, with the <em>High accuracy</em> model.</td></tr><tr><td>Silero VAD</td><td>0.6 MB</td><td>MIT</td><td>Detecting when someone speaks.</td></tr><tr><td>TitaNet</td><td>40 MB</td><td>Apache-2.0</td><td>Telling speakers apart, while <em>Identify speakers</em> is on.</td></tr></tbody></table></figure><h2>Downloading resources</h2><p>When a feature needs resources that are not on the device yet, Trilium asks before downloading them. The dialog lists each resource with what it is used for, where it is downloaded from, its license and its size, followed by the total download size and the free space on the disk.</p><ul><li>To start the download, press <em>Download</em>. Each resource shows its progress, and the feature continues once all of them are downloaded.</li><li>To stop the download, press <em>Cancel</em> or close the dialog. The files already downloaded are kept, and the next download continues where this one stopped, even within a large file.</li><li>If the disk does not have enough free space, the dialog says so and the download cannot be started.</li></ul><p>Every file is checked against a checksum built into Trilium before it is used, so a file that was damaged or altered during the download is discarded.</p><aside class=\"admonition note\"><p>Downloaded resources are not synchronized. Each device that uses a feature downloads its resources separately, even when the notes are kept in sync through <a class=\"reference-link\" href=\"#root/_help_cbkrhQjrkKrh\">Synchronization</a>.</p></aside><h2>Managing downloaded resources</h2><p>To see the downloaded resources, go to <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Downloaded resources</em>. Each resource that was downloaded, or partly downloaded by an interrupted download, is listed with the space it takes on the disk and its status. Below the list, <em>Space used</em> shows the space they take in total, and how much free space is left on the disk.</p><ul><li>To open the folder of a resource, press the <span class=\"tn-icon bx bx-folder-open\"></span> button (desktop only).</li><li>To delete a resource, press the <span class=\"tn-icon bx bx-trash\"></span> button. If a feature needs it again, it is downloaded again.</li></ul><p>The list also shows, faded out, anything else in the resources folder:</p><ul><li><em>Older version</em>: the files of an earlier version of a resource. When a resource is updated, the new version is downloaded into a new folder, and the old one is left behind.</li><li><em>Not used</em>: a resource that no feature of this installation uses, for example one downloaded by a feature that was removed.</li><li><em>Unknown</em>: any other file or folder, for example one copied there by hand.</li></ul><p>These can be deleted in the same way.</p><aside class=\"admonition warning\"><p>If a server and a desktop application share the same data directory, a resource used by only one of them shows as <em>Not used</em> in the other. Deleting it there removes it for both.</p></aside><h2>Location</h2><p>The resources are stored in the <code>resources</code> folder of the <a class=\"reference-link\" href=\"#root/_help_tAassRL4RSQL\">Data directory</a>, one folder per resource. To store them elsewhere, set the <code>TRILIUM_RESOURCES_DIR</code> environment variable to another folder before starting Trilium.</p><h2>Installing without an Internet connection</h2><p>To install a resource on a device that cannot download it, copy its folder from the <code>resources</code> folder of a device that already has it into the same place on the other device. The next time a feature asks to download it, press <em>Download</em>: the files already in place are checked against their checksums and kept, and only the missing ones are downloaded.</p>",- "_help_x0JgW8UqGXvq": "<p>Trilium supports two different layouts, based on your preference.</p><h3>Vertical layout</h3><p>The vertical layout is Trilium's original layout:</p><ul><li>The <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a> is positioned on the left side of the screen, with buttons being laid out vertically.</li><li>The tab bar is at the top, but to the right of the <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a>.</li><li>The <a class=\"reference-link\" href=\"#root/_help_Ms1nauBra7gq\">Quick search</a> is at the top of the <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a>.</li><li>The <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a> can be collapsed by pressing the <span class=\"tn-icon bx bx-chevrons-left\"></span> button at the bottom of the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>.</li><li>The <a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a> can be accessed via the <span class=\"tn-icon cke cke-trilium\"></span> icon at the top of the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>.</li></ul><p><img src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/1_Vertical%20and%20horizontal%20layout_image.jpg\"></p><h3>Horizontal layout</h3><p>The horizontal layout is a more traditional layout, since it bears similarity with other applications. In this mode:</p><ul><li>The <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a> is at the top of the screen, with the buttons laid horizontally.</li><li>The tab bar is at the top of the screen, but now covers the entirety of the width, allowing for more tabs to be displayed at once.</li><li>The <a class=\"reference-link\" href=\"#root/_help_Ms1nauBra7gq\">Quick search</a> is now part of the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>. It can be moved around according to preference and even removed if needed.</li><li>The <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a> can be collapsed by pressing the small <span class=\"tn-icon bx bx-sidebar\"></span> button to the left of the first tab. While collapsed, it can be peeked temporarily above the content by pressing the strip on the left edge of the app.</li><li>The <a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a> can be accessed via the <span class=\"tn-icon bx bx-menu\"></span> button at the end of the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>.</li></ul><p><img src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Vertical%20and%20horizontal%20layout_image.jpg\"></p><h2>Changing the layout</h2><p>Go to <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> and look for the <em>Appearance</em> option on the left. Then look for the <em>Layout</em> section, where there is the possibility to switch between the two available layouts.</p><p>Clicking an option will immediately apply the selected layout by reloading the window.</p>",+ "_help_x0JgW8UqGXvq": "<p>Trilium supports two different layouts, based on your preference.</p><h3>Vertical layout</h3><p>The vertical layout is Trilium's original layout:</p><ul><li>The <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a> is positioned on the left side of the screen, with buttons being laid out vertically.</li><li>The tab bar is at the top, but to the right of the <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a>.</li><li>The <a class=\"reference-link\" href=\"#root/_help_Ms1nauBra7gq\">Quick search</a> is at the top of the <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a>.</li><li>The <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a> can be collapsed by pressing the <span class=\"tn-icon bx bx-chevrons-left\"></span> button at the bottom of the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>. While collapsed, it can be peeked temporarily above the content by pressing the strip on the right side of the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>.</li><li>The <a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a> can be accessed via the <span class=\"tn-icon cke cke-trilium\"></span> icon at the top of the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>.</li></ul><p><img src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/1_Vertical%20and%20horizontal%20layout_image.jpg\"></p><h3>Horizontal layout</h3><p>The horizontal layout is a more traditional layout, since it bears similarity with other applications. In this mode:</p><ul><li>The <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a> is at the top of the screen, with the buttons laid horizontally.</li><li>The tab bar is at the top of the screen, but now covers the entirety of the width, allowing for more tabs to be displayed at once.</li><li>The <a class=\"reference-link\" href=\"#root/_help_Ms1nauBra7gq\">Quick search</a> is now part of the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>. It can be moved around according to preference and even removed if needed.</li><li>The <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a> can be collapsed by pressing the small <span class=\"tn-icon bx bx-sidebar\"></span> button to the left of the first tab. While collapsed, it can be peeked temporarily above the content by pressing the strip on the left edge of the app.</li><li>The <a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a> can be accessed via the <span class=\"tn-icon bx bx-menu\"></span> button at the end of the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>.</li></ul><p><img src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Vertical%20and%20horizontal%20layout_image.jpg\"></p><h2>Changing the layout</h2><p>Go to <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> and look for the <em>Appearance</em> option on the left. Then look for the <em>Layout</em> section, where there is the possibility to switch between the two available layouts.</p><p>Clicking an option will immediately apply the selected layout by reloading the window.</p>","_help_x3i7MxGccDuM": "<p>The global menu configures the current window (zoom, keeping the window on top) and offers access to some more advanced options.</p><p><img src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Global%20menu_image.jpg\"></p><h2>Accessing the global menu</h2><p>See <a href=\"#root/_help_x0JgW8UqGXvq\">Vertical and horizontal layout</a> since the position of the global menu is changed based on which layout has been selected.</p>",- "_help_oPVyFC7WL2Lp": "<p>This page explains how to manipulate the note tree in TriliumNext, focusing on moving notes.</p><p><img src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree_image.jpg\"></p><h2>Drag and Drop</h2><p><img src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree_drag-and-drop.gif\" alt=\"Drag and drop example\"></p><p>You can easily rearrange the note tree by dragging and dropping notes, as demonstrated in the example above.</p><h3>Importing files</h3><p>A file or archive can easily be imported into Trilium just by dragging it inside the note tree.</p><p>Note that a drag & drop always imports with <em>safe import</em> on, meaning that some features such as scripts are disabled in the upcoming notes. To bypass that, use the dedicated <a href=\"#root/_help_mHbBMPDPkVV5\">import</a> feature (right click → <em>Import into note</em>).</p><p>Unlike the import dialog, the drag & drop also has some basic auto-detection of the import. For example, dragging a .zip file with a <code>.obsidian</code> folder in it will automatically trigger a dedicated <a class=\"reference-link\" href=\"#root/_help_iWD7wiIuMtgV\">Obsidian</a> import.</p><h2>Keyboard Manipulation</h2><p><img src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree_move-note-with-keyboard.gif\" alt=\"Example of using keyboard keys to move a note\">Trilium offers efficient keyboard-based manipulation using the following <a href=\"#root/_help_A9Oc6YKKc65v\">shortcuts</a>:</p><ul><li><kbd>Ctrl</kbd> + <kbd>↑</kbd> and <kbd>Ctrl</kbd> +<kbd>↓</kbd>: Move the note up or down in the order.</li><li><kbd>Ctrl</kbd>+<kbd>←</kbd>: Move the note up in the hierarchy by changing its parent to the note's grandparent.</li><li><kbd>Ctrl</kbd>+<kbd>→</kbd>: Move the note down in the hierarchy by setting its parent to the note currently above it (this action is best understood through a demo or hands-on experience).</li><li><kbd>←</kbd> and <kbd>→</kbd>: Expand and collapse a sub-tree.</li></ul><h2>Context Menu</h2><p>You can also move notes using the familiar cut and paste functions available in the context menu, or with the associated keyboard <a href=\"#root/_help_A9Oc6YKKc65v\">shortcuts</a>: <code>CTRL-C</code> ( <a href=\"#root/_help_IakOLONlIfGI\">copy</a>), <kbd>Ctrl</kbd> + <kbd>X</kbd> (cut) and <kbd>Ctrl</kbd> + <kbd>V</kbd> (paste).</p><p>See <a class=\"reference-link\" href=\"#root/_help_YtSN43OrfzaA\">Note tree contextual menu</a> for more information.</p><h2>Tree Settings</h2><p>Click the tree icon in the tree toolbar to open the tree settings popup. Each option is a toggle that takes effect as soon as it is switched:</p><ul><li><em>Hide archived notes</em>: When enabled, archived notes are not shown in the tree.</li><li><em>Automatically collapse notes</em>: When enabled, notes are collapsed after a period of inactivity to keep the tree tidy.</li><li><em>Follow active note</em>: When enabled (default), the tree automatically scrolls and expands parent nodes to keep the currently active note visible. When disabled, the tree is fully detached from navigation — only the background highlight of the active note is updated, but the tree viewport and its expanded/collapsed state are never changed by navigation. Use the crosshair button to manually jump the tree to the active note at any time.</li></ul><h2>Hiding and peeking the tree</h2><p>To hide or show the note tree, press the <span class=\"tn-icon bx bx-sidebar\"></span> button to the left of the first tab in the horizontal layout, or the <span class=\"tn-icon bx bx-chevrons-left\"></span> button at the bottom of the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a> in the vertical layout. The <em>Toggle Left Pane</em> <a href=\"#root/_help_A9Oc6YKKc65v\">keyboard shortcut</a>, which is not assigned by default, does the same. See <a class=\"reference-link\" href=\"#root/_help_x0JgW8UqGXvq\">Vertical and horizontal layout</a>.</p><p>In the horizontal layout, there is also a small strip on the left edge of the app which shows an arrow icon:</p><ul><li>When the tree is hidden, pressing the edge will <em>peek</em> the tree.<ul><li>In this mode the tree is shown temporarily above the content, without shifting the content of your notes.</li><li>Clicking outside the tree, pressing <kbd>Esc</kbd> or pressing the edge again will hide the tree.</li><li>Pressing the <span class=\"tn-icon bx bx-sidebar\"></span> button to the left of the first tab will dock the tree.</li></ul></li><li>When the tree is docked, pressing the edge will hide the tree.</li></ul><p>The <em>Peek Tree Pane</em> <a href=\"#root/_help_A9Oc6YKKc65v\">keyboard shortcut</a>, <kbd>Alt</kbd>+<kbd>[</kbd> by default, does the same as pressing the edge. Only one panel is peeked at a time: peeking the tree hides a peeked <a class=\"reference-link\" href=\"#root/_help_RnaPdbciOfeq\">Right Sidebar</a>, and the other way around.</p><h2>Keyboard shortcuts</h2><p>The note tree comes with multiple keyboard shortcuts to make editing faster, consult the dedicated <a class=\"reference-link\" href=\"#root/_help_DvdZhoQZY9Yd\">Keyboard shortcuts</a> section.</p>",+ "_help_oPVyFC7WL2Lp": "<p>This page explains how to manipulate the note tree in TriliumNext, focusing on moving notes.</p><p><img src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree_image.jpg\"></p><h2>Drag and Drop</h2><p><img src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree_drag-and-drop.gif\" alt=\"Drag and drop example\"></p><p>You can easily rearrange the note tree by dragging and dropping notes, as demonstrated in the example above.</p><h3>Importing files</h3><p>A file or archive can easily be imported into Trilium just by dragging it inside the note tree.</p><p>Note that a drag & drop always imports with <em>safe import</em> on, meaning that some features such as scripts are disabled in the upcoming notes. To bypass that, use the dedicated <a href=\"#root/_help_mHbBMPDPkVV5\">import</a> feature (right click → <em>Import into note</em>).</p><p>Unlike the import dialog, the drag & drop also has some basic auto-detection of the import. For example, dragging a .zip file with a <code>.obsidian</code> folder in it will automatically trigger a dedicated <a class=\"reference-link\" href=\"#root/_help_iWD7wiIuMtgV\">Obsidian</a> import.</p><h2>Keyboard Manipulation</h2><p><img src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree_move-note-with-keyboard.gif\" alt=\"Example of using keyboard keys to move a note\">Trilium offers efficient keyboard-based manipulation using the following <a href=\"#root/_help_A9Oc6YKKc65v\">shortcuts</a>:</p><ul><li><kbd>Ctrl</kbd> + <kbd>↑</kbd> and <kbd>Ctrl</kbd> +<kbd>↓</kbd>: Move the note up or down in the order.</li><li><kbd>Ctrl</kbd>+<kbd>←</kbd>: Move the note up in the hierarchy by changing its parent to the note's grandparent.</li><li><kbd>Ctrl</kbd>+<kbd>→</kbd>: Move the note down in the hierarchy by setting its parent to the note currently above it (this action is best understood through a demo or hands-on experience).</li><li><kbd>←</kbd> and <kbd>→</kbd>: Expand and collapse a sub-tree.</li></ul><h2>Context Menu</h2><p>You can also move notes using the familiar cut and paste functions available in the context menu, or with the associated keyboard <a href=\"#root/_help_A9Oc6YKKc65v\">shortcuts</a>: <code>CTRL-C</code> ( <a href=\"#root/_help_IakOLONlIfGI\">copy</a>), <kbd>Ctrl</kbd> + <kbd>X</kbd> (cut) and <kbd>Ctrl</kbd> + <kbd>V</kbd> (paste).</p><p>See <a class=\"reference-link\" href=\"#root/_help_YtSN43OrfzaA\">Note tree contextual menu</a> for more information.</p><h2>Tree Settings</h2><p>Click the tree icon in the tree toolbar to open the tree settings popup. Each option is a toggle that takes effect as soon as it is switched:</p><ul><li><em>Hide archived notes</em>: When enabled, archived notes are not shown in the tree.</li><li><em>Automatically collapse notes</em>: When enabled, notes are collapsed after a period of inactivity to keep the tree tidy.</li><li><em>Follow active note</em>: When enabled (default), the tree automatically scrolls and expands parent nodes to keep the currently active note visible. When disabled, the tree is fully detached from navigation — only the background highlight of the active note is updated, but the tree viewport and its expanded/collapsed state are never changed by navigation. Use the crosshair button to manually jump the tree to the active note at any time.</li></ul><h2>Hiding and peeking the tree</h2><p>To hide or show the note tree, press the <span class=\"tn-icon bx bx-sidebar\"></span> button to the left of the first tab in the horizontal layout, or the <span class=\"tn-icon bx bx-chevrons-left\"></span> button at the bottom of the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a> in the vertical layout. The <em>Toggle Left Pane</em> <a href=\"#root/_help_A9Oc6YKKc65v\">keyboard shortcut</a>, which is not assigned by default, does the same. See <a class=\"reference-link\" href=\"#root/_help_x0JgW8UqGXvq\">Vertical and horizontal layout</a>.</p><p>A small strip with an arrow icon runs along the left edge of the app in the horizontal layout. In the vertical layout, it runs along the right side of the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>, and only shows while the tree is hidden.</p><ul><li>When the tree is hidden, pressing the strip will <em>peek</em> the tree.<ul><li>In this mode the tree is shown temporarily above the content, without shifting the content of your notes.</li><li>Clicking outside the tree, pressing <kbd>Esc</kbd> or pressing the strip again will hide the tree.</li><li>Pressing the button that shows the tree will dock it.</li></ul></li><li>In the horizontal layout, pressing the strip while the tree is docked will hide it.</li></ul><p>The <em>Peek Tree Pane</em> <a href=\"#root/_help_A9Oc6YKKc65v\">keyboard shortcut</a>, <kbd>Alt</kbd>+<kbd>[</kbd> by default, does the same as pressing the strip. Only one panel is peeked at a time: peeking the tree hides a peeked <a class=\"reference-link\" href=\"#root/_help_RnaPdbciOfeq\">Right Sidebar</a>, and the other way around.</p><h2>Keyboard shortcuts</h2><p>The note tree comes with multiple keyboard shortcuts to make editing faster, consult the dedicated <a class=\"reference-link\" href=\"#root/_help_DvdZhoQZY9Yd\">Keyboard shortcuts</a> section.</p>","_help_YtSN43OrfzaA": "<figure class=\"image image-style-align-right\"><img style=\"aspect-ratio:269/608;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree/1_Note%20tree%20contextual%20menu_image.png\" width=\"269\" height=\"608\"></figure><p>The <em>note tree menu</em> can be accessed by right-clicking in the <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a>.</p><h2>Interaction</h2><p>The contextual menu can operate:</p><ul><li>On a single note, by right clicking it in the note tree.</li><li>On multiple notes, by selecting them first. See <a class=\"reference-link\" href=\"#root/_help_yTjUdsOi4CIE\">Multiple selection</a> on how to do so.<ul><li>When right clicking, do note that usually the note being right clicked is also included in the affected notes, regardless of whether it was selected or not.</li></ul></li></ul><h2>Available options</h2><aside class=\"admonition note\"><p>When multiple notes are selected, only a subset of notes will be active. The ones that do support multiple notes will mention this in the list below.</p></aside><p>The most frequent actions stand side by side at the top of the menu, each as an icon over its name. Use <kbd>←</kbd> and <kbd>→</kbd>, or <kbd>↑</kbd> and <kbd>↓</kbd>, to move between them.</p><ul><li><strong>Cut</strong><ul><li>Will place the given notes in clipboard.</li><li>Use one of the two paste functions (or the keyboard shortcuts) to move them to the desired location.</li></ul></li><li><strong>Clone</strong><ul><li>Will place the given notes in clipboard.</li><li>Use one of the two paste functions (or the keyboard shortcuts) to copy them to the desired location.</li><li>Note that the copy function here works according to the <a class=\"reference-link\" href=\"#root/_help_IakOLONlIfGI\">Cloning Notes</a> functionality (i.e. the note itself will be present in two locations at once, and editing it in one place will edit it everywhere).</li><li>To simply create a duplicate note that can be modified independently, look for <em>Duplicate</em>.</li></ul></li><li><strong>Paste into</strong><ul><li>Pastes the notes in clipboard as child notes of the right-clicked one.</li><li>Shown only after notes have been cut or cloned.</li></ul></li><li><strong>Paste after</strong><ul><li>Pastes the notes in clipboard underneath the right-clicked one.</li><li>Shown only after notes have been cut or cloned.</li></ul></li><li><strong>Delete…</strong><ul><li>Will delete the given notes, asking for confirmation first.</li><li>In the dialog, the following options can be configured:<ul><li><em>Delete also all clones</em> to ensure that the note will be deleted everywhere if it has been placed into multiple locations (see <a class=\"reference-link\" href=\"#root/_help_IakOLONlIfGI\">Cloning Notes</a>).</li><li><em>Erase notes permanently</em> will ensure that the note cannot be recovered from <a class=\"reference-link\" href=\"#root/_help_r5JGHN99bVKn\">Recent Changes</a>.</li></ul></li></ul></li></ul><p>The rest of the menu lists its options one per row:</p><ul><li><strong>Open note</strong><ul><li>Clicking it opens the note in a new <a href=\"#root/_help_3seOhtN8uLIY\">tab</a>.</li><li>Hovering it or clicking its arrow opens a submenu with the places the note can be opened in: <em>Open in a new tab</em>, <em>Open in a new split</em> (to the right of the note, within the current tab) and <em>Open in a new window</em>.</li></ul></li><li><strong>Quick edit</strong><ul><li>Opens the note in <a class=\"reference-link\" href=\"#root/_help_ZjLYv08Rp3qC\">Quick edit</a>, over the current one.</li></ul></li><li><strong>Hoist note</strong><ul><li>Will focus the note tree on this note. See <a class=\"reference-link\" href=\"#root/_help_OR8WJ7Iz9K4U\">Note Hoisting</a> for more information.</li></ul></li><li><strong>Insert note after</strong><ul><li>Allows easy creation of a note with a specified <a href=\"#root/_help_KSZ04uQ2D1St\">note type</a>.</li><li>The <em>Code</em> submenu starts with the scripting notes, each a code note set up for its role: <em>Custom CSS</em> (with <code>#appCss</code>), <em>Widget</em> (with <code>#widget</code> and a starting skeleton) and <em>Backend script</em>. The enabled code languages follow.</li><li><a class=\"reference-link\" href=\"#root/_help_GTwFsgaA0lCt\">Collections</a> are grouped in the <em>Collection</em> submenu. The note types created less often, the <a class=\"reference-link\" href=\"#root/_help_B2ORr7OVEZtc\">Snippets</a> and the AI quick action are in the <em>More</em> submenu.</li><li><a class=\"reference-link\" href=\"#root/_help_KC1HB96bqqHX\">Templates</a> will also be present (if any) at the end of the list.</li><li>To find an entry quickly, type into the search box at the top of the submenu, or just start typing while the submenu is open. The submenu then lists every matching entry, including those inside its own submenus (such as a code language or a collection), each with the submenu it comes from. Use <kbd>↑</kbd> and <kbd>↓</kbd> to pick a match, <kbd>Enter</kbd> to create it, and <kbd>Esc</kbd> to clear the search.</li><li>The note will be added on the same level of hierarchy as the note selected.</li></ul></li><li><strong>Insert child note</strong><ul><li>Same as <em>Insert note after</em>, but the note will be created as a child of the selected note.</li></ul></li><li><strong>Move to…</strong><ul><li>Will display a modal to specify where to move the desired notes.</li></ul></li><li><strong>Clone to…</strong><ul><li>Will display a modal to specify where to <a href=\"#root/_help_IakOLONlIfGI\">clone</a> the desired notes.</li></ul></li><li><strong>Duplicate</strong><ul><li>Creates a copy of the note and its descendants, placed right after the original.</li><li>When the note has child notes, the item also has an arrow, set apart by a divider. Hovering the item or clicking the arrow opens a submenu:<ul><li><em>Note and its children</em> does the same as clicking <em>Duplicate</em>.</li><li><em>This note only</em> copies the note with its content and attributes, but without any of its child notes. Links and relations to the original children keep pointing at them.</li></ul></li><li>This process is different from <a class=\"reference-link\" href=\"#root/_help_IakOLONlIfGI\">Cloning Notes</a> since the duplicated note can be edited independently from the original.</li><li>An alternative to this, if done regularly, would be <a class=\"reference-link\" href=\"#root/_help_KC1HB96bqqHX\">Templates</a>.</li></ul></li><li><strong>Archive/Unarchive</strong><ul><li>Marks a note as <a href=\"#root/_help_MKmLg5x6xkor\">archived</a>.</li><li>If the note is already archived, it will be unarchived instead.</li><li>Multiple notes can be selected as well. However, all the selected notes must be in the same state (archived or not), otherwise the option will be disabled.</li></ul></li><li><strong>Protect subtree/Unprotect subtree</strong><ul><li>On a note that is not protected, <em>Protect subtree</em> marks this note and all of its descendants as protected. On a protected note, the item reads <em>Unprotect subtree</em> and unprotects them instead. See <a class=\"reference-link\" href=\"#root/_help_bwg0e8ewQMak\">Protected Notes</a> for more information.</li><li>Hovering the item or clicking its arrow opens a submenu with both actions, for instance to unprotect the protected notes below a note that is not protected itself.</li></ul></li><li><strong>Import into note…</strong><ul><li>Opens the <a href=\"#root/_help_mHbBMPDPkVV5\">import</a> dialog and places the imported notes as child notes of the selected one.</li></ul></li><li><strong>Export…</strong><ul><li>Opens the <a href=\"#root/_help_mHbBMPDPkVV5\">export</a> dialog for the selected notes.</li></ul></li><li><strong>Search in subtree</strong><ul><li>Opens a full <a class=\"reference-link\" href=\"#root/_help_eIg8jdvaoNNd\">Search</a> with it preconfigured to only look into this note and its descendants (the <em>Ancestor</em> field).</li></ul></li></ul><h2>Advanced options</h2><figure class=\"image image-style-align-right\"><img style=\"aspect-ratio:231/263;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree/Note%20tree%20contextual%20menu_image.png\" width=\"231\" height=\"263\"></figure><p>The advanced options menu offers some of the less frequently used actions for notes.</p><p>To access these options, first look for the <em>Advanced</em> option at the bottom of the contextual menu to reveal a sub-menu with:</p><ul><li><strong>Apply bulk actions…</strong><ul><li>Opens the <a class=\"reference-link\" href=\"#root/_help_ivYnonVFBxbQ\">Bulk Actions</a> dialog, to apply actions such as adding labels or moving notes to multiple notes at once (see <a class=\"reference-link\" href=\"#root/_help_yTjUdsOi4CIE\">Multiple selection</a>).</li></ul></li><li><strong>Edit branch prefix…</strong><ul><li>Opens a dialog to assign a name to be able to distinguish <a href=\"#root/_help_IakOLONlIfGI\">clones</a>, see <a class=\"reference-link\" href=\"#root/_help_TBwsyfadTA18\">Branch prefix</a> for more information.</li></ul></li><li><strong>Convert to attachment…</strong><ul><li>Converts the selected notes to <a class=\"reference-link\" href=\"#root/_help_0vhv7lsOLy82\">Attachments</a> of their parent notes.</li><li>This functional is most useful when dealing with image <a class=\"reference-link\" href=\"#root/_help_W8vYD3Q1zjCR\">File</a> notes that were imported from an external source or an older version of Trilium.</li></ul></li><li><strong>Expand subtree</strong><ul><li>Expands all the child notes in the <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a>.</li></ul></li><li><strong>Collapse subtree</strong><ul><li>Collapses all the child notes in the note tree.</li></ul></li><li><strong>Sort by…</strong><ul><li>Opens a dialog to sort all the child notes of the selected note.</li><li>The sorting is done only once, there is an automatic sorting mechanism as well that can be set using <a class=\"reference-link\" href=\"#root/_help_zEY4DaJG4YT5\">Attributes</a>.</li><li>See <a class=\"reference-link\" href=\"#root/_help_aGlEvb9hyDhS\">Sorting Notes</a> for more information.</li></ul></li><li><strong>Copy note path to clipboard</strong><ul><li>Copies a URL fragment representing the full path to this branch for a note, such as <code>#root/Hb2E70L7HPuf/4sRFgMZhYFts/2IVuShedRJ3U/LJVMvKXOFv7n</code>.</li><li>The URL to manually create <a class=\"reference-link\" href=\"#root/_help_QEAPj01N5f7w\">Links</a> within notes, or for note <a class=\"reference-link\" href=\"#root/_help_wArbEsdSae6g\">Navigation</a>.</li></ul></li><li><strong>Recent changes in subtree</strong><ul><li>This will open <a class=\"reference-link\" href=\"#root/_help_r5JGHN99bVKn\">Recent Changes</a>, but filtered to only the changes related to this note or one of its descendants.</li></ul></li></ul>","_help_yTjUdsOi4CIE": "<p>In the <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a>, it's possible to select multiple notes at one time. This won't affect the currently displayed note, but it allows to do batch operations.</p><h2>Types of multiple selection</h2><figure class=\"image image-style-align-right image_resized\" style=\"width:28.54%;\"><img style=\"aspect-ratio:335/306;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree/Multiple%20selection_image.png\" width=\"335\" height=\"306\"></figure><h3>Selecting notes one by one</h3><p>To individually select each note, press the <kbd>Alt</kbd> key and click on the note to be selected.</p><p>The selected notes will be indicated via a different background color and an icon.</p><h3>Selecting notes in a sequence</h3><figure class=\"image image-style-align-right image_resized\" style=\"width:29.24%;\"><img style=\"aspect-ratio:233/205;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree/Multiple%20selection_image.jpg\" width=\"233\" height=\"205\"></figure><p>When notes are in a sequence (e.g. one underneath the other), the entire selection can be made just by selecting the first and the last item instead of individually clicking all the notes.</p><p>To do so, first select the note to start the selection with. Then hold <kbd>Shift</kbd> and click on the note to end the selection with. All the notes between the start and the end note will be selected as well.</p><h2>Selected notes vs. active note</h2><p>There is a distinction between <em>selected notes</em> and the <em>active note</em>:</p><ul><li><em>Selected notes</em> are simply the notes that were selected in the multiple section process (i.e. either via <kbd>Alt</kbd> or <kbd>Shift</kbd>).</li><li>The <em>active note</em> is simply the note that whose content is being displayed to the right of the tree.<ul><li><p>Visually, it's identified in the tree by having a different background color and a subtle shadow.</p></li><li><p>The active note can also be selected case in which the icon and background will also change:</p><img class=\"image_resized\" style=\"aspect-ratio:317/223;width:35.1%;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree/1_Multiple%20selection_image.png\" width=\"317\" height=\"223\"></li></ul></li></ul>","_help_DvdZhoQZY9Yd": "<p>The <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a> comes with multiple keyboard shortcuts to make editing faster:</p><h2>Navigation within the tree</h2><ul><li><kbd><span>↑</span></kbd> and <kbd><span>↑</span></kbd> to navigate between notes.</li><li><kbd><span>←</span></kbd> to collapse a note with children, or <kbd><span>→</span></kbd> to expand it.</li><li><kbd><span>←</span></kbd> on a note with no children to navigate to its parent.</li></ul><h2>Opening notes</h2><ul><li><kbd>Click</kbd> to open the note in the current tab.</li><li><kbd>Ctrl</kbd>+<kbd>Click</kbd> or <kbd>Middle click</kbd> to open the note in a new tab.</li><li><kbd>Ctrl</kbd>+<kbd>Right click</kbd> to open the note in <a class=\"reference-link\" href=\"#root/_help_ZjLYv08Rp3qC\">Quick edit</a>.</li></ul><h2>Clipboard management</h2><ul><li><kbd>Ctrl</kbd>+<kbd>C</kbd> to copy one or more notes based on selection (see <a class=\"reference-link\" href=\"#root/_help_IakOLONlIfGI\">Cloning Notes</a>).</li><li><kbd>Ctrl</kbd>+<kbd>X</kbd> to cut one or more notes (for moving them).</li><li><kbd>Ctrl</kbd>+<kbd>V</kbd> to paste them somewhere (which results in a copy or move based on the shortcut used).</li></ul><h2>Moving notes</h2><ul><li><kbd>Ctrl</kbd> + <kbd><span>↑</span></kbd> , <kbd>Ctrl</kbd> + <kbd><span>↓</span></kbd> - move note up/down in the note list.</li><li><kbd>Ctrl</kbd> + <kbd><span>←</span></kbd> - move note up in the note tree.</li><li><kbd>Ctrl</kbd>+<kbd><span>→</span></kbd> - move note down in the note tree.</li><li><kbd>Del</kbd> - deletes note and optionally its subtree (asked in the dialog).</li><li><kbd>Alt</kbd>+<kbd>S</kbd> - sorts the child notes of the note (see <a class=\"reference-link\" href=\"#root/_help_aGlEvb9hyDhS\">Sorting Notes</a>).</li></ul><h2>Multiple selection</h2><p>See <a class=\"reference-link\" href=\"#root/_help_yTjUdsOi4CIE\">Multiple selection</a> for more information about how selection works.</p><ul><li><kbd>Alt</kbd>+<kbd>Click</kbd> – add a single note to the current selection.</li><li><kbd>Shift</kbd>+<kbd>Click</kbd> – select a range of notes, starting from the current note (the highlighted one) to the one that is being clicked.</li><li><kbd>Shift</kbd>+<kbd><span>↑</span></kbd>, <kbd>Shift</kbd>+<kbd><span>↓</span></kbd> – multi-select not above/below.</li><li><kbd>Ctrl</kbd>+<kbd>A</kbd> – select all notes in the current level</li></ul>",diff --git a/apps/server/src/assets/translations/en/server.json b/apps/server/src/assets/translations/en/server.jsonindex b64f6eccdb..f7df97fb22 100644--- a/apps/server/src/assets/translations/en/server.json+++ b/apps/server/src/assets/translations/en/server.json@@ -78,7 +78,7 @@"split-view": "Split view","move-split-left": "Swap the active split with the one on its left, so the note moves and the focus follows it","move-split-right": "Swap the active split with the one on its right, so the note moves and the focus follows it",- "peek-left-pane": "Peek the note tree as a temporary panel that floats over the content, in the horizontal layout"+ "peek-left-pane": "Peek the note tree as a temporary panel that floats over the content"},"keyboard_action_names": {"back-in-note-history": "Back in Note History",diff --git a/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Note Tree.md b/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Note Tree.mdindex c969132e9e..545b2434dd 100644--- a/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Note Tree.md+++ b/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Note Tree.md@@ -44,15 +44,15 @@ Click the tree icon in the tree toolbar to open the tree settings popup. Each opTo hide or show the note tree, press the <span class="tn-icon bx bx-sidebar"></span> button to the left of the first tab in the horizontal layout, or the <span class="tn-icon bx bx-chevrons-left"></span> button at the bottom of the <a class="reference-link" href="Launch%20Bar.md">Launch Bar</a> in the vertical layout. The _Toggle Left Pane_ [keyboard shortcut](../Keyboard%20Shortcuts.md), which is not assigned by default, does the same. See <a class="reference-link" href="Vertical%20and%20horizontal%20layout.md">Vertical and horizontal layout</a>.-In the horizontal layout, there is also a small strip on the left edge of the app which shows an arrow icon:+A small strip with an arrow icon runs along the left edge of the app in the horizontal layout. In the vertical layout, it runs along the right side of the <a class="reference-link" href="Launch%20Bar.md">Launch Bar</a>, and only shows while the tree is hidden.-* When the tree is hidden, pressing the edge will _peek_ the tree.+* When the tree is hidden, pressing the strip will _peek_ the tree.* In this mode the tree is shown temporarily above the content, without shifting the content of your notes.- * Clicking outside the tree, pressing <kbd>Esc</kbd> or pressing the edge again will hide the tree.- * Pressing the <span class="tn-icon bx bx-sidebar"></span> button to the left of the first tab will dock the tree.-* When the tree is docked, pressing the edge will hide the tree.+ * Clicking outside the tree, pressing <kbd>Esc</kbd> or pressing the strip again will hide the tree.+ * Pressing the button that shows the tree will dock it.+* In the horizontal layout, pressing the strip while the tree is docked will hide it.-The _Peek Tree Pane_ [keyboard shortcut](../Keyboard%20Shortcuts.md), <kbd>Alt</kbd>+<kbd>[</kbd> by default, does the same as pressing the edge. Only one panel is peeked at a time: peeking the tree hides a peeked <a class="reference-link" href="Right%20Sidebar.md">Right Sidebar</a>, and the other way around.+The _Peek Tree Pane_ [keyboard shortcut](../Keyboard%20Shortcuts.md), <kbd>Alt</kbd>+<kbd>[</kbd> by default, does the same as pressing the strip. Only one panel is peeked at a time: peeking the tree hides a peeked <a class="reference-link" href="Right%20Sidebar.md">Right Sidebar</a>, and the other way around.## Keyboard shortcutsdiff --git a/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Vertical and horizontal layout.md b/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Vertical and horizontal layout.mdindex 136e6a51ed..e5aefe4c75 100644--- a/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Vertical and horizontal layout.md+++ b/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Vertical and horizontal layout.md@@ -8,7 +8,7 @@ The vertical layout is Trilium's original layout:* The <a class="reference-link" href="Launch%20Bar.md">Launch Bar</a> is positioned on the left side of the screen, with buttons being laid out vertically.* The tab bar is at the top, but to the right of the <a class="reference-link" href="Note%20Tree.md">Note Tree</a>.* The <a class="reference-link" href="../Navigation/Quick%20search.md">Quick search</a> is at the top of the <a class="reference-link" href="Note%20Tree.md">Note Tree</a>.-* The <a class="reference-link" href="Note%20Tree.md">Note Tree</a> can be collapsed by pressing the <span class="tn-icon bx bx-chevrons-left"></span> button at the bottom of the <a class="reference-link" href="Launch%20Bar.md">Launch Bar</a>.+* The <a class="reference-link" href="Note%20Tree.md">Note Tree</a> can be collapsed by pressing the <span class="tn-icon bx bx-chevrons-left"></span> button at the bottom of the <a class="reference-link" href="Launch%20Bar.md">Launch Bar</a>. While collapsed, it can be peeked temporarily above the content by pressing the strip on the right side of the <a class="reference-link" href="Launch%20Bar.md">Launch Bar</a>.* The <a class="reference-link" href="Global%20menu.md">Global menu</a> can be accessed via the <span class="tn-icon cke cke-trilium"></span> icon at the top of the <a class="reference-link" href="Launch%20Bar.md">Launch Bar</a>.