Skip to content

Commit 76f791d

Browse files
committed
2 parents 0c5adce + 3f93d19 commit 76f791d

File tree

47 files changed

+1155
-458
lines changed

Some content is hidden

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

47 files changed

+1155
-458
lines changed

.github/workflows/playwright.yml

Lines changed: 50 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
- hotfix
78
paths-ignore:
89
- "apps/website/**"
910
pull_request:
@@ -13,8 +14,24 @@ permissions:
1314
contents: read
1415

1516
jobs:
16-
main:
17-
runs-on: ubuntu-latest
17+
e2e:
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
include:
22+
- name: linux-x64
23+
os: ubuntu-22.04
24+
arch: x64
25+
- name: linux-arm64
26+
os: ubuntu-24.04-arm
27+
arch: arm64
28+
runs-on: ${{ matrix.os }}
29+
name: E2E tests on ${{ matrix.name }}
30+
env:
31+
TRILIUM_DOCKER: 1
32+
TRILIUM_PORT: 8082
33+
TRILIUM_DATA_DIR: "${{ github.workspace }}/apps/server/spec/db"
34+
TRILIUM_INTEGRATION_TEST: memory
1835
steps:
1936
- uses: actions/checkout@v5
2037
with:
@@ -29,13 +46,42 @@ jobs:
2946

3047
- name: Install dependencies
3148
run: pnpm install --frozen-lockfile
32-
- run: pnpm exec playwright install --with-deps
3349

34-
- run: pnpm --filter server-e2e e2e
50+
- name: Install Playwright browsers
51+
run: pnpm exec playwright install --with-deps
52+
53+
- name: Build the server
54+
uses: ./.github/actions/build-server
55+
with:
56+
os: linux
57+
arch: ${{ matrix.arch }}
58+
59+
- name: Unpack and start the server
60+
run: |
61+
version=$(node --eval "console.log(require('./package.json').version)")
62+
file=$(find ./upload -name '*.tar.xz' -print -quit)
63+
name=$(basename "$file" .tar.xz)
64+
mkdir -p ./server-dist
65+
tar -xvf "$file" -C ./server-dist
66+
server_dir="./server-dist/TriliumNotes-Server-$version-linux-${{ matrix.arch }}"
67+
if [ ! -d "$server_dir" ]; then
68+
echo Missing dir.
69+
exit 1
70+
fi
71+
cd "$server_dir"
72+
"./trilium.sh" &
73+
sleep 10
74+
75+
- name: Server end-to-end tests
76+
run: pnpm --filter server-e2e e2e
3577

3678
- name: Upload test report
3779
if: failure()
3880
uses: actions/upload-artifact@v5
3981
with:
4082
name: e2e report
4183
path: apps/server-e2e/test-output
84+
85+
- name: Kill the server
86+
if: always()
87+
run: pkill -f trilium || true

