Merge remote-tracking branch 'origin/develop' into feature/client_typescript_port1
; Conflicts: ; package-lock.json ; package.json ; src/public/app/components/app_context.ts ; src/public/app/services/hoisted_note.ts ; src/public/app/services/open.ts ; src/public/app/services/toast.ts
261
.github/workflows/main-docker.yml
vendored
Normal file
@ -0,0 +1,261 @@
|
|||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "develop"
|
||||||
|
- "feature/update**"
|
||||||
|
- "feature/server_esm**"
|
||||||
|
paths-ignore:
|
||||||
|
- "docs/**"
|
||||||
|
- "bin/**"
|
||||||
|
tags:
|
||||||
|
- "v*"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
GHCR_REGISTRY: ghcr.io
|
||||||
|
DOCKERHUB_REGISTRY: docker.io
|
||||||
|
IMAGE_NAME: ${{ github.repository_owner }}/notes
|
||||||
|
TEST_TAG: ${{ github.repository_owner }}/notes:test
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test_docker:
|
||||||
|
name: Check Docker build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- dockerfile: Dockerfile.alpine
|
||||||
|
- dockerfile: Dockerfile
|
||||||
|
steps:
|
||||||
|
- name: Checkout the repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set IMAGE_NAME to lowercase
|
||||||
|
run: echo "IMAGE_NAME=${IMAGE_NAME,,}" >> $GITHUB_ENV
|
||||||
|
- name: Set TEST_TAG to lowercase
|
||||||
|
run: echo "TEST_TAG=${TEST_TAG,,}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Set up node & dependencies
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
cache: "npm"
|
||||||
|
|
||||||
|
- run: npm ci
|
||||||
|
|
||||||
|
- name: Run the TypeScript build
|
||||||
|
run: npx tsc
|
||||||
|
|
||||||
|
- name: Create server-package.json
|
||||||
|
run: cat package.json | grep -v electron > server-package.json
|
||||||
|
|
||||||
|
- name: Build and export to Docker
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ${{ matrix.dockerfile }}
|
||||||
|
load: true
|
||||||
|
tags: ${{ env.TEST_TAG }}
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
|
|
||||||
|
- name: Validate container run output
|
||||||
|
run: |
|
||||||
|
CONTAINER_ID=$(docker run -d --log-driver=journald --rm --name trilium_local ${{ env.TEST_TAG }})
|
||||||
|
echo "Container ID: $CONTAINER_ID"
|
||||||
|
|
||||||
|
- name: Wait for the healthchecks to pass
|
||||||
|
uses: stringbean/docker-healthcheck-action@v1
|
||||||
|
with:
|
||||||
|
container: trilium_local
|
||||||
|
wait-time: 50
|
||||||
|
require-status: running
|
||||||
|
require-healthy: true
|
||||||
|
|
||||||
|
# Print the entire log of the container thus far, regardless if the healthcheck failed or succeeded
|
||||||
|
- name: Print entire log
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
journalctl -u docker CONTAINER_NAME=trilium_local --no-pager
|
||||||
|
|
||||||
|
build:
|
||||||
|
name: Build Docker images
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- test_docker
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
attestations: write
|
||||||
|
id-token: write
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- dockerfile: Dockerfile.alpine
|
||||||
|
platform: linux/amd64
|
||||||
|
- dockerfile: Dockerfile
|
||||||
|
platform: linux/arm64
|
||||||
|
- dockerfile: Dockerfile
|
||||||
|
platform: linux/arm/v7
|
||||||
|
steps:
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
platform=${{ matrix.platform }}
|
||||||
|
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
|
||||||
|
- name: Set IMAGE_NAME to lowercase
|
||||||
|
run: echo "IMAGE_NAME=${IMAGE_NAME,,}" >> $GITHUB_ENV
|
||||||
|
- name: Set TEST_TAG to lowercase
|
||||||
|
run: echo "TEST_TAG=${TEST_TAG,,}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Docker meta
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v4
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
tags: |
|
||||||
|
type=ref,event=branch
|
||||||
|
type=ref,event=tag
|
||||||
|
type=sha
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
|
||||||
|
- name: Set up node & dependencies
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
cache: "npm"
|
||||||
|
- run: npm ci
|
||||||
|
- name: Run the TypeScript build
|
||||||
|
run: npx tsc
|
||||||
|
- name: Create server-package.json
|
||||||
|
run: cat package.json | grep -v electron > server-package.json
|
||||||
|
|
||||||
|
- name: Login to GHCR
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ${{ env.GHCR_REGISTRY }}
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ${{ env.DOCKERHUB_REGISTRY }}
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push by digest
|
||||||
|
id: build
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ${{ matrix.dockerfile }}
|
||||||
|
platforms: ${{ matrix.platform }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
outputs: type=image,name=${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true
|
||||||
|
|
||||||
|
- name: Export digest
|
||||||
|
run: |
|
||||||
|
mkdir -p /tmp/digests
|
||||||
|
digest="${{ steps.build.outputs.digest }}"
|
||||||
|
touch "/tmp/digests/${digest#sha256:}"
|
||||||
|
|
||||||
|
- name: Upload digest
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: digests-${{ env.PLATFORM_PAIR }}
|
||||||
|
path: /tmp/digests/*
|
||||||
|
if-no-files-found: error
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
|
merge:
|
||||||
|
name: Merge manifest lists
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- build
|
||||||
|
steps:
|
||||||
|
- name: Download digests
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
path: /tmp/digests
|
||||||
|
pattern: digests-*
|
||||||
|
merge-multiple: true
|
||||||
|
- name: Set IMAGE_NAME to lowercase
|
||||||
|
run: echo "IMAGE_NAME=${IMAGE_NAME,,}" >> $GITHUB_ENV
|
||||||
|
- name: Set TEST_TAG to lowercase
|
||||||
|
run: echo "TEST_TAG=${TEST_TAG,,}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Docker meta
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v4
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
|
||||||
|
- name: Login to GHCR
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ${{ env.GHCR_REGISTRY }}
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ${{ env.DOCKERHUB_REGISTRY }}
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Create manifest list and push
|
||||||
|
working-directory: /tmp/digests
|
||||||
|
run: |
|
||||||
|
# Extract the branch or tag name from the ref
|
||||||
|
REF_NAME=$(echo "${GITHUB_REF}" | sed 's/refs\/heads\///' | sed 's/refs\/tags\///')
|
||||||
|
|
||||||
|
# Create and push the manifest list with both the branch/tag name and the commit SHA
|
||||||
|
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
||||||
|
-t ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}:${REF_NAME} \
|
||||||
|
$(printf '${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)
|
||||||
|
|
||||||
|
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
||||||
|
-t ${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:${REF_NAME} \
|
||||||
|
$(printf '${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)
|
||||||
|
|
||||||
|
# If the ref is a tag, also tag the image as stable as this is part of a 'release'
|
||||||
|
# and only go in the `if` if there is NOT a `-` in the tag's name, due to tagging of `-alpha`, `-beta`, etc...
|
||||||
|
if [[ "${GITHUB_REF}" == refs/tags/* && ! "${REF_NAME}" =~ - ]]; then
|
||||||
|
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
||||||
|
-t ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}:stable \
|
||||||
|
$(printf '${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)
|
||||||
|
|
||||||
|
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
||||||
|
-t ${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:stable \
|
||||||
|
$(printf '${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Inspect image
|
||||||
|
run: |
|
||||||
|
docker buildx imagetools inspect ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }}
|
||||||
|
docker buildx imagetools inspect ${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }}
|
222
.github/workflows/main.yml
vendored
@ -2,80 +2,76 @@ name: Main
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'develop'
|
- "feature/update**"
|
||||||
- 'feature/update**'
|
- "feature/server_esm**"
|
||||||
- 'feature/server_esm**'
|
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'docs/**'
|
- "docs/**"
|
||||||
- 'bin/**'
|
- ".github/workflows/main-docker.yml"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
|
||||||
REGISTRY: ghcr.io
|
|
||||||
IMAGE_NAME: ${{ github.repository }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_darwin-x64:
|
make-electron:
|
||||||
name: Build macOS x86_64
|
name: Make Electron
|
||||||
runs-on: ubuntu-latest
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
arch: [x64, arm64]
|
||||||
|
os:
|
||||||
|
- name: macos
|
||||||
|
image: macos-latest
|
||||||
|
extension: dmg
|
||||||
|
- name: linux
|
||||||
|
image: ubuntu-latest
|
||||||
|
extension: deb
|
||||||
|
- name: windows
|
||||||
|
image: windows-latest
|
||||||
|
extension: exe
|
||||||
|
runs-on: ${{ matrix.os.image }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Set up node & dependencies
|
- name: Set up node & dependencies
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: "npm"
|
- name: Set up Python for appdmg to be installed
|
||||||
- run: npm ci
|
if: ${{ matrix.os.name == 'macos' }}
|
||||||
- run: |
|
run: brew install python-setuptools
|
||||||
npm run update-build-info
|
- name: Install dependencies
|
||||||
./bin/build-mac-x64.sh
|
run: npm ci
|
||||||
- uses: actions/upload-artifact@v4
|
- name: Update build info
|
||||||
|
run: npm run update-build-info
|
||||||
|
- name: Run electron-forge
|
||||||
|
run: npm run make-electron -- --arch=${{ matrix.arch }}
|
||||||
|
- name: Prepare artifacts (Unix)
|
||||||
|
if: runner.os != 'windows'
|
||||||
|
run: |
|
||||||
|
mkdir -p upload
|
||||||
|
file=$(find out/make -name '*.zip' -print -quit)
|
||||||
|
cp "$file" "upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}-${{ github.ref_name }}.zip"
|
||||||
|
file=$(find out/make -name '*.${{ matrix.os.extension }}' -print -quit)
|
||||||
|
cp "$file" "upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}-${{ github.ref_name }}.${{ matrix.os.extension }}"
|
||||||
|
- name: Prepare artifacts (Windows)
|
||||||
|
if: runner.os == 'windows'
|
||||||
|
run: |
|
||||||
|
mkdir upload
|
||||||
|
$file = Get-ChildItem -Path out/make -Filter '*.zip' -Recurse | Select-Object -First 1
|
||||||
|
Copy-Item -Path $file.FullName -Destination "upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}-${{ github.ref_name }}.zip"
|
||||||
|
$file = Get-ChildItem -Path out/make -Filter '*.${{ matrix.os.extension }}' -Recurse | Select-Object -First 1
|
||||||
|
Copy-Item -Path $file.FullName -Destination "upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}-${{ github.ref_name }}.${{ matrix.os.extension }}"
|
||||||
|
- name: Publish artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: trilium-mac-x64.zip
|
name: TriliumNextNotes ${{ matrix.os.name }} ${{ matrix.arch }}.zip
|
||||||
path: dist/trilium-mac-x64*.zip
|
path: upload/*.zip
|
||||||
build_darwin-arm64:
|
- name: Publish installer artifacts
|
||||||
name: Build macOS aarch64
|
uses: actions/upload-artifact@v4
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Set up node & dependencies
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
name: TriliumNextNotes ${{ matrix.os.name }} ${{ matrix.arch }}.${{matrix.os.extension}}
|
||||||
cache: "npm"
|
path: upload/*.${{ matrix.os.extension }}
|
||||||
- run: npm ci
|
|
||||||
- run: |
|
|
||||||
npm run update-build-info
|
|
||||||
./bin/build-mac-arm64.sh
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: trilium-mac-arm64.zip
|
|
||||||
path: dist/trilium-mac-arm64*.zip
|
|
||||||
build_linux-x64:
|
|
||||||
name: Build Linux x86_64
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Set up node & dependencies
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
cache: "npm"
|
|
||||||
- run: npm ci
|
|
||||||
- run: |
|
|
||||||
npm run update-build-info
|
|
||||||
./bin/build-linux-x64.sh
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: trilium-linux-x64.tar.xz
|
|
||||||
path: dist/trilium-linux-x64-*.tar.xz
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: trilium_amd64.deb
|
|
||||||
path: dist/trilium_*.deb
|
|
||||||
build_linux_server-x64:
|
build_linux_server-x64:
|
||||||
name: Build Linux Server x86_64
|
name: Build Linux Server x86_64
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -86,103 +82,19 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: "npm"
|
cache: "npm"
|
||||||
- run: npm ci
|
- name: Install dependencies
|
||||||
- run: |
|
run: npm ci
|
||||||
|
- name: Run Linux server build (x86_64)
|
||||||
|
run: |
|
||||||
npm run update-build-info
|
npm run update-build-info
|
||||||
./bin/build-server.sh
|
./bin/build-server.sh
|
||||||
|
- name: Prepare artifacts
|
||||||
|
if: runner.os != 'windows'
|
||||||
|
run: |
|
||||||
|
mkdir -p upload
|
||||||
|
file=$(find dist -name '*.tar.xz' -print -quit)
|
||||||
|
cp "$file" "upload/TriliumNextNotes-linux-x64-${{ github.ref_name }}.tar.xz"
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: trilium-linux-x64-server.tar.xz
|
name: TriliumNextNotes linux server x64
|
||||||
path: dist/trilium-linux-x64-server-*.tar.xz
|
path: upload/TriliumNextNotes-linux-x64-${{ github.ref_name }}.tar.xz
|
||||||
build_windows-x64:
|
|
||||||
name: Build Windows x86_64
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Set up Wine
|
|
||||||
run: |
|
|
||||||
sudo dpkg --add-architecture i386
|
|
||||||
wget -qO - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
|
|
||||||
sudo add-apt-repository ppa:cybermax-dexter/sdl2-backport
|
|
||||||
sudo apt-add-repository "deb https://dl.winehq.org/wine-builds/ubuntu $(lsb_release -cs) main"
|
|
||||||
sudo apt install --install-recommends winehq-stable
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Set up node & dependencies
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
cache: "npm"
|
|
||||||
- run: npm ci
|
|
||||||
- run: |
|
|
||||||
npm run update-build-info
|
|
||||||
./bin/build-win-x64.sh DONTPACK
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: trilium-windows-x64
|
|
||||||
path: dist/trilium-windows-x64
|
|
||||||
build_windows-installer:
|
|
||||||
name: Build Windows x86_64 (Setup)
|
|
||||||
runs-on: windows-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Set up node & dependencies
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
cache: "npm"
|
|
||||||
- run: npm ci
|
|
||||||
- name: Run installer build
|
|
||||||
run: |
|
|
||||||
npm run update-build-info
|
|
||||||
npm run make-electron
|
|
||||||
- name: Publish installer artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: TriliumNext Notes for Windows (Setup)
|
|
||||||
path: out/make/squirrel.windows/x64/*.exe
|
|
||||||
build_docker:
|
|
||||||
name: Build Docker image
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
attestations: write
|
|
||||||
id-token: write
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Log in to the Container registry
|
|
||||||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
|
|
||||||
with:
|
|
||||||
registry: ${{ env.REGISTRY }}
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Extract metadata (tags, labels) for Docker
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
|
|
||||||
with:
|
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
||||||
- name: Set up node & dependencies
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
cache: "npm"
|
|
||||||
- run: npm ci
|
|
||||||
- name: Run the TypeScript build
|
|
||||||
run: npx tsc
|
|
||||||
- name: Create server-package.json
|
|
||||||
run: cat package.json | grep -v electron > server-package.json
|
|
||||||
- uses: docker/setup-buildx-action@v3
|
|
||||||
- uses: docker/build-push-action@v6
|
|
||||||
id: push
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
push: true
|
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
|
||||||
cache-from: type=gha
|
|
||||||
cache-to: type=gha,mode=max
|
|
||||||
- name: Generate artifact attestation
|
|
||||||
uses: actions/attest-build-provenance@v1
|
|
||||||
with:
|
|
||||||
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
|
|
||||||
subject-digest: ${{ steps.push.outputs.digest }}
|
|
||||||
push-to-registry: true
|
|
||||||
|
126
.github/workflows/nightly.yml
vendored
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
name: Nightly Release
|
||||||
|
on:
|
||||||
|
# This can be used to automatically publish nightlies at UTC nighttime
|
||||||
|
schedule:
|
||||||
|
- cron: '0 2 * * *' # run at 2 AM UTC
|
||||||
|
# This can be used to allow manually triggering nightlies from the web interface
|
||||||
|
workflow_dispatch:
|
||||||
|
env:
|
||||||
|
GITHUB_UPLOAD_URL: https://uploads.github.com/repos/TriliumNext/Notes/releases/179589950/assets{?name,label}
|
||||||
|
GITHUB_RELEASE_ID: 179589950
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
jobs:
|
||||||
|
nightly-electron:
|
||||||
|
name: Deploy nightly
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
arch: [x64, arm64]
|
||||||
|
os:
|
||||||
|
- name: macos
|
||||||
|
image: macos-latest
|
||||||
|
extension: dmg
|
||||||
|
- name: linux
|
||||||
|
image: ubuntu-latest
|
||||||
|
extension: deb
|
||||||
|
- name: windows
|
||||||
|
image: windows-latest
|
||||||
|
extension: exe
|
||||||
|
runs-on: ${{ matrix.os.image }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Set up node & dependencies
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
- name: Set up Python for appdmg to be installed
|
||||||
|
if: ${{ matrix.os.name == 'macos' }}
|
||||||
|
run: brew install python-setuptools
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
- name: Update build info
|
||||||
|
run: npm run update-build-info
|
||||||
|
- name: Run electron-forge
|
||||||
|
run: npm run make-electron -- --arch=${{ matrix.arch }}
|
||||||
|
- name: Prepare artifacts (Unix)
|
||||||
|
if: runner.os != 'windows'
|
||||||
|
run: |
|
||||||
|
mkdir -p upload
|
||||||
|
file=$(find out/make -name '*.zip' -print -quit)
|
||||||
|
cp "$file" "upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}.zip"
|
||||||
|
file=$(find out/make -name '*.${{ matrix.os.extension }}' -print -quit)
|
||||||
|
cp "$file" "upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}.${{ matrix.os.extension }}"
|
||||||
|
- name: Prepare artifacts (Windows)
|
||||||
|
if: runner.os == 'windows'
|
||||||
|
run: |
|
||||||
|
mkdir upload
|
||||||
|
$file = Get-ChildItem -Path out/make -Filter '*.zip' -Recurse | Select-Object -First 1
|
||||||
|
Copy-Item -Path $file.FullName -Destination "upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}.zip"
|
||||||
|
$file = Get-ChildItem -Path out/make -Filter '*.${{ matrix.os.extension }}' -Recurse | Select-Object -First 1
|
||||||
|
Copy-Item -Path $file.FullName -Destination "upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}.${{ matrix.os.extension }}"
|
||||||
|
- name: Publish artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: TriliumNextNotes ${{ matrix.os.name }} ${{ matrix.arch }}
|
||||||
|
path: upload/*.zip
|
||||||
|
overwrite: true
|
||||||
|
- name: Publish installer artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: TriliumNextNotes ${{ matrix.os.name }} ${{ matrix.arch }}
|
||||||
|
path: upload/*.${{ matrix.os.extension }}
|
||||||
|
overwrite: true
|
||||||
|
|
||||||
|
- name: Deploy release
|
||||||
|
uses: WebFreak001/deploy-nightly@v3.1.0
|
||||||
|
with:
|
||||||
|
upload_url: ${{ env.GITHUB_UPLOAD_URL }}
|
||||||
|
release_id: ${{ env.GITHUB_RELEASE_ID }}
|
||||||
|
asset_path: upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}.zip # path to archive to upload
|
||||||
|
asset_name: TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}-nightly.zip # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash
|
||||||
|
asset_content_type: application/zip # required by GitHub API
|
||||||
|
- name: Deploy installer release
|
||||||
|
uses: WebFreak001/deploy-nightly@v3.1.0
|
||||||
|
with:
|
||||||
|
upload_url: ${{ env.GITHUB_UPLOAD_URL }}
|
||||||
|
release_id: ${{ env.GITHUB_RELEASE_ID }}
|
||||||
|
asset_path: upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}.${{ matrix.os.extension }} # path to archive to upload
|
||||||
|
asset_name: TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}-nightly.${{ matrix.os.extension }} # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash
|
||||||
|
asset_content_type: application/zip # required by GitHub API
|
||||||
|
nightly-server:
|
||||||
|
name: Deploy server nightly
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Set up node & dependencies
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
cache: "npm"
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
- name: Run Linux server build (x86_64)
|
||||||
|
run: |
|
||||||
|
npm run update-build-info
|
||||||
|
./bin/build-server.sh
|
||||||
|
- name: Prepare artifacts
|
||||||
|
if: runner.os != 'windows'
|
||||||
|
run: |
|
||||||
|
mkdir -p upload
|
||||||
|
file=$(find dist -name '*.tar.xz' -print -quit)
|
||||||
|
cp "$file" "upload/TriliumNextNotes-linux-x64-${{ github.ref_name }}.tar.xz"
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: TriliumNextNotes linux server x64
|
||||||
|
path: upload/TriliumNextNotes-linux-x64-${{ github.ref_name }}.tar.xz
|
||||||
|
overwrite: true
|
||||||
|
|
||||||
|
- name: Deploy release
|
||||||
|
uses: WebFreak001/deploy-nightly@v3.1.0
|
||||||
|
with:
|
||||||
|
upload_url: ${{ env.GITHUB_UPLOAD_URL }}
|
||||||
|
release_id: ${{ env.GITHUB_RELEASE_ID }}
|
||||||
|
asset_path: upload/TriliumNextNotes-linux-x64-${{ github.ref_name }}.tar.xz # path to archive to upload
|
||||||
|
asset_name: TriliumNextNotes-linux-x64-nightly.zip # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash
|
||||||
|
asset_content_type: application/zip # required by GitHub API
|
27
.github/workflows/playwright.yml
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
name: Playwright Tests
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main, master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ main, master ]
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
timeout-minutes: 60
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: lts/*
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
- name: Install Playwright Browsers
|
||||||
|
run: npx playwright install --with-deps
|
||||||
|
- name: Run Playwright tests
|
||||||
|
run: npx playwright test
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
name: playwright-report
|
||||||
|
path: playwright-report/
|
||||||
|
retention-days: 30
|
95
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
name: Release
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v*"
|
||||||
|
workflow_dispatch:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
make-electron:
|
||||||
|
name: Make Electron
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
arch: [x64, arm64]
|
||||||
|
os:
|
||||||
|
- name: macos
|
||||||
|
image: macos-latest
|
||||||
|
extension: dmg
|
||||||
|
- name: linux
|
||||||
|
image: ubuntu-latest
|
||||||
|
extension: deb
|
||||||
|
- name: windows
|
||||||
|
image: windows-latest
|
||||||
|
extension: exe
|
||||||
|
runs-on: ${{ matrix.os.image }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Set up node & dependencies
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
- name: Set up Python for appdmg to be installed
|
||||||
|
if: ${{ matrix.os.name == 'macos' }}
|
||||||
|
run: brew install python-setuptools
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
- name: Update build info
|
||||||
|
run: npm run update-build-info
|
||||||
|
- name: Run electron-forge
|
||||||
|
run: npm run make-electron -- --arch=${{ matrix.arch }}
|
||||||
|
- name: Prepare artifacts (Unix)
|
||||||
|
if: runner.os != 'windows'
|
||||||
|
run: |
|
||||||
|
mkdir -p upload
|
||||||
|
file=$(find out/make -name '*.zip' -print -quit)
|
||||||
|
cp "$file" "upload/TriliumNextNotes-${{ github.ref_name }}-${{ matrix.os.name }}-${{ matrix.arch }}.zip"
|
||||||
|
file=$(find out/make -name '*.${{ matrix.os.extension }}' -print -quit)
|
||||||
|
cp "$file" "upload/TriliumNextNotes-${{ github.ref_name }}-${{ matrix.os.name }}-${{ matrix.arch }}.${{ matrix.os.extension }}"
|
||||||
|
- name: Prepare artifacts (Windows)
|
||||||
|
if: runner.os == 'windows'
|
||||||
|
run: |
|
||||||
|
mkdir upload
|
||||||
|
$file = Get-ChildItem -Path out/make -Filter '*.zip' -Recurse | Select-Object -First 1
|
||||||
|
Copy-Item -Path $file.FullName -Destination "upload/TriliumNextNotes-${{ github.ref_name }}-${{ matrix.os.name }}-${{ matrix.arch }}.zip"
|
||||||
|
$file = Get-ChildItem -Path out/make -Filter '*.${{ matrix.os.extension }}' -Recurse | Select-Object -First 1
|
||||||
|
Copy-Item -Path $file.FullName -Destination "upload/TriliumNextNotes-${{ github.ref_name }}-${{ matrix.os.name }}-${{ matrix.arch }}.${{ matrix.os.extension }}"
|
||||||
|
- name: Publish release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
draft: true
|
||||||
|
fail_on_unmatched_files: true
|
||||||
|
files: upload/*.*
|
||||||
|
build_linux_server-x64:
|
||||||
|
name: Build Linux Server x86_64
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Set up node & dependencies
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
cache: "npm"
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
- name: Run Linux server build (x86_64)
|
||||||
|
run: |
|
||||||
|
npm run update-build-info
|
||||||
|
./bin/build-server.sh
|
||||||
|
- name: Prepare artifacts
|
||||||
|
if: runner.os != 'windows'
|
||||||
|
run: |
|
||||||
|
mkdir -p upload
|
||||||
|
file=$(find dist -name '*.tar.xz' -print -quit)
|
||||||
|
cp "$file" "upload/TriliumNextNotes-${{ github.ref_name }}-server-linux-x64.tar.xz"
|
||||||
|
- name: Publish release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
draft: true
|
||||||
|
fail_on_unmatched_files: true
|
||||||
|
files: upload/*.*
|
16
.gitignore
vendored
@ -5,15 +5,31 @@ build/
|
|||||||
src/public/app-dist/
|
src/public/app-dist/
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
yarn-error.log
|
yarn-error.log
|
||||||
|
po-*/
|
||||||
|
|
||||||
*.db
|
*.db
|
||||||
|
!integration-tests/db/document.db
|
||||||
|
integration-tests/db/log
|
||||||
|
integration-tests/db/sessions
|
||||||
|
integration-tests/db/backup
|
||||||
|
integration-tests/db/session_secret.txt
|
||||||
|
|
||||||
config.ini
|
config.ini
|
||||||
cert.key
|
cert.key
|
||||||
cert.crt
|
cert.crt
|
||||||
server-package.json
|
server-package.json
|
||||||
.idea/httpRequests/
|
.idea/httpRequests/
|
||||||
|
.idea/shelf/
|
||||||
data/
|
data/
|
||||||
data-test/
|
data-test/
|
||||||
tmp/
|
tmp/
|
||||||
.eslintcache
|
.eslintcache
|
||||||
|
|
||||||
out/
|
out/
|
||||||
|
|
||||||
|
images/app-icons/mac/*.png
|
||||||
|
/test-results/
|
||||||
|
/playwright-report/
|
||||||
|
/blob-report/
|
||||||
|
/playwright/.cache/
|
||||||
|
/playwright/.auth/
|
8
.idea/codeStyles/Project.xml
generated
@ -6,8 +6,10 @@
|
|||||||
<option name="TAB_SIZE" value="2" />
|
<option name="TAB_SIZE" value="2" />
|
||||||
</value>
|
</value>
|
||||||
</option>
|
</option>
|
||||||
<JSCodeStyleSettings version="0">
|
<codeStyleSettings language="JSON">
|
||||||
<option name="USE_EXPLICIT_JS_EXTENSION" value="TRUE" />
|
<indentOptions>
|
||||||
</JSCodeStyleSettings>
|
<option name="INDENT_SIZE" value="4" />
|
||||||
|
</indentOptions>
|
||||||
|
</codeStyleSettings>
|
||||||
</code_scheme>
|
</code_scheme>
|
||||||
</component>
|
</component>
|
3
.vscode/i18n-ally-custom-framework.yml
vendored
@ -3,6 +3,7 @@
|
|||||||
languageIds:
|
languageIds:
|
||||||
- javascript
|
- javascript
|
||||||
- typescript
|
- typescript
|
||||||
|
- html
|
||||||
|
|
||||||
# An array of RegExes to find the key usage. **The key should be captured in the first match group**.
|
# An array of RegExes to find the key usage. **The key should be captured in the first match group**.
|
||||||
# You should unescape RegEx strings in order to fit in the YAML file
|
# You should unescape RegEx strings in order to fit in the YAML file
|
||||||
@ -24,6 +25,8 @@ scopeRangeRegex: "useTranslation\\(\\s*\\[?\\s*['\"`](.*?)['\"`]"
|
|||||||
# The "$1" will be replaced by the keypath specified.
|
# The "$1" will be replaced by the keypath specified.
|
||||||
refactorTemplates:
|
refactorTemplates:
|
||||||
- t("$1")
|
- t("$1")
|
||||||
|
- ${t("$1")}
|
||||||
|
- <%= t("$1") %>
|
||||||
|
|
||||||
|
|
||||||
# If set to true, only enables this custom framework (will disable all built-in frameworks)
|
# If set to true, only enables this custom framework (will disable all built-in frameworks)
|
||||||
|
20
.vscode/i18n-ally-reviews.yml
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# Review comments generated by i18n-ally. Please commit this file.
|
||||||
|
|
||||||
|
reviews:
|
||||||
|
help.inPageSearch:
|
||||||
|
description: >-
|
||||||
|
Describes the shortcut which triggers a search within the current
|
||||||
|
page/note only
|
||||||
|
add_label.to_value:
|
||||||
|
locales:
|
||||||
|
fr:
|
||||||
|
comments:
|
||||||
|
- user:
|
||||||
|
name: Potjoe-97
|
||||||
|
email: giann@LAPTOPT490-GF
|
||||||
|
id: QXec0JUoxfGmMlpch-B1S
|
||||||
|
comment: ''
|
||||||
|
suggestion: vers la valeur
|
||||||
|
type: request_change
|
||||||
|
time: '2024-10-15T16:57:06.188Z'
|
||||||
|
resolved: true
|
12
.vscode/settings.json
vendored
@ -6,9 +6,19 @@
|
|||||||
"i18n-ally.sourceLanguage": "en",
|
"i18n-ally.sourceLanguage": "en",
|
||||||
"i18n-ally.keystyle": "nested",
|
"i18n-ally.keystyle": "nested",
|
||||||
"i18n-ally.localesPaths": [
|
"i18n-ally.localesPaths": [
|
||||||
"./src/public/translations"
|
"./src/public/translations",
|
||||||
|
"./translations"
|
||||||
],
|
],
|
||||||
"[jsonc]": {
|
"[jsonc]": {
|
||||||
"editor.defaultFormatter": "vscode.json-language-features"
|
"editor.defaultFormatter": "vscode.json-language-features"
|
||||||
},
|
},
|
||||||
|
"[javascript]": {
|
||||||
|
"editor.defaultFormatter": "vscode.typescript-language-features"
|
||||||
|
},
|
||||||
|
"[typescript]": {
|
||||||
|
"editor.defaultFormatter": "vscode.typescript-language-features"
|
||||||
|
},
|
||||||
|
"github-actions.workflows.pinned.workflows": [
|
||||||
|
".github/workflows/nightly.yml"
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
52
Dockerfile
@ -1,8 +1,8 @@
|
|||||||
# !!! Don't try to build this Dockerfile directly, run it through bin/build-docker.sh script !!!
|
# !!! Don't try to build this Dockerfile directly, run it through bin/build-docker.sh script !!!
|
||||||
FROM node:20.15.1-alpine
|
FROM node:20.15.1-bullseye-slim
|
||||||
|
|
||||||
# Configure system dependencies
|
# Configure system dependencies
|
||||||
RUN apk add --no-cache --virtual .build-dependencies \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
g++ \
|
g++ \
|
||||||
@ -11,40 +11,50 @@ RUN apk add --no-cache --virtual .build-dependencies \
|
|||||||
make \
|
make \
|
||||||
nasm \
|
nasm \
|
||||||
libpng-dev \
|
libpng-dev \
|
||||||
python3
|
python3 \
|
||||||
|
gosu \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Create app directory
|
# Create app directory
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
# Bundle app source
|
# Bundle app source
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
COPY server-package.json package.json
|
COPY server-package.json package.json
|
||||||
|
|
||||||
# Copy TypeScript build artifacts into the original directory structure.
|
# Copy TypeScript build artifacts into the original directory structure.
|
||||||
RUN ls
|
# Copy the healthcheck
|
||||||
RUN cp -R build/src/* src/.
|
RUN cp -R build/src/* src/. && \
|
||||||
RUN rm -r build
|
cp build/docker_healthcheck.js . && \
|
||||||
|
rm -r build && \
|
||||||
|
rm docker_healthcheck.ts
|
||||||
|
|
||||||
# Install app dependencies
|
# Install app dependencies
|
||||||
RUN set -x \
|
RUN apt-get purge -y --auto-remove \
|
||||||
&& npm install \
|
autoconf \
|
||||||
&& apk del .build-dependencies \
|
automake \
|
||||||
&& npm run webpack \
|
g++ \
|
||||||
&& npm prune --omit=dev \
|
gcc \
|
||||||
&& cp src/public/app/share.js src/public/app-dist/. \
|
libtool \
|
||||||
&& cp -r src/public/app/doc_notes src/public/app-dist/. \
|
make \
|
||||||
&& rm -rf src/public/app \
|
nasm \
|
||||||
&& rm src/services/asset_path.ts
|
libpng-dev \
|
||||||
|
python3 \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
RUN npm install && \
|
||||||
|
npm run webpack && \
|
||||||
|
npm prune --omit=dev
|
||||||
|
RUN cp src/public/app/share.js src/public/app-dist/. && \
|
||||||
|
cp -r src/public/app/doc_notes src/public/app-dist/. && \
|
||||||
|
rm -rf src/public/app && rm src/services/asset_path.ts
|
||||||
|
|
||||||
# Some setup tools need to be kept
|
# Some setup tools need to be kept
|
||||||
RUN apk add --no-cache su-exec shadow
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
gosu \
|
||||||
# Add application user and setup proper volume permissions
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
RUN adduser -s /bin/false node; exit 0
|
|
||||||
|
|
||||||
# Start the application
|
# Start the application
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
CMD [ "./start-docker.sh" ]
|
CMD [ "./start-docker.sh" ]
|
||||||
|
|
||||||
HEALTHCHECK --start-period=10s CMD exec su-exec node node docker_healthcheck.js
|
HEALTHCHECK --start-period=10s CMD exec gosu node node docker_healthcheck.js
|
53
Dockerfile.alpine
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
# !!! Don't try to build this Dockerfile directly, run it through bin/build-docker.sh script !!!
|
||||||
|
FROM node:20.15.1-alpine
|
||||||
|
|
||||||
|
# Configure system dependencies
|
||||||
|
RUN apk add --no-cache --virtual .build-dependencies \
|
||||||
|
autoconf \
|
||||||
|
automake \
|
||||||
|
g++ \
|
||||||
|
gcc \
|
||||||
|
libtool \
|
||||||
|
make \
|
||||||
|
nasm \
|
||||||
|
libpng-dev \
|
||||||
|
python3
|
||||||
|
|
||||||
|
# Create app directory
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
# Bundle app source
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
COPY server-package.json package.json
|
||||||
|
|
||||||
|
# Copy TypeScript build artifacts into the original directory structure.
|
||||||
|
# Copy the healthcheck
|
||||||
|
RUN cp -R build/src/* src/. && \
|
||||||
|
cp build/docker_healthcheck.js . && \
|
||||||
|
rm -r build && \
|
||||||
|
rm docker_healthcheck.ts
|
||||||
|
|
||||||
|
# Install app dependencies
|
||||||
|
RUN set -x && \
|
||||||
|
npm install && \
|
||||||
|
apk del .build-dependencies && \
|
||||||
|
npm run webpack && \
|
||||||
|
npm prune --omit=dev && \
|
||||||
|
cp src/public/app/share.js src/public/app-dist/. && \
|
||||||
|
cp -r src/public/app/doc_notes src/public/app-dist/. && \
|
||||||
|
rm -rf src/public/app && \
|
||||||
|
rm src/services/asset_path.ts
|
||||||
|
|
||||||
|
|
||||||
|
# Some setup tools need to be kept
|
||||||
|
RUN apk add --no-cache su-exec shadow
|
||||||
|
|
||||||
|
# Add application user and setup proper volume permissions
|
||||||
|
RUN adduser -s /bin/false node; exit 0
|
||||||
|
|
||||||
|
# Start the application
|
||||||
|
EXPOSE 8080
|
||||||
|
CMD [ "./start-docker.sh" ]
|
||||||
|
|
||||||
|
HEALTHCHECK --start-period=10s CMD exec su-exec node node docker_healthcheck.js
|
@ -1,6 +1,6 @@
|
|||||||
# TriliumNext Notes
|
# TriliumNext Notes
|
||||||
|
|
||||||
[English](https://github.com/TriliumNext/Notes/blob/master/README.md) | [Chinese](https://github.com/TriliumNext/Notes/blob/master/README-ZH_CN.md) | [Russian](https://github.com/TriliumNext/Notes/blob/master/README.ru.md) | [Japanese](https://github.com/TriliumNext/Notes/blob/master/README.ja.md) | [Italian](https://github.com/TriliumNext/Notes/blob/master/README.it.md)
|
[English](./README.md) | [Chinese](./README-ZH_CN.md) | [Russian](./README.ru.md) | [Japanese](./README.ja.md) | [Italian](./README.it.md) | [Spanish](./README.es.md)
|
||||||
|
|
||||||
TriliumNext Notes 是一个层次化的笔记应用程序,专注于建立大型个人知识库。请参阅[屏幕截图](https://triliumnext.github.io/Docs/Wiki/screenshot-tour)以快速了解:
|
TriliumNext Notes 是一个层次化的笔记应用程序,专注于建立大型个人知识库。请参阅[屏幕截图](https://triliumnext.github.io/Docs/Wiki/screenshot-tour)以快速了解:
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ Trilium 也提供 Flatpak:
|
|||||||
|
|
||||||
或者克隆本仓库到本地,并运行
|
或者克隆本仓库到本地,并运行
|
||||||
|
|
||||||
```
|
```shell
|
||||||
npm install
|
npm install
|
||||||
npm run start-server
|
npm run start-server
|
||||||
```
|
```
|
||||||
|
106
README.es.md
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
# TriliumNext Notes
|
||||||
|
|
||||||
|
[English](./README.md) | [Chinese](./README-ZH_CN.md) | [Russian](./README.ru.md) | [Japanese](./README.ja.md) | [Italian](./README.it.md) | [Spanish](./README.es.md)
|
||||||
|
|
||||||
|
TriliumNext Notes es una aplicación de toma de notas jerárquicas multi-plataforma y de código libre con un enfoque en la construcción de grandes bases de conocimiento personal.
|
||||||
|
|
||||||
|
Vea estas [capturas de pantalla](https://triliumnext.github.io/Docs/Wiki/screenshot-tour) para un vistazo rápido:
|
||||||
|
|
||||||
|
<a href="https://triliumnext.github.io/Docs/Wiki/screenshot-tour"><img src="https://github.com/TriliumNext/Docs/blob/main/Wiki/images/screenshot.png?raw=true" alt="Trilium Screenshot" width="1000"></a>
|
||||||
|
|
||||||
|
## ⚠️ ¿Por qué usar TriliumNext?
|
||||||
|
|
||||||
|
[El proyecto Trilium original está en modo de mantenimiento](https://github.com/zadam/trilium/issues/4620)
|
||||||
|
|
||||||
|
### ¿Cómo migrar desde Trilium?
|
||||||
|
|
||||||
|
No hay pasos de migración especiales para migrar de una instancia de zadam/Trilium a una instancia de TriliumNext/Notes. Simplemente actualice su instancia de Trilium a la última versión e [instale TriliumNext/Notes como de costumbre](#-Instalación)
|
||||||
|
|
||||||
|
## 💬 Discuta con nosotros
|
||||||
|
|
||||||
|
Siéntase libre de unirse a nuestras conversaciones oficiales. ¡Nos encantaría escuchar de las características, sugerencias o problemas que pueda tener!
|
||||||
|
|
||||||
|
- [Matrix](https://matrix.to/#/#triliumnext:matrix.org) (Para discusiones síncronas)
|
||||||
|
- La sala `General` es replicada a [XMPP](xmpp:discuss@trilium.thisgreat.party?join)
|
||||||
|
- [Discusiones de GitHub](https://github.com/TriliumNext/Notes/discussions) (Para discusiones asíncronas)
|
||||||
|
- [Wiki](https://triliumnext.github.io/Docs/) (Para preguntas frecuentes y guías de usuario)
|
||||||
|
|
||||||
|
## 🎁 Características
|
||||||
|
|
||||||
|
- Las notas pueden ser acomodadas en un árbol de profundidad arbitraria. Una sola nota puede ser colocada en múltiples lugares del árbol (vea [clonar](https://triliumnext.github.io/Docs/Wiki/cloning-notes)
|
||||||
|
- Edición de notas WYSIWYG enriquecida que incluye, por ejemplo, tablas, imágenes y [matemáticas](https://triliumnext.github.io/Docs/Wiki/text-notes) con [autoformato](https://triliumnext.github.io/Docs/Wiki/text-notes#autoformat) markdown
|
||||||
|
- Soporte para editar [notas con código fuente](https://triliumnext.github.io/Docs/Wiki/code-notes), incluyendo resaltado de sintaxis
|
||||||
|
- Rápida y sencilla [navegación entre notas](https://triliumnext.github.io/Docs/Wiki/note-navigation), búsqueda de texto completo y [elevación de notas](https://triliumnext.github.io/Docs/Wiki/note-hoisting)
|
||||||
|
- [Versionado de notas](https://triliumnext.github.io/Docs/Wiki/note-revisions) sutil
|
||||||
|
- Los [atributos](https://triliumnext.github.io/Docs/Wiki/attributes) de las notas pueden utilizarse para organización, realizar consultas y [scripts](https://triliumnext.github.io/Docs/Wiki/scripts) avanzados
|
||||||
|
- [Sincronización](https://triliumnext.github.io/Docs/Wiki/synchronization) con servidor de sincronización propio
|
||||||
|
- existe un [servicio de terceros para alojar el servidor de sincronización](https://trilium.cc/paid-hosting)
|
||||||
|
- [Compartir](https://triliumnext.github.io/Docs/Wiki/sharing) (publicar) notas al Internet público
|
||||||
|
- Fuerte [encriptación de notas](https://triliumnext.github.io/Docs/Wiki/protected-notes) con granularidad para cada nota
|
||||||
|
- Esbozo de diagramas con Excalidraw incorporado (tipo de nota «canvas»)
|
||||||
|
- [Mapas de relaciones](<https://triliumnext.github.io/Docs/Wiki/relation-map>) y [mapas de enlaces](https://triliumnext.github.io/Docs/Wiki/link-map) para visualizar las notas y sus relaciones
|
||||||
|
- [Scripting](https://triliumnext.github.io/Docs/Wiki/scripts) - vea [casos de uso avanzados](https://triliumnext.github.io/Docs/Wiki/advanced-showcases)
|
||||||
|
- [REST API](https://triliumnext.github.io/Docs/Wiki/etapi) para automatización
|
||||||
|
- Escala bien tanto en uso como en rendimiento a partir de 100,000 notas
|
||||||
|
- [Interfaz móvil](https://triliumnext.github.io/Docs/Wiki/mobile-frontend) optimizada para teléfonos inteligentes y tabletas
|
||||||
|
- [Tema nocturno](https://triliumnext.github.io/Docs/Wiki/themes)
|
||||||
|
- Importación y exportación de [Evernote](https://triliumnext.github.io/Docs/Wiki/evernote-import) y [Markdown](https://triliumnext.github.io/Docs/Wiki/markdown)
|
||||||
|
- [Web Clipper](https://triliumnext.github.io/Docs/Wiki/web-clipper) para guardar fácilmente contenido web
|
||||||
|
|
||||||
|
✨ Consulte los/las siguientes recursos/comunidades de terceros para obtener más información sobre complementos para TriliumNext:
|
||||||
|
|
||||||
|
- [awesome-trilium](https://github.com/Nriver/awesome-trilium) para temas, scripts, plugins y más de terceros.
|
||||||
|
- [TriliumRocks!](https://trilium.rocks/) para tutoriales, guías y mucho más.
|
||||||
|
|
||||||
|
## 🏗 Instalación
|
||||||
|
|
||||||
|
### Escritorio
|
||||||
|
|
||||||
|
Para usar TriliumNext en su máquina de escritorio (Linux, MacOS y Windows) tiene algunas opciones:
|
||||||
|
|
||||||
|
- Descargue la versión binaria para su plataforma desde la [página de lanzamientos](https://github.com/TriliumNext/Notes/releases/latest), descomprima el paquete y ejecute el ejecutable `trilium`.
|
||||||
|
- Acceda a TriliumNext a través de la interfaz web de una instalación de servidor (ver más abajo)
|
||||||
|
- Actualmente solo las últimas versiones de Chrome y Firefox son compatibles (y están probadas).
|
||||||
|
- (Próximamente) TriliumNext también se proporcionará como un Flatpak
|
||||||
|
|
||||||
|
### Móvil
|
||||||
|
|
||||||
|
Para usar TriliumNext en un dispositivo móvil:
|
||||||
|
|
||||||
|
- Utilice un navegador web móvil para acceder a la interfaz móvil de una instalación de servidor (ver más abajo)
|
||||||
|
- El uso de una aplicación móvil aún no está soportado ([vea aquí](https://github.com/TriliumNext/Notes/issues/72)) para seguir las mejoras móviles.
|
||||||
|
|
||||||
|
### Servidor
|
||||||
|
|
||||||
|
Para instalar TriliumNext en su servidor (incluyendo vía Docker desde [Dockerhub](https://hub.docker.com/r/triliumnext/notes)) siga la [documentación de instalación de servidor](https://triliumnext.github.io/Docs/Wiki/server-installation).
|
||||||
|
|
||||||
|
## 📝 Documentación
|
||||||
|
|
||||||
|
[Vea la Wiki para la lista completa de páginas de documentación.](https://triliumnext.github.io/Docs)
|
||||||
|
|
||||||
|
También puede leer [Patrones para una base de conocimiento personal](https://triliumnext.github.io/Docs/Wiki/patterns-of-personal-knowledge) para obtener un poco de inspiración de como podría usar TriliumNext.
|
||||||
|
|
||||||
|
## 💻 Contribuir
|
||||||
|
|
||||||
|
Clone localmente y ejecute
|
||||||
|
|
||||||
|
```shell
|
||||||
|
npm install
|
||||||
|
npm run start-server
|
||||||
|
```
|
||||||
|
|
||||||
|
## 👏 Reconocimientos
|
||||||
|
|
||||||
|
- [CKEditor 5](https://github.com/ckeditor/ckeditor5) - el mejor editor WYSIWYG en el mercado, equipo muy interactivo y atento
|
||||||
|
- [FancyTree](https://github.com/mar10/fancytree) - biblioteca de árbol muy rica en funciones sin competencia real. TriliumNext Notes no sería lo mismo sin esta.
|
||||||
|
- [CodeMirror](https://github.com/codemirror/CodeMirror) - editor de código con soporte para una gran cantidad de lenguajes
|
||||||
|
- [jsPlumb](https://github.com/jsplumb/jsplumb) - biblioteca de conectividad visual sin competencia. Usado en [mapas de relación](https://triliumnext.github.io/Docs/Wiki/Relation-map) y [mapas de enlace](https://triliumnext.github.io/Docs/Wiki/Link-map)
|
||||||
|
|
||||||
|
## 🤝 Soporte
|
||||||
|
|
||||||
|
Puede apoyar al desarrollador original de Trilium usando GitHub Sponsors, [PayPal](https://paypal.me/za4am) o Bitcoin (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2).
|
||||||
|
Apoyo para la organización TriliumNext será posible en un futuro próximo.
|
||||||
|
|
||||||
|
## 🔑 Licencia
|
||||||
|
|
||||||
|
Este programa es software libre: puede redistribuirlo y/o modificarlo bajo los términos de la Licencia Pública General de Affero GNU publicada por la Free Software Foundation, ya sea la versión 3 de la Licencia, o (a su elección) cualquier versión posterior.
|
@ -1,6 +1,6 @@
|
|||||||
# TriliumNext Notes
|
# TriliumNext Notes
|
||||||
|
|
||||||
[English](https://github.com/TriliumNext/Notes/blob/master/README.md) | [Chinese](https://github.com/TriliumNext/Notes/blob/master/README-ZH_CN.md) | [Russian](https://github.com/TriliumNext/Notes/blob/master/README.ru.md) | [Japanese](https://github.com/TriliumNext/Notes/blob/master/README.ja.md) | [Italian](https://github.com/TriliumNext/Notes/blob/master/README.it.md)
|
[English](./README.md) | [Chinese](./README-ZH_CN.md) | [Russian](./README.ru.md) | [Japanese](./README.ja.md) | [Italian](./README.it.md) | [Spanish](./README.es.md)
|
||||||
|
|
||||||
TriliumNext Notes è un'applicazione per appunti ad organizzazione gerarchica, studiata per la costruzione di archivi di conoscenza personali di grandi dimensioni.
|
TriliumNext Notes è un'applicazione per appunti ad organizzazione gerarchica, studiata per la costruzione di archivi di conoscenza personali di grandi dimensioni.
|
||||||
|
|
||||||
@ -70,7 +70,8 @@ Puoi anche leggere ["Patterns of personal knowledge base"](https://triliumnext.g
|
|||||||
## 💻 Contribuire
|
## 💻 Contribuire
|
||||||
|
|
||||||
Clona localmente ed esegui
|
Clona localmente ed esegui
|
||||||
```
|
|
||||||
|
```shell
|
||||||
npm install
|
npm install
|
||||||
npm run start-server
|
npm run start-server
|
||||||
```
|
```
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# TriliumNext Notes
|
# TriliumNext Notes
|
||||||
|
|
||||||
[English](https://github.com/TriliumNext/Notes/blob/master/README.md) | [Chinese](https://github.com/TriliumNext/Notes/blob/master/README-ZH_CN.md) | [Russian](https://github.com/TriliumNext/Notes/blob/master/README.ru.md) | [Japanese](https://github.com/TriliumNext/Notes/blob/master/README.ja.md) | [Italian](https://github.com/TriliumNext/Notes/blob/master/README.it.md)
|
[English](./README.md) | [Chinese](./README-ZH_CN.md) | [Russian](./README.ru.md) | [Japanese](./README.ja.md) | [Italian](./README.it.md) | [Spanish](./README.es.md)
|
||||||
|
|
||||||
Trilium Notes は、大規模な個人知識ベースの構築に焦点を当てた、階層型ノートアプリケーションです。概要は[スクリーンショット](https://triliumnext.github.io/Docs/Wiki/screenshot-tour)をご覧ください:
|
Trilium Notes は、大規模な個人知識ベースの構築に焦点を当てた、階層型ノートアプリケーションです。概要は[スクリーンショット](https://triliumnext.github.io/Docs/Wiki/screenshot-tour)をご覧ください:
|
||||||
|
|
||||||
@ -51,7 +51,8 @@ Trilium は Flatpak としても提供されます:
|
|||||||
## 💻 コントリビュート
|
## 💻 コントリビュート
|
||||||
|
|
||||||
または、ローカルにクローンして実行
|
または、ローカルにクローンして実行
|
||||||
```
|
|
||||||
|
```shell
|
||||||
npm install
|
npm install
|
||||||
npm run start-server
|
npm run start-server
|
||||||
```
|
```
|
||||||
|
60
README.md
@ -1,8 +1,8 @@
|
|||||||
# TriliumNext Notes
|
# TriliumNext Notes
|
||||||
|
|
||||||
[English](https://github.com/TriliumNext/Notes/blob/master/README.md) | [Chinese](https://github.com/TriliumNext/Notes/blob/master/README-ZH_CN.md) | [Russian](https://github.com/TriliumNext/Notes/blob/master/README.ru.md) | [Japanese](https://github.com/TriliumNext/Notes/blob/master/README.ja.md) | [Italian](https://github.com/TriliumNext/Notes/blob/master/README.it.md)
|
[English](./README.md) | [Chinese](./README-ZH_CN.md) | [Russian](./README.ru.md) | [Japanese](./README.ja.md) | [Italian](./README.it.md) | [Spanish](./README.es.md)
|
||||||
|
|
||||||
TriliumNext Notes is a hierarchical note taking application with focus on building large personal knowledge bases.
|
TriliumNext Notes is an open-source, cross-platform hierarchical note taking application with focus on building large personal knowledge bases.
|
||||||
|
|
||||||
See [screenshots](https://triliumnext.github.io/Docs/Wiki/screenshot-tour) for quick overview:
|
See [screenshots](https://triliumnext.github.io/Docs/Wiki/screenshot-tour) for quick overview:
|
||||||
|
|
||||||
@ -12,23 +12,22 @@ See [screenshots](https://triliumnext.github.io/Docs/Wiki/screenshot-tour) for q
|
|||||||
|
|
||||||
[The original Trilium project is in maintenance mode](https://github.com/zadam/trilium/issues/4620)
|
[The original Trilium project is in maintenance mode](https://github.com/zadam/trilium/issues/4620)
|
||||||
|
|
||||||
|
### Migrating from Trilium?
|
||||||
|
|
||||||
|
There are no special migration steps to migrate from a zadam/Trilium instance to a TriliumNext/Notes instance. Just upgrade your Trilium instance to the latest version and [install TriliumNext/Notes as usual](#-installation)
|
||||||
|
|
||||||
## 💬 Discuss with us
|
## 💬 Discuss with us
|
||||||
|
|
||||||
Feel free to join our official discussions and community. We are focused on the development on Trilium, and would love to hear what features, suggestions, or issues you may have!
|
Feel free to join our official conversations. We would love to hear what features, suggestions, or issues you may have!
|
||||||
|
|
||||||
- [Matrix](https://matrix.to/#/#triliumnext:matrix.org) (For synchronous discussions)
|
- [Matrix](https://matrix.to/#/#triliumnext:matrix.org) (For synchronous discussions)
|
||||||
|
- The `General` Matrix room is also bridged to [XMPP](xmpp:discuss@trilium.thisgreat.party?join)
|
||||||
- [Github Discussions](https://github.com/TriliumNext/Notes/discussions) (For Asynchronous discussions)
|
- [Github Discussions](https://github.com/TriliumNext/Notes/discussions) (For Asynchronous discussions)
|
||||||
- [Wiki](https://triliumnext.github.io/Docs/) (For common how-to questions and user guides)
|
- [Wiki](https://triliumnext.github.io/Docs/) (For common how-to questions and user guides)
|
||||||
|
|
||||||
The two rooms linked above are mirrored, so you can use either XMPP or Matrix, from any client you prefer, on pretty much any platform under the sun!
|
|
||||||
|
|
||||||
### Unofficial Communities
|
|
||||||
|
|
||||||
[Trilium Rocks](https://discord.gg/aqdX9mXX4r)
|
|
||||||
|
|
||||||
## 🎁 Features
|
## 🎁 Features
|
||||||
|
|
||||||
* Notes can be arranged into arbitrarily deep tree. Single note can be placed into multiple places in the tree (see [cloning](https://triliumnext.github.io/Docs/Wiki/cloning-notes)
|
* Notes can be arranged into arbitrarily deep tree. Single note can be placed into multiple places in the tree (see [cloning](https://triliumnext.github.io/Docs/Wiki/cloning-notes))
|
||||||
* Rich WYSIWYG note editing including e.g. tables, images and [math](https://triliumnext.github.io/Docs/Wiki/text-notes) with markdown [autoformat](https://triliumnext.github.io/Docs/Wiki/text-notes#autoformat)
|
* Rich WYSIWYG note editing including e.g. tables, images and [math](https://triliumnext.github.io/Docs/Wiki/text-notes) with markdown [autoformat](https://triliumnext.github.io/Docs/Wiki/text-notes#autoformat)
|
||||||
* Support for editing [notes with source code](https://triliumnext.github.io/Docs/Wiki/code-notes), including syntax highlighting
|
* Support for editing [notes with source code](https://triliumnext.github.io/Docs/Wiki/code-notes), including syntax highlighting
|
||||||
* Fast and easy [navigation between notes](https://triliumnext.github.io/Docs/Wiki/note-navigation), full text search and [note hoisting](https://triliumnext.github.io/Docs/Wiki/note-hoisting)
|
* Fast and easy [navigation between notes](https://triliumnext.github.io/Docs/Wiki/note-navigation), full text search and [note hoisting](https://triliumnext.github.io/Docs/Wiki/note-hoisting)
|
||||||
@ -48,41 +47,58 @@ The two rooms linked above are mirrored, so you can use either XMPP or Matrix, f
|
|||||||
* [Evernote](https://triliumnext.github.io/Docs/Wiki/evernote-import) and [Markdown import & export](https://triliumnext.github.io/Docs/Wiki/markdown)
|
* [Evernote](https://triliumnext.github.io/Docs/Wiki/evernote-import) and [Markdown import & export](https://triliumnext.github.io/Docs/Wiki/markdown)
|
||||||
* [Web Clipper](https://triliumnext.github.io/Docs/Wiki/web-clipper) for easy saving of web content
|
* [Web Clipper](https://triliumnext.github.io/Docs/Wiki/web-clipper) for easy saving of web content
|
||||||
|
|
||||||
✨ Check out the following third-party resources for more TriliumNext related goodies:
|
✨ Check out the following third-party resources/communities for more TriliumNext related goodies:
|
||||||
|
|
||||||
- [awesome-trilium](https://github.com/Nriver/awesome-trilium) for 3rd party themes, scripts, plugins and more.
|
- [awesome-trilium](https://github.com/Nriver/awesome-trilium) for 3rd party themes, scripts, plugins and more.
|
||||||
- [TriliumRocks!](https://trilium.rocks/) for tutorials, guides, and much more.
|
- [TriliumRocks!](https://trilium.rocks/) for tutorials, guides, and much more.
|
||||||
|
|
||||||
## 🏗 Builds
|
## 🏗 Installation
|
||||||
|
|
||||||
Trilium is provided as either desktop application (Linux and Windows) or web application hosted on your server (Linux). Mac OS desktop build is available, but it is [unsupported](https://triliumnext.github.io/Docs/Wiki/faq#mac-os-support).
|
### Desktop
|
||||||
|
|
||||||
* If you want to use TriliumNext on the desktop, download binary release for your platform from [latest release](https://github.com/TriliumNext/Notes/releases/latest), unzip the package and run ```trilium``` executable.
|
To use TriliumNext on your desktop machine (Linux, MacOS, and Windows) you have a few options:
|
||||||
* If you want to install TriliumNext on your own server, follow [this page](https://triliumnext.github.io/Docs/Wiki/server-installation).
|
|
||||||
* Currently only recent versions of Chrome and Firefox are supported (tested) browsers.
|
|
||||||
|
|
||||||
TriliumNext will also provided as a Flatpak:
|
* Download the binary release for your platform from the [latest release page](https://github.com/TriliumNext/Notes/releases/latest), unzip the package and run the ```trilium``` executable.
|
||||||
|
* Access TriliumNext via the web interface of a server installation (see below)
|
||||||
|
* Currently only the latest versions of Chrome & Firefox are supported (and tested).
|
||||||
|
* (Coming Soon) TriliumNext will also be provided as a Flatpak
|
||||||
|
|
||||||
<img width="240" src="https://flathub.org/assets/badges/flathub-badge-en.png">
|
### Mobile
|
||||||
|
|
||||||
|
To use TriliumNext on a mobile device:
|
||||||
|
|
||||||
|
* Use a mobile web browser to access the mobile interface of a server installation (see below)
|
||||||
|
* Use of a mobile app is not yet supported ([see here](https://github.com/TriliumNext/Notes/issues/72)) to track mobile improvements.
|
||||||
|
|
||||||
|
### Server
|
||||||
|
|
||||||
|
To install TriliumNext on your own server (including via Docker from [Dockerhub](https://hub.docker.com/r/triliumnext/notes)) follow [the server installation docs](https://triliumnext.github.io/Docs/Wiki/server-installation).
|
||||||
|
|
||||||
## 📝 Documentation
|
## 📝 Documentation
|
||||||
|
|
||||||
[See wiki for complete list of documentation pages.](https://triliumnext.github.io/Docs)
|
[See wiki for complete list of documentation pages.](https://triliumnext.github.io/Docs)
|
||||||
|
|
||||||
You can also read [Patterns of personal knowledge base](https://triliumnext.github.io/Docs/Wiki/patterns-of-personal-knowledge) to get some inspiration on how you might use Trilium.
|
You can also read [Patterns of personal knowledge base](https://triliumnext.github.io/Docs/Wiki/patterns-of-personal-knowledge) to get some inspiration on how you might use TriliumNext.
|
||||||
|
|
||||||
## 💻 Contribute
|
## 💻 Contribute
|
||||||
|
|
||||||
Clone locally and run
|
### Code
|
||||||
```
|
|
||||||
|
```shell
|
||||||
|
git clone https://github.com/TriliumNext/Notes.git
|
||||||
|
cd Notes
|
||||||
npm install
|
npm install
|
||||||
npm run start-server
|
npm run start-server
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
|
||||||
|
Head on over to our [Docs repo](https://github.com/TriliumNext/Docs)
|
||||||
|
|
||||||
## 👏 Shoutouts
|
## 👏 Shoutouts
|
||||||
|
|
||||||
* [CKEditor 5](https://github.com/ckeditor/ckeditor5) - best WYSIWYG editor on the market, very interactive and listening team
|
* [CKEditor 5](https://github.com/ckeditor/ckeditor5) - best WYSIWYG editor on the market, very interactive and listening team
|
||||||
* [FancyTree](https://github.com/mar10/fancytree) - very feature rich tree library without real competition. Trilium Notes would not be the same without it.
|
* [FancyTree](https://github.com/mar10/fancytree) - very feature rich tree library without real competition. TriliumNext Notes would not be the same without it.
|
||||||
* [CodeMirror](https://github.com/codemirror/CodeMirror) - code editor with support for huge amount of languages
|
* [CodeMirror](https://github.com/codemirror/CodeMirror) - code editor with support for huge amount of languages
|
||||||
* [jsPlumb](https://github.com/jsplumb/jsplumb) - visual connectivity library without competition. Used in [relation maps](https://triliumnext.github.io/Docs/Wiki/Relation-map) and [link maps](https://triliumnext.github.io/Docs/Wiki/Link-map)
|
* [jsPlumb](https://github.com/jsplumb/jsplumb) - visual connectivity library without competition. Used in [relation maps](https://triliumnext.github.io/Docs/Wiki/Relation-map) and [link maps](https://triliumnext.github.io/Docs/Wiki/Link-map)
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# TriliumNext Notes
|
# TriliumNext Notes
|
||||||
|
|
||||||
[English](https://github.com/TriliumNext/Notes/blob/master/README.md) | [Chinese](https://github.com/TriliumNext/Notes/blob/master/README-ZH_CN.md) | [Russian](https://github.com/TriliumNext/Notes/blob/master/README.ru.md) | [Japanese](https://github.com/TriliumNext/Notes/blob/master/README.ja.md) | [Italian](https://github.com/TriliumNext/Notes/blob/master/README.it.md)
|
[English](./README.md) | [Chinese](./README-ZH_CN.md) | [Russian](./README.ru.md) | [Japanese](./README.ja.md) | [Italian](./README.it.md) | [Spanish](./README.es.md)
|
||||||
|
|
||||||
Trilium Notes – это приложение для заметок с иерархической структурой, ориентированное на создание больших персональных баз знаний. Для быстрого ознакомления посмотрите [скриншот-тур](https://triliumnext.github.io/Docs/Wiki/screenshot-tour):
|
Trilium Notes – это приложение для заметок с иерархической структурой, ориентированное на создание больших персональных баз знаний. Для быстрого ознакомления посмотрите [скриншот-тур](https://triliumnext.github.io/Docs/Wiki/screenshot-tour):
|
||||||
|
|
||||||
@ -41,7 +41,8 @@ Trilium предоставляется в виде десктопного при
|
|||||||
## 💻 Участвуйте в разработке
|
## 💻 Участвуйте в разработке
|
||||||
|
|
||||||
Или склонируйте на своё устройство и запустите
|
Или склонируйте на своё устройство и запустите
|
||||||
```
|
|
||||||
|
```shell
|
||||||
npm install
|
npm install
|
||||||
npm run start-server
|
npm run start-server
|
||||||
```
|
```
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
ELECTRON_VERSION="electron-v125"
|
|
||||||
NODE_VERSION="node-v115"
|
|
||||||
|
|
||||||
if ! command -v jq &> /dev/null; then
|
|
||||||
echo "Missing command: jq"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
script_dir=$(realpath $(dirname $0))
|
|
||||||
cd "$script_dir"
|
|
||||||
BETTER_SQLITE3_VERSION=$(jq -r '.dependencies.["better-sqlite3"]' ../../package.json | grep -oP "\d+\.\d+\.\d+")
|
|
||||||
|
|
||||||
if [ -z $BETTER_SQLITE3_VERSION ]; then
|
|
||||||
echo "Unable to determine better-sqlite3 version."
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Version: $BETTER_SQLITE3_VERSION"
|
|
||||||
|
|
||||||
function download() {
|
|
||||||
version="$1"
|
|
||||||
platform="$2"
|
|
||||||
dest_name="$3"
|
|
||||||
url=https://github.com/WiseLibs/better-sqlite3/releases/download/v${BETTER_SQLITE3_VERSION}/better-sqlite3-v${BETTER_SQLITE3_VERSION}-${version}-${platform}.tar.gz
|
|
||||||
temp_file="temp.tar.gz"
|
|
||||||
curl -L "$url" -o "$temp_file"
|
|
||||||
tar -xzvf "$temp_file"
|
|
||||||
mv build/Release/better_sqlite3.node "$dest_name-better_sqlite3.node"
|
|
||||||
rm -rf build
|
|
||||||
rm -f "$temp_file"
|
|
||||||
}
|
|
||||||
|
|
||||||
download $NODE_VERSION "linux-x64" "linux-server"
|
|
||||||
download $ELECTRON_VERSION "linux-x64" "linux-desktop"
|
|
||||||
download $ELECTRON_VERSION "win32-x64" "win"
|
|
||||||
download $ELECTRON_VERSION "darwin-x64" "mac-x64"
|
|
||||||
download $ELECTRON_VERSION "darwin-arm64" "mac-arm64"
|
|
@ -1,19 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e # Fail on any command error
|
|
||||||
|
|
||||||
if ! command -v dpkg-deb &> /dev/null; then
|
|
||||||
echo "Missing command: dpkg-deb"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if dpkg-deb 2>&1 | grep BusyBox &> /dev/null; then
|
|
||||||
echo "The dpkg-deb binary provided by BusyBox is not compatible. The Debian tool needs to be used instead."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Packaging debian x64 distribution..."
|
|
||||||
|
|
||||||
VERSION=`jq -r ".version" package.json`
|
|
||||||
|
|
||||||
./node_modules/.bin/electron-installer-debian --config bin/deb-options.json --options.version=${VERSION} --arch amd64
|
|
@ -10,8 +10,8 @@ cat package.json | grep -v electron > server-package.json
|
|||||||
echo "Compiling typescript..."
|
echo "Compiling typescript..."
|
||||||
npx tsc
|
npx tsc
|
||||||
|
|
||||||
sudo docker build -t zadam/trilium:$VERSION --network host -t zadam/trilium:$SERIES .
|
sudo docker build -t triliumnext/notes:$VERSION --network host -t triliumnext/notes:$SERIES .
|
||||||
|
|
||||||
if [[ $VERSION != *"beta"* ]]; then
|
if [[ $VERSION != *"beta"* ]]; then
|
||||||
sudo docker tag zadam/trilium:$VERSION zadam/trilium:latest
|
sudo docker tag triliumnext/notes:$VERSION triliumnext/notes:latest
|
||||||
fi
|
fi
|
||||||
|
@ -1,58 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e # Fail on any command error
|
|
||||||
|
|
||||||
if ! command -v jq &> /dev/null; then
|
|
||||||
echo "Missing command: jq"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! command -v fakeroot &> /dev/null; then
|
|
||||||
echo "Missing command: fakeroot"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! command -v dpkg-deb &> /dev/null; then
|
|
||||||
echo "Missing command: dpkg-deb"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if dpkg-deb 2>&1 | grep BusyBox &> /dev/null; then
|
|
||||||
echo "The dpkg-deb binary provided by BusyBox is not compatible. The Debian tool needs to be used instead."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
SRC_DIR=./dist/trilium-linux-x64-src
|
|
||||||
|
|
||||||
[ "$1" != "DONTCOPY" ] && ./bin/copy-trilium.sh "$SRC_DIR"
|
|
||||||
|
|
||||||
echo "Copying required linux-x64 binaries"
|
|
||||||
cp -r bin/better-sqlite3/linux-desktop-better_sqlite3.node "$SRC_DIR"/node_modules/better-sqlite3/build/Release/better_sqlite3.node
|
|
||||||
|
|
||||||
echo "Packaging linux x64 electron build"
|
|
||||||
./node_modules/.bin/electron-packager "$SRC_DIR" --asar --out=dist --executable-name=trilium --platform=linux --arch=x64 --overwrite
|
|
||||||
|
|
||||||
BUILD_DIR=./dist/trilium-linux-x64
|
|
||||||
rm -rf "$BUILD_DIR"
|
|
||||||
|
|
||||||
mv "./dist/TriliumNext Notes-linux-x64" "$BUILD_DIR"
|
|
||||||
|
|
||||||
cp images/app-icons/png/128x128.png "$BUILD_DIR"/icon.png
|
|
||||||
cp bin/tpl/anonymize-database.sql "$BUILD_DIR"/
|
|
||||||
|
|
||||||
cp -r dump-db "$BUILD_DIR"/
|
|
||||||
rm -rf "$BUILD_DIR"/dump-db/node_modules
|
|
||||||
|
|
||||||
for f in 'trilium-portable' 'trilium-safe-mode' 'trilium-no-cert-check'; do
|
|
||||||
cp bin/tpl/"$f".sh "$BUILD_DIR"/
|
|
||||||
chmod 755 "$BUILD_DIR"/"$f".sh
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "Packaging linux x64 electron distribution..."
|
|
||||||
VERSION=`jq -r ".version" package.json`
|
|
||||||
|
|
||||||
pushd dist
|
|
||||||
tar cJf "trilium-linux-x64-${VERSION}.tar.xz" trilium-linux-x64
|
|
||||||
popd
|
|
||||||
|
|
||||||
bin/build-debian.sh
|
|
@ -1,37 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e # Fail on any command error
|
|
||||||
|
|
||||||
SRC_DIR=./dist/trilium-mac-arm64-src
|
|
||||||
|
|
||||||
if [ "$1" != "DONTCOPY" ]
|
|
||||||
then
|
|
||||||
./bin/copy-trilium.sh $SRC_DIR
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Copying required mac arm64 binaries"
|
|
||||||
|
|
||||||
cp -r bin/better-sqlite3/mac-arm64-better_sqlite3.node $SRC_DIR/node_modules/better-sqlite3/build/Release/better_sqlite3.node
|
|
||||||
|
|
||||||
echo "Packaging mac arm64 electron build"
|
|
||||||
|
|
||||||
./node_modules/.bin/electron-packager $SRC_DIR --asar --out=dist --executable-name=trilium --platform=darwin --arch=arm64 --overwrite --icon=images/app-icons/mac/icon.icns
|
|
||||||
|
|
||||||
BUILD_DIR=./dist/trilium-mac-arm64
|
|
||||||
rm -rf $BUILD_DIR
|
|
||||||
|
|
||||||
# Mac build has by default useless directory level
|
|
||||||
mv "./dist/TriliumNext Notes-darwin-arm64" $BUILD_DIR
|
|
||||||
|
|
||||||
cp bin/tpl/anonymize-database.sql $BUILD_DIR/
|
|
||||||
|
|
||||||
cp -r dump-db $BUILD_DIR/
|
|
||||||
rm -rf $BUILD_DIR/dump-db/node_modules
|
|
||||||
|
|
||||||
echo "Zipping mac arm64 electron distribution..."
|
|
||||||
|
|
||||||
VERSION=`jq -r ".version" package.json`
|
|
||||||
|
|
||||||
cd dist
|
|
||||||
|
|
||||||
zip -r9 --symlinks trilium-mac-arm64-${VERSION}.zip trilium-mac-arm64
|
|
@ -1,37 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e # Fail on any command error
|
|
||||||
|
|
||||||
SRC_DIR=./dist/trilium-mac-x64-src
|
|
||||||
|
|
||||||
if [ "$1" != "DONTCOPY" ]
|
|
||||||
then
|
|
||||||
./bin/copy-trilium.sh $SRC_DIR
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Copying required mac x64 binaries"
|
|
||||||
|
|
||||||
cp -r bin/better-sqlite3/mac-x64-better_sqlite3.node $SRC_DIR/node_modules/better-sqlite3/build/Release/better_sqlite3.node
|
|
||||||
|
|
||||||
echo "Packaging mac x64 electron build"
|
|
||||||
|
|
||||||
./node_modules/.bin/electron-packager $SRC_DIR --asar --out=dist --executable-name=trilium --platform=darwin --arch=x64 --overwrite --icon=images/app-icons/mac/icon.icns
|
|
||||||
|
|
||||||
BUILD_DIR=./dist/trilium-mac-x64
|
|
||||||
rm -rf $BUILD_DIR
|
|
||||||
|
|
||||||
# Mac build has by default useless directory level
|
|
||||||
mv "./dist/TriliumNext Notes-darwin-x64" $BUILD_DIR
|
|
||||||
|
|
||||||
cp bin/tpl/anonymize-database.sql $BUILD_DIR/
|
|
||||||
|
|
||||||
cp -r dump-db $BUILD_DIR/
|
|
||||||
rm -rf $BUILD_DIR/dump-db/node_modules
|
|
||||||
|
|
||||||
echo "Zipping mac x64 electron distribution..."
|
|
||||||
|
|
||||||
VERSION=`jq -r ".version" package.json`
|
|
||||||
|
|
||||||
cd dist
|
|
||||||
|
|
||||||
zip -r9 --symlinks trilium-mac-x64-${VERSION}.zip trilium-mac-x64
|
|
@ -22,15 +22,14 @@ rm -r $PKG_DIR/node/lib/node_modules/npm
|
|||||||
rm -r $PKG_DIR/node/include/node
|
rm -r $PKG_DIR/node/include/node
|
||||||
|
|
||||||
rm -r $PKG_DIR/node_modules/electron*
|
rm -r $PKG_DIR/node_modules/electron*
|
||||||
rm -r $PKG_DIR/electron.js
|
rm -r $PKG_DIR/electron*.js
|
||||||
|
|
||||||
cp -r bin/better-sqlite3/linux-server-better_sqlite3.node $PKG_DIR/node_modules/better-sqlite3/build/Release/better_sqlite3.node
|
printf "#!/bin/sh\n./node/bin/node src/main" > $PKG_DIR/trilium.sh
|
||||||
|
|
||||||
printf "#!/bin/sh\n./node/bin/node src/www" > $PKG_DIR/trilium.sh
|
|
||||||
chmod 755 $PKG_DIR/trilium.sh
|
chmod 755 $PKG_DIR/trilium.sh
|
||||||
|
|
||||||
cp bin/tpl/anonymize-database.sql $PKG_DIR/
|
cp bin/tpl/anonymize-database.sql $PKG_DIR/
|
||||||
|
|
||||||
|
cp -r translations $PKG_DIR/
|
||||||
cp -r dump-db $PKG_DIR/
|
cp -r dump-db $PKG_DIR/
|
||||||
rm -rf $PKG_DIR/dump-db/node_modules
|
rm -rf $PKG_DIR/dump-db/node_modules
|
||||||
|
|
||||||
|
@ -1,44 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e # Fail on any command error
|
|
||||||
|
|
||||||
if ! command -v wine &> /dev/null; then
|
|
||||||
echo "Missing command: wine"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
SRC_DIR=./dist/trilium-windows-x64-src
|
|
||||||
|
|
||||||
if [ "$1" != "DONTCOPY" ]
|
|
||||||
then
|
|
||||||
./bin/copy-trilium.sh $SRC_DIR
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Copying required windows binaries"
|
|
||||||
|
|
||||||
cp -r bin/better-sqlite3/win-better_sqlite3.node $SRC_DIR/node_modules/better-sqlite3/build/Release/better_sqlite3.node
|
|
||||||
|
|
||||||
echo "Packaging windows x64 electron build"
|
|
||||||
|
|
||||||
./node_modules/.bin/electron-packager $SRC_DIR --asar --out=dist --executable-name=trilium --platform=win32 --arch=x64 --overwrite --icon=images/app-icons/win/icon.ico
|
|
||||||
|
|
||||||
BUILD_DIR=./dist/trilium-windows-x64
|
|
||||||
rm -rf $BUILD_DIR
|
|
||||||
|
|
||||||
mv "./dist/TriliumNext Notes-win32-x64" $BUILD_DIR
|
|
||||||
|
|
||||||
cp bin/tpl/anonymize-database.sql $BUILD_DIR/
|
|
||||||
|
|
||||||
cp -r dump-db $BUILD_DIR/
|
|
||||||
rm -rf $BUILD_DIR/dump-db/node_modules
|
|
||||||
|
|
||||||
cp bin/tpl/trilium-{portable,no-cert-check,safe-mode}.bat $BUILD_DIR/
|
|
||||||
|
|
||||||
if [ "$1" != "DONTPACK" ]
|
|
||||||
then
|
|
||||||
echo "Zipping windows x64 electron distribution..."
|
|
||||||
VERSION=`jq -r ".version" package.json`
|
|
||||||
|
|
||||||
cd dist
|
|
||||||
zip -r9 trilium-windows-x64-${VERSION}.zip trilium-windows-x64
|
|
||||||
fi
|
|
@ -35,7 +35,7 @@ const copy = async () => {
|
|||||||
await fs.copy(file, path.join(DEST_DIR, file));
|
await fs.copy(file, path.join(DEST_DIR, file));
|
||||||
}
|
}
|
||||||
|
|
||||||
const dirsToCopy = ["images", "libraries", "db"];
|
const dirsToCopy = ["images", "libraries", "translations", "db"];
|
||||||
for (const dir of dirsToCopy) {
|
for (const dir of dirsToCopy) {
|
||||||
log(`Copying ${dir}`);
|
log(`Copying ${dir}`);
|
||||||
await fs.copy(dir, path.join(DEST_DIR, dir));
|
await fs.copy(dir, path.join(DEST_DIR, dir));
|
||||||
@ -75,7 +75,21 @@ const copy = async () => {
|
|||||||
"node_modules/split.js/dist/",
|
"node_modules/split.js/dist/",
|
||||||
"node_modules/panzoom/dist/",
|
"node_modules/panzoom/dist/",
|
||||||
"node_modules/i18next/",
|
"node_modules/i18next/",
|
||||||
"node_modules/i18next-http-backend/"
|
"node_modules/i18next-http-backend/",
|
||||||
|
"node_modules/eslint/bin/",
|
||||||
|
"node_modules/jsplumb/dist/",
|
||||||
|
"node_modules/vanilla-js-wheel-zoom/dist/",
|
||||||
|
"node_modules/mark.js/dist/",
|
||||||
|
"node_modules/knockout/build/output/",
|
||||||
|
"node_modules/normalize.css/",
|
||||||
|
"node_modules/jquery.fancytree/dist/",
|
||||||
|
"node_modules/bootstrap/dist/",
|
||||||
|
"node_modules/autocomplete.js/dist/",
|
||||||
|
"node_modules/codemirror/lib/",
|
||||||
|
"node_modules/codemirror/addon/",
|
||||||
|
"node_modules/codemirror/mode/",
|
||||||
|
"node_modules/codemirror/keymap/",
|
||||||
|
"node_modules/mind-elixir/dist/"
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const folder of nodeModulesFolder) {
|
for (const folder of nodeModulesFolder) {
|
||||||
|
@ -37,11 +37,11 @@ for f in 'package.json' 'package-lock.json' 'README.md' 'LICENSE' 'config-sample
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Patch package.json main
|
# Patch package.json main
|
||||||
sed -i 's/.\/dist\/electron.js/electron.js/g' "$DIR/package.json"
|
sed -i 's/.\/dist\/electron-main.js/electron-main.js/g' "$DIR/package.json"
|
||||||
|
|
||||||
script_dir=$(realpath $(dirname $0))
|
script_dir=$(realpath $(dirname $0))
|
||||||
cp -R "$script_dir/../build/src" "$DIR"
|
cp -R "$script_dir/../build/src" "$DIR"
|
||||||
cp "$script_dir/../build/electron.js" "$DIR"
|
cp "$script_dir/../build/electron-main.js" "$DIR"
|
||||||
|
|
||||||
# run in subshell (so we return to original dir)
|
# run in subshell (so we return to original dir)
|
||||||
(cd $DIR && npm install --omit=dev)
|
(cd $DIR && npm install --omit=dev)
|
||||||
@ -52,7 +52,6 @@ if [[ -d "$DIR"/node_modules ]]; then
|
|||||||
'@excalidraw/excalidraw/dist/excalidraw-assets-dev' '@excalidraw/excalidraw/dist/excalidraw.development.js' '@excalidraw/excalidraw/dist/excalidraw-with-preact.development.js' \
|
'@excalidraw/excalidraw/dist/excalidraw-assets-dev' '@excalidraw/excalidraw/dist/excalidraw.development.js' '@excalidraw/excalidraw/dist/excalidraw-with-preact.development.js' \
|
||||||
'mermaid/dist/mermaid.js' \
|
'mermaid/dist/mermaid.js' \
|
||||||
'boxicons/svg' 'boxicons/node_modules/react'/* \
|
'boxicons/svg' 'boxicons/node_modules/react'/* \
|
||||||
'better-sqlite3/Release' 'better-sqlite3/deps/sqlite3.tar.gz' 'better-sqlite3/deps/sqlite3' \
|
|
||||||
'@jimp/plugin-print/fonts' 'jimp/browser' 'jimp/fonts'; do
|
'@jimp/plugin-print/fonts' 'jimp/browser' 'jimp/fonts'; do
|
||||||
[[ -e "$DIR"/node_modules/"$d" ]] && rm -r "$DIR"/node_modules/"$d"
|
[[ -e "$DIR"/node_modules/"$d" ]] && rm -r "$DIR"/node_modules/"$d"
|
||||||
done
|
done
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
const anonymizationService = require('../src/services/anonymization');
|
import anonymizationService from '../src/services/anonymization.js';
|
||||||
const fs = require('fs');
|
import fs from 'fs';
|
||||||
const path = require('path');
|
import path from 'path';
|
||||||
|
|
||||||
fs.writeFileSync(path.resolve(__dirname, 'tpl', 'anonymize-database.sql'), anonymizationService.getFullAnonymizationScript());
|
fs.writeFileSync(path.resolve(__dirname, 'tpl', 'anonymize-database.sql'), anonymizationService.getFullAnonymizationScript());
|
45
bin/create-icons.sh
Executable file
@ -0,0 +1,45 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if ! command -v magick &> /dev/null; then
|
||||||
|
echo "This tool requires ImageMagick to be installed in order to create the icons."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! command -v inkscape &> /dev/null; then
|
||||||
|
echo "This tool requires Inkscape to be render sharper SVGs than ImageMagick."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! command -v icnsutil &> /dev/null; then
|
||||||
|
echo "This tool requires icnsutil to be installed in order to generate macOS icons."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
script_dir=$(realpath $(dirname $0))
|
||||||
|
cd "${script_dir}/../images/app-icons"
|
||||||
|
inkscape -w 180 -h 180 "../icon-color.svg" -o "./ios/apple-touch-icon.png"
|
||||||
|
|
||||||
|
# Build PNGs
|
||||||
|
inkscape -w 128 -h 128 "../icon-color.svg" -o "./png/128x128.png"
|
||||||
|
inkscape -w 256 -h 256 "../icon-color.svg" -o "./png/256x256.png"
|
||||||
|
inkscape -w 256 -h 256 "../icon-purple.svg" -o "./png/256x256-dev.png"
|
||||||
|
|
||||||
|
# Build Mac .icns
|
||||||
|
declare -a sizes=("16" "32" "512" "1024")
|
||||||
|
for size in "${sizes[@]}"; do
|
||||||
|
inkscape -w $size -h $size "../icon-color.svg" -o "./png/${size}x${size}.png"
|
||||||
|
done
|
||||||
|
|
||||||
|
mkdir -p fakeapp.app
|
||||||
|
npx iconsur set fakeapp.app -l -i "png/1024x1024.png" -o "mac/1024x1024.png" -s 0.8
|
||||||
|
declare -a sizes=("16x16" "32x32" "128x128" "512x512")
|
||||||
|
for size in "${sizes[@]}"; do
|
||||||
|
magick "mac/1024x1024.png" -resize "${size}" "mac/${size}.png"
|
||||||
|
done
|
||||||
|
icnsutil compose -f "mac/icon.icns" ./mac/*.png
|
||||||
|
|
||||||
|
# Build Windows icon
|
||||||
|
magick -background none "../icon-color.svg" -define icon:auto-resize=16,32,48,64,128,256 "./icon.ico"
|
||||||
|
|
||||||
|
# Build Squirrel splash image
|
||||||
|
magick "./png/256x256.png" -background "#ffffff" -gravity center -extent 640x480 "./win/setup-banner.gif"
|
@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"src": "dist/trilium-linux-x64",
|
|
||||||
"dest": "dist/",
|
|
||||||
"compression": "xz",
|
|
||||||
"name": "trilium",
|
|
||||||
"productName": "Trilium Notes",
|
|
||||||
"genericName": "Note taker",
|
|
||||||
"description": "Trilium Notes is a hierarchical note taking application with focus on building large personal knowledge bases.",
|
|
||||||
"sections": "misc",
|
|
||||||
"maintainer": "zadam.apps@gmail.com",
|
|
||||||
"homepage": "https://github.com/zadam/trilium",
|
|
||||||
"bin": "trilium",
|
|
||||||
"icon": "dist/trilium-linux-x64/icon.png",
|
|
||||||
"categories": [ "Office" ]
|
|
||||||
}
|
|
12
bin/electron-forge/desktop.ejs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
<% if (productName) { %>Name=<%= productName %>
|
||||||
|
<% } %><% if (description) { %>Comment=<%= description %>
|
||||||
|
<% } %><% if (genericName) { %>GenericName=<%= genericName %>
|
||||||
|
<% } %><% if (name) { %>Exec=<%= name %> %U
|
||||||
|
Icon=<%= name %>
|
||||||
|
<% } %>Type=Application
|
||||||
|
StartupNotify=true
|
||||||
|
<% if (productName) { %>StartupWMClass=<%= productName %>
|
||||||
|
<% } if (categories && categories.length) { %>Categories=<%= categories.join(';') %>;
|
||||||
|
<% } %><% if (mimeType && mimeType.length) { %>MimeType=<%= mimeType.join(';') %>;
|
||||||
|
<% } %>
|
@ -47,35 +47,3 @@ echo "Tagging commit with $TAG"
|
|||||||
|
|
||||||
git tag $TAG
|
git tag $TAG
|
||||||
git push origin $TAG
|
git push origin $TAG
|
||||||
|
|
||||||
bin/build.sh
|
|
||||||
|
|
||||||
LINUX_X64_BUILD=trilium-linux-x64-$VERSION.tar.xz
|
|
||||||
DEBIAN_X64_BUILD=trilium_${VERSION}_amd64.deb
|
|
||||||
WINDOWS_X64_BUILD=trilium-windows-x64-$VERSION.zip
|
|
||||||
MAC_X64_BUILD=trilium-mac-x64-$VERSION.zip
|
|
||||||
MAC_ARM64_BUILD=trilium-mac-arm64-$VERSION.zip
|
|
||||||
SERVER_BUILD=trilium-linux-x64-server-$VERSION.tar.xz
|
|
||||||
|
|
||||||
echo "Creating release in GitHub"
|
|
||||||
|
|
||||||
EXTRA=
|
|
||||||
|
|
||||||
if [[ $TAG == *"beta"* ]]; then
|
|
||||||
EXTRA=--prerelease
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -z "$GITHUB_CLI_AUTH_TOKEN" ]; then
|
|
||||||
echo "$GITHUB_CLI_AUTH_TOKEN" | gh auth login --with-token
|
|
||||||
fi
|
|
||||||
|
|
||||||
gh release create "$TAG" \
|
|
||||||
--title "$TAG release" \
|
|
||||||
--notes "" \
|
|
||||||
$EXTRA \
|
|
||||||
"dist/$DEBIAN_X64_BUILD" \
|
|
||||||
"dist/$LINUX_X64_BUILD" \
|
|
||||||
"dist/$WINDOWS_X64_BUILD" \
|
|
||||||
"dist/$MAC_X64_BUILD" \
|
|
||||||
"dist/$MAC_ARM64_BUILD" \
|
|
||||||
"dist/$SERVER_BUILD"
|
|
||||||
|
98
bin/translation.sh
Executable file
@ -0,0 +1,98 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# --------------------------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Create PO files to make easier the labor of translation.
|
||||||
|
#
|
||||||
|
# Info:
|
||||||
|
# https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html
|
||||||
|
# https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/json2po.html
|
||||||
|
#
|
||||||
|
# Dependencies:
|
||||||
|
# jq
|
||||||
|
# translate-toolkit
|
||||||
|
# python-wcwidth
|
||||||
|
#
|
||||||
|
# Created by @hasecilu
|
||||||
|
#
|
||||||
|
# --------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
stats() {
|
||||||
|
# Print the number of existing strings on the JSON files for each locale
|
||||||
|
s=$(jq 'path(..) | select(length == 2) | .[1]' "${paths[0]}/en/server.json" | wc -l)
|
||||||
|
c=$(jq 'path(..) | select(length == 2) | .[1]' "${paths[1]}/en/translation.json" | wc -l)
|
||||||
|
echo "|locale |server strings |client strings |"
|
||||||
|
echo "|-------|---------------|---------------|"
|
||||||
|
echo "| en | ${s} | ${c} |"
|
||||||
|
for locale in "${locales[@]}"; do
|
||||||
|
s=$(jq 'path(..) | select(length == 2) | .[1]' "${paths[0]}/${locale}/server.json" | wc -l)
|
||||||
|
c=$(jq 'path(..) | select(length == 2) | .[1]' "${paths[1]}/${locale}/translation.json" | wc -l)
|
||||||
|
echo "| ${locale} | ${s} | ${c} |"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
help() {
|
||||||
|
echo -e "\nDescription:"
|
||||||
|
echo -e "\tCreate PO files to make easier the labor of translation"
|
||||||
|
echo -e "\nUsage:"
|
||||||
|
echo -e "\t./translation.sh [--stats] [--update <OPT_LOCALE>] [--update2 <OPT_LOCALE>]"
|
||||||
|
echo -e "\nFlags:"
|
||||||
|
echo -e " --clear\n\tClear all po-* directories"
|
||||||
|
echo -e " --stats\n\tPrint the number of existing strings on the JSON files for each locale"
|
||||||
|
echo -e " --update <LOCALE>\n\tUpdate PO files from English and localized JSON files as source"
|
||||||
|
echo -e " --update2 <LOCALE>\n\tRecover translation from PO files to localized JSON files"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Main function ------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Get script directory to set file path relative to it
|
||||||
|
file_path="$(
|
||||||
|
cd -- "$(dirname "${0}")" >/dev/null 2>&1 || exit
|
||||||
|
pwd -P
|
||||||
|
)"
|
||||||
|
paths=("${file_path}/../translations/" "${file_path}/../src/public/translations/")
|
||||||
|
locales=(cn es fr ro)
|
||||||
|
|
||||||
|
if [ $# -eq 1 ]; then
|
||||||
|
if [ "$1" == "--clear" ]; then
|
||||||
|
for path in "${paths[@]}"; do
|
||||||
|
for locale in "${locales[@]}"; do
|
||||||
|
[ -d "${path}/po-${locale}" ] && rm -r "${path}/po-${locale}"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
elif [ "$1" == "--stats" ]; then
|
||||||
|
stats
|
||||||
|
elif [ "$1" == "--update" ]; then
|
||||||
|
# Update PO files from English and localized JSON files as source
|
||||||
|
for path in "${paths[@]}"; do
|
||||||
|
for locale in "${locales[@]}"; do
|
||||||
|
json2po -t "${path}/en" "${path}/${locale}" "${path}/po-${locale}"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
elif [ "$1" == "--update2" ]; then
|
||||||
|
# Recover translation from PO files to localized JSON files
|
||||||
|
for path in "${paths[@]}"; do
|
||||||
|
for locale in "${locales[@]}"; do
|
||||||
|
po2json -t "${path}/en" "${path}/po-${locale}" "${path}/${locale}"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
else
|
||||||
|
help
|
||||||
|
fi
|
||||||
|
elif [ $# -eq 2 ]; then
|
||||||
|
if [ "$1" == "--update" ]; then
|
||||||
|
locale="$2"
|
||||||
|
for path in "${paths[@]}"; do
|
||||||
|
json2po -t "${path}/en" "${path}/${locale}" "${path}/po-${locale}"
|
||||||
|
done
|
||||||
|
elif [ "$1" == "--update2" ]; then
|
||||||
|
locale="$2"
|
||||||
|
for path in "${paths[@]}"; do
|
||||||
|
po2json -t "${path}/en" "${path}/po-${locale}" "${path}/${locale}"
|
||||||
|
done
|
||||||
|
else
|
||||||
|
help
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
help
|
||||||
|
fi
|
BIN
db/demo.zip
@ -1,16 +1,21 @@
|
|||||||
# Running `docker-compose up` will create/use the "trilium-data" directory in the user home
|
# Running `docker-compose up` will create/use the "trilium-data" directory in the user home
|
||||||
# Run `TRILIUM_DATA_DIR=/path/of/your/choice docker-compose up` to set a different directory
|
# Run `TRILIUM_DATA_DIR=/path/of/your/choice docker-compose up` to set a different directory
|
||||||
version: '2.1'
|
# To run in the background, use `docker-compose up -d`
|
||||||
services:
|
services:
|
||||||
trilium:
|
trilium:
|
||||||
image: zadam/trilium
|
# Optionally, replace `latest` with a version tag like `v0.90.3`
|
||||||
restart: always
|
# Using `latest` may cause unintended updates to the container
|
||||||
|
image: triliumnext/notes:latest
|
||||||
|
# Restart the container unless it was stopped by the user
|
||||||
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
- TRILIUM_DATA_DIR=/home/node/trilium-data
|
- TRILIUM_DATA_DIR=/home/node/trilium-data
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
# By default, Trilium will be available at http://localhost:8080
|
||||||
|
# It will also be accessible at http://<host-ip>:8080
|
||||||
|
# You might want to limit this with something like Docker Networks, reverse proxies, or firewall rules, such as UFW
|
||||||
|
- '8080:8080'
|
||||||
volumes:
|
volumes:
|
||||||
|
# Unless TRILIUM_DATA_DIR is set, the data will be stored in the "trilium-data" directory in the home directory.
|
||||||
|
# This can also be changed with by replacing the line below with `- /path/of/your/choice:/home/node/trilium-data
|
||||||
- ${TRILIUM_DATA_DIR:-~/trilium-data}:/home/node/trilium-data
|
- ${TRILIUM_DATA_DIR:-~/trilium-data}:/home/node/trilium-data
|
||||||
|
|
||||||
volumes:
|
|
||||||
trilium:
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const http = require("http");
|
import http from "http";
|
||||||
const ini = require("ini");
|
import ini from "ini";
|
||||||
const fs = require("fs");
|
import fs from "fs";
|
||||||
const dataDir = require('./src/services/data_dir');
|
import dataDir from './src/services/data_dir.js';
|
||||||
const config = ini.parse(fs.readFileSync(dataDir.CONFIG_INI_PATH, 'utf-8'));
|
const config = ini.parse(fs.readFileSync(dataDir.CONFIG_INI_PATH, 'utf-8'));
|
||||||
|
|
||||||
if (config.Network.https) {
|
if (config.Network.https) {
|
||||||
@ -10,12 +10,12 @@ if (config.Network.https) {
|
|||||||
process.exit(0);
|
process.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
const port = require('./src/services/port');
|
import port from './src/services/port.js';
|
||||||
const host = require('./src/services/host');
|
import host from './src/services/host.js';
|
||||||
|
|
||||||
const options = { timeout: 2000 };
|
const options: http.RequestOptions = { timeout: 2000 };
|
||||||
|
|
||||||
const callback = res => {
|
const callback: (res: http.IncomingMessage) => void = res => {
|
||||||
console.log(`STATUS: ${res.statusCode}`);
|
console.log(`STATUS: ${res.statusCode}`);
|
||||||
if (res.statusCode === 200) {
|
if (res.statusCode === 200) {
|
||||||
process.exit(0);
|
process.exit(0);
|
@ -42,9 +42,9 @@ const NOTE_TYPE_ICONS = {
|
|||||||
"code": "bx bx-code",
|
"code": "bx bx-code",
|
||||||
"render": "bx bx-extension",
|
"render": "bx bx-extension",
|
||||||
"search": "bx bx-file-find",
|
"search": "bx bx-file-find",
|
||||||
"relationMap": "bx bx-map-alt",
|
"relationMap": "bx bxs-network-chart",
|
||||||
"book": "bx bx-book",
|
"book": "bx bx-book",
|
||||||
"noteMap": "bx bx-map-alt",
|
"noteMap": "bx bxs-network-chart",
|
||||||
"mermaid": "bx bx-selection",
|
"mermaid": "bx bx-selection",
|
||||||
"canvas": "bx bx-pen",
|
"canvas": "bx bx-pen",
|
||||||
"webView": "bx bx-globe-alt",
|
"webView": "bx bx-globe-alt",
|
||||||
@ -570,7 +570,7 @@ class FNote {
|
|||||||
return workspaceIconClass;
|
return workspaceIconClass;
|
||||||
}
|
}
|
||||||
else if (this.noteId === 'root') {
|
else if (this.noteId === 'root') {
|
||||||
return "bx bx-chevrons-right";
|
return "bx bx-home-alt-2";
|
||||||
}
|
}
|
||||||
if (this.noteId === '_share') {
|
if (this.noteId === '_share') {
|
||||||
return "bx bx-share-alt";
|
return "bx bx-share-alt";
|
||||||
|
@ -14,10 +14,10 @@ npm install
|
|||||||
|
|
||||||
## Running
|
## Running
|
||||||
|
|
||||||
See output of `node dump-db.js --help`:
|
See output of `npx esrun dump.ts --help`:
|
||||||
|
|
||||||
```
|
```
|
||||||
dump-db.js <path_to_document> <target_directory>
|
dump-db.ts <path_to_document> <target_directory>
|
||||||
|
|
||||||
dump the contents of document.db into the target directory
|
dump the contents of document.db into the target directory
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
const yargs = require('yargs/yargs')
|
import yargs from 'yargs';
|
||||||
const { hideBin } = require('yargs/helpers')
|
import { hideBin } from 'yargs/helpers';
|
||||||
const dumpService = require('./inc/dump.js');
|
import dumpService from './inc/dump.js';
|
||||||
|
|
||||||
yargs(hideBin(process.argv))
|
yargs(hideBin(process.argv))
|
||||||
.command('$0 <path_to_document> <target_directory>', 'dump the contents of document.db into the target directory', (yargs) => {
|
.command('$0 <path_to_document> <target_directory>', 'dump the contents of document.db into the target directory', (yargs) => {
|
||||||
return yargs
|
return yargs
|
||||||
.positional('path_to_document', { describe: 'path to the document.db' })
|
.option('path_to_document', { alias: 'p', describe: 'path to the document.db', type: 'string', demandOption: true })
|
||||||
.positional('target_directory', { describe: 'path of the directory into which the notes should be dumped' })
|
.option('target_directory', { alias: 't', describe: 'path of the directory into which the notes should be dumped', type: 'string', demandOption: true });
|
||||||
}, (argv) => {
|
}, (argv) => {
|
||||||
try {
|
try {
|
||||||
dumpService.dumpDocument(argv.path_to_document, argv.target_directory, {
|
dumpService.dumpDocument(argv.path_to_document, argv.target_directory, {
|
@ -1,8 +1,8 @@
|
|||||||
const crypto = require("crypto");
|
import crypto from 'crypto';
|
||||||
const sql = require('./sql');
|
import sql from './sql.js';
|
||||||
const decryptService = require('./decrypt.js');
|
import decryptService from './decrypt.js';
|
||||||
|
|
||||||
function getDataKey(password) {
|
function getDataKey(password: any) {
|
||||||
if (!password) {
|
if (!password) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -16,28 +16,28 @@ function getDataKey(password) {
|
|||||||
|
|
||||||
return decryptedDataKey;
|
return decryptedDataKey;
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e: any) {
|
||||||
throw new Error(`Cannot read data key, the entered password might be wrong. The underlying error: '${e.message}', stack:\n${e.stack}`);
|
throw new Error(`Cannot read data key, the entered password might be wrong. The underlying error: '${e.message}', stack:\n${e.stack}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPasswordDerivedKey(password) {
|
function getPasswordDerivedKey(password: any) {
|
||||||
const salt = getOption('passwordDerivedKeySalt');
|
const salt = getOption('passwordDerivedKeySalt');
|
||||||
|
|
||||||
return getScryptHash(password, salt);
|
return getScryptHash(password, salt);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getScryptHash(password, salt) {
|
function getScryptHash(password: any, salt: any) {
|
||||||
const hashed = crypto.scryptSync(password, salt, 32,
|
const hashed = crypto.scryptSync(password, salt, 32,
|
||||||
{N: 16384, r:8, p:1});
|
{ N: 16384, r: 8, p: 1 });
|
||||||
|
|
||||||
return hashed;
|
return hashed;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getOption(name) {
|
function getOption(name: string) {
|
||||||
return sql.getValue("SELECT value FROM options WHERE name = ?", [name]);
|
return sql.getValue("SELECT value FROM options WHERE name = ?", [name]);
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
export default {
|
||||||
getDataKey
|
getDataKey
|
||||||
};
|
};
|
@ -1,6 +1,6 @@
|
|||||||
const crypto = require("crypto");
|
import crypto from 'crypto';
|
||||||
|
|
||||||
function decryptString(dataKey, cipherText) {
|
function decryptString(dataKey: any, cipherText: any) {
|
||||||
const buffer = decrypt(dataKey, cipherText);
|
const buffer = decrypt(dataKey, cipherText);
|
||||||
|
|
||||||
if (buffer === null) {
|
if (buffer === null) {
|
||||||
@ -16,7 +16,7 @@ function decryptString(dataKey, cipherText) {
|
|||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
function decrypt(key, cipherText, ivLength = 13) {
|
function decrypt(key: any, cipherText: any, ivLength = 13) {
|
||||||
if (cipherText === null) {
|
if (cipherText === null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -46,11 +46,10 @@ function decrypt(key, cipherText, ivLength = 13) {
|
|||||||
|
|
||||||
return payload;
|
return payload;
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e: any) {
|
||||||
// recovery from https://github.com/zadam/trilium/issues/510
|
// recovery from https://github.com/zadam/trilium/issues/510
|
||||||
if (e.message?.includes("WRONG_FINAL_BLOCK_LENGTH") || e.message?.includes("wrong final block length")) {
|
if (e.message?.includes("WRONG_FINAL_BLOCK_LENGTH") || e.message?.includes("wrong final block length")) {
|
||||||
log.info("Caught WRONG_FINAL_BLOCK_LENGTH, returning cipherText instead");
|
console.log("Caught WRONG_FINAL_BLOCK_LENGTH, returning cipherText instead");
|
||||||
|
|
||||||
return cipherText;
|
return cipherText;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -59,7 +58,7 @@ function decrypt(key, cipherText, ivLength = 13) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function pad(data) {
|
function pad(data: any) {
|
||||||
if (data.length > 16) {
|
if (data.length > 16) {
|
||||||
data = data.slice(0, 16);
|
data = data.slice(0, 16);
|
||||||
}
|
}
|
||||||
@ -72,7 +71,7 @@ function pad(data) {
|
|||||||
return Buffer.from(data);
|
return Buffer.from(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
function arraysIdentical(a, b) {
|
function arraysIdentical(a: any, b: any) {
|
||||||
let i = a.length;
|
let i = a.length;
|
||||||
if (i !== b.length) return false;
|
if (i !== b.length) return false;
|
||||||
while (i--) {
|
while (i--) {
|
||||||
@ -81,12 +80,12 @@ function arraysIdentical(a, b) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function shaArray(content) {
|
function shaArray(content: any) {
|
||||||
// we use this as simple checksum and don't rely on its security so SHA-1 is good enough
|
// we use this as simple checksum and don't rely on its security so SHA-1 is good enough
|
||||||
return crypto.createHash('sha1').update(content).digest();
|
return crypto.createHash('sha1').update(content).digest();
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
export default {
|
||||||
decrypt,
|
decrypt,
|
||||||
decryptString
|
decryptString
|
||||||
};
|
};
|
@ -1,11 +1,11 @@
|
|||||||
const fs = require("fs");
|
import fs from 'fs';
|
||||||
const sanitize = require("sanitize-filename");
|
import sanitize from 'sanitize-filename';
|
||||||
const sql = require('./sql.js');
|
import sql from './sql.js';
|
||||||
const decryptService = require('./decrypt.js');
|
import decryptService from './decrypt.js';
|
||||||
const dataKeyService = require('./data_key.js');
|
import dataKeyService from './data_key.js';
|
||||||
const extensionService = require('./extension.js');
|
import extensionService from './extension.js';
|
||||||
|
|
||||||
function dumpDocument(documentPath, targetPath, options) {
|
function dumpDocument(documentPath: string, targetPath: string, options: { password: any; includeDeleted: any; }) {
|
||||||
const stats = {
|
const stats = {
|
||||||
succeeded: 0,
|
succeeded: 0,
|
||||||
failed: 0,
|
failed: 0,
|
||||||
@ -19,14 +19,14 @@ function dumpDocument(documentPath, targetPath, options) {
|
|||||||
|
|
||||||
const dataKey = dataKeyService.getDataKey(options.password);
|
const dataKey = dataKeyService.getDataKey(options.password);
|
||||||
|
|
||||||
const existingPaths = {};
|
const existingPaths: Record<string, any> = {};
|
||||||
const noteIdToPath = {};
|
const noteIdToPath: Record<string, any> = {};
|
||||||
|
|
||||||
dumpNote(targetPath, 'root');
|
dumpNote(targetPath, 'root');
|
||||||
|
|
||||||
printDumpResults(stats, options);
|
printDumpResults(stats, options);
|
||||||
|
|
||||||
function dumpNote(targetPath, noteId) {
|
function dumpNote(targetPath: any, noteId: any) {
|
||||||
console.log(`Reading note '${noteId}'`);
|
console.log(`Reading note '${noteId}'`);
|
||||||
|
|
||||||
let childTargetPath, noteRow, fileNameWithPath;
|
let childTargetPath, noteRow, fileNameWithPath;
|
||||||
@ -94,7 +94,7 @@ function dumpDocument(documentPath, targetPath, options) {
|
|||||||
|
|
||||||
noteIdToPath[noteId] = childTargetPath;
|
noteIdToPath[noteId] = childTargetPath;
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e: any) {
|
||||||
console.error(`DUMPERROR: Writing '${noteId}' failed with error '${e.message}':\n${e.stack}`);
|
console.error(`DUMPERROR: Writing '${noteId}' failed with error '${e.message}':\n${e.stack}`);
|
||||||
|
|
||||||
stats.failed++;
|
stats.failed++;
|
||||||
@ -108,9 +108,9 @@ function dumpDocument(documentPath, targetPath, options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
fs.mkdirSync(childTargetPath, { recursive: true });
|
fs.mkdirSync(childTargetPath as string, { recursive: true });
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e: any) {
|
||||||
console.error(`DUMPERROR: Creating directory ${childTargetPath} failed with error '${e.message}'`);
|
console.error(`DUMPERROR: Creating directory ${childTargetPath} failed with error '${e.message}'`);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ function dumpDocument(documentPath, targetPath, options) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function printDumpResults(stats, options) {
|
function printDumpResults(stats: any, options: any) {
|
||||||
console.log('\n----------------------- STATS -----------------------');
|
console.log('\n----------------------- STATS -----------------------');
|
||||||
console.log('Successfully dumpted notes: ', stats.succeeded.toString().padStart(5, ' '));
|
console.log('Successfully dumpted notes: ', stats.succeeded.toString().padStart(5, ' '));
|
||||||
console.log('Protected notes: ', stats.protected.toString().padStart(5, ' '), options.password ? '' : '(skipped)');
|
console.log('Protected notes: ', stats.protected.toString().padStart(5, ' '), options.password ? '' : '(skipped)');
|
||||||
@ -134,7 +134,7 @@ function printDumpResults(stats, options) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function isContentEmpty(content) {
|
function isContentEmpty(content: any) {
|
||||||
if (!content) {
|
if (!content) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -150,7 +150,7 @@ function isContentEmpty(content) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function validatePaths(documentPath, targetPath) {
|
function validatePaths(documentPath: string, targetPath: string) {
|
||||||
if (!fs.existsSync(documentPath)) {
|
if (!fs.existsSync(documentPath)) {
|
||||||
console.error(`Path to document '${documentPath}' has not been found. Run with --help to see usage.`);
|
console.error(`Path to document '${documentPath}' has not been found. Run with --help to see usage.`);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
@ -166,6 +166,6 @@ function validatePaths(documentPath, targetPath) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
export default {
|
||||||
dumpDocument
|
dumpDocument
|
||||||
};
|
};
|
@ -1,7 +1,7 @@
|
|||||||
const path = require("path");
|
import path from "path";
|
||||||
const mimeTypes = require("mime-types");
|
import mimeTypes from "mime-types";
|
||||||
|
|
||||||
function getFileName(note, childTargetPath, safeTitle) {
|
function getFileName(note: any, childTargetPath: string, safeTitle: string) {
|
||||||
let existingExtension = path.extname(safeTitle).toLowerCase();
|
let existingExtension = path.extname(safeTitle).toLowerCase();
|
||||||
let newExtension;
|
let newExtension;
|
||||||
|
|
||||||
@ -29,6 +29,6 @@ function getFileName(note, childTargetPath, safeTitle) {
|
|||||||
return fileNameWithPath;
|
return fileNameWithPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
export default {
|
||||||
getFileName
|
getFileName
|
||||||
};
|
};
|
@ -1,17 +0,0 @@
|
|||||||
const Database = require("better-sqlite3");
|
|
||||||
let dbConnection;
|
|
||||||
|
|
||||||
const openDatabase = (documentPath) => { dbConnection = new Database(documentPath, { readonly: true }) };
|
|
||||||
|
|
||||||
const getRow = (query, params = []) => dbConnection.prepare(query).get(params);
|
|
||||||
const getRows = (query, params = []) => dbConnection.prepare(query).all(params);
|
|
||||||
const getValue = (query, params = []) => dbConnection.prepare(query).pluck().get(params);
|
|
||||||
const getColumn = (query, params = []) => dbConnection.prepare(query).pluck().all(params);
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
openDatabase,
|
|
||||||
getRow,
|
|
||||||
getRows,
|
|
||||||
getValue,
|
|
||||||
getColumn
|
|
||||||
};
|
|
18
dump-db/inc/sql.ts
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import Database, { Database as DatabaseType } from "better-sqlite3";
|
||||||
|
|
||||||
|
let dbConnection: DatabaseType;
|
||||||
|
|
||||||
|
const openDatabase = (documentPath: string) => { dbConnection = new Database(documentPath, { readonly: true }) };
|
||||||
|
|
||||||
|
const getRow = (query: string, params: string[] = []): Record<string, any> => dbConnection.prepare(query).get(params) as Record<string, any>;
|
||||||
|
const getRows = (query: string, params = []) => dbConnection.prepare(query).all(params);
|
||||||
|
const getValue = (query: string, params: string[] = []) => dbConnection.prepare(query).pluck().get(params);
|
||||||
|
const getColumn = (query: string, params: string[] = []) => dbConnection.prepare(query).pluck().all(params);
|
||||||
|
|
||||||
|
export default {
|
||||||
|
openDatabase,
|
||||||
|
getRow,
|
||||||
|
getRows,
|
||||||
|
getValue,
|
||||||
|
getColumn
|
||||||
|
};
|
1513
dump-db/package-lock.json
generated
@ -2,24 +2,30 @@
|
|||||||
"name": "dump-db",
|
"name": "dump-db",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "Standalone tool to dump contents of Trilium document.db file into a directory tree of notes",
|
"description": "Standalone tool to dump contents of Trilium document.db file into a directory tree of notes",
|
||||||
"main": "dump-db.js",
|
"main": "dump-db.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/zadam/trilium.git"
|
"url": "git+https://github.com/TriliumNext/Notes.git"
|
||||||
},
|
},
|
||||||
"author": "zadam",
|
"author": "TriliumNext",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/zadam/trilium/issues"
|
"url": "https://github.com/TriliumNext/Notes/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/zadam/trilium/dump-db#readme",
|
"homepage": "https://github.com/TriliumNext/Notes/blob/master/dump-db/README.md",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"better-sqlite3": "7.5.0",
|
"better-sqlite3": "^11.1.2",
|
||||||
"mime-types": "2.1.34",
|
"esrun": "^3.2.26",
|
||||||
"sanitize-filename": "1.6.3",
|
"mime-types": "^2.1.34",
|
||||||
"yargs": "17.3.1"
|
"sanitize-filename": "^1.6.3",
|
||||||
|
"yargs": "^17.3.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/better-sqlite3": "^7.6.11",
|
||||||
|
"@types/mime-types": "^2.1.4",
|
||||||
|
"@types/yargs": "^17.0.33"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
10
dump-db/tsconfig.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"module": "ESNext",
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"target": "ES6",
|
||||||
|
"strict": true
|
||||||
|
}
|
||||||
|
}
|
4
electron-main.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
import { initializeTranslations } from "./src/services/i18n.js";
|
||||||
|
|
||||||
|
await initializeTranslations();
|
||||||
|
await import("./electron.js")
|
@ -70,4 +70,4 @@ electron.app.on("will-quit", () => {
|
|||||||
// this is to disable electron warning spam in the dev console (local development only)
|
// this is to disable electron warning spam in the dev console (local development only)
|
||||||
process.env["ELECTRON_DISABLE_SECURITY_WARNINGS"] = "true";
|
process.env["ELECTRON_DISABLE_SECURITY_WARNINGS"] = "true";
|
||||||
|
|
||||||
await import('./src/www.js');
|
await import('./src/main.js');
|
||||||
|
102
forge.config.cjs
@ -1,18 +1,82 @@
|
|||||||
|
const path = require('path');
|
||||||
|
const fs = require('fs-extra');
|
||||||
|
|
||||||
|
const APP_NAME = "TriliumNext Notes";
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
packagerConfig: {
|
packagerConfig: {
|
||||||
|
executableName: "trilium",
|
||||||
|
name: APP_NAME,
|
||||||
|
overwrite: true,
|
||||||
asar: true,
|
asar: true,
|
||||||
// icon will break once we add .dmg support, since the .ico & .icns have to be in same dir (see https://www.electronforge.io/guides/create-and-add-icons#windows-and-macos)
|
icon: "./images/app-icons/icon",
|
||||||
icon: "./images/app-icons/win/icon"
|
extraResource: [
|
||||||
|
// Moved to root
|
||||||
|
...getExtraResourcesForPlatform(),
|
||||||
|
|
||||||
|
// Moved to resources (TriliumNext Notes.app/Contents/Resources on macOS)
|
||||||
|
"translations/"
|
||||||
|
],
|
||||||
|
afterComplete: [(buildPath, _electronVersion, platform, _arch, callback) => {
|
||||||
|
const extraResources = getExtraResourcesForPlatform();
|
||||||
|
for (const resource of extraResources) {
|
||||||
|
const baseName = path.basename(resource);
|
||||||
|
let sourcePath;
|
||||||
|
if (platform === 'darwin') {
|
||||||
|
sourcePath = path.join(buildPath, `${APP_NAME}.app`, 'Contents', 'Resources', baseName);
|
||||||
|
} else {
|
||||||
|
sourcePath = path.join(buildPath, 'resources', baseName);
|
||||||
|
}
|
||||||
|
let destPath;
|
||||||
|
|
||||||
|
if (baseName !== "256x256.png") {
|
||||||
|
destPath = path.join(buildPath, baseName);
|
||||||
|
} else {
|
||||||
|
destPath = path.join(buildPath, "icon.png");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Copy files from resources folder to root
|
||||||
|
fs.move(sourcePath, destPath)
|
||||||
|
.then(() => callback())
|
||||||
|
.catch(err => callback(err));
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
rebuildConfig: {
|
||||||
|
force: true
|
||||||
},
|
},
|
||||||
rebuildConfig: {},
|
|
||||||
makers: [
|
makers: [
|
||||||
|
{
|
||||||
|
name: '@electron-forge/maker-deb',
|
||||||
|
config: {
|
||||||
|
options: {
|
||||||
|
icon: "./images/app-icons/png/128x128.png",
|
||||||
|
desktopTemplate: path.resolve("./bin/electron-forge/desktop.ejs")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: '@electron-forge/maker-squirrel',
|
name: '@electron-forge/maker-squirrel',
|
||||||
config: {
|
config: {
|
||||||
iconUrl: "https://raw.githubusercontent.com/TriliumNext/Notes/develop/images/app-icons/win/icon.ico",
|
iconUrl: "https://raw.githubusercontent.com/TriliumNext/Notes/develop/images/app-icons/icon.ico",
|
||||||
setupIcon: "./images/app-icons/win/icon.ico",
|
setupIcon: "./images/app-icons/icon.ico",
|
||||||
loadingGif: "./images/app-icons/win/setup-banner.gif"
|
loadingGif: "./images/app-icons/win/setup-banner.gif"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '@electron-forge/maker-dmg',
|
||||||
|
config: {
|
||||||
|
icon: "./images/app-icons/icon.icns",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '@electron-forge/maker-zip',
|
||||||
|
config: {
|
||||||
|
options: {
|
||||||
|
iconUrl: "https://raw.githubusercontent.com/TriliumNext/Notes/develop/images/app-icons/icon.ico",
|
||||||
|
icon: "./images/app-icons/icon.ico",
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
plugins: [
|
plugins: [
|
||||||
@ -22,3 +86,31 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
function getExtraResourcesForPlatform() {
|
||||||
|
let resources = [
|
||||||
|
'dump-db/',
|
||||||
|
'./bin/tpl/anonymize-database.sql'
|
||||||
|
];
|
||||||
|
const scripts = ['trilium-portable', 'trilium-safe-mode', 'trilium-no-cert-check']
|
||||||
|
switch (process.platform) {
|
||||||
|
case 'win32':
|
||||||
|
for (const script of scripts) {
|
||||||
|
resources.push(`./bin/tpl/${script}.bat`)
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'darwin':
|
||||||
|
break;
|
||||||
|
case 'linux':
|
||||||
|
resources.push("images/app-icons/png/256x256.png")
|
||||||
|
for (const script of scripts) {
|
||||||
|
resources.push(`./bin/tpl/${script}.sh`)
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return resources;
|
||||||
|
}
|
BIN
images/app-icons/icon.icns
Normal file
BIN
images/app-icons/icon.ico
Normal file
After Width: | Height: | Size: 112 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 9.8 KiB |
BIN
images/app-icons/png/1000x1000.png
Normal file
After Width: | Height: | Size: 93 KiB |
BIN
images/app-icons/png/1024x1024.png
Normal file
After Width: | Height: | Size: 107 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 706 B |
Before Width: | Height: | Size: 782 B After Width: | Height: | Size: 626 B |
Before Width: | Height: | Size: 972 B |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 111 KiB |
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 1.0 KiB |
@ -1,12 +1,5 @@
|
|||||||
<?xml version="1.0" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
<svg enable-background="new 0 0 256 256" version="1.1" viewBox="0 0 256 256" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="body_1" width="53" height="40">
|
<title>TrilliumNext Notes</title>
|
||||||
|
<path fill="black" d="m232.6 27.598c-17.706 0.092041-40.298 3.7127-58.258 10.104-1.7959 0.63909-3.5465 1.3043-5.2402 1.998-3.1 1.2-6.0988 2.6016-8.7988 4.1016-2.2 1.2-4.3016 2.4988-6.1016 3.7988-21.6 15.5-27.9 44.2-28.6 65.4l14.9-10.5 14.301-10 51.199-35.9-49.1 39.301-14.1 11.299-14.801 11.801c20.4 6.5 52.4 9.7992 74.9-6.3008 3.1886-2.319 6.4708-5.1162 9.7559-8.459 0.14708-0.08175 0.29689-0.1571 0.44336-0.24023 2.3386-2.3386 4.7705-4.8714 7.0215-7.5898 0.02928-0.033868 0.05864-0.065681 0.08789-0.099609 0.0964-0.038723 0.1948-0.072111 0.29102-0.11133 14.544-16.737 27.833-39.152 32.252-55.658 0.67979-2.5395 1.1487-4.9387 1.3809-7.1562 0.11607-1.1088 0.17422-2.173 0.16797-3.1855-1.0438-0.3625-2.1849-0.68557-3.4121-0.9707-1.2272-0.28513-2.542-0.53096-3.9336-0.74024s-2.8595-0.38069-4.3965-0.51562c-3.0739-0.26987-6.4198-0.39341-9.9609-0.375zm-202.79 20.252c-11.737-0.05-22.113 1.4004-28.312 4.6504 0.9 5.6625 4.3309 13.419 9.3125 21.77v0.001953c3.3209 5.5664 7.332 11.395 11.74 17.043v0.001953c6.6127 8.4716 14.122 16.534 21.547 22.684 2.3 1.9 4.5008 3.5996 6.8008 5.0996 0.048555 0.0124 0.097907 0.019 0.14648 0.03125 1.7845 1.2837 3.569 2.2777 5.3535 3.1699 20.8 10.4 45.5 3.7984 62.1-4.1016l-14.301-7.2988-13.6-6.9004-48.127-24.607 49.928 21.707 14.5 6.3008 15.199 6.5996c-3.4-18.3-14.099-44-35.799-54.9-3.3-1.6-6.9004-3.1004-10.9-4.4004-2.9-0.9-5.8996-1.7-9.0996-2.5-11.65-2.75-24.751-4.2996-36.488-4.3496zm97.488 73.85 3.6992 13.9 3.5996 13.201 12.801 47.6-15.9-47-4.5-13.4-4.8008-14.199c-10.3 13.4-21.3 36.199-15.5 57.199 0.8747 3.11 2.1333 6.3182 3.6719 9.709 0.01066 0.06374 0.01836 0.12769 0.0293 0.19141 1.1 2.5 2.3988 5.0992 3.7988 7.6992 10.4 18.8 27.701 38.501 39.701 42.801 0.00763-0.00936 0.01581-0.01991 0.02344-0.0293 0.02502 0.00909 0.05119 0.02035 0.07617 0.0293 8.8-10.8 16.8-42.601 15.9-65.701-0.1-2.7-0.30117-5.2992-0.70117-7.6992-0.3-1.9-0.69922-3.8-1.1992-5.5-5.6-20.2-25.199-32.601-40.699-38.801z"/>
|
||||||
<g transform="matrix(0.51887405 0 0 0.51887405 -30.622847 -23.349333)">
|
|
||||||
<g>
|
|
||||||
<path d="M139.19968 46.483948C 133.79512 46.316727 130.99477 48.84615 130.3185 49.08075C 130.93373 47.91552 131.34544 47.18139 132.91882 45.54309C 127.567184 45.48699 122.60501 46.645172 118.819 50.18706C 113.74112 54.93721 114.13588 58.872803 114.12565 58.8534C 114.12665 58.8554 113.324486 56.28694 113.083885 53.53986C 107.557976 61.18914 105.376045 71.32445 109.565636 78.88518C 112.16631 72.611374 116.29593 67.204346 121.617935 62.940678C 121.79327 58.466747 123.59313 54.686737 126.437935 51.89591C 123.87077 54.96861 122.73801 58.46922 122.8523 61.99735C 129.0425 57.37914 136.62968 54.301147 144.96371 53.29115C 138.92981 54.39993 133.4628 56.804817 128.68442 60.08495C 131.67526 61.4509 135.09087 61.66504 138.68073 60.41479C 135.23903 62.02769 131.41844 62.291573 127.55341 60.88681C 124.123 63.39894 121.072174 66.36721 118.44998 69.62935C 123.10523 71.15123 128.19724 70.83655 133.26453 68.25387C 128.6128 71.25848 123.14792 72.38525 117.30839 71.10572C 114.98041 74.22992 113.02919 77.58555 111.50413 81.04383C 113.382675 82.42883 121.53502 86.77435 135.51878 76.4623C 133.54428 75.878815 131.94408 75.053665 131.94337 75.05225C 131.98787 75.07205 133.38448 75.200424 137.46893 72.753555C 141.07997 70.64182 144.18617 66.81666 146.47923 63.839214C 144.52872 63.120605 143.00966 62.366364 143.00896 62.364605C 143.00795 62.363605 145.52956 62.534286 149.44116 59.539906C 152.93013 56.869026 156.82515 52.997295 156.83716 53.106655C 156.86186 53.129955 148.2449 46.763355 139.19968 46.483955" stroke="none" fill="#000000" fill-rule="nonzero" />
|
|
||||||
<path d="M76.90892 60.39415C 81.01041 59.20187 83.62202 60.57837 84.18329 60.62363C 83.49581 59.85657 83.04422 59.37815 81.5362 58.43957C 85.61753 57.342182 89.62709 57.24689 93.18141 59.20068C 97.94861 61.82108 98.37924 64.89886 98.38368 64.88219C 98.38287 64.884186 98.51835 62.767998 98.19094 60.626408C 103.84037 65.368546 107.39591 72.664375 105.59999 79.25351C 102.44364 74.98344 98.27924 71.67578 93.41609 69.47424C 92.44918 66.098694 90.369 63.571594 87.674324 62.0049C 90.20933 63.84117 91.72702 66.28648 92.29676 68.9982C 86.70379 66.69781 80.32978 65.84657 73.76949 66.719246C 78.589516 66.37542 88.79929 67.0738 97.083725 73.94838C 93.808014 76.02605 89.85612 76.78993 85.50101 75.81959C 89.617004 77.19292 94.00519 76.97535 98.23167 74.84885C 100.59329 76.77167 102.71017 78.94501 104.520195 81.28075C 103.3416 82.70688 97.917564 87.62569 85.30545 82.520676C 86.70662 81.686905 87.77634 80.74236 87.77674 80.74117C 87.746544 80.76498 86.70259 81.13821 83.12366 80.07813C 79.96972 79.18005 76.88272 76.87608 74.574715 75.058075C 75.932335 74.12624 76.953674 73.25198 76.953674 73.2504C 76.95406 73.24959 75.05817 73.87652 71.50989 72.36501C 68.344666 71.016304 64.64558 68.832634 64.65687 68.918396C 64.642365 68.940994 70.04542 62.389626 76.90893 60.394146" stroke="none" fill="#000000" fill-rule="nonzero" />
|
|
||||||
<path d="M106.35028 116.78676C 103.35939 114.0036 103.23137 111.1697 102.99563 110.68548C 102.692345 111.63276 102.514435 112.24205 102.46853 113.950066C 99.56593 111.13644 97.53256 107.88377 97.42573 103.98627C 97.2827 98.76002 99.63347 96.87469 99.61758 96.879555C 99.619576 96.879555 97.79303 97.82024 96.170654 99.15473C 97.362595 92.146484 101.699936 85.59194 108.057846 83.79309C 106.043465 88.51463 105.32079 93.58698 105.859375 98.68461C 103.522285 101.15936 102.43365 104.12773 102.44335 107.12493C 102.7356 104.12552 104.0304 101.66008 106.00902 99.8426C 106.82087 105.59001 109.21976 111.25976 113.143005 116.22528C 110.507935 112.4288 106.112755 103.67846 107.79472 93.44062C 111.1198 95.10421 113.68158 97.97678 114.99713 102.04415C 114.133644 97.97323 111.813774 94.46955 107.98454 92.04802C 108.433075 89.14839 109.210045 86.32549 110.27087 83.67378C 112.03185 83.93501 118.768524 85.95295 120.66769 98.87222C 119.291214 98.13378 117.984055 97.72311 117.98273 97.72354C 118.017624 97.73644 118.836945 98.41008 119.69913 101.88272C 120.4889 104.925644 120.07702 108.61209 119.68893 111.41583C 118.25153 110.761665 117.02649 110.35595 117.025604 110.356834C 117.024605 110.356834 118.470055 111.60574 118.94197 115.277824C 119.36268 118.55367 119.348564 122.68398 119.41433 122.632C 119.44033 122.63284 111.35593 121.44354 106.35022 116.78675" stroke="none" fill="#000000" fill-rule="nonzero" />
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
</svg>
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.3 KiB |
@ -1,12 +1,28 @@
|
|||||||
<?xml version="1.0" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
<svg enable-background="new 0 0 256 256" version="1.1" viewBox="0 0 256 256" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="body_1" width="53" height="40">
|
<title>TrilliumNext Notes</title>
|
||||||
|
<style type="text/css">
|
||||||
<g transform="matrix(0.51887405 0 0 0.51887405 -30.622847 -23.349333)">
|
.st0{fill:#95C980;}
|
||||||
|
.st1{fill:#72B755;}
|
||||||
|
.st2{fill:#4FA52B;}
|
||||||
|
.st3{fill:#EE8C89;}
|
||||||
|
.st4{fill:#E96562;}
|
||||||
|
.st5{fill:#E33F3B;}
|
||||||
|
.st6{fill:#EFB075;}
|
||||||
|
.st7{fill:#E99547;}
|
||||||
|
.st8{fill:#E47B19;}
|
||||||
|
</style>
|
||||||
<g>
|
<g>
|
||||||
<path d="M139.19968 46.483948C 133.79512 46.316727 130.99477 48.84615 130.3185 49.08075C 130.93373 47.91552 131.34544 47.18139 132.91882 45.54309C 127.567184 45.48699 122.60501 46.645172 118.819 50.18706C 113.74112 54.93721 114.13588 58.872803 114.12565 58.8534C 114.12665 58.8554 113.324486 56.28694 113.083885 53.53986C 107.557976 61.18914 105.376045 71.32445 109.565636 78.88518C 112.16631 72.611374 116.29593 67.204346 121.617935 62.940678C 121.79327 58.466747 123.59313 54.686737 126.437935 51.89591C 123.87077 54.96861 122.73801 58.46922 122.8523 61.99735C 129.0425 57.37914 136.62968 54.301147 144.96371 53.29115C 138.92981 54.39993 133.4628 56.804817 128.68442 60.08495C 131.67526 61.4509 135.09087 61.66504 138.68073 60.41479C 135.23903 62.02769 131.41844 62.291573 127.55341 60.88681C 124.123 63.39894 121.072174 66.36721 118.44998 69.62935C 123.10523 71.15123 128.19724 70.83655 133.26453 68.25387C 128.6128 71.25848 123.14792 72.38525 117.30839 71.10572C 114.98041 74.22992 113.02919 77.58555 111.50413 81.04383C 113.382675 82.42883 121.53502 86.77435 135.51878 76.4623C 133.54428 75.878815 131.94408 75.053665 131.94337 75.05225C 131.98787 75.07205 133.38448 75.200424 137.46893 72.753555C 141.07997 70.64182 144.18617 66.81666 146.47923 63.839214C 144.52872 63.120605 143.00966 62.366364 143.00896 62.364605C 143.00795 62.363605 145.52956 62.534286 149.44116 59.539906C 152.93013 56.869026 156.82515 52.997295 156.83716 53.106655C 156.86186 53.129955 148.2449 46.763355 139.19968 46.483955" stroke="none" fill="#4FA52B" fill-rule="nonzero" />
|
<path class="st0" d="m202.9 112.7c-22.5 16.1-54.5 12.8-74.9 6.3l14.8-11.8 14.1-11.3 49.1-39.3-51.2 35.9-14.3 10-14.9 10.5c0.7-21.2 7-49.9 28.6-65.4 1.8-1.3 3.9-2.6 6.1-3.8 2.7-1.5 5.7-2.9 8.8-4.1 27.1-11.1 68.5-15.3 85.2-9.5 0.1 16.2-15.9 45.4-33.9 65.9-2.4 2.8-4.9 5.4-7.4 7.8-3.4 3.5-6.8 6.4-10.1 8.8z"/>
|
||||||
<path d="M76.90892 60.39415C 81.01041 59.20187 83.62202 60.57837 84.18329 60.62363C 83.49581 59.85657 83.04422 59.37815 81.5362 58.43957C 85.61753 57.342182 89.62709 57.24689 93.18141 59.20068C 97.94861 61.82108 98.37924 64.89886 98.38368 64.88219C 98.38287 64.884186 98.51835 62.767998 98.19094 60.626408C 103.84037 65.368546 107.39591 72.664375 105.59999 79.25351C 102.44364 74.98344 98.27924 71.67578 93.41609 69.47424C 92.44918 66.098694 90.369 63.571594 87.674324 62.0049C 90.20933 63.84117 91.72702 66.28648 92.29676 68.9982C 86.70379 66.69781 80.32978 65.84657 73.76949 66.719246C 78.589516 66.37542 88.79929 67.0738 97.083725 73.94838C 93.808014 76.02605 89.85612 76.78993 85.50101 75.81959C 89.617004 77.19292 94.00519 76.97535 98.23167 74.84885C 100.59329 76.77167 102.71017 78.94501 104.520195 81.28075C 103.3416 82.70688 97.917564 87.62569 85.30545 82.520676C 86.70662 81.686905 87.77634 80.74236 87.77674 80.74117C 87.746544 80.76498 86.70259 81.13821 83.12366 80.07813C 79.96972 79.18005 76.88272 76.87608 74.574715 75.058075C 75.932335 74.12624 76.953674 73.25198 76.953674 73.2504C 76.95406 73.24959 75.05817 73.87652 71.50989 72.36501C 68.344666 71.016304 64.64558 68.832634 64.65687 68.918396C 64.642365 68.940994 70.04542 62.389626 76.90893 60.394146" stroke="none" fill="#E47B19" fill-rule="nonzero" />
|
<path class="st1" d="m213.1 104c-22.2 12.6-51.4 9.3-70.3 3.2l14.1-11.3 49.1-39.3-51.2 35.9-14.3 10c0.5-18.1 4.9-42.1 19.7-58.6 2.7-1.5 5.7-2.9 8.8-4.1 27.1-11.1 68.5-15.3 85.2-9.5 0.1 16.2-15.9 45.4-33.9 65.9-2.3 2.8-4.8 5.4-7.2 7.8z"/>
|
||||||
<path d="M106.35028 116.78676C 103.35939 114.0036 103.23137 111.1697 102.99563 110.68548C 102.692345 111.63276 102.514435 112.24205 102.46853 113.950066C 99.56593 111.13644 97.53256 107.88377 97.42573 103.98627C 97.2827 98.76002 99.63347 96.87469 99.61758 96.879555C 99.619576 96.879555 97.79303 97.82024 96.170654 99.15473C 97.362595 92.146484 101.699936 85.59194 108.057846 83.79309C 106.043465 88.51463 105.32079 93.58698 105.859375 98.68461C 103.522285 101.15936 102.43365 104.12773 102.44335 107.12493C 102.7356 104.12552 104.0304 101.66008 106.00902 99.8426C 106.82087 105.59001 109.21976 111.25976 113.143005 116.22528C 110.507935 112.4288 106.112755 103.67846 107.79472 93.44062C 111.1198 95.10421 113.68158 97.97678 114.99713 102.04415C 114.133644 97.97323 111.813774 94.46955 107.98454 92.04802C 108.433075 89.14839 109.210045 86.32549 110.27087 83.67378C 112.03185 83.93501 118.768524 85.95295 120.66769 98.87222C 119.291214 98.13378 117.984055 97.72311 117.98273 97.72354C 118.017624 97.73644 118.836945 98.41008 119.69913 101.88272C 120.4889 104.925644 120.07702 108.61209 119.68893 111.41583C 118.25153 110.761665 117.02649 110.35595 117.025604 110.356834C 117.024605 110.356834 118.470055 111.60574 118.94197 115.277824C 119.36268 118.55367 119.348564 122.68398 119.41433 122.632C 119.44033 122.63284 111.35593 121.44354 106.35022 116.78675" stroke="none" fill="#E33F3B" fill-rule="nonzero" />
|
<path class="st2" d="m220.5 96.2c-21.1 8.6-46.6 5.3-63.7-0.2l49.2-39.4-51.2 35.9c0.3-15.8 3.5-36.6 14.3-52.8 27.1-11.1 68.5-15.3 85.2-9.5 0.1 16.2-15.9 45.4-33.8 66z"/>
|
||||||
|
|
||||||
|
<path class="st3" d="m106.7 179c-5.8-21 5.2-43.8 15.5-57.2l4.8 14.2 4.5 13.4 15.9 47-12.8-47.6-3.6-13.2-3.7-13.9c15.5 6.2 35.1 18.6 40.7 38.8 0.5 1.7 0.9 3.6 1.2 5.5 0.4 2.4 0.6 5 0.7 7.7 0.9 23.1-7.1 54.9-15.9 65.7-12-4.3-29.3-24-39.7-42.8-1.4-2.6-2.7-5.1-3.8-7.6-1.6-3.5-2.9-6.8-3.8-10z"/>
|
||||||
|
<path class="st4" d="m110.4 188.9c-3.4-19.8 6.9-40.5 16.6-52.9l4.5 13.4 15.9 47-12.8-47.6-3.6-13.2c13.3 5.2 29.9 15 38.1 30.4 0.4 2.4 0.6 5 0.7 7.7 0.9 23.1-7.1 54.9-15.9 65.7-12-4.3-29.3-24-39.7-42.8-1.4-2.6-2.7-5.2-3.8-7.7z"/>
|
||||||
|
<path class="st5" d="m114.2 196.5c-0.7-18 8.6-35.9 17.3-47.1l15.9 47-12.8-47.6c11.6 4.4 26.1 12.4 35.2 24.8 0.9 23.1-7.1 54.9-15.9 65.7-12-4.3-29.3-24-39.7-42.8z"/>
|
||||||
|
|
||||||
|
<path class="st6" d="m86.3 59.1c21.7 10.9 32.4 36.6 35.8 54.9l-15.2-6.6-14.5-6.3-50.6-22 48.8 24.9 13.6 6.9 14.3 7.3c-16.6 7.9-41.3 14.5-62.1 4.1-1.8-0.9-3.6-1.9-5.4-3.2-2.3-1.5-4.5-3.2-6.8-5.1-19.9-16.4-40.3-46.4-42.7-61.5 12.4-6.5 41.5-5.8 64.8-0.3 3.2 0.8 6.2 1.6 9.1 2.5 4 1.3 7.6 2.8 10.9 4.4z"/>
|
||||||
|
<path class="st7" d="m75.4 54.8c18.9 12 28.4 35.6 31.6 52.6l-14.5-6.3-50.6-22 48.7 24.9 13.6 6.9c-14.1 6.8-34.5 13-53.3 8.2-2.3-1.5-4.5-3.2-6.8-5.1-19.8-16.4-40.2-46.4-42.6-61.5 12.4-6.5 41.5-5.8 64.8-0.3 3.1 0.8 6.2 1.6 9.1 2.6z"/>
|
||||||
|
<path class="st8" d="m66.3 52.2c15.3 12.8 23.3 33.6 26.1 48.9l-50.6-22 48.8 24.9c-12.2 6-29.6 11.8-46.5 10-19.8-16.4-40.2-46.4-42.6-61.5 12.4-6.5 41.5-5.8 64.8-0.3z"/>
|
||||||
</g>
|
</g>
|
||||||
</g>
|
|
||||||
</svg>
|
</svg>
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 5.9 KiB |
@ -1,12 +0,0 @@
|
|||||||
<?xml version="1.0" standalone="no"?>
|
|
||||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="body_1" width="53" height="40">
|
|
||||||
|
|
||||||
<g transform="matrix(0.51887405 0 0 0.51887405 -30.622847 -23.349333)">
|
|
||||||
<g>
|
|
||||||
<path d="M139.19968 46.483948C 133.79512 46.316727 130.99477 48.84615 130.3185 49.08075C 130.93373 47.91552 131.34544 47.18139 132.91882 45.54309C 127.567184 45.48699 122.60501 46.645172 118.819 50.18706C 113.74112 54.93721 114.13588 58.872803 114.12565 58.8534C 114.12665 58.8554 113.324486 56.28694 113.083885 53.53986C 107.557976 61.18914 105.376045 71.32445 109.565636 78.88518C 112.16631 72.611374 116.29593 67.204346 121.617935 62.940678C 121.79327 58.466747 123.59313 54.686737 126.437935 51.89591C 123.87077 54.96861 122.73801 58.46922 122.8523 61.99735C 129.0425 57.37914 136.62968 54.301147 144.96371 53.29115C 138.92981 54.39993 133.4628 56.804817 128.68442 60.08495C 131.67526 61.4509 135.09087 61.66504 138.68073 60.41479C 135.23903 62.02769 131.41844 62.291573 127.55341 60.88681C 124.123 63.39894 121.072174 66.36721 118.44998 69.62935C 123.10523 71.15123 128.19724 70.83655 133.26453 68.25387C 128.6128 71.25848 123.14792 72.38525 117.30839 71.10572C 114.98041 74.22992 113.02919 77.58555 111.50413 81.04383C 113.382675 82.42883 121.53502 86.77435 135.51878 76.4623C 133.54428 75.878815 131.94408 75.053665 131.94337 75.05225C 131.98787 75.07205 133.38448 75.200424 137.46893 72.753555C 141.07997 70.64182 144.18617 66.81666 146.47923 63.839214C 144.52872 63.120605 143.00966 62.366364 143.00896 62.364605C 143.00795 62.363605 145.52956 62.534286 149.44116 59.539906C 152.93013 56.869026 156.82515 52.997295 156.83716 53.106655C 156.86186 53.129955 148.2449 46.763355 139.19968 46.483955" stroke="none" fill="#ABABAB" fill-rule="nonzero" />
|
|
||||||
<path d="M76.90892 60.39415C 81.01041 59.20187 83.62202 60.57837 84.18329 60.62363C 83.49581 59.85657 83.04422 59.37815 81.5362 58.43957C 85.61753 57.342182 89.62709 57.24689 93.18141 59.20068C 97.94861 61.82108 98.37924 64.89886 98.38368 64.88219C 98.38287 64.884186 98.51835 62.767998 98.19094 60.626408C 103.84037 65.368546 107.39591 72.664375 105.59999 79.25351C 102.44364 74.98344 98.27924 71.67578 93.41609 69.47424C 92.44918 66.098694 90.369 63.571594 87.674324 62.0049C 90.20933 63.84117 91.72702 66.28648 92.29676 68.9982C 86.70379 66.69781 80.32978 65.84657 73.76949 66.719246C 78.589516 66.37542 88.79929 67.0738 97.083725 73.94838C 93.808014 76.02605 89.85612 76.78993 85.50101 75.81959C 89.617004 77.19292 94.00519 76.97535 98.23167 74.84885C 100.59329 76.77167 102.71017 78.94501 104.520195 81.28075C 103.3416 82.70688 97.917564 87.62569 85.30545 82.520676C 86.70662 81.686905 87.77634 80.74236 87.77674 80.74117C 87.746544 80.76498 86.70259 81.13821 83.12366 80.07813C 79.96972 79.18005 76.88272 76.87608 74.574715 75.058075C 75.932335 74.12624 76.953674 73.25198 76.953674 73.2504C 76.95406 73.24959 75.05817 73.87652 71.50989 72.36501C 68.344666 71.016304 64.64558 68.832634 64.65687 68.918396C 64.642365 68.940994 70.04542 62.389626 76.90893 60.394146" stroke="none" fill="#ABABAB" fill-rule="nonzero" />
|
|
||||||
<path d="M106.35028 116.78676C 103.35939 114.0036 103.23137 111.1697 102.99563 110.68548C 102.692345 111.63276 102.514435 112.24205 102.46853 113.950066C 99.56593 111.13644 97.53256 107.88377 97.42573 103.98627C 97.2827 98.76002 99.63347 96.87469 99.61758 96.879555C 99.619576 96.879555 97.79303 97.82024 96.170654 99.15473C 97.362595 92.146484 101.699936 85.59194 108.057846 83.79309C 106.043465 88.51463 105.32079 93.58698 105.859375 98.68461C 103.522285 101.15936 102.43365 104.12773 102.44335 107.12493C 102.7356 104.12552 104.0304 101.66008 106.00902 99.8426C 106.82087 105.59001 109.21976 111.25976 113.143005 116.22528C 110.507935 112.4288 106.112755 103.67846 107.79472 93.44062C 111.1198 95.10421 113.68158 97.97678 114.99713 102.04415C 114.133644 97.97323 111.813774 94.46955 107.98454 92.04802C 108.433075 89.14839 109.210045 86.32549 110.27087 83.67378C 112.03185 83.93501 118.768524 85.95295 120.66769 98.87222C 119.291214 98.13378 117.984055 97.72311 117.98273 97.72354C 118.017624 97.73644 118.836945 98.41008 119.69913 101.88272C 120.4889 104.925644 120.07702 108.61209 119.68893 111.41583C 118.25153 110.761665 117.02649 110.35595 117.025604 110.356834C 117.024605 110.356834 118.470055 111.60574 118.94197 115.277824C 119.36268 118.55367 119.348564 122.68398 119.41433 122.632C 119.44033 122.63284 111.35593 121.44354 106.35022 116.78675" stroke="none" fill="#ABABAB" fill-rule="nonzero" />
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 4.6 KiB |
17
images/icon-purple.svg
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg enable-background="new 0 0 256 256" version="1.1" viewBox="0 0 256 256" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<title>TrilliumNext Notes</title>
|
||||||
|
<g>
|
||||||
|
<path d="m202.9 112.7c-22.5 16.1-54.5 12.8-74.9 6.3l14.8-11.8 14.1-11.3 49.1-39.3-51.2 35.9-14.3 10-14.9 10.5c0.7-21.2 7-49.9 28.6-65.4 1.8-1.3 3.9-2.6 6.1-3.8 2.7-1.5 5.7-2.9 8.8-4.1 27.1-11.1 68.5-15.3 85.2-9.5 0.1 16.2-15.9 45.4-33.9 65.9-2.4 2.8-4.9 5.4-7.4 7.8-3.4 3.5-6.8 6.4-10.1 8.8z" fill="#ab60e3"/>
|
||||||
|
<path d="m213.1 104c-22.2 12.6-51.4 9.3-70.3 3.2l14.1-11.3 49.1-39.3-51.2 35.9-14.3 10c0.5-18.1 4.9-42.1 19.7-58.6 2.7-1.5 5.7-2.9 8.8-4.1 27.1-11.1 68.5-15.3 85.2-9.5 0.1 16.2-15.9 45.4-33.9 65.9-2.3 2.8-4.8 5.4-7.2 7.8z" fill="#8038b8"/>
|
||||||
|
<path d="m220.5 96.2c-21.1 8.6-46.6 5.3-63.7-0.2l49.2-39.4-51.2 35.9c0.3-15.8 3.5-36.6 14.3-52.8 27.1-11.1 68.5-15.3 85.2-9.5 0.1 16.2-15.9 45.4-33.8 66z" fill="#560a8f"/>
|
||||||
|
|
||||||
|
<path d="m106.7 179c-5.8-21 5.2-43.8 15.5-57.2l4.8 14.2 4.5 13.4 15.9 47-12.8-47.6-3.6-13.2-3.7-13.9c15.5 6.2 35.1 18.6 40.7 38.8 0.5 1.7 0.9 3.6 1.2 5.5 0.4 2.4 0.6 5 0.7 7.7 0.9 23.1-7.1 54.9-15.9 65.7-12-4.3-29.3-24-39.7-42.8-1.4-2.6-2.7-5.1-3.8-7.6-1.6-3.5-2.9-6.8-3.8-10z" fill="#bb9dd2"/>
|
||||||
|
<path d="m110.4 188.9c-3.4-19.8 6.9-40.5 16.6-52.9l4.5 13.4 15.9 47-12.8-47.6-3.6-13.2c13.3 5.2 29.9 15 38.1 30.4 0.4 2.4 0.6 5 0.7 7.7 0.9 23.1-7.1 54.9-15.9 65.7-12-4.3-29.3-24-39.7-42.8-1.4-2.6-2.7-5.2-3.8-7.7z" fill="#9a6cbc"/>
|
||||||
|
<path d="m114.2 196.5c-0.7-18 8.6-35.9 17.3-47.1l15.9 47-12.8-47.6c11.6 4.4 26.1 12.4 35.2 24.8 0.9 23.1-7.1 54.9-15.9 65.7-12-4.3-29.3-24-39.7-42.8z" fill="#783ba5"/>
|
||||||
|
|
||||||
|
<path d="m86.3 59.1c21.7 10.9 32.4 36.6 35.8 54.9l-15.2-6.6-14.5-6.3-50.6-22 48.8 24.9 13.6 6.9 14.3 7.3c-16.6 7.9-41.3 14.5-62.1 4.1-1.8-0.9-3.6-1.9-5.4-3.2-2.3-1.5-4.5-3.2-6.8-5.1-19.9-16.4-40.3-46.4-42.7-61.5 12.4-6.5 41.5-5.8 64.8-0.3 3.2 0.8 6.2 1.6 9.1 2.5 4 1.3 7.6 2.8 10.9 4.4z" fill="#ab60e3"/>
|
||||||
|
<path d="m75.4 54.8c18.9 12 28.4 35.6 31.6 52.6l-14.5-6.3-50.6-22 48.7 24.9 13.6 6.9c-14.1 6.8-34.5 13-53.3 8.2-2.3-1.5-4.5-3.2-6.8-5.1-19.8-16.4-40.2-46.4-42.6-61.5 12.4-6.5 41.5-5.8 64.8-0.3 3.1 0.8 6.2 1.6 9.1 2.6z" fill="#8038b8"/>
|
||||||
|
<path d="m66.3 52.2c15.3 12.8 23.3 33.6 26.1 48.9l-50.6-22 48.8 24.9c-12.2 6-29.6 11.8-46.5 10-19.8-16.4-40.2-46.4-42.6-61.5 12.4-6.5 41.5-5.8 64.8-0.3z" fill="#6f2796"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.3 KiB |
5
images/icon-white.svg
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg enable-background="new 0 0 256 256" version="1.1" viewBox="0 0 256 256" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<title>TrilliumNext Notes</title>
|
||||||
|
<path fill="white" d="m232.6 27.598c-17.706 0.092041-40.298 3.7127-58.258 10.104-1.7959 0.63909-3.5465 1.3043-5.2402 1.998-3.1 1.2-6.0988 2.6016-8.7988 4.1016-2.2 1.2-4.3016 2.4988-6.1016 3.7988-21.6 15.5-27.9 44.2-28.6 65.4l14.9-10.5 14.301-10 51.199-35.9-49.1 39.301-14.1 11.299-14.801 11.801c20.4 6.5 52.4 9.7992 74.9-6.3008 3.1886-2.319 6.4708-5.1162 9.7559-8.459 0.14708-0.08175 0.29689-0.1571 0.44336-0.24023 2.3386-2.3386 4.7705-4.8714 7.0215-7.5898 0.02928-0.033868 0.05864-0.065681 0.08789-0.099609 0.0964-0.038723 0.1948-0.072111 0.29102-0.11133 14.544-16.737 27.833-39.152 32.252-55.658 0.67979-2.5395 1.1487-4.9387 1.3809-7.1562 0.11607-1.1088 0.17422-2.173 0.16797-3.1855-1.0438-0.3625-2.1849-0.68557-3.4121-0.9707-1.2272-0.28513-2.542-0.53096-3.9336-0.74024s-2.8595-0.38069-4.3965-0.51562c-3.0739-0.26987-6.4198-0.39341-9.9609-0.375zm-202.79 20.252c-11.737-0.05-22.113 1.4004-28.312 4.6504 0.9 5.6625 4.3309 13.419 9.3125 21.77v0.001953c3.3209 5.5664 7.332 11.395 11.74 17.043v0.001953c6.6127 8.4716 14.122 16.534 21.547 22.684 2.3 1.9 4.5008 3.5996 6.8008 5.0996 0.048555 0.0124 0.097907 0.019 0.14648 0.03125 1.7845 1.2837 3.569 2.2777 5.3535 3.1699 20.8 10.4 45.5 3.7984 62.1-4.1016l-14.301-7.2988-13.6-6.9004-48.127-24.607 49.928 21.707 14.5 6.3008 15.199 6.5996c-3.4-18.3-14.099-44-35.799-54.9-3.3-1.6-6.9004-3.1004-10.9-4.4004-2.9-0.9-5.8996-1.7-9.0996-2.5-11.65-2.75-24.751-4.2996-36.488-4.3496zm97.488 73.85 3.6992 13.9 3.5996 13.201 12.801 47.6-15.9-47-4.5-13.4-4.8008-14.199c-10.3 13.4-21.3 36.199-15.5 57.199 0.8747 3.11 2.1333 6.3182 3.6719 9.709 0.01066 0.06374 0.01836 0.12769 0.0293 0.19141 1.1 2.5 2.3988 5.0992 3.7988 7.6992 10.4 18.8 27.701 38.501 39.701 42.801 0.00763-0.00936 0.01581-0.01991 0.02344-0.0293 0.02502 0.00909 0.05119 0.02035 0.07617 0.0293 8.8-10.8 16.8-42.601 15.9-65.701-0.1-2.7-0.30117-5.2992-0.70117-7.6992-0.3-1.9-0.69922-3.8-1.1992-5.5-5.6-20.2-25.199-32.601-40.699-38.801z"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.1 KiB |
@ -1,67 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<svg
|
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
||||||
xmlns:cc="http://creativecommons.org/ns#"
|
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
width="210mm"
|
|
||||||
height="297mm"
|
|
||||||
viewBox="0 0 210 297"
|
|
||||||
version="1.1"
|
|
||||||
id="svg2163"
|
|
||||||
inkscape:version="1.0.2 (e86c870879, 2021-01-15)"
|
|
||||||
sodipodi:docname="cropped.svg">
|
|
||||||
<defs
|
|
||||||
id="defs2157" />
|
|
||||||
<sodipodi:namedview
|
|
||||||
id="base"
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
bordercolor="#666666"
|
|
||||||
borderopacity="1.0"
|
|
||||||
inkscape:pageopacity="0.0"
|
|
||||||
inkscape:pageshadow="2"
|
|
||||||
inkscape:zoom="1.5099157"
|
|
||||||
inkscape:cx="386.95033"
|
|
||||||
inkscape:cy="314.49555"
|
|
||||||
inkscape:document-units="mm"
|
|
||||||
inkscape:current-layer="layer1"
|
|
||||||
inkscape:document-rotation="0"
|
|
||||||
showgrid="false"
|
|
||||||
inkscape:window-width="1245"
|
|
||||||
inkscape:window-height="846"
|
|
||||||
inkscape:window-x="60"
|
|
||||||
inkscape:window-y="0"
|
|
||||||
inkscape:window-maximized="0" />
|
|
||||||
<metadata
|
|
||||||
id="metadata2160">
|
|
||||||
<rdf:RDF>
|
|
||||||
<cc:Work
|
|
||||||
rdf:about="">
|
|
||||||
<dc:format>image/svg+xml</dc:format>
|
|
||||||
<dc:type
|
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
||||||
<dc:title></dc:title>
|
|
||||||
</cc:Work>
|
|
||||||
</rdf:RDF>
|
|
||||||
</metadata>
|
|
||||||
<g
|
|
||||||
inkscape:label="Ebene 1"
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
id="layer1">
|
|
||||||
<path
|
|
||||||
d="m 139.19968,46.483949 c -5.40456,-0.16722 -8.20491,2.3622 -8.88118,2.5968 0.61524,-1.16523 1.02694,-1.89936 2.60032,-3.53766 -5.35164,-0.0561 -10.31381,1.10208 -14.09982,4.64397 -5.07788,4.75015 -4.68312,8.68574 -4.69335,8.66634 0.001,0.002 -0.80116,-2.56646 -1.04176,-5.31354 -5.52591,7.64928 -7.70784,17.78459 -3.51825,25.34532 2.60068,-6.2738 6.73029,-11.68083 12.0523,-15.9445 0.17533,-4.47393 1.9752,-8.25394 4.82,-11.04477 -2.56716,3.0727 -3.69993,6.57331 -3.58563,10.10144 6.19019,-4.61821 13.77738,-7.6962 22.11141,-8.7062 -6.03391,1.10878 -11.50091,3.51367 -16.27929,6.7938 2.99085,1.36595 6.40645,1.58009 9.99631,0.32984 -3.4417,1.6129 -7.26228,1.87678 -11.12731,0.47202 -3.43041,2.51213 -6.48124,5.4804 -9.10343,8.74254 4.65525,1.52188 9.74725,1.2072 14.81455,-1.37548 -4.65173,3.00461 -10.11661,4.13138 -15.95614,2.85185 -2.32798,3.1242 -4.2792,6.47983 -5.80426,9.93811 1.87855,1.385 10.03089,5.73052 24.01465,-4.58153 -1.9745,-0.58349 -3.5747,-1.40864 -3.57541,-1.41005 0.0445,0.0198 1.4411,0.14817 5.52556,-2.2987 3.61104,-2.11173 6.71724,-5.9369 9.0103,-8.91434 -1.95051,-0.71861 -3.46957,-1.47285 -3.47028,-1.47461 -0.001,-10e-4 2.5206,0.16968 6.4322,-2.8247 3.48897,-2.67088 7.38399,-6.54261 7.39599,-6.43325 0.0247,0.0233 -8.59226,-6.3433 -17.63748,-6.6227"
|
|
||||||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path1983" />
|
|
||||||
<path
|
|
||||||
d="m 76.908921,60.394149 c 4.10149,-1.19228 6.7131,0.18422 7.27437,0.22948 -0.68748,-0.76706 -1.13907,-1.24548 -2.64709,-2.18406 4.08133,-1.09739 8.09089,-1.19268 11.64521,0.76111 4.7672,2.6204 5.19783,5.69818 5.20227,5.68151 -8.1e-4,0.002 0.13467,-2.11419 -0.19274,-4.25578 5.649429,4.74214 9.204969,12.03797 7.409049,18.6271 -3.15635,-4.27007 -7.320749,-7.57773 -12.183899,-9.77927 -0.96691,-3.37555 -3.04709,-5.90265 -5.74177,-7.46934 2.535,1.83627 4.0527,4.28158 4.62244,6.9933 -5.59297,-2.30039 -11.96698,-3.15163 -18.52727,-2.27895 4.82002,-0.34383 15.0298,0.35455 23.31423,7.22913 -3.27571,2.07767 -7.22761,2.84155 -11.58272,1.87121 4.116,1.37333 8.50418,1.15576 12.73066,-0.97074 2.361629,1.92282 4.478499,4.09616 6.288529,6.4319 -1.1786,1.42613 -6.602629,6.34494 -19.214749,1.23993 1.40117,-0.83377 2.47089,-1.77831 2.47129,-1.7795 -0.0302,0.0238 -1.07415,0.39703 -4.65308,-0.66304 -3.15394,-0.89808 -6.24094,-3.20205 -8.54894,-5.02006 1.35762,-0.93183 2.37896,-1.80609 2.37896,-1.80768 3.9e-4,-8.1e-4 -1.89551,0.62612 -5.44379,-0.88538 -3.16522,-1.34871 -6.86431,-3.53238 -6.85302,-3.44662 -0.0145,0.0226 5.38855,-6.52877 12.25206,-8.52425"
|
|
||||||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.040011"
|
|
||||||
id="path1985" />
|
|
||||||
<path
|
|
||||||
d="m 106.35028,116.78676 c -2.99089,-2.78316 -3.11891,-5.61706 -3.35465,-6.10128 -0.30328,0.94728 -0.48119,1.55657 -0.5271,3.26459 -2.902599,-2.81363 -4.935969,-6.06629 -5.042799,-9.9638 -0.14303,-5.226251 2.20774,-7.111581 2.19185,-7.106711 0.002,0 -1.82455,0.94068 -3.44692,2.27518 1.19194,-7.00825 5.529279,-13.56279 11.887189,-15.36164 -2.01438,4.72154 -2.73705,9.79389 -2.19847,14.89152 -2.33709,2.474751 -3.42573,5.443121 -3.41602,8.440321 0.29225,-2.99941 1.58705,-5.46485 3.56567,-7.282331 0.81185,5.747411 3.21074,11.417161 7.13399,16.382681 -2.63507,-3.79648 -7.03025,-12.54682 -5.34828,-22.784661 3.32507,1.66359 5.88686,4.53616 7.20241,8.603531 -0.86349,-4.070921 -3.18336,-7.574601 -7.01259,-9.996131 0.44853,-2.89963 1.2255,-5.72253 2.28632,-8.37424 1.76099,0.26123 8.49766,2.27917 10.39682,15.19844 -1.37647,-0.73844 -2.68363,-1.14912 -2.68496,-1.14868 0.0349,0.0129 0.85422,0.68654 1.7164,4.159181 0.78977,3.04292 0.37789,6.72937 -0.0102,9.53311 -1.43739,-0.65417 -2.66244,-1.05988 -2.66332,-1.059 -0.001,0 1.44445,1.24891 1.91637,4.92099 0.42071,3.27585 0.40659,7.40616 0.47236,7.35418 0.026,8.4e-4 -8.0584,-1.18846 -13.06411,-5.84525"
|
|
||||||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0442482"
|
|
||||||
id="path1987" />
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 5.4 KiB |
17
integration-tests/auth.setup.ts
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import { test as setup, expect } from '@playwright/test';
|
||||||
|
|
||||||
|
const authFile = 'playwright/.auth/user.json';
|
||||||
|
|
||||||
|
const ROOT_URL = "http://localhost:8082";
|
||||||
|
const LOGIN_PASSWORD = "demo1234";
|
||||||
|
|
||||||
|
// Reference: https://playwright.dev/docs/auth#basic-shared-account-in-all-tests
|
||||||
|
|
||||||
|
setup("authenticate", async ({ page }) => {
|
||||||
|
await page.goto(ROOT_URL);
|
||||||
|
await expect(page).toHaveURL(`${ROOT_URL}/login`);
|
||||||
|
|
||||||
|
await page.getByRole("textbox", { name: "Password" }).fill(LOGIN_PASSWORD);
|
||||||
|
await page.getByRole("button", { name: "Login"}).click();
|
||||||
|
await page.context().storageState({ path: authFile });
|
||||||
|
});
|
BIN
integration-tests/db/document.db
Normal file
9
integration-tests/duplicate.spec.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { test, expect } from '@playwright/test';
|
||||||
|
|
||||||
|
test("Can duplicate note with broken links", async ({ page }) => {
|
||||||
|
await page.goto(`http://localhost:8082/#2VammGGdG6Ie`);
|
||||||
|
await page.locator('.tree-wrapper .fancytree-active').getByText('Note map').click({ button: 'right' });
|
||||||
|
await page.getByText('Duplicate subtree').click();
|
||||||
|
await expect(page.locator(".toast-body")).toBeHidden();
|
||||||
|
await expect(page.locator('.tree-wrapper').getByText('Note map (dup)')).toBeVisible();
|
||||||
|
});
|
18
integration-tests/example.disabled.ts
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import { test, expect } from '@playwright/test';
|
||||||
|
|
||||||
|
test('has title', async ({ page }) => {
|
||||||
|
await page.goto('https://playwright.dev/');
|
||||||
|
|
||||||
|
// Expect a title "to contain" a substring.
|
||||||
|
await expect(page).toHaveTitle(/Playwright/);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('get started link', async ({ page }) => {
|
||||||
|
await page.goto('https://playwright.dev/');
|
||||||
|
|
||||||
|
// Click the get started link.
|
||||||
|
await page.getByRole('link', { name: 'Get started' }).click();
|
||||||
|
|
||||||
|
// Expects page to have a heading with the name of Installation.
|
||||||
|
await expect(page.getByRole('heading', { name: 'Installation' })).toBeVisible();
|
||||||
|
});
|
23
integration-tests/help.spec.ts
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import test, { expect } from "@playwright/test";
|
||||||
|
|
||||||
|
test('Help popup', async ({ page }) => {
|
||||||
|
await page.goto('http://localhost:8082');
|
||||||
|
await page.getByText('Trilium Integration Test DB').click();
|
||||||
|
|
||||||
|
await page.locator('body').press('F1');
|
||||||
|
await page.getByRole('link', { name: 'online↗' }).click();
|
||||||
|
expect((await page.waitForEvent('popup')).url()).toBe("https://triliumnext.github.io/Docs/")
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Complete help in search', async ({ page }) => {
|
||||||
|
await page.goto('http://localhost:8082');
|
||||||
|
|
||||||
|
// Clear all tabs
|
||||||
|
await page.locator('.note-tab:first-of-type').locator("div").nth(1).click({ button: 'right' });
|
||||||
|
await page.getByText('Close all tabs').click();
|
||||||
|
|
||||||
|
await page.locator('#launcher-container').getByRole('button', { name: '' }).first().click();
|
||||||
|
await page.getByRole('cell', { name: ' ' }).locator('span').first().click();
|
||||||
|
await page.getByRole('button', { name: 'complete help on search syntax' }).click();
|
||||||
|
expect((await page.waitForEvent('popup')).url()).toBe("https://triliumnext.github.io/Docs/Wiki/search.html");
|
||||||
|
});
|
43
integration-tests/i18n.spec.ts
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
import test, { expect } from "@playwright/test";
|
||||||
|
|
||||||
|
test("User can change language from settings", async ({ page }) => {
|
||||||
|
await page.goto('http://localhost:8082');
|
||||||
|
|
||||||
|
// Clear all tabs
|
||||||
|
await page.locator('.note-tab:first-of-type').locator("div").nth(1).click({ button: 'right' });
|
||||||
|
await page.getByText('Close all tabs').click();
|
||||||
|
|
||||||
|
// Go to options -> Appearance
|
||||||
|
await page.locator('#launcher-pane div').filter({ hasText: 'Options Open New Window' }).getByRole('button').click();
|
||||||
|
await page.locator('#launcher-pane').getByText('Options').click();
|
||||||
|
await page.locator('#center-pane').getByText('Appearance').click();
|
||||||
|
|
||||||
|
// Check that the default value (English) is set.
|
||||||
|
await expect(page.locator('#center-pane')).toContainText('Theme');
|
||||||
|
const languageCombobox = await page.getByRole('combobox').first();
|
||||||
|
await expect(languageCombobox).toHaveValue("en");
|
||||||
|
|
||||||
|
// Select Chinese and ensure the translation is set.
|
||||||
|
languageCombobox.selectOption("cn");
|
||||||
|
await expect(page.locator('#center-pane')).toContainText('主题');
|
||||||
|
|
||||||
|
// Select English again.
|
||||||
|
languageCombobox.selectOption("en");
|
||||||
|
});
|
||||||
|
|
||||||
|
test("Restores language on start-up on desktop", async ({ page, context }) => {
|
||||||
|
await page.goto('http://localhost:8082');
|
||||||
|
await expect(page.locator('#launcher-pane').first()).toContainText("Open New Window");
|
||||||
|
});
|
||||||
|
|
||||||
|
test("Restores language on start-up on mobile", async ({ page, context }) => {
|
||||||
|
await context.addCookies([
|
||||||
|
{
|
||||||
|
url: "http://localhost:8082",
|
||||||
|
name: "trilium-device",
|
||||||
|
value: "mobile"
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
await page.goto('http://localhost:8082');
|
||||||
|
await expect(page.locator('#launcher-pane div').first()).toContainText("Open New Window");
|
||||||
|
});
|
18
integration-tests/katex.disabled.ts
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import { test, expect } from '@playwright/test';
|
||||||
|
|
||||||
|
const ROOT_URL = "http://localhost:8080";
|
||||||
|
const LOGIN_PASSWORD = "eliandoran";
|
||||||
|
|
||||||
|
test("Can insert equations", async ({ page }) => {
|
||||||
|
await page.setDefaultTimeout(60_000);
|
||||||
|
await page.setDefaultNavigationTimeout(60_000);
|
||||||
|
|
||||||
|
// Create a new note
|
||||||
|
// await page.locator("button.button-widget.bx-file-blank")
|
||||||
|
// .click();
|
||||||
|
|
||||||
|
const activeNote = page.locator(".component.note-split:visible");
|
||||||
|
const noteContent = activeNote
|
||||||
|
.locator(".note-detail-editable-text-editor")
|
||||||
|
await noteContent.press("Ctrl+M");
|
||||||
|
});
|
21
integration-tests/settings.spec.ts
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import test, { expect } from "@playwright/test";
|
||||||
|
|
||||||
|
test("Native Title Bar not displayed on web", async ({ page }) => {
|
||||||
|
await page.goto('http://localhost:8082/#root/_hidden/_options/_optionsAppearance');
|
||||||
|
await expect(page.getByRole('heading', { name: 'Theme' })).toBeVisible();
|
||||||
|
await expect(page.getByRole('heading', { name: 'Native Title Bar (requires' })).toBeHidden();
|
||||||
|
});
|
||||||
|
|
||||||
|
test("Tray settings not displayed on web", async ({ page }) => {
|
||||||
|
await page.goto('http://localhost:8082/#root/_hidden/_options/_optionsOther');
|
||||||
|
await expect(page.getByRole('heading', { name: 'Note Erasure Timeout' })).toBeVisible();
|
||||||
|
await expect(page.getByRole('heading', { name: 'Tray' })).toBeHidden();
|
||||||
|
});
|
||||||
|
|
||||||
|
test("Spellcheck settings not displayed on web", async ({ page }) => {
|
||||||
|
await page.goto('http://localhost:8082/#root/_hidden/_options/_optionsSpellcheck');
|
||||||
|
await expect(page.getByRole('heading', { name: 'Spell Check' })).toBeVisible();
|
||||||
|
await expect(page.getByRole('heading', { name: 'Tray' })).toBeHidden();
|
||||||
|
await expect(page.getByText('These options apply only for desktop builds')).toBeVisible();
|
||||||
|
await expect(page.getByText('Enable spellcheck')).toBeHidden();
|
||||||
|
});
|
18
integration-tests/tree.spec.ts
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import test, { expect } from "@playwright/test";
|
||||||
|
|
||||||
|
test("Renders on desktop", async ({ page, context }) => {
|
||||||
|
await page.goto('http://localhost:8082');
|
||||||
|
await expect(page.locator('.tree')).toContainText('Trilium Integration Test');
|
||||||
|
});
|
||||||
|
|
||||||
|
test("Renders on mobile", async ({ page, context }) => {
|
||||||
|
await context.addCookies([
|
||||||
|
{
|
||||||
|
url: "http://localhost:8082",
|
||||||
|
name: "trilium-device",
|
||||||
|
value: "mobile"
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
await page.goto('http://localhost:8082');
|
||||||
|
await expect(page.locator('.tree')).toContainText('Trilium Integration Test');
|
||||||
|
});
|
12
integration-tests/update_check.spec.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import { test, expect } from '@playwright/test';
|
||||||
|
|
||||||
|
const expectedVersion = "0.90.3";
|
||||||
|
|
||||||
|
test("Displays update badge when there is a version available", async ({ page }) => {
|
||||||
|
await page.goto("http://localhost:8080");
|
||||||
|
await page.getByRole('button', { name: '' }).click();
|
||||||
|
await page.getByText(`Version ${expectedVersion} is available,`).click();
|
||||||
|
|
||||||
|
const page1 = await page.waitForEvent('popup');
|
||||||
|
expect(page1.url()).toBe(`https://github.com/TriliumNext/Notes/releases/tag/v${expectedVersion}`);
|
||||||
|
});
|