Skip to content

Commit 0c35daa

Browse files
committed
Merge remote-tracking branch 'origin/main' into renovate/jquery-3.x
2 parents eaa84a6 + 4a19639 commit 0c35daa

File tree

49 files changed

+5098
-848
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+5098
-848
lines changed

_regroup/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"@types/node": "22.17.2",
4242
"@types/yargs": "17.0.33",
4343
"@vitest/coverage-v8": "3.2.4",
44-
"eslint": "9.33.0",
44+
"eslint": "9.34.0",
4545
"eslint-plugin-simple-import-sort": "12.1.1",
4646
"esm": "3.2.25",
4747
"jsdoc": "4.0.4",

apps/client/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"url": "https://github.com/TriliumNext/Notes"
1111
},
1212
"dependencies": {
13-
"@eslint/js": "9.33.0",
13+
"@eslint/js": "9.34.0",
1414
"@excalidraw/excalidraw": "0.18.0",
1515
"@fullcalendar/core": "6.1.19",
1616
"@fullcalendar/daygrid": "6.1.19",
@@ -36,7 +36,7 @@
3636
"draggabilly": "3.0.0",
3737
"force-graph": "1.50.1",
3838
"globals": "16.3.0",
39-
"i18next": "25.4.0",
39+
"i18next": "25.4.2",
4040
"i18next-http-backend": "3.0.2",
4141
"jquery": "3.7.1",
4242
"jquery.fancytree": "2.38.5",
@@ -47,12 +47,12 @@
4747
"leaflet-gpx": "2.2.0",
4848
"mark.js": "8.11.1",
4949
"marked": "16.2.0",
50-
"mermaid": "11.10.0",
50+
"mermaid": "11.10.1",
5151
"mind-elixir": "5.0.6",
5252
"normalize.css": "8.0.1",
5353
"panzoom": "9.4.3",
5454
"preact": "10.27.1",
55-
"react-i18next": "15.7.1",
55+
"react-i18next": "15.7.2",
5656
"split.js": "1.6.5",
5757
"svg-pan-zoom": "3.6.2",
5858
"tabulator-tables": "6.3.1",

apps/client/src/services/note_autocomplete.ts

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ export interface Suggestion {
3636
commandId?: string;
3737
commandDescription?: string;
3838
commandShortcut?: string;
39+
attributeSnippet?: string;
40+
highlightedAttributeSnippet?: string;
3941
}
4042

4143
export interface Options {
@@ -323,7 +325,33 @@ function initNoteAutocomplete($el: JQuery<HTMLElement>, options?: Options) {
323325
html += '</div>';
324326
return html;
325327
}
326-
return `<span class="${suggestion.icon ?? "bx bx-note"}"></span> ${suggestion.highlightedNotePathTitle}`;
328+
// Add special class for search-notes action
329+
const actionClass = suggestion.action === "search-notes" ? "search-notes-action" : "";
330+
331+
// Choose appropriate icon based on action
332+
let iconClass = suggestion.icon ?? "bx bx-note";
333+
if (suggestion.action === "search-notes") {
334+
iconClass = "bx bx-search";
335+
} else if (suggestion.action === "create-note") {
336+
iconClass = "bx bx-plus";
337+
} else if (suggestion.action === "external-link") {
338+
iconClass = "bx bx-link-external";
339+
}
340+
341+
// Simplified HTML structure without nested divs
342+
let html = `<div class="note-suggestion ${actionClass}">`;
343+
html += `<span class="${iconClass}" style="display: inline-block; width: 16px; vertical-align: top;"></span>`;
344+
html += `<span style="display: inline-block; width: calc(100% - 20px); padding-left: 4px;">`;
345+
html += `<span class="search-result-title" style="display: block;">${suggestion.highlightedNotePathTitle}</span>`;
346+
347+
// Add attribute snippet inline if available
348+
if (suggestion.highlightedAttributeSnippet) {
349+
html += `<span style="display: block; font-size: 0.8em; color: var(--muted-text-color); opacity: 0.6; line-height: 1;" class="search-result-attributes">${suggestion.highlightedAttributeSnippet}</span>`;
350+
}
351+
352+
html += `</span>`;
353+
html += `</div>`;
354+
return html;
327355
}
328356
},
329357
// we can't cache identical searches because notes can be created / renamed, new recent notes can be added

apps/client/src/stylesheets/style.css