apps/build-docs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"keywords": [],
1010
"author": "Elian Doran <[email protected]>",
1111
"license": "AGPL-3.0-only",
12-
"packageManager": "pnpm@10.20.0",
12+
"packageManager": "pnpm@10.21.0",
1313
"devDependencies": {
14-
"@redocly/cli": "2.11.0",
14+
"@redocly/cli": "2.11.1",
1515
"archiver": "7.0.1",
1616
"fs-extra": "11.3.2",
1717
"react": "19.2.0",

apps/client/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@triliumnext/client",
3-
"version": "0.99.4",
3+
"version": "0.99.5",
44
"description": "JQuery-based client for TriliumNext, used for both web and desktop (via Electron)",
55
"private": true,
66
"license": "AGPL-3.0-only",
@@ -43,7 +43,7 @@
4343
"draggabilly": "3.0.0",
4444
"force-graph": "1.51.0",
4545
"globals": "16.5.0",
46-
"i18next": "25.6.1",
46+
"i18next": "25.6.2",
4747
"i18next-http-backend": "3.0.2",
4848
"jquery": "3.7.1",
4949
"jquery.fancytree": "2.38.5",

apps/client/src/components/app_context.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ export type CommandMappings = {
329329
exportAsPdf: CommandData;
330330
openNoteExternally: CommandData;
331331
openNoteCustom: CommandData;
332+
openNoteOnServer: CommandData;
332333
renderActiveNote: CommandData;
333334
unhoist: CommandData;
334335
reloadFrontendApp: CommandData;

apps/client/src/components/root_command_executor.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ export default class RootCommandExecutor extends Component {
6666
}
6767
}
6868

69+
openNoteOnServerCommand() {
70+
const noteId = appContext.tabManager.getActiveContextNoteId();
71+
if (noteId) {
72+
openService.openNoteOnServer(noteId);
73+
}
74+
}
75+
6976
enterProtectedSessionCommand() {
7077
protectedSessionService.enterProtectedSession();
7178
}

apps/client/src/services/open.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import utils from "./utils.js";
2+
import options from "./options.js";
23
import server from "./server.js";
34

45
type ExecFunction = (command: string, cb: (err: string, stdout: string, stderror: string) => void) => void;
@@ -171,6 +172,21 @@ function getHost() {
171172
return `${url.protocol}//${url.hostname}:${url.port}`;
172173
}
173174

175+
async function openNoteOnServer(noteId: string) {
176+
// Get the sync server host from options
177+
const syncServerHost = options.get("syncServerHost");
178+
179+
if (!syncServerHost) {
180+
console.error("No sync server host configured");
181+
return;
182+
}
183+
184+
const url = new URL(`#root/${noteId}`, syncServerHost).toString();
185+
186+
// Use window.open to ensure link opens in external browser in Electron
187+
window.open(url, '_blank', 'noopener,noreferrer');
188+
}
189+
174190
async function openDirectory(directory: string) {
175191
try {
176192
if (utils.isElectron()) {
@@ -198,5 +214,6 @@ export default {
198214
openAttachmentExternally,
199215
openNoteCustom,
200216
openAttachmentCustom,
217+
openNoteOnServer,
201218
openDirectory
202219
};

apps/client/src/services/syntax_highlight.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ export async function formatCodeBlocks($container: JQuery<HTMLElement>) {
2424
continue;
2525
}
2626

27-
applyCopyToClipboardButton($(codeBlock));
27+
if (glob.device !== "print") {
28+
applyCopyToClipboardButton($(codeBlock));
29+
}
2830

2931
if (syntaxHighlightingEnabled) {
3032
applySingleBlockSyntaxHighlight($(codeBlock), normalizedMimeType);

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,14 @@ div.promoted-attributes-container {
4242
*/
4343

4444
/* The property label */
45-
.note-info-widget-table th,
45+
.note-info-item > span:first-child,
4646
.file-properties-widget .file-table th,
4747
.image-properties > div:first-child > span > strong {
4848
opacity: 0.65;
4949
font-weight: 500;
5050
vertical-align: top;
5151
}
5252

53-
.note-info-widget-table td,
5453
.file-properties-widget .file-table td {
5554
vertical-align: top;
5655
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,7 @@
682682
"open_note_externally": "Open note externally",
683683
"open_note_externally_title": "File will be open in an external application and watched for changes. You'll then be able to upload the modified version back to Trilium.",
684684
"open_note_custom": "Open note custom",
685+
"open_note_on_server": "Open note on server",
685686
"import_files": "Import files",
686687
"export_note": "Export note",
687688
"delete_note": "Delete note",

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

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@
3939
"help_on_tree_prefix": "Ayuda sobre el prefijo del árbol",
4040
"prefix": "Prefijo: ",
4141
"save": "Guardar",
42-
"branch_prefix_saved": "Se ha guardado el prefijo de rama."
42+
"branch_prefix_saved": "Se ha guardado el prefijo de rama.",
43+
"edit_branch_prefix_multiple": "Editar prefijo de rama para {{count}} ramas",
44+
"branch_prefix_saved_multiple": "El prefijo de rama se ha guardado para {{count}} ramas.",
45+
"affected_branches": "Ramas afectadas ({{count}}):"
4346
},
4447
"bulk_actions": {
4548
"bulk_actions": "Acciones en bloque",
@@ -1107,7 +1110,8 @@
11071110
"title": "Ancho del contenido",
11081111
"default_description": "Trilium limita de forma predeterminada el ancho máximo del contenido para mejorar la legibilidad de ventanas maximizadas en pantallas anchas.",
11091112
"max_width_label": "Ancho máximo del contenido en píxeles",
1110-
"max_width_unit": "píxeles"
1113+
"max_width_unit": "píxeles",
1114+
"centerContent": "Mantener el contenido centrado"
11111115
},
11121116
"native_title_bar": {
11131117
"title": "Barra de título nativa (requiere reiniciar la aplicación)",
@@ -2079,5 +2083,14 @@
20792083
},
20802084
"collections": {
20812085
"rendering_error": "No se puede mostrar contenido debido a un error."
2086+
},
2087+
"read-only-info": {
2088+
"read-only-note": "Actualmente, está viendo una nota de solo lectura.",
2089+
"auto-read-only-note": "Esta nota se muestra en modo de solo lectura para una carga más rápida.",
2090+
"auto-read-only-learn-more": "Para saber más",
2091+
"edit-note": "Editar nota"
2092+
},
2093+
"calendar_view": {
2094+
"delete_note": "Eliminar nota..."
20822095
}
20832096
}

0 commit comments

Comments
 (0)