mirror of
https://github.com/zadam/trilium.git
synced 2025-11-11 07:45:51 +01:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
118e11c3fd | ||
|
|
b54765113e | ||
|
|
ed08893996 | ||
|
|
20286d53c8 | ||
|
|
9c1a34fe7c | ||
|
|
e70c6b69b8 | ||
|
|
9b69b0ad0d | ||
|
|
3776c40b8d | ||
|
|
c7369bc9b3 | ||
|
|
b741662fde | ||
|
|
624610b17c | ||
|
|
de004bd8ba |
54
.github/workflows/playwright.yml
vendored
54
.github/workflows/playwright.yml
vendored
@@ -4,6 +4,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
- hotfix
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- "apps/website/**"
|
- "apps/website/**"
|
||||||
pull_request:
|
pull_request:
|
||||||
@@ -13,8 +14,24 @@ permissions:
|
|||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
main:
|
e2e:
|
||||||
runs-on: ubuntu-latest
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- name: linux-x64
|
||||||
|
os: ubuntu-22.04
|
||||||
|
arch: x64
|
||||||
|
- name: linux-arm64
|
||||||
|
os: ubuntu-24.04-arm
|
||||||
|
arch: arm64
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
name: E2E tests on ${{ matrix.name }}
|
||||||
|
env:
|
||||||
|
TRILIUM_DOCKER: 1
|
||||||
|
TRILIUM_PORT: 8082
|
||||||
|
TRILIUM_DATA_DIR: "${{ github.workspace }}/apps/server/spec/db"
|
||||||
|
TRILIUM_INTEGRATION_TEST: memory
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
@@ -29,9 +46,34 @@ jobs:
|
|||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
- run: pnpm exec playwright install --with-deps
|
|
||||||
|
|
||||||
- run: pnpm --filter server-e2e e2e
|
- name: Install Playwright browsers
|
||||||
|
run: pnpm exec playwright install --with-deps
|
||||||
|
|
||||||
|
- name: Build the server
|
||||||
|
uses: ./.github/actions/build-server
|
||||||
|
with:
|
||||||
|
os: linux
|
||||||
|
arch: ${{ matrix.arch }}
|
||||||
|
|
||||||
|
- name: Unpack and start the server
|
||||||
|
run: |
|
||||||
|
version=$(node --eval "console.log(require('./package.json').version)")
|
||||||
|
file=$(find ./upload -name '*.tar.xz' -print -quit)
|
||||||
|
name=$(basename "$file" .tar.xz)
|
||||||
|
mkdir -p ./server-dist
|
||||||
|
tar -xvf "$file" -C ./server-dist
|
||||||
|
server_dir="./server-dist/TriliumNotes-Server-$version-linux-${{ matrix.arch }}"
|
||||||
|
if [ ! -d "$server_dir" ]; then
|
||||||
|
echo Missing dir.
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cd "$server_dir"
|
||||||
|
"./trilium.sh" &
|
||||||
|
sleep 10
|
||||||
|
|
||||||
|
- name: Server end-to-end tests
|
||||||
|
run: pnpm --filter server-e2e e2e
|
||||||
|
|
||||||
- name: Upload test report
|
- name: Upload test report
|
||||||
if: failure()
|
if: failure()
|
||||||
@@ -39,3 +81,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: e2e report
|
name: e2e report
|
||||||
path: apps/server-e2e/test-output
|
path: apps/server-e2e/test-output
|
||||||
|
|
||||||
|
- name: Kill the server
|
||||||
|
if: always()
|
||||||
|
run: pkill -f trilium || true
|
||||||
|
|||||||
@@ -24,7 +24,9 @@ export async function formatCodeBlocks($container: JQuery<HTMLElement>) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
applyCopyToClipboardButton($(codeBlock));
|
if (glob.device !== "print") {
|
||||||
|
applyCopyToClipboardButton($(codeBlock));
|
||||||
|
}
|
||||||
|
|
||||||
if (syntaxHighlightingEnabled) {
|
if (syntaxHighlightingEnabled) {
|
||||||
applySingleBlockSyntaxHighlight($(codeBlock), normalizedMimeType);
|
applySingleBlockSyntaxHighlight($(codeBlock), normalizedMimeType);
|
||||||
|
|||||||
@@ -2045,7 +2045,7 @@ body.zen .title-row .icon-action,
|
|||||||
body.zen .promoted-attributes-widget,
|
body.zen .promoted-attributes-widget,
|
||||||
body.zen .floating-buttons-children > *:not(.bx-edit-alt),
|
body.zen .floating-buttons-children > *:not(.bx-edit-alt),
|
||||||
body.zen .action-button,
|
body.zen .action-button,
|
||||||
body.zen .note-list-widget:not(.full-height) {
|
body.zen .note-split:not(.type-book) .note-list-widget {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -498,7 +498,7 @@ li.dropdown-item a.dropdown-item-button:focus-visible {
|
|||||||
transition: background-color 200ms ease-out;
|
transition: background-color 200ms ease-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
:root .note-list .note-book-card:active {
|
:root .note-list.grid-view .note-book-card:active {
|
||||||
transform: scale(.98);
|
transform: scale(.98);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -123,8 +123,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* The container */
|
/* The container */
|
||||||
div.note-detail-empty {
|
|
||||||
max-width: 70%;
|
.note-split.empty-note {
|
||||||
|
--max-content-width: 70%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.note-split.empty-note div.note-detail {
|
||||||
margin: 50px auto;
|
margin: 50px auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ export default class NoteWrapperWidget extends FlexContainer<BasicWidget> {
|
|||||||
|
|
||||||
const note = this.noteContext?.note;
|
const note = this.noteContext?.note;
|
||||||
if (!note) {
|
if (!note) {
|
||||||
this.$widget.addClass("bgfx");
|
this.$widget.addClass("bgfx empty-note");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,10 +20,10 @@ fi
|
|||||||
# Debug output
|
# Debug output
|
||||||
echo "Selected Arch: $ARCH"
|
echo "Selected Arch: $ARCH"
|
||||||
|
|
||||||
# Set Node.js version and architecture-specific filename
|
|
||||||
NODE_VERSION=22.16.0
|
|
||||||
|
|
||||||
script_dir=$(realpath $(dirname $0))
|
script_dir=$(realpath $(dirname $0))
|
||||||
|
|
||||||
|
# Set Node.js version and architecture-specific filename
|
||||||
|
NODE_VERSION=$(cat "../../.nvmrc")
|
||||||
BUILD_DIR="$script_dir/../dist"
|
BUILD_DIR="$script_dir/../dist"
|
||||||
DIST_DIR="$script_dir/../out"
|
DIST_DIR="$script_dir/../out"
|
||||||
|
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ function getEditedNotesOnDate(req: Request) {
|
|||||||
SELECT noteId FROM notes
|
SELECT noteId FROM notes
|
||||||
WHERE
|
WHERE
|
||||||
(notes.dateCreated LIKE :date OR notes.dateModified LIKE :date)
|
(notes.dateCreated LIKE :date OR notes.dateModified LIKE :date)
|
||||||
AND (noteId NOT LIKE '_%')
|
AND (notes.noteId NOT LIKE '\\_%' ESCAPE '\\')
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT noteId FROM revisions
|
SELECT noteId FROM revisions
|
||||||
WHERE revisions.dateCreated LIKE :date
|
WHERE revisions.dateCreated LIKE :date
|
||||||
|
|||||||
Reference in New Issue
Block a user