Lines changed: 94 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,28 @@
2828
--ck-mention-list-max-height: 500px;
2929
}
3030

31+
body#trilium-app.motion-disabled *,
32+
body#trilium-app.motion-disabled *::before,
33+
body#trilium-app.motion-disabled *::after {
34+
/* Disable transitions and animations */
35+
transition: none !important;
36+
animation: none !important;
37+
}
38+
39+
body#trilium-app.shadows-disabled *,
40+
body#trilium-app.shadows-disabled *::before,
41+
body#trilium-app.shadows-disabled *::after {
42+
/* Disable shadows */
43+
box-shadow: none !important;
44+
}
45+
46+
body#trilium-app.backdrop-effects-disabled *,
47+
body#trilium-app.backdrop-effects-disabled *::before,
48+
body#trilium-app.backdrop-effects-disabled *::after {
49+
/* Disable backdrop effects */
50+
backdrop-filter: none !important;
51+
}
52+
3153
.table {
3254
--bs-table-bg: transparent !important;
3355
}
@@ -355,7 +377,7 @@ body.desktop .tabulator-popup-container {
355377

356378
@supports (animation-fill-mode: forwards) {
357379
/* Delay the opening of submenus */
358-
body.desktop .dropdown-submenu .dropdown-menu {
380+
body.desktop:not(.motion-disabled) .dropdown-submenu .dropdown-menu {
359381
opacity: 0;
360382
animation-fill-mode: forwards;
361383
animation-delay: var(--submenu-opening-delay);
@@ -1773,20 +1795,69 @@ textarea {
17731795
font-size: 1em;
17741796
}
17751797

1798+
.jump-to-note-dialog .modal-dialog {
1799+
max-width: 900px;
1800+
width: 90%;
1801+
}
1802+
17761803
.jump-to-note-dialog .modal-header {
17771804
align-items: center;
17781805
}
17791806

17801807
.jump-to-note-dialog .modal-body {
17811808
padding: 0;
1809+
min-height: 200px;
17821810
}
17831811

17841812
.jump-to-note-results .aa-dropdown-menu {
1785-
max-height: 40vh;
1813+
max-height: calc(80vh - 200px);
1814+
width: 100%;
1815+
max-width: none;
1816+
overflow-y: auto;
1817+
overflow-x: hidden;
1818+
text-overflow: ellipsis;
1819+
box-shadow: none;
1820+
}
1821+
1822+
.jump-to-note-results {
1823+
width: 100%;
17861824
}
17871825

17881826
.jump-to-note-results .aa-suggestions {
1789-
padding: 1rem;
1827+
padding: 0;
1828+
width: 100%;
1829+
}
1830+
1831+
.jump-to-note-results .aa-dropdown-menu .aa-suggestion {
1832+
white-space: normal;
1833+
padding: 2px 12px !important;
1834+
line-height: 1.1;
1835+
position: relative;
1836+
border-radius: 0;
1837+
margin: 0 !important;
1838+
}
1839+
1840+
.jump-to-note-results .note-suggestion {
1841+
margin: 0;
1842+
padding: 0;
1843+
line-height: 1;
1844+
}
1845+
1846+
.jump-to-note-results .aa-suggestion:not(:last-child)::after {
1847+
display: none; /* Remove dividers for more compact look */
1848+
}
1849+
1850+
.jump-to-note-results .aa-suggestion:last-child::after {
1851+
display: none;
1852+
}
1853+
1854+
.jump-to-note-results .aa-suggestion.disabled::after {
1855+
display: none;
1856+
}
1857+
1858+
.jump-to-note-results .aa-dropdown-menu .aa-suggestion:hover,
1859+
.jump-to-note-results .aa-dropdown-menu .aa-cursor {
1860+
background-color: var(--hover-item-background-color, #f8f9fa);
17901861
}
17911862

17921863
/* Command palette styling */
@@ -1804,8 +1875,24 @@ textarea {
18041875

18051876
.jump-to-note-dialog .aa-cursor .command-suggestion,
18061877
.jump-to-note-dialog .aa-suggestion:hover .command-suggestion {
1807-
border-left-color: var(--link-color);
1808-
background-color: var(--hover-background-color);
1878+
background-color: transparent;
1879+
}
1880+
1881+
.jump-to-note-dialog .show-in-full-search,
1882+
.jump-to-note-results .show-in-full-search {
1883+
border-top: 1px solid var(--main-border-color);
1884+
padding-top: 12px;
1885+
margin-top: 12px;
1886+
}
1887+
1888+
.jump-to-note-results .aa-suggestion .search-notes-action {
1889+
border-top: 1px solid var(--main-border-color);
1890+
margin-top: 8px;
1891+
padding-top: 8px;
1892+
}
1893+
1894+
.jump-to-note-results .aa-suggestion:has(.search-notes-action)::after {
1895+
display: none;
18091896
}
18101897

18111898
.jump-to-note-dialog .command-icon {
@@ -2262,7 +2349,8 @@ footer.webview-footer button {
22622349

22632350
/* Search result highlighting */
22642351
.search-result-title b,
2265-
.search-result-content b {
2352+
.search-result-content b,
2353+
.search-result-attributes b {
22662354
font-weight: 900;
22672355
color: var(--admonition-warning-accent-color);
22682356
}

apps/client/src/stylesheets/theme-next-dark.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989

9090
--menu-text-color: #e3e3e3;
9191
--menu-background-color: #222222d9;
92+
--menu-background-color-no-backdrop: #1b1b1b;
9293
--menu-item-icon-color: #8c8c8c;
9394
--menu-item-disabled-opacity: 0.5;
9495
--menu-item-keyboard-shortcut-color: #ffffff8f;

apps/client/src/stylesheets/theme-next-light.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383

8484
--menu-text-color: #272727;
8585
--menu-background-color: #ffffffd9;
86+
--menu-background-color-no-backdrop: #fdfdfd;
8687
--menu-item-icon-color: #727272;
8788
--menu-item-disabled-opacity: 0.6;
8889
--menu-item-keyboard-shortcut-color: #666666a8;

apps/client/src/stylesheets/theme-next/base.css

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@
8383
--tab-note-icons: true;
8484
}
8585

86+
body.backdrop-effects-disabled {
87+
/* Backdrop effects are disabled, replace the menu background color with the
88+
* no-backdrop fallback color */
89+
--menu-background-color: var(--menu-background-color-no-backdrop);
90+
}
91+
8692
/*
8793
* MENUS
8894
*
@@ -532,8 +538,8 @@ body.mobile .dropdown-menu .dropdown-item.submenu-open .dropdown-toggle::after {
532538
/* List item */
533539
.jump-to-note-dialog .aa-suggestions div,
534540
.note-detail-empty .aa-suggestions div {
535-
border-radius: 6px;
536-
padding: 6px 12px;
541+
border-radius: 0;
542+
padding: 12px 16px;
537543
color: var(--menu-text-color);
538544
cursor: default;
539545
}

apps/client/src/translations/cn/translation.json

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1871,7 +1871,12 @@
18711871
"selected_provider": "已选提供商",
18721872
"selected_provider_description": "选择用于聊天和补全功能的AI提供商",
18731873
"select_model": "选择模型...",
1874-
"select_provider": "选择提供商..."
1874+
"select_provider": "选择提供商...",
1875+
"ai_enabled": "已启用 AI 功能",
1876+
"ai_disabled": "已禁用 AI 功能",
1877+
"no_models_found_online": "找不到模型。请检查您的 API 密钥及设置。",
1878+
"no_models_found_ollama": "找不到 Ollama 模型。请确认 Ollama 是否正在运行。",
1879+
"error_fetching": "获取模型失败:{{error}}"
18751880
},
18761881
"code-editor-options": {
18771882
"title": "编辑器"
@@ -1999,5 +2004,21 @@
19992004
"next_theme_message": "当前使用旧版主题,要试用新主题吗?",
20002005
"next_theme_button": "试用新主题",
20012006
"dismiss": "关闭"
2007+
},
2008+
"settings": {
2009+
"related_settings": "相关设置"
2010+
},
2011+
"settings_appearance": {
2012+
"related_code_blocks": "文本笔记中代码块的色彩方案",
2013+
"related_code_notes": "代码笔记的色彩方案"
2014+
},
2015+
"units": {
2016+
"percentage": "%"
2017+
},
2018+
"ui-performance": {
2019+
"title": "性能",
2020+
"enable-motion": "启用过渡和动画",
2021+
"enable-shadows": "启用阴影",
2022+
"enable-backdrop-effects": "启用菜单、弹窗和面板的背景效果"
20022023
}
20032024
}

0 commit comments

Comments
 (0)