Merge remote-tracking branch 'origin/develop' into port/client_ts
| @@ -15,3 +15,9 @@ indent_size = 2 | ||||
| indent_style = space | ||||
| insert_final_newline = true | ||||
| trim_trailing_whitespace = true | ||||
|  | ||||
| [*.yml] | ||||
| indent_size = 2 | ||||
| indent_style = space | ||||
| insert_final_newline = true | ||||
| trim_trailing_whitespace = true | ||||
							
								
								
									
										3
									
								
								.github/ISSUE_TEMPLATE/bug_report.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -1,7 +1,6 @@ | ||||
| name: Bug Report | ||||
| description: Report a bug | ||||
| title: "(Bug report) " | ||||
| labels: "Type: Bug" | ||||
| type: "Bug" | ||||
| body: | ||||
| - type: textarea | ||||
|   attributes: | ||||
|   | ||||
							
								
								
									
										5
									
								
								.github/ISSUE_TEMPLATE/feature_request.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -1,12 +1,11 @@ | ||||
| name: Feature Request | ||||
| description: Ask for a new feature to be added | ||||
| title: "(Feature request) " | ||||
| labels: "Type: Enhancement" | ||||
| type: "Feature" | ||||
| body: | ||||
| - type: textarea | ||||
|   attributes: | ||||
|     label: Describe feature | ||||
|     description: A clear and concise description of what you want to be added.. | ||||
|     description: A clear and concise description of what you want to be added. | ||||
|   validations: | ||||
|     required: true | ||||
| - type: textarea | ||||
|   | ||||
							
								
								
									
										10
									
								
								.github/ISSUE_TEMPLATE/task.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,10 @@ | ||||
| name: Task | ||||
| description: Create a new Task | ||||
| type: "Task" | ||||
| body: | ||||
| - type: textarea | ||||
|   attributes: | ||||
|     label: Describe Task | ||||
|     description: A clear and concise description of what the task is about. | ||||
|   validations: | ||||
|     required: true | ||||
							
								
								
									
										48
									
								
								.github/actions/build-electron/action.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,48 @@ | ||||
| inputs: | ||||
|   os: | ||||
|     description: "One of the supported platforms: macos, linux, windows" | ||||
|     required: true | ||||
|   arch: | ||||
|     description: "The architecture to build for: x64, arm64" | ||||
|     required: true | ||||
|   extension: | ||||
|     description: "Platform specific extensions to copy in the output: dmg, deb, rpm, exe" | ||||
|     required: true | ||||
| runs: | ||||
|   using: composite | ||||
|   steps: | ||||
|     - name: Set up Python for appdmg to be installed | ||||
|       if: ${{ inputs.os == 'macos' }} | ||||
|       shell: bash | ||||
|       run: brew install python-setuptools | ||||
|     - name: Install dependencies for RPM and Flatpak package building | ||||
|       if: ${{ inputs.os == 'linux' }} | ||||
|       shell: bash | ||||
|       run: | | ||||
|         sudo apt-get update && sudo apt-get install rpm flatpak-builder elfutils | ||||
|         flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo | ||||
|         FLATPAK_ARCH=$(if [[ ${{ inputs.arch }} = 'arm64' ]]; then echo 'aarch64'; else echo 'x86_64'; fi) | ||||
|         FLATPAK_VERSION='24.08' | ||||
|         flatpak install --user --no-deps --arch $FLATPAK_ARCH --assumeyes runtime/org.freedesktop.Platform/$FLATPAK_ARCH/$FLATPAK_VERSION runtime/org.freedesktop.Sdk/$FLATPAK_ARCH/$FLATPAK_VERSION org.electronjs.Electron2.BaseApp/$FLATPAK_ARCH/$FLATPAK_VERSION | ||||
|     - name: Install dependencies | ||||
|       shell: bash | ||||
|       run: npm ci | ||||
|     - name: Temporary Flatpak arm64 workaround till https://github.com/electron/forge/pull/3839 is merged | ||||
|       if: ${{ inputs.os == 'linux' && inputs.arch == 'arm64' }} | ||||
|       shell: bash | ||||
|       run:  sed -e "s/case 'armv7l'/case 'arm64'/g" -e "s/return 'arm'/return 'aarch64'/g" -i node_modules/@electron-forge/maker-flatpak/dist/MakerFlatpak.js | ||||
|     - name: Update build info | ||||
|       shell: bash | ||||
|       run: npm run update-build-info | ||||
|     - name: Run electron-forge | ||||
|       shell: bash | ||||
|       run: npm run make-electron -- --arch=${{ inputs.arch }} | ||||
|     - name: Prepare artifacts | ||||
|       shell: bash | ||||
|       run: | | ||||
|         mkdir -p upload; | ||||
|         for ext in ${{ inputs.extension }}; | ||||
|         do | ||||
|           file=$(find out/make -name "*.$ext" -print -quit); | ||||
|           cp "$file" "upload/TriliumNextNotes-${{ github.ref_name }}-${{ inputs.os }}-${{ inputs.arch }}.$ext"; | ||||
|         done | ||||
							
								
								
									
										28
									
								
								.github/actions/build-server/action.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,28 @@ | ||||
| inputs: | ||||
|   arch: | ||||
|     description: "The architecture to build for: x64, arm64" | ||||
|     required: true | ||||
| runs: | ||||
|   using: composite | ||||
|   steps: | ||||
|     - name: Set up node & dependencies | ||||
|       uses: actions/setup-node@v4 | ||||
|       with: | ||||
|         node-version: 20 | ||||
|         cache: "npm" | ||||
|     - name: Install dependencies | ||||
|       shell: bash | ||||
|       run: npm ci | ||||
|     - name: Run Linux server build | ||||
|       env: | ||||
|         MATRIX_ARCH: ${{ inputs.arch }} | ||||
|       shell: bash | ||||
|       run: | | ||||
|         npm run update-build-info | ||||
|         ./bin/build-server.sh | ||||
|     - name: Prepare artifacts | ||||
|       shell: bash | ||||
|       run: | | ||||
|         mkdir -p upload | ||||
|         file=$(find dist -name '*.tar.xz' -print -quit) | ||||
|         cp "$file" "upload/TriliumNextNotes-Server-${{ github.ref_name }}-${{ inputs.os }}-${{ inputs.arch }}.tar.xz" | ||||
							
								
								
									
										56
									
								
								.github/workflows/main.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -23,10 +23,10 @@ jobs: | ||||
|         os: | ||||
|           - name: macos | ||||
|             image: macos-latest | ||||
|             extension: dmg | ||||
|             extension: [dmg, zip] | ||||
|           - name: linux | ||||
|             image: ubuntu-latest | ||||
|             extension: deb | ||||
|             extension: [deb, rpm, zip, flatpak] | ||||
|           - name: windows | ||||
|             image: windows-latest | ||||
|             extension: exe | ||||
| @@ -37,31 +37,12 @@ jobs: | ||||
|         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 }}-${{ 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: Run the build | ||||
|         uses: ./.github/actions/build-electron | ||||
|         with: | ||||
|           os: ${{ matrix.os.name }} | ||||
|           arch: ${{ matrix.arch }} | ||||
|           extension: ${{ matrix.os.extension }} | ||||
|       - name: Publish artifacts | ||||
|         uses: actions/upload-artifact@v4 | ||||
|         with: | ||||
| @@ -72,6 +53,7 @@ jobs: | ||||
|         with: | ||||
|           name: TriliumNextNotes ${{ matrix.os.name }} ${{ matrix.arch }}.${{matrix.os.extension}} | ||||
|           path: upload/*.${{ matrix.os.extension }} | ||||
|  | ||||
|   build_linux_server: | ||||
|     name: Build Linux Server | ||||
|     strategy: | ||||
| @@ -86,24 +68,10 @@ jobs: | ||||
|     runs-on: ${{ matrix.runs-on }} | ||||
|     steps: | ||||
|       - uses: actions/checkout@v4 | ||||
|       - name: Set up node & dependencies | ||||
|         uses: actions/setup-node@v4 | ||||
|       - name: Run the build | ||||
|         uses: ./.github/actions/build-server | ||||
|         with: | ||||
|           node-version: 20 | ||||
|           cache: "npm" | ||||
|       - name: Install dependencies | ||||
|         run: npm ci | ||||
|       - name: Run Linux server build | ||||
|         env: | ||||
|           MATRIX_ARCH: ${{ matrix.arch }} | ||||
|         run: | | ||||
|           npm run update-build-info | ||||
|           ./bin/build-server.sh | ||||
|       - name: Prepare artifacts | ||||
|         run: | | ||||
|           mkdir -p upload | ||||
|           file=$(find dist -name '*.tar.xz' -print -quit) | ||||
|           cp "$file" "upload/TriliumNextNotes-linux-${{ matrix.arch }}-${{ github.ref_name }}.tar.xz" | ||||
|           arch: ${{ matrix.arch }} | ||||
|       - uses: actions/upload-artifact@v4 | ||||
|         with: | ||||
|           name: TriliumNextNotes linux server ${{ matrix.arch }} | ||||
|   | ||||
							
								
								
									
										122
									
								
								.github/workflows/nightly.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -20,10 +20,10 @@ jobs: | ||||
|         os: | ||||
|           - name: macos | ||||
|             image: macos-latest | ||||
|             extension: dmg | ||||
|             extension: [dmg, zip] | ||||
|           - name: linux | ||||
|             image: ubuntu-latest | ||||
|             extension: deb | ||||
|             extension: [deb, rpm, zip, flatpak] | ||||
|           - name: windows | ||||
|             image: windows-latest | ||||
|             extension: exe | ||||
| @@ -34,96 +34,56 @@ jobs: | ||||
|         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 | ||||
|         shell: bash | ||||
|         run: npm ci | ||||
|       - name: Update build info | ||||
|         run: npm run update-build-info | ||||
|       - name: Update nightly version | ||||
|         run: npm run ci-update-nightly-version | ||||
|       - 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 | ||||
|       - name: Run the build | ||||
|         uses: ./.github/actions/build-electron | ||||
|         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 | ||||
|           os: ${{ matrix.os.name }} | ||||
|           arch: ${{ matrix.arch }} | ||||
|           extension: ${{ join(matrix.os.extension, ' ') }} | ||||
|  | ||||
|       - name: Deploy release | ||||
|         uses: WebFreak001/deploy-nightly@v3.2.0 | ||||
|       - name: Publish release | ||||
|         uses: softprops/action-gh-release@v2 | ||||
|         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.2.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 | ||||
|           make_latest: false | ||||
|           prerelease: true | ||||
|           draft: false | ||||
|           fail_on_unmatched_files: true | ||||
|           files: upload/*.* | ||||
|           tag_name: nightly | ||||
|           name: Nightly Build | ||||
|  | ||||
|   nightly-server: | ||||
|     name: Deploy server nightly | ||||
|     strategy: | ||||
|       fail-fast: false | ||||
|       matrix: | ||||
|         arch: [x64, arm64] | ||||
|         include: | ||||
|           - arch: x64 | ||||
|             runs-on: ubuntu-latest | ||||
|           - arch: arm64 | ||||
|             runs-on: ubuntu-24.04-arm | ||||
|     runs-on: ${{ matrix.runs-on }} | ||||
|     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 | ||||
|           npm run ci-update-nightly-version | ||||
|           ./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.2.0 | ||||
|       - name: Run the build | ||||
|         uses: ./.github/actions/build-server | ||||
|         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 | ||||
|           arch: ${{ matrix.arch }} | ||||
|  | ||||
|       - name: Publish release | ||||
|         uses: softprops/action-gh-release@v2 | ||||
|         with: | ||||
|           make_latest: false | ||||
|           prerelease: true | ||||
|           draft: false | ||||
|           fail_on_unmatched_files: true | ||||
|           files: upload/*.* | ||||
|           tag_name: nightly | ||||
|           name: Nightly Build | ||||
|   | ||||
							
								
								
									
										68
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -20,10 +20,10 @@ jobs: | ||||
|         os: | ||||
|           - name: macos | ||||
|             image: macos-latest | ||||
|             extension: dmg | ||||
|             extension: [dmg, zip] | ||||
|           - name: linux | ||||
|             image: ubuntu-latest | ||||
|             extension: deb | ||||
|             extension: [deb, rpm, zip, flatpak] | ||||
|           - name: windows | ||||
|             image: windows-latest | ||||
|             extension: exe | ||||
| @@ -34,59 +34,39 @@ jobs: | ||||
|         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: Run the build | ||||
|         uses: ./.github/actions/build-electron | ||||
|         with: | ||||
|           os: ${{ matrix.os.name }} | ||||
|           arch: ${{ matrix.arch }} | ||||
|           extension: ${{ join(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 | ||||
|     name: Build Linux Server | ||||
|     strategy: | ||||
|       fail-fast: false | ||||
|       matrix: | ||||
|         arch: [x64, arm64] | ||||
|         include: | ||||
|           - arch: x64 | ||||
|             runs-on: ubuntu-latest | ||||
|           - arch: arm64 | ||||
|             runs-on: ubuntu-24.04-arm | ||||
|     runs-on: ${{ matrix.runs-on }} | ||||
|     steps: | ||||
|       - uses: actions/checkout@v4 | ||||
|       - name: Set up node & dependencies | ||||
|         uses: actions/setup-node@v4 | ||||
|  | ||||
|       - name: Run the build | ||||
|         uses: ./.github/actions/build-server | ||||
|         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" | ||||
|           arch: ${{ matrix.arch }} | ||||
|  | ||||
|       - name: Publish release | ||||
|         uses: softprops/action-gh-release@v2 | ||||
|         with: | ||||
|   | ||||
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -1,3 +1,4 @@ | ||||
| .cache | ||||
| .DS_Store | ||||
| node_modules/ | ||||
| dist/ | ||||
| @@ -7,6 +8,7 @@ src/public/app-dist/ | ||||
| npm-debug.log | ||||
| yarn-error.log | ||||
| po-*/ | ||||
| .flatpak-builder/ | ||||
|  | ||||
| *.db | ||||
| !integration-tests/db/document.db | ||||
|   | ||||
| @@ -118,8 +118,10 @@ Head on over to our [Docs repo](https://github.com/TriliumNext/Docs) | ||||
|  | ||||
| ## 🤝 Support | ||||
|  | ||||
| You can support the original Trilium developer using GitHub Sponsors, [PayPal](https://paypal.me/za4am) or Bitcoin (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2). | ||||
| Support for the TriliumNext organization will be possible in the near future. | ||||
| Support for the TriliumNext organization will be possible in the near future. For now, you can: | ||||
| - Support continued development on TriliumNext by supporting our developers: [eliandoran](https://github.com/sponsors/eliandoran) (See the [repository insights]([developers]([url](https://github.com/TriliumNext/Notes/graphs/contributors))) for a full list) | ||||
| - Show a token of gratitude to the original Trilium developer ([zadam](https://github.com/sponsors/zadam)) via [PayPal](https://paypal.me/za4am) or Bitcoin (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2). | ||||
|  | ||||
|  | ||||
| ## 🔑 License | ||||
|  | ||||
|   | ||||
| @@ -81,7 +81,6 @@ const copy = async () => { | ||||
|         "node_modules/mermaid/dist/", | ||||
|         "node_modules/jquery/dist/", | ||||
|         "node_modules/jquery-hotkeys/", | ||||
|         "node_modules/print-this/", | ||||
|         "node_modules/split.js/dist/", | ||||
|         "node_modules/panzoom/dist/", | ||||
|         "node_modules/i18next/", | ||||
| @@ -89,7 +88,6 @@ const copy = async () => { | ||||
|         "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/", | ||||
|   | ||||
| @@ -22,6 +22,10 @@ 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" | ||||
|  | ||||
| # Build dev icons (including tray) | ||||
| inkscape -w 16 -h 16 "../icon-purple.svg" -o "./png/16x16-dev.png" | ||||
| inkscape -w 32 -h 32 "../icon-purple.svg" -o "./png/32x32-dev.png" | ||||
| inkscape -w 256 -h 256 "../icon-purple.svg" -o "./png/256x256-dev.png" | ||||
|  | ||||
| # Build Mac .icns | ||||
| @@ -41,5 +45,8 @@ 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 Windows setup icon | ||||
| magick -background none "../icon-installer.svg" -define icon:auto-resize=16,32,48,64,128,256 "./win/setup.ico" | ||||
|  | ||||
| # Build Squirrel splash image | ||||
| magick "./png/256x256.png" -background "#ffffff" -gravity center -extent 640x480 "./win/setup-banner.gif" | ||||
| @@ -1,12 +1,17 @@ | ||||
| [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(';') %>; | ||||
| <% } %> | ||||
| <%= | ||||
| Object.entries({ | ||||
|     "Name": productName, | ||||
|     "Comment": description, | ||||
|     "GenericName": genericName, | ||||
|     "Exec": name ? `${name} %U` : undefined, | ||||
|     "Icon": name, | ||||
|     "Type": "Application", | ||||
|     "StartupNotify": "true", | ||||
|     "StartupWMClass": productName, | ||||
|     "Categories": categories?.length ? `${categories.join(";")};` : undefined, | ||||
|     "MimeType": mimeType?.length ? `${mimeType.join(";")};` : undefined | ||||
| }) | ||||
| .map(line => line[1] ? line.join("=") : undefined) | ||||
| .filter(line => !!line) | ||||
| .join("\n")%> | ||||
							
								
								
									
										1
									
								
								bin/tray-icons/bookmarks.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1 @@ | ||||
| <svg  xmlns="http://www.w3.org/2000/svg"  width="24"  height="24"  viewBox="0 0 24 24"  fill="none"  stroke="currentColor"  stroke-width="1"  stroke-linecap="round"  stroke-linejoin="round"  class="icon icon-tabler icons-tabler-outline icon-tabler-bookmark"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 7v14l-6 -4l-6 4v-14a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4z" /></svg> | ||||
| After Width: | Height: | Size: 383 B | 
							
								
								
									
										39
									
								
								bin/tray-icons/build-icons.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,39 @@ | ||||
| #!/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 | ||||
|  | ||||
| script_dir=$(realpath $(dirname $0)) | ||||
| images_dir="$script_dir/../../images" | ||||
| output_dir="$images_dir/app-icons/tray" | ||||
|  | ||||
| function generateDpiScaledIcons { | ||||
|   file=$1 | ||||
|   suffix=$2 | ||||
|   name="$(basename $file .svg)$suffix" | ||||
|   inkscape -w 16 -h 16 "$file" -o "$output_dir/$name.png" | ||||
|   inkscape -w 20 -h 20 "$file" -o "$output_dir/$name@1.25x.png" | ||||
|   inkscape -w 24 -h 24 "$file" -o "$output_dir/$name@1.5x.png" | ||||
|   inkscape -w 32 -h 32 "$file" -o "$output_dir/$name@2x.png" | ||||
| } | ||||
|  | ||||
| generateDpiScaledIcons "$images_dir/icon-black.svg" "Template" | ||||
| generateDpiScaledIcons "$images_dir/icon-color.svg" | ||||
| generateDpiScaledIcons "$images_dir/icon-purple.svg" | ||||
|  | ||||
| for file in *.svg; do | ||||
|     name="$(basename $file .svg)Template" | ||||
|     generateDpiScaledIcons "$file" "Template" | ||||
|     magick "$output_dir/$name.png" -channel RGB -negate "$output_dir/$name-inverted.png" | ||||
|     magick "$output_dir/$name@1.25x.png" -channel RGB -negate "$output_dir/$name-inverted@1.25x.png" | ||||
|     magick "$output_dir/$name@1.5x.png" -channel RGB -negate "$output_dir/$name-inverted@1.5x.png" | ||||
|     magick "$output_dir/$name@2x.png" -channel RGB -negate "$output_dir/$name-inverted@2x.png" | ||||
| done | ||||
|  | ||||
							
								
								
									
										1
									
								
								bin/tray-icons/close.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1 @@ | ||||
| <svg  xmlns="http://www.w3.org/2000/svg"  width="24"  height="24"  viewBox="0 0 24 24"  fill="none"  stroke="currentColor"  stroke-width="1"  stroke-linecap="round"  stroke-linejoin="round"  class="icon icon-tabler icons-tabler-outline icon-tabler-x"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 6l-12 12" /><path d="M6 6l12 12" /></svg> | ||||
| After Width: | Height: | Size: 356 B | 
							
								
								
									
										1
									
								
								bin/tray-icons/new-note.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1 @@ | ||||
| <svg  xmlns="http://www.w3.org/2000/svg"  width="24"  height="24"  viewBox="0 0 24 24"  fill="none"  stroke="currentColor"  stroke-width="1"  stroke-linecap="round"  stroke-linejoin="round"  class="icon icon-tabler icons-tabler-outline icon-tabler-plus"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 5l0 14" /><path d="M5 12l14 0" /></svg> | ||||
| After Width: | Height: | Size: 357 B | 
							
								
								
									
										1
									
								
								bin/tray-icons/recents.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1 @@ | ||||
| <svg  xmlns="http://www.w3.org/2000/svg"  width="24"  height="24"  viewBox="0 0 24 24"  fill="none"  stroke="currentColor"  stroke-width="1"  stroke-linecap="round"  stroke-linejoin="round"  class="icon icon-tabler icons-tabler-outline icon-tabler-history"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 8l0 4l2 2" /><path d="M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5" /></svg> | ||||
| After Width: | Height: | Size: 387 B | 
							
								
								
									
										1
									
								
								bin/tray-icons/today.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1 @@ | ||||
| <svg  xmlns="http://www.w3.org/2000/svg"  width="24"  height="24"  viewBox="0 0 24 24"  fill="none"  stroke="currentColor"  stroke-width="1"  stroke-linecap="round"  stroke-linejoin="round"  class="icon icon-tabler icons-tabler-outline icon-tabler-calendar-star"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M11 21h-5a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v3.5" /><path d="M16 3v4" /><path d="M8 3v4" /><path d="M4 11h11" /><path d="M17.8 20.817l-2.172 1.138a.392 .392 0 0 1 -.568 -.41l.415 -2.411l-1.757 -1.707a.389 .389 0 0 1 .217 -.665l2.428 -.352l1.086 -2.193a.392 .392 0 0 1 .702 0l1.086 2.193l2.428 .352a.39 .39 0 0 1 .217 .665l-1.757 1.707l.414 2.41a.39 .39 0 0 1 -.567 .411l-2.172 -1.138z" /></svg> | ||||
| After Width: | Height: | Size: 734 B | 
| @@ -28,6 +28,15 @@ keyPath= | ||||
| # expressjs shortcuts are supported: loopback(127.0.0.1/8, ::1/128), linklocal(169.254.0.0/16, fe80::/10), uniquelocal(10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, fc00::/7) | ||||
| trustedReverseProxy=false | ||||
|  | ||||
|  | ||||
| [Session] | ||||
| # Use this setting to constrain the current instance's "Path" value for the set cookies | ||||
| # This can be useful, when you have several instances running on the same domain, under different paths (e.g. by using a reverse proxy). | ||||
| # It prevents your instances from overwriting each others' cookies. | ||||
| # e.g. if you have https://your-domain.com/triliumNext/instanceA and https://your-domain.com/triliumNext/instanceB | ||||
| # you would want to set the cookiePath value to "/triliumNext/instanceA" for your first and "/triliumNext/instanceB" for your second instance | ||||
| cookiePath=/ | ||||
|  | ||||
| [Sync] | ||||
| #syncServerHost= | ||||
| #syncServerTimeout= | ||||
|   | ||||
							
								
								
									
										
											BIN
										
									
								
								db/demo.zip
									
									
									
									
									
								
							
							
						
						| @@ -8,8 +8,8 @@ test("Help popup", async ({ page, context }) => { | ||||
|     await app.goto(); | ||||
|  | ||||
|     const popupPromise = page.waitForEvent("popup"); | ||||
|     await app.currentNoteSplit.press("F1"); | ||||
|     await page.getByRole("link", { name: "online↗" }).click(); | ||||
|     await app.currentNoteSplit.press("Shift+F1"); | ||||
|     await page.getByRole("link", { name: "online" }).click(); | ||||
|     const popup = await popupPromise; | ||||
|     expect(popup.url()).toBe("https://triliumnext.github.io/Docs/"); | ||||
| }); | ||||
|   | ||||
| @@ -26,6 +26,8 @@ electronDl({ saveAs: true }); | ||||
| // needed for excalidraw export https://github.com/zadam/trilium/issues/4271 | ||||
| electron.app.commandLine.appendSwitch("enable-experimental-web-platform-features"); | ||||
|  | ||||
| electron.app.userAgentFallback = `${electron.app.getName()} ${electron.app.getVersion()}`; | ||||
|  | ||||
| // Quit when all windows are closed, except on macOS. There, it's common | ||||
| // for applications and their menu bar to stay active until the user quits | ||||
| // explicitly with Cmd + Q. | ||||
|   | ||||
| @@ -3,6 +3,13 @@ const fs = require("fs-extra"); | ||||
|  | ||||
| const APP_NAME = "TriliumNext Notes"; | ||||
|  | ||||
| const extraResourcesForPlatform = getExtraResourcesForPlatform(); | ||||
| const baseLinuxMakerConfigOptions = { | ||||
|   icon: "./images/app-icons/png/128x128.png", | ||||
|   desktopTemplate: path.resolve("./bin/electron-forge/desktop.ejs"), | ||||
|   categories: ["Office", "Utility"] | ||||
| }; | ||||
|  | ||||
| module.exports = { | ||||
|     packagerConfig: { | ||||
|         executableName: "trilium", | ||||
| @@ -12,7 +19,7 @@ module.exports = { | ||||
|         icon: "./images/app-icons/icon", | ||||
|         extraResource: [ | ||||
|             // Moved to root | ||||
|             ...getExtraResourcesForPlatform(), | ||||
|             ...extraResourcesForPlatform, | ||||
|  | ||||
|             // Moved to resources (TriliumNext Notes.app/Contents/Resources on macOS) | ||||
|             "translations/", | ||||
| @@ -20,22 +27,18 @@ module.exports = { | ||||
|         ], | ||||
|         afterComplete: [ | ||||
|             (buildPath, _electronVersion, platform, _arch, callback) => { | ||||
|                 const extraResources = getExtraResourcesForPlatform(); | ||||
|                 for (const resource of extraResources) { | ||||
|                 for (const resource of extraResourcesForPlatform) { | ||||
|                     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"); | ||||
|                     } | ||||
|                     // prettier-ignore | ||||
|                     const sourcePath = (platform === "darwin") | ||||
|                         ? path.join(buildPath, `${APP_NAME}.app`, "Contents", "Resources", baseName) | ||||
|                         : path.join(buildPath, "resources", baseName); | ||||
|  | ||||
|                     // prettier-ignore | ||||
|                     const destPath = (baseName !== "256x256.png") | ||||
|                         ? path.join(buildPath, baseName) | ||||
|                         : path.join(buildPath, "icon.png"); | ||||
|  | ||||
|                     // Copy files from resources folder to root | ||||
|                     fs.move(sourcePath, destPath) | ||||
| @@ -53,8 +56,38 @@ module.exports = { | ||||
|             name: "@electron-forge/maker-deb", | ||||
|             config: { | ||||
|                 options: { | ||||
|                     icon: "./images/app-icons/png/128x128.png", | ||||
|                     desktopTemplate: path.resolve("./bin/electron-forge/desktop.ejs") | ||||
|                   ...baseLinuxMakerConfigOptions | ||||
|                 } | ||||
|             } | ||||
|         }, | ||||
|         { | ||||
|             name: "@electron-forge/maker-flatpak", | ||||
|             config: { | ||||
|                 options: { | ||||
|                     ...baseLinuxMakerConfigOptions, | ||||
|                     id: "com.triliumnext.notes", | ||||
|                     runtimeVersion: "24.08", | ||||
|                     base: "org.electronjs.Electron2.BaseApp", | ||||
|                     baseVersion: "24.08", | ||||
|                     baseFlatpakref: "https://flathub.org/repo/flathub.flatpakrepo", | ||||
|                     modules: [ | ||||
|                         { | ||||
|                             name: "zypak", | ||||
|                             sources: { | ||||
|                                 type: "git", | ||||
|                                 url: "https://github.com/refi64/zypak", | ||||
|                                 tag: "v2024.01.17" | ||||
|                             } | ||||
|                         } | ||||
|                     ] | ||||
|                 }, | ||||
|             } | ||||
|         }, | ||||
|         { | ||||
|             name: "@electron-forge/maker-rpm", | ||||
|             config: { | ||||
|                 options: { | ||||
|                   ...baseLinuxMakerConfigOptions | ||||
|                 } | ||||
|             } | ||||
|         }, | ||||
| @@ -62,7 +95,7 @@ module.exports = { | ||||
|             name: "@electron-forge/maker-squirrel", | ||||
|             config: { | ||||
|                 iconUrl: "https://raw.githubusercontent.com/TriliumNext/Notes/develop/images/app-icons/icon.ico", | ||||
|                 setupIcon: "./images/app-icons/icon.ico", | ||||
|                 setupIcon: "./images/app-icons/win/setup.ico", | ||||
|                 loadingGif: "./images/app-icons/win/setup-banner.gif" | ||||
|             } | ||||
|         }, | ||||
| @@ -91,21 +124,20 @@ module.exports = { | ||||
| }; | ||||
|  | ||||
| function getExtraResourcesForPlatform() { | ||||
|     let resources = ["dump-db/", "./bin/tpl/anonymize-database.sql"]; | ||||
|     const resources = ["dump-db/", "./bin/tpl/anonymize-database.sql"]; | ||||
|  | ||||
|     const getScriptRessources = () => { | ||||
|         const scripts = ["trilium-portable", "trilium-safe-mode", "trilium-no-cert-check"]; | ||||
|         const scriptExt = (process.platform === "win32") ? "bat" : "sh"; | ||||
|         return scripts.map(script => `./bin/tpl/${script}.${scriptExt}`); | ||||
|     } | ||||
|  | ||||
|     switch (process.platform) { | ||||
|         case "win32": | ||||
|             for (const script of scripts) { | ||||
|                 resources.push(`./bin/tpl/${script}.bat`); | ||||
|             } | ||||
|             break; | ||||
|         case "darwin": | ||||
|             resources.push(...getScriptRessources()) | ||||
|             break; | ||||
|         case "linux": | ||||
|             resources.push("images/app-icons/png/256x256.png"); | ||||
|             for (const script of scripts) { | ||||
|                 resources.push(`./bin/tpl/${script}.sh`); | ||||
|             } | ||||
|             resources.push(...getScriptRessources(), "images/app-icons/png/256x256.png"); | ||||
|             break; | ||||
|         default: | ||||
|             break; | ||||
|   | ||||
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/png/16x16-dev.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 635 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/png/32x32-dev.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 1.3 KiB | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/bookmarksTemplate-inverted.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 336 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/bookmarksTemplate-inverted@1.25x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 364 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/bookmarksTemplate-inverted@1.5x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 412 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/bookmarksTemplate-inverted@2x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 456 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/bookmarksTemplate.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 314 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/bookmarksTemplate@1.25x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 343 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/bookmarksTemplate@1.5x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 423 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/bookmarksTemplate@2x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 493 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/closeTemplate-inverted.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 258 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/closeTemplate-inverted@1.25x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 271 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/closeTemplate-inverted@1.5x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 293 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/closeTemplate-inverted@2x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 334 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/closeTemplate.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 254 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/closeTemplate@1.25x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 268 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/closeTemplate@1.5x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 306 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/closeTemplate@2x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 339 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/icon-blackTemplate.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 390 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/icon-blackTemplate@1.25x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 490 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/icon-blackTemplate@1.5x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 589 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/icon-blackTemplate@2x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 728 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/icon-color.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 626 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/icon-color@1.25x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 797 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/icon-color@1.5x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 975 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/icon-color@2x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 1.3 KiB | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/icon-purple.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 635 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/icon-purple@1.25x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 804 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/icon-purple@1.5x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 997 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/icon-purple@2x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 1.3 KiB | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/new-noteTemplate-inverted.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 252 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/new-noteTemplate-inverted@1.25x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 265 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/new-noteTemplate-inverted@1.5x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 273 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/new-noteTemplate-inverted@2x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 269 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/new-noteTemplate.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 202 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/new-noteTemplate@1.25x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 237 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/new-noteTemplate@1.5x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 241 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/new-noteTemplate@2x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 242 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/recentsTemplate-inverted.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 443 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/recentsTemplate-inverted@1.25x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 481 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/recentsTemplate-inverted@1.5x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 576 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/recentsTemplate-inverted@2x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 700 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/recentsTemplate.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 450 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/recentsTemplate@1.25x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 501 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/recentsTemplate@1.5x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 627 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/recentsTemplate@2x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 798 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/todayTemplate-inverted.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 397 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/todayTemplate-inverted@1.25x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 484 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/todayTemplate-inverted@1.5x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 513 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/todayTemplate-inverted@2x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 605 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/todayTemplate.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 378 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/todayTemplate@1.25x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 500 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/todayTemplate@1.5x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 534 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/tray/todayTemplate@2x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 667 B | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/win/setup.ico
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 109 KiB | 
							
								
								
									
										125
									
								
								images/icon-installer.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,125 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  --> | ||||
| <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" | ||||
| 	 viewBox="0 0 256 256" style="enable-background:new 0 0 256 256;" xml:space="preserve"> | ||||
| <style type="text/css"> | ||||
| 	.st0{fill:#686768;} | ||||
| 	.st1{fill:#808080;} | ||||
| 	.st2{fill:url(#SVGID_1_);} | ||||
| 	.st3{fill:url(#SVGID_2_);} | ||||
| 	.st4{fill:url(#SVGID_3_);} | ||||
| 	.st5{fill:#D9D9D9;} | ||||
| 	.st6{fill:url(#SVGID_4_);} | ||||
| 	.st7{opacity:0.47;} | ||||
| 	.st8{fill:#5B5A5A;} | ||||
| 	.st9{fill:#95C980;} | ||||
| 	.st10{fill:#72B755;} | ||||
| 	.st11{fill:#4FA52B;} | ||||
| 	.st12{fill:#EE8C89;} | ||||
| 	.st13{fill:#E96562;} | ||||
| 	.st14{fill:#E33F3B;} | ||||
| 	.st15{fill:#EFB075;} | ||||
| 	.st16{fill:#E99547;} | ||||
| 	.st17{fill:#E47B19;} | ||||
| 	.st18{opacity:0.38;fill:url(#SVGID_5_);enable-background:new    ;} | ||||
| </style> | ||||
| <g id="Layer_1_2_"> | ||||
| 	<g id="Layer_1_1_"> | ||||
| 	</g> | ||||
| </g> | ||||
| <g id="Layer_2_1_"> | ||||
| 	<polygon class="st0" points="69.5,48.6 69.3,93.1 4,95.2 3.3,93.7 29.6,53.4 	"/> | ||||
| 	<path class="st1" d="M69.5,47l-0.2,46.1c0,0-66.3,1-66,0.6l26.1-41.8L69.5,47z"/> | ||||
| 	 | ||||
| 		<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="69.458" y1="120.0202" x2="219.2576" y2="120.0202" gradientTransform="matrix(1 0 0 1 0 8)"> | ||||
| 		<stop  offset="0" style="stop-color:#E3E3E3"/> | ||||
| 		<stop  offset="1" style="stop-color:#F4F4F4"/> | ||||
| 	</linearGradient> | ||||
| 	<polygon class="st2" points="69.5,47 218.9,55.6 219.3,202.6 69.9,209.1 	"/> | ||||
| 	 | ||||
| 		<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="29.2408" y1="120.0202" x2="69.8681" y2="120.0202" gradientTransform="matrix(1 0 0 1 0 8)"> | ||||
| 		<stop  offset="0" style="stop-color:#D9D9D9"/> | ||||
| 		<stop  offset="1" style="stop-color:#D4D4D4"/> | ||||
| 	</linearGradient> | ||||
| 	<polygon class="st3" points="29.2,51.8 69.5,47 69.8,209.1 29.2,204.4 	"/> | ||||
| 	 | ||||
| 		<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="151.9309" y1="42.7213" x2="142.8473" y2="-43.5726" gradientTransform="matrix(0.9941 1.431752e-03 1.431754e-03 1.1143 -3.0394 44.4335)"> | ||||
| 		<stop  offset="0" style="stop-color:#B3B3B3"/> | ||||
| 		<stop  offset="0.4752" style="stop-color:#B5B5B5"/> | ||||
| 		<stop  offset="0.6464" style="stop-color:#BCBCBC"/> | ||||
| 		<stop  offset="0.7685" style="stop-color:#C7C7C7"/> | ||||
| 		<stop  offset="0.8671" style="stop-color:#D8D8D8"/> | ||||
| 		<stop  offset="0.9506" style="stop-color:#EEEEEE"/> | ||||
| 		<stop  offset="1" style="stop-color:#FFFFFF"/> | ||||
| 	</linearGradient> | ||||
| 	<polygon class="st4" points="219.3,98.5 97.4,93.2 69.5,47.3 218.9,55.6 	"/> | ||||
| 	<polygon class="st1" points="102,85.3 251.2,93 252.8,91.1 72.2,48.9 69.5,47 	"/> | ||||
| 	<polygon class="st5" points="252.8,91.1 128,84.6 102,82.9 69.8,47.3 219.1,55.6 233.6,71.4 252.3,90.6 252.3,90.6 	"/> | ||||
| 	 | ||||
| 		<radialGradient id="SVGID_4_" cx="445.2994" cy="-436.338" r="4.0179" gradientTransform="matrix(0.5088 -4.329579e-03 0.1464 14.7395 -92.0455 6569.5317)" gradientUnits="userSpaceOnUse"> | ||||
| 		<stop  offset="0" style="stop-color:#FFFFFF"/> | ||||
| 		<stop  offset="6.758273e-02" style="stop-color:#FFFFFF;stop-opacity:0.9324"/> | ||||
| 		<stop  offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/> | ||||
| 	</radialGradient> | ||||
| 	<path class="st6" d="M72.2,152.5c0.2,26.2,0.9,42.4,0.1,42.4c-0.9,0-1.5-6.3-2.5-32.3c-1.1-26.1-1.4-85-0.5-85.1 | ||||
| 		C70.1,77.2,71.9,126.4,72.2,152.5z"/> | ||||
| 	<g class="st7"> | ||||
| 		<path class="st8" d="M29.1,203.9l20.4,2.1c3.3,0.4,6.9,0.6,10.2,1.1l10.2,1.2h-0.1l74.7-3.2l37.4-1.7l9.3-0.4 | ||||
| 			c3.1-0.1,6.3-0.2,9.3-0.4l18.7-0.5l-18.7,1.2c-3.1,0.2-6.3,0.4-9.3,0.5l-9.3,0.4l-37.4,1.7l-74.5,3.2l0,0l0,0L59.7,208 | ||||
| 			c-3.3-0.4-6.8-0.9-10.2-1.4L29.1,203.9z"/> | ||||
| 		<path class="st1" d="M28.6,203.9c3.3,0.2,6.8,0.4,10.3,0.6s7.1,0.5,10.6,0.9l10.2,1.1l10.2,1.2l-0.1,1.1h-0.1v-1.1l74.8-3.1 | ||||
| 			l37.4-1.6l18.7-0.7l18.7-0.5v0.6l-18.7,1.1l-9.3,0.5l-9.3,0.4l-37.4,1.6l-74.7,3.1l0,0l0,0l-10.2-1.2l-10.2-1.4L29,203.8 | ||||
| 			L28.6,203.9z M30.3,204.1l19.2,2.5l10.2,1.4l10.2,1.2l0,0l74.7-3.3l37.4-1.7l9.3-0.4l9.3-0.5l18.7-1.2v0.6l-18.7,0.5l-18.7,0.7 | ||||
| 			l-37.4,1.7l-74.7,3.3v-1.1h0.1l-0.1,1.1l-10.2-1.2l-10.2-1.1c-3.3-0.4-6.5-0.6-9.7-1.1C36.6,205,33.5,204.5,30.3,204.1z"/> | ||||
| 	</g> | ||||
| 	<g> | ||||
| 		<g> | ||||
| 			<g> | ||||
| 				<path class="st9" d="M181.4,136.4c-8.7,6.8-23.5,8.1-33.8,5.5c2.6-2.3,3.8-3.4,6.3-5.8c2.5-2.2,3.6-3.2,6-5.4 | ||||
| 					c8.4-7.4,12.5-10.8,20.7-17.7c-8.5,6.4-12.9,9.6-21.6,16.4c-2.5,2-3.7,2.8-6.1,4.8c-2.6,2-3.8,3.1-6.4,5 | ||||
| 					c-0.5-9.5,1.1-22.1,10.3-28.9c0.7-0.6,1.7-1.1,2.6-1.7c1.2-0.6,2.5-1.4,3.9-1.8c11.4-4.4,24.8-7.5,37.3-5.9 | ||||
| 					c0.7,6.5-4.9,18.9-11.8,28.2c-1,1.2-1.8,2.5-2.8,3.6C184.2,133.9,182.7,135.3,181.4,136.4z"/> | ||||
| 				<path class="st10" d="M185.6,132.4c-9.2,6-22.6,5.8-31.7,3.7c2.5-2.2,3.6-3.2,6-5.4c8.4-7.4,12.5-10.8,20.7-17.7 | ||||
| 					c-8.5,6.4-12.9,9.6-21.6,16.4c-2.5,2-3.7,2.8-6.1,4.8c-0.5-7.9,0.4-18.4,6.5-25.5c1.2-0.6,2.5-1.4,3.9-1.8 | ||||
| 					c11.4-4.6,24.8-7.5,37.3-5.9c0.7,6.5-4.9,18.9-11.8,28.2C187.5,130.1,186.5,131.3,185.6,132.4z"/> | ||||
| 				<path class="st11" d="M188.5,128.9c-8.9,4.2-20.5,3.8-28.5,1.8c8.4-7.4,12.5-10.8,20.7-17.7c-8.5,6.4-12.9,9.6-21.6,16.4 | ||||
| 					c-0.5-6.8,0-15.7,4.3-22.6c11.4-4.4,24.8-7.5,37.3-5.9C201.2,107.4,195.5,119.9,188.5,128.9z"/> | ||||
| 			</g> | ||||
| 			<g> | ||||
| 				<path class="st12" d="M140.4,169.2c-3.6-8.9,0.5-19.6,4.7-26c1.1,2.5,1.6,3.7,2.7,6c1.1,2.3,1.6,3.4,2.6,5.7 | ||||
| 					c3.7,7.9,5.5,11.8,9.3,19.2c-3.1-7.6-4.7-11.6-7.9-19.7c-0.9-2.2-1.4-3.3-2.2-5.5c-1-2.3-1.5-3.6-2.3-6 | ||||
| 					c7.4,2.2,16.8,6.6,20.3,15c0.2,0.7,0.5,1.5,0.7,2.2c0.2,1,0.5,2.1,0.6,3.2c1.5,9.6-0.9,23-4.4,28c-5.5-0.9-14.5-7.7-20-15.1 | ||||
| 					c-0.7-1-1.5-2-2.1-3C141.7,171.9,141,170.6,140.4,169.2z"/> | ||||
| 				<path class="st13" d="M142.5,173.3c-2.3-8.4,1.5-18.1,5.4-24c1.1,2.3,1.6,3.4,2.6,5.7c3.7,7.9,5.5,11.8,9.3,19.2 | ||||
| 					c-3.1-7.6-4.7-11.6-7.9-19.7c-0.9-2.2-1.4-3.3-2.2-5.5c6.3,1.7,14.4,5.2,18.7,11.3c0.2,1,0.5,2.1,0.6,3.2 | ||||
| 					c1.5,9.6-0.9,23-4.4,27.9c-5.5-0.9-14.5-7.7-20-15.1C143.9,175.2,143.3,174.3,142.5,173.3z"/> | ||||
| 				<path class="st14" d="M144.6,176.2c-1.1-7.5,2.5-16,5.9-21.3c3.7,7.9,5.5,11.8,9.3,19.2c-3.1-7.6-4.7-11.6-7.9-19.7 | ||||
| 					c5.5,1.4,12.5,4.1,17.2,8.9c1.5,9.6-0.9,23-4.4,27.9C159,190.4,150.1,183.6,144.6,176.2z"/> | ||||
| 			</g> | ||||
| 			<g> | ||||
| 				<path class="st15" d="M125.9,116.6c10.5,4.3,16.5,15.4,18.8,23.4c-3-1-4.3-1.4-7.3-2.3c-2.8-0.9-4.2-1.4-6.9-2.2 | ||||
| 					c-9.7-3.2-14.5-4.9-23.9-8.2c9.1,3.8,13.7,5.8,23.1,9.6c2.6,1.1,3.9,1.6,6.5,2.7c2.7,1.1,4.1,1.6,6.9,2.7 | ||||
| 					c-7.4,4.2-18.4,8.4-28.3,4.6c-0.7-0.2-1.7-0.7-2.6-1.2c-1-0.6-2.2-1.2-3.3-2.1c-8.5-6-17.6-16.7-20.9-26.8 | ||||
| 					c4.9-3.4,17.6-4.2,28.3-2.3c1.5,0.2,2.8,0.5,4.3,0.9C122.7,115.4,124.3,115.8,125.9,116.6z"/> | ||||
| 				<path class="st16" d="M120.7,114.9c9.1,4.8,14.5,15,16.7,22.6c-2.8-0.9-4.2-1.4-6.9-2.2c-9.7-3.2-14.5-4.9-23.9-8.2 | ||||
| 					c9.1,3.8,13.7,5.8,23,9.6c2.6,1.1,3.9,1.6,6.5,2.7c-6.1,3.6-15.4,7.4-23.9,6c-1-0.6-2.2-1.2-3.3-2.1c-8.5-6-17.6-16.7-20.9-26.8 | ||||
| 					c4.9-3.4,17.6-4.2,28.3-2.3C118,114.2,119.4,114.4,120.7,114.9z"/> | ||||
| 				<path class="st17" d="M116.6,113.9c7.5,5.3,12.1,14.4,14,21.3c-9.7-3.2-14.5-4.9-23.9-8.2c9.1,3.8,13.7,5.8,23.1,9.6 | ||||
| 					c-5.4,3.2-13,6.6-20.7,6.5c-8.5-6-17.6-16.7-20.9-26.8C93.2,112.8,105.7,112,116.6,113.9z"/> | ||||
| 			</g> | ||||
| 		</g> | ||||
| 	</g> | ||||
| 	 | ||||
| 		<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="241.7537" y1="104.2354" x2="160.0455" y2="55.1756" gradientTransform="matrix(1 0 0 -1 0 256)"> | ||||
| 		<stop  offset="0.1721" style="stop-color:#C7C7C7"/> | ||||
| 		<stop  offset="0.3798" style="stop-color:#D8D8D8"/> | ||||
| 		<stop  offset="0.6814" style="stop-color:#DADADA"/> | ||||
| 		<stop  offset="0.7898" style="stop-color:#E1E1E1"/> | ||||
| 		<stop  offset="0.867" style="stop-color:#ECECEC"/> | ||||
| 		<stop  offset="0.8745" style="stop-color:#EEEEEE"/> | ||||
| 		<stop  offset="1" style="stop-color:#FFFFFF"/> | ||||
| 	</linearGradient> | ||||
| 	<path class="st18" d="M219.1,128.3c-1,0.4-3.3,15.7-3.7,19.2c-0.7,5.8-3.9,28.7-11.1,41.2c-7.3,12.8-15.7,13.7-16.4,14.6l31.1-0.9 | ||||
| 		C219.1,179.1,219.1,151.5,219.1,128.3L219.1,128.3z"/> | ||||
| </g> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 7.6 KiB | 
							
								
								
									
										2
									
								
								libraries/codemirror/eslint.js
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -46,7 +46,7 @@ | ||||
|         const errors = new eslint().verify(text, { | ||||
|             root: true, | ||||
|             parserOptions: { | ||||
|                 ecmaVersion: "latest" | ||||
|                 ecmaVersion: "2019" | ||||
|             }, | ||||
|             extends: ['eslint:recommended', 'airbnb-base'], | ||||
|             env: { | ||||
|   | ||||
							
								
								
									
										2300
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
							
								
								
									
										46
									
								
								package.json
									
									
									
									
									
								
							
							
						
						| @@ -2,7 +2,7 @@ | ||||
|   "name": "trilium", | ||||
|   "productName": "TriliumNext Notes", | ||||
|   "description": "Build your personal knowledge base with TriliumNext Notes", | ||||
|   "version": "0.91.4-beta", | ||||
|   "version": "0.91.6", | ||||
|   "license": "AGPL-3.0-only", | ||||
|   "main": "./dist/electron-main.js", | ||||
|   "author": { | ||||
| @@ -25,10 +25,14 @@ | ||||
|     "start-server-no-dir": "cross-env TRILIUM_ENV=dev TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 nodemon src/main.ts", | ||||
|     "start-test-server": "npm run switch-server && rimraf ./data-test && cross-env TRILIUM_DATA_DIR=./data-test TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev TRILIUM_PORT=9999 nodemon src/main.ts", | ||||
|     "qstart-server": "npm run switch-server && npm run start-server", | ||||
|     "start-electron": "npm run prepare-dist && cross-env TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev electron ./dist/electron-main.js --inspect=5858 .", | ||||
|     "start-electron-nix": "npm run prepare-dist && cross-env TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev nix-shell -p electron_33 --run \"electron ./dist/electron-main.js --inspect=5858 .\"", | ||||
|     "start-electron-no-dir": "npm run prepare-dist && cross-env TRILIUM_ENV=dev electron --inspect=5858 .", | ||||
|     "start-electron-no-dir-nix": "electron-rebuild --version 33.3.1 && npm run prepare-dist && cross-env TRILIUM_ENV=dev nix-shell -p electron_33 --run \"electron ./dist/electron-main.js --inspect=5858 .\"", | ||||
|     "start-electron": "cross-env NODE_OPTIONS=\"--import tsx\" TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev electron ./electron-main.ts --inspect=5858 .", | ||||
|     "start-electron-nix": "electron-rebuild --version 33.3.1 && cross-env NODE_OPTIONS=\"--import tsx\" TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev nix-shell -p electron_33 --run \"electron ./electron-main.ts --inspect=5858 .\"", | ||||
|     "start-electron-no-dir": "cross-env NODE_OPTIONS=\"--import tsx\" TRILIUM_ENV=dev electron --inspect=5858 .", | ||||
|     "start-electron-no-dir-nix": "electron-rebuild --version 33.3.1 && cross-env NODE_OPTIONS=\"--import tsx\" TRILIUM_ENV=dev nix-shell -p electron_33 --run \"electron ./electron-main.ts --inspect=5858 .\"", | ||||
|     "start-electron-prod": "npm run prepare-dist && cross-env TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev electron ./dist/electron-main.js --inspect=5858 .", | ||||
|     "start-electron-prod-nix": "electron-rebuild --version 33.3.1 && npm run prepare-dist && cross-env TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev nix-shell -p electron_33 --run \"electron ./dist/electron-main.js --inspect=5858 .\"", | ||||
|     "start-electron-prod-no-dir": "npm run prepare-dist && cross-env TRILIUM_ENV=dev electron --inspect=5858 .", | ||||
|     "start-electron-prod-no-dir-nix": "electron-rebuild --version 33.3.1 && npm run prepare-dist && cross-env TRILIUM_ENV=dev nix-shell -p electron_33 --run \"electron ./dist/electron-main.js --inspect=5858 .\"", | ||||
|     "qstart-electron": "npm run switch-electron && npm run start-electron", | ||||
|     "switch-server": "rimraf ./node_modules/better-sqlite3 && npm install", | ||||
|     "switch-electron": "electron-rebuild", | ||||
| @@ -58,12 +62,15 @@ | ||||
|     "@electron/remote": "2.1.2", | ||||
|     "@excalidraw/excalidraw": "0.17.6", | ||||
|     "@highlightjs/cdn-assets": "11.11.1", | ||||
|     "@joplin/turndown-plugin-gfm": "1.0.61", | ||||
|     "@mermaid-js/layout-elk": "0.1.7", | ||||
|     "@mind-elixir/node-menu": "1.0.4", | ||||
|     "@triliumnext/express-partial-content": "1.0.1", | ||||
|     "@types/jquery.fancytree": "0.0.11", | ||||
|     "@types/js-yaml": "4.0.9", | ||||
|     "@types/leaflet": "1.9.16", | ||||
|     "@types/react-dom": "18.3.5", | ||||
|     "@types/swagger-ui-express": "4.1.7", | ||||
|     "archiver": "7.0.1", | ||||
|     "async-mutex": "0.5.0", | ||||
|     "autocomplete.js": "0.38.1", | ||||
| @@ -106,25 +113,25 @@ | ||||
|     "is-animated": "2.0.2", | ||||
|     "is-svg": "5.1.0", | ||||
|     "jimp": "1.6.0", | ||||
|     "joplin-turndown-plugin-gfm": "1.0.12", | ||||
|     "jquery": "3.7.1", | ||||
|     "jquery-hotkeys": "0.2.2", | ||||
|     "jquery.fancytree": "2.38.4", | ||||
|     "js-yaml": "4.1.0", | ||||
|     "jsdom": "26.0.0", | ||||
|     "jsplumb": "2.15.6", | ||||
|     "katex": "0.16.21", | ||||
|     "knockout": "3.5.1", | ||||
|     "leaflet": "1.9.4", | ||||
|     "leaflet-gpx": "2.1.2", | ||||
|     "mark.js": "8.11.1", | ||||
|     "marked": "15.0.6", | ||||
|     "marked": "15.0.7", | ||||
|     "mermaid": "11.4.1", | ||||
|     "mime-types": "2.1.35", | ||||
|     "mind-elixir": "4.3.6", | ||||
|     "mind-elixir": "4.3.7", | ||||
|     "multer": "1.4.5-lts.1", | ||||
|     "normalize-strings": "1.1.1", | ||||
|     "normalize.css": "8.0.1", | ||||
|     "panzoom": "9.4.3", | ||||
|     "print-this": "2.0.0", | ||||
|     "rand-token": "1.0.1", | ||||
|     "react": "18.3.1", | ||||
|     "react-dom": "18.3.1", | ||||
| @@ -132,13 +139,13 @@ | ||||
|     "sanitize-filename": "1.6.3", | ||||
|     "sanitize-html": "2.14.0", | ||||
|     "sax": "1.4.1", | ||||
|     "semver": "7.6.3", | ||||
|     "serve-favicon": "2.5.0", | ||||
|     "session-file-store": "1.5.0", | ||||
|     "source-map-support": "0.5.21", | ||||
|     "split.js": "1.6.5", | ||||
|     "stream-throttle": "0.1.3", | ||||
|     "striptags": "3.2.0", | ||||
|     "swagger-ui-express": "5.0.1", | ||||
|     "tmp": "0.2.3", | ||||
|     "ts-loader": "9.5.2", | ||||
|     "turndown": "7.2.0", | ||||
| @@ -152,11 +159,13 @@ | ||||
|     "@electron-forge/cli": "7.6.1", | ||||
|     "@electron-forge/maker-deb": "7.6.1", | ||||
|     "@electron-forge/maker-dmg": "7.6.1", | ||||
|     "@electron-forge/maker-flatpak": "7.6.1", | ||||
|     "@electron-forge/maker-rpm": "7.6.1", | ||||
|     "@electron-forge/maker-squirrel": "7.6.1", | ||||
|     "@electron-forge/maker-zip": "7.6.1", | ||||
|     "@electron-forge/plugin-auto-unpack-natives": "7.6.1", | ||||
|     "@electron/rebuild": "3.7.1", | ||||
|     "@playwright/test": "1.50.0", | ||||
|     "@playwright/test": "1.50.1", | ||||
|     "@types/archiver": "6.0.3", | ||||
|     "@types/better-sqlite3": "7.6.12", | ||||
|     "@types/bootstrap": "5.2.10", | ||||
| @@ -176,14 +185,14 @@ | ||||
|     "@types/jasmine": "5.1.5", | ||||
|     "@types/jquery": "3.5.32", | ||||
|     "@types/jsdom": "21.1.7", | ||||
|     "@types/leaflet-gpx": "1.3.7", | ||||
|     "@types/mime-types": "2.1.4", | ||||
|     "@types/multer": "1.4.12", | ||||
|     "@types/node": "22.10.10", | ||||
|     "@types/node": "22.13.1", | ||||
|     "@types/react": "18.3.18", | ||||
|     "@types/safe-compare": "1.1.2", | ||||
|     "@types/sanitize-html": "2.13.0", | ||||
|     "@types/sax": "1.2.7", | ||||
|     "@types/semver": "7.5.8", | ||||
|     "@types/serve-favicon": "2.5.7", | ||||
|     "@types/session-file-store": "1.2.5", | ||||
|     "@types/source-map-support": "0.5.10", | ||||
| @@ -193,22 +202,21 @@ | ||||
|     "@types/ws": "8.5.14", | ||||
|     "@types/xml2js": "0.4.14", | ||||
|     "@types/yargs": "17.0.33", | ||||
|     "@vitest/coverage-v8": "3.0.4", | ||||
|     "@vitest/coverage-v8": "3.0.5", | ||||
|     "cross-env": "7.0.3", | ||||
|     "electron": "34.0.1", | ||||
|     "electron": "34.1.1", | ||||
|     "esm": "3.2.25", | ||||
|     "jasmine": "5.5.0", | ||||
|     "jsdoc": "4.0.4", | ||||
|     "lorem-ipsum": "2.0.8", | ||||
|     "nodemon": "3.1.9", | ||||
|     "prettier": "3.4.2", | ||||
|     "prettier": "3.5.0", | ||||
|     "rcedit": "4.0.1", | ||||
|     "rimraf": "6.0.1", | ||||
|     "tslib": "2.8.1", | ||||
|     "tsx": "4.19.2", | ||||
|     "typedoc": "0.27.6", | ||||
|     "typedoc": "0.27.7", | ||||
|     "typescript": "5.7.3", | ||||
|     "vitest": "3.0.4", | ||||
|     "vitest": "3.0.5", | ||||
|     "webpack": "5.97.1", | ||||
|     "webpack-cli": "6.0.1", | ||||
|     "webpack-dev-middleware": "7.4.2" | ||||
|   | ||||
| @@ -4,14 +4,14 @@ import BAttribute from "../../src/becca/entities/battribute.js"; | ||||
| import becca from "../../src/becca/becca.js"; | ||||
| import randtoken from "rand-token"; | ||||
| import type SearchResult from "../../src/services/search/search_result.js"; | ||||
| import type { NoteType } from "../../src/becca/entities/rows.js"; | ||||
| import type { NoteRow, NoteType } from "../../src/becca/entities/rows.js"; | ||||
| randtoken.generator({ source: "crypto" }); | ||||
|  | ||||
| function findNoteByTitle(searchResults: Array<SearchResult>, title: string): BNote | undefined { | ||||
| export function findNoteByTitle(searchResults: Array<SearchResult>, title: string): BNote | undefined { | ||||
|     return searchResults.map((sr) => becca.notes[sr.noteId]).find((note) => note.title === title); | ||||
| } | ||||
|  | ||||
| class NoteBuilder { | ||||
| export class NoteBuilder { | ||||
|     note: BNote; | ||||
|     constructor(note: BNote) { | ||||
|         this.note = note; | ||||
| @@ -55,11 +55,11 @@ class NoteBuilder { | ||||
|     } | ||||
| } | ||||
|  | ||||
| function id() { | ||||
| export function id() { | ||||
|     return randtoken.generate(10); | ||||
| } | ||||
|  | ||||
| function note(title: string, extraParams = {}) { | ||||
| export function note(title: string, extraParams: Partial<NoteRow> = {}) { | ||||
|     const row = Object.assign( | ||||
|         { | ||||
|             noteId: id(), | ||||
| @@ -74,9 +74,3 @@ function note(title: string, extraParams = {}) { | ||||
|  | ||||
|     return new NoteBuilder(note); | ||||
| } | ||||
|  | ||||
| export default { | ||||
|     NoteBuilder, | ||||
|     findNoteByTitle, | ||||
|     note | ||||
| }; | ||||
|   | ||||
| @@ -35,7 +35,7 @@ app.use((req, res, next) => { | ||||
|     return next(); | ||||
| }); | ||||
|  | ||||
| if (!utils.isElectron()) { | ||||
| if (!utils.isElectron) { | ||||
|     app.use(compression()); // HTTP compression | ||||
| } | ||||
|  | ||||
| @@ -77,7 +77,7 @@ await import("./services/scheduler.js"); | ||||
|  | ||||
| startScheduledCleanup(); | ||||
|  | ||||
| if (utils.isElectron()) { | ||||
| if (utils.isElectron) { | ||||
|     (await import("@electron/remote/main/index.js")).initialize(); | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -23,6 +23,7 @@ import type { Attribute } from "../services/attribute_parser.js"; | ||||
| import type NoteTreeWidget from "../widgets/note_tree.js"; | ||||
| import type { default as NoteContext, GetTextEditorCallback } from "./note_context.js"; | ||||
| import type { ContextMenuEvent } from "../menus/context_menu.js"; | ||||
| import type TypeWidget from "../widgets/type_widgets/type_widget.js"; | ||||
|  | ||||
| interface Layout { | ||||
|     getRootWidget: (appContext: AppContext) => RootWidget; | ||||
| @@ -60,8 +61,8 @@ export interface NoteCommandData extends CommandData { | ||||
|     viewScope?: ViewScope; | ||||
| } | ||||
|  | ||||
| export interface ExecuteCommandData extends CommandData { | ||||
|     resolve: unknown; | ||||
| export interface ExecuteCommandData<T> extends CommandData { | ||||
|     resolve: (data: T) => void | ||||
| } | ||||
|  | ||||
| /** | ||||
| @@ -77,10 +78,15 @@ export type CommandMappings = { | ||||
|         searchString?: string; | ||||
|         ancestorNoteId?: string | null; | ||||
|     }; | ||||
|     closeTocCommand: CommandData; | ||||
|     showLaunchBarSubtree: CommandData; | ||||
|     showOptions: CommandData & { | ||||
|         section: string; | ||||
|     }; | ||||
|     showExportDialog: CommandData & { | ||||
|         notePath: string; | ||||
|         defaultType: "single" | "subtree"; | ||||
|     }; | ||||
|     showDeleteNotesDialog: CommandData & { | ||||
|         branchIdsToDelete: string[]; | ||||
|         callback: (value: ResolveOptions) => void; | ||||
| @@ -162,12 +168,16 @@ export type CommandMappings = { | ||||
|         callback: (value: NoteDetailWidget | PromiseLike<NoteDetailWidget>) => void; | ||||
|     }; | ||||
|     executeWithTextEditor: CommandData & | ||||
|         ExecuteCommandData & { | ||||
|         ExecuteCommandData<TextEditor> & { | ||||
|             callback?: GetTextEditorCallback; | ||||
|         }; | ||||
|     executeWithCodeEditor: CommandData & ExecuteCommandData; | ||||
|     executeWithContentElement: CommandData & ExecuteCommandData; | ||||
|     executeWithTypeWidget: CommandData & ExecuteCommandData; | ||||
|     executeWithCodeEditor: CommandData & ExecuteCommandData<null>; | ||||
|     /** | ||||
|      * Called upon when attempting to retrieve the content element of a {@link NoteContext}. | ||||
|      * Generally should not be invoked manually, as it is used by {@link NoteContext.getContentElement}. | ||||
|      */ | ||||
|     executeWithContentElement: CommandData & ExecuteCommandData<JQuery<HTMLElement>>; | ||||
|     executeWithTypeWidget: CommandData & ExecuteCommandData<TypeWidget | null>; | ||||
|     addTextToActiveEditor: CommandData & { | ||||
|         text: string; | ||||
|     }; | ||||
| @@ -213,6 +223,9 @@ export type CommandMappings = { | ||||
|         zoomFactor: string; | ||||
|     } | ||||
|  | ||||
|     reEvaluateRightPaneVisibility: CommandData; | ||||
|     runActiveNote: CommandData; | ||||
|  | ||||
|     // Geomap | ||||
|     deleteFromMap: { noteId: string }, | ||||
|     openGeoLocation: { noteId: string, event: JQuery.MouseDownEvent } | ||||
| @@ -258,7 +271,7 @@ type EventMappings = { | ||||
|     }; | ||||
|     noteSwitched: { | ||||
|         noteContext: NoteContext; | ||||
|         notePath: string | null; | ||||
|         notePath?: string | null; | ||||
|     }; | ||||
|     noteSwitchedAndActivatedEvent: { | ||||
|         noteContext: NoteContext; | ||||
| @@ -273,6 +286,9 @@ type EventMappings = { | ||||
|     reEvaluateHighlightsListWidgetVisibility: { | ||||
|         noteId: string | undefined; | ||||
|     }; | ||||
|     reEvaluateTocWidgetVisibility: { | ||||
|         noteId: string | undefined; | ||||
|     }; | ||||
|     showHighlightsListWidget: { | ||||
|         noteId: string; | ||||
|     }; | ||||
| @@ -308,7 +324,12 @@ type EventMappings = { | ||||
|     }; | ||||
|     refreshNoteList: { | ||||
|         noteId: string; | ||||
|     } | ||||
|     }; | ||||
|     showToc: { | ||||
|         noteId: string; | ||||
|     }; | ||||
|     scrollToEnd: { ntxId: string }; | ||||
|     noteTypeMimeChanged: { noteId: string }; | ||||
| }; | ||||
|  | ||||
| export type EventListener<T extends EventNames> = { | ||||
|   | ||||
| @@ -9,8 +9,9 @@ import hoistedNoteService from "../services/hoisted_note.js"; | ||||
| import options from "../services/options.js"; | ||||
| import type { ViewScope } from "../services/link.js"; | ||||
| import type FNote from "../entities/fnote.js"; | ||||
| import type TypeWidget from "../widgets/type_widgets/type_widget.js"; | ||||
|  | ||||
| interface SetNoteOpts { | ||||
| export interface SetNoteOpts { | ||||
|     triggerSwitchEvent?: unknown; | ||||
|     viewScope?: ViewScope; | ||||
| } | ||||
| @@ -163,6 +164,7 @@ class NoteContext extends Component implements EventListener<"entitiesReloaded"> | ||||
|                     noteId: this.note?.noteId, | ||||
|                     notePath: this.notePath | ||||
|                 }); | ||||
|                 utils.reloadTray(); | ||||
|             } | ||||
|         }, 5000); | ||||
|     } | ||||
| @@ -287,7 +289,7 @@ class NoteContext extends Component implements EventListener<"entitiesReloaded"> | ||||
|     hasNoteList() { | ||||
|         return ( | ||||
|             this.note && | ||||
|             this.viewScope?.viewMode === "default" && | ||||
|             ["default", "contextual-help"].includes(this.viewScope?.viewMode ?? "") && | ||||
|             this.note.hasChildren() && | ||||
|             ["book", "text", "code"].includes(this.note.type) && | ||||
|             this.note.mime !== "text/x-sqlite;schema=trilium" && | ||||
| @@ -318,6 +320,15 @@ class NoteContext extends Component implements EventListener<"entitiesReloaded"> | ||||
|         ); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * Returns a promise which will retrieve the JQuery element of the content of this note context. | ||||
|      * | ||||
|      * Do note that retrieving the content element needs to be handled by the type widget, which is the one which | ||||
|      * provides the content element by listening to the `executeWithContentElement` event. Not all note types support | ||||
|      * this. | ||||
|      * | ||||
|      * If no content could be determined `null` is returned instead. | ||||
|      */ | ||||
|     async getContentElement() { | ||||
|         return this.timeout<JQuery<HTMLElement>>( | ||||
|             new Promise((resolve) => | ||||
| @@ -331,7 +342,7 @@ class NoteContext extends Component implements EventListener<"entitiesReloaded"> | ||||
|  | ||||
|     async getTypeWidget() { | ||||
|         return this.timeout( | ||||
|             new Promise((resolve) => | ||||
|             new Promise<TypeWidget | null>((resolve) => | ||||
|                 appContext.triggerCommand("executeWithTypeWidget", { | ||||
|                     resolve, | ||||
|                     ntxId: this.ntxId | ||||
|   | ||||
| @@ -90,6 +90,10 @@ export default class RootCommandExecutor extends Component { | ||||
|         await appContext.tabManager.openTabWithNoteWithHoisting("_backendLog", { activate: true }); | ||||
|     } | ||||
|  | ||||
|     async showHelpCommand() { | ||||
|         await this.showAndHoistSubtree("_help"); | ||||
|     } | ||||
|  | ||||
|     async showLaunchBarSubtreeCommand() { | ||||
|         const rootNote = utils.isMobile() ? "_lbMobileRoot" : "_lbRoot"; | ||||
|         await this.showAndHoistSubtree(rootNote); | ||||
|   | ||||
| @@ -4,7 +4,6 @@ import noteTooltipService from "./services/note_tooltip.js"; | ||||
| import bundleService from "./services/bundle.js"; | ||||
| import toastService from "./services/toast.js"; | ||||
| import noteAutocompleteService from "./services/note_autocomplete.js"; | ||||
| import macInit from "./services/mac_init.js"; | ||||
| import electronContextMenu from "./menus/electron_context_menu.js"; | ||||
| import glob from "./services/glob.js"; | ||||
| import { t } from "./services/i18n.js"; | ||||
| @@ -35,8 +34,6 @@ if (utils.isElectron()) { | ||||
|     initOnElectron(); | ||||
| } | ||||
|  | ||||
| macInit.init(); | ||||
|  | ||||
| noteTooltipService.setupGlobalTooltip(); | ||||
|  | ||||
| noteAutocompleteService.init(); | ||||
| @@ -48,6 +45,7 @@ if (utils.isElectron()) { | ||||
| function initOnElectron() { | ||||
|     const electron: typeof Electron = utils.dynamicRequire("electron"); | ||||
|     electron.ipcRenderer.on("globalShortcut", async (event, actionName) => appContext.triggerCommand(actionName)); | ||||
|     electron.ipcRenderer.on("openInSameTab", async (event, noteId) => appContext.tabManager.openInSameTab(noteId)); | ||||
|     const electronRemote: typeof ElectronRemote = utils.dynamicRequire("@electron/remote"); | ||||
|     const currentWindow = electronRemote.getCurrentWindow(); | ||||
|     const style = window.getComputedStyle(document.body); | ||||
|   | ||||
							
								
								
									
										500
									
								
								src/public/app/doc_notes/en/User Guide/!!!meta.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,500 @@ | ||||
| { | ||||
| 	"formatVersion": 2, | ||||
| 	"appVersion": "0.91.5", | ||||
| 	"files": [ | ||||
| 		{ | ||||
| 			"isClone": false, | ||||
| 			"noteId": "OkOZllzB3fqN", | ||||
| 			"notePath": [ | ||||
| 				"OkOZllzB3fqN" | ||||
| 			], | ||||
| 			"title": "User Guide", | ||||
| 			"notePosition": 20, | ||||
| 			"prefix": null, | ||||
| 			"isExpanded": false, | ||||
| 			"type": "text", | ||||
| 			"mime": "text/html", | ||||
| 			"attributes": [ | ||||
| 				{ | ||||
| 					"type": "label", | ||||
| 					"name": "iconClass", | ||||
| 					"value": "bx bx-help-circle", | ||||
| 					"isInheritable": false, | ||||
| 					"position": 10 | ||||
| 				} | ||||
| 			], | ||||
| 			"format": "html", | ||||
| 			"attachments": [], | ||||
| 			"dirFileName": "User Guide", | ||||
| 			"children": [ | ||||
| 				{ | ||||
| 					"isClone": false, | ||||
| 					"noteId": "wmegHv51MJMd", | ||||
| 					"notePath": [ | ||||
| 						"OkOZllzB3fqN", | ||||
| 						"wmegHv51MJMd" | ||||
| 					], | ||||
| 					"title": "Types of notes", | ||||
| 					"notePosition": 20, | ||||
| 					"prefix": null, | ||||
| 					"isExpanded": false, | ||||
| 					"type": "text", | ||||
| 					"mime": "text/html", | ||||
| 					"attributes": [], | ||||
| 					"format": "html", | ||||
| 					"attachments": [], | ||||
| 					"dirFileName": "Types of notes", | ||||
| 					"children": [ | ||||
| 						{ | ||||
| 							"isClone": false, | ||||
| 							"noteId": "foPEtsL51pD2", | ||||
| 							"notePath": [ | ||||
| 								"OkOZllzB3fqN", | ||||
| 								"wmegHv51MJMd", | ||||
| 								"foPEtsL51pD2" | ||||
| 							], | ||||
| 							"title": "Geo map", | ||||
| 							"notePosition": 10, | ||||
| 							"prefix": null, | ||||
| 							"isExpanded": false, | ||||
| 							"type": "text", | ||||
| 							"mime": "text/html", | ||||
| 							"attributes": [ | ||||
| 								{ | ||||
| 									"type": "label", | ||||
| 									"name": "iconClass", | ||||
| 									"value": "bx bx-map-alt", | ||||
| 									"isInheritable": false, | ||||
| 									"position": 10 | ||||
| 								} | ||||
| 							], | ||||
| 							"format": "html", | ||||
| 							"dataFileName": "Geo map.html", | ||||
| 							"attachments": [ | ||||
| 								{ | ||||
| 									"attachmentId": "viN50n5G4kB0", | ||||
| 									"title": "image.png", | ||||
| 									"role": "image", | ||||
| 									"mime": "image/png", | ||||
| 									"position": 10, | ||||
| 									"dataFileName": "Geo map_image.png" | ||||
| 								}, | ||||
| 								{ | ||||
| 									"attachmentId": "eUrcqc8RRuZG", | ||||
| 									"title": "image.png", | ||||
| 									"role": "image", | ||||
| 									"mime": "image/png", | ||||
| 									"position": 10, | ||||
| 									"dataFileName": "1_Geo map_image.png" | ||||
| 								}, | ||||
| 								{ | ||||
| 									"attachmentId": "1quk4yxJpeHZ", | ||||
| 									"title": "image.png", | ||||
| 									"role": "image", | ||||
| 									"mime": "image/png", | ||||
| 									"position": 10, | ||||
| 									"dataFileName": "2_Geo map_image.png" | ||||
| 								}, | ||||
| 								{ | ||||
| 									"attachmentId": "mgwGrtQZjxxb", | ||||
| 									"title": "image.png", | ||||
| 									"role": "image", | ||||
| 									"mime": "image/png", | ||||
| 									"position": 10, | ||||
| 									"dataFileName": "3_Geo map_image.png" | ||||
| 								}, | ||||
| 								{ | ||||
| 									"attachmentId": "JULizn130rVI", | ||||
| 									"title": "image.png", | ||||
| 									"role": "image", | ||||
| 									"mime": "image/png", | ||||
| 									"position": 10, | ||||
| 									"dataFileName": "4_Geo map_image.png" | ||||
| 								}, | ||||
| 								{ | ||||
| 									"attachmentId": "kcYjOvJDFkbS", | ||||
| 									"title": "image.png", | ||||
| 									"role": "image", | ||||
| 									"mime": "image/png", | ||||
| 									"position": 10, | ||||
| 									"dataFileName": "5_Geo map_image.png" | ||||
| 								}, | ||||
| 								{ | ||||
| 									"attachmentId": "ut6vm2aXVfXI", | ||||
| 									"title": "image.png", | ||||
| 									"role": "image", | ||||
| 									"mime": "image/png", | ||||
| 									"position": 10, | ||||
| 									"dataFileName": "6_Geo map_image.png" | ||||
| 								}, | ||||
| 								{ | ||||
| 									"attachmentId": "0AwaQMqt3FVA", | ||||
| 									"title": "image.png", | ||||
| 									"role": "image", | ||||
| 									"mime": "image/png", | ||||
| 									"position": 10, | ||||
| 									"dataFileName": "7_Geo map_image.png" | ||||
| 								}, | ||||
| 								{ | ||||
| 									"attachmentId": "gFR2Izzp18LQ", | ||||
| 									"title": "image.png", | ||||
| 									"role": "image", | ||||
| 									"mime": "image/png", | ||||
| 									"position": 10, | ||||
| 									"dataFileName": "8_Geo map_image.png" | ||||
| 								}, | ||||
| 								{ | ||||
| 									"attachmentId": "PMqmCbNLlZOG", | ||||
| 									"title": "image.png", | ||||
| 									"role": "image", | ||||
| 									"mime": "image/png", | ||||
| 									"position": 10, | ||||
| 									"dataFileName": "9_Geo map_image.png" | ||||
| 								}, | ||||
| 								{ | ||||
| 									"attachmentId": "pKdtiq4r0eFY", | ||||
| 									"title": "image.png", | ||||
| 									"role": "image", | ||||
| 									"mime": "image/png", | ||||
| 									"position": 10, | ||||
| 									"dataFileName": "10_Geo map_image.png" | ||||
| 								}, | ||||
| 								{ | ||||
| 									"attachmentId": "FXRVvYpOxWyR", | ||||
| 									"title": "image.png", | ||||
| 									"role": "image", | ||||
| 									"mime": "image/png", | ||||
| 									"position": 10, | ||||
| 									"dataFileName": "11_Geo map_image.png" | ||||
| 								}, | ||||
| 								{ | ||||
| 									"attachmentId": "42AncDs7SSAf", | ||||
| 									"title": "image.png", | ||||
| 									"role": "image", | ||||
| 									"mime": "image/png", | ||||
| 									"position": 10, | ||||
| 									"dataFileName": "12_Geo map_image.png" | ||||
| 								}, | ||||
| 								{ | ||||
| 									"attachmentId": "gR2c2Thmfy3I", | ||||
| 									"title": "image.png", | ||||
| 									"role": "image", | ||||
| 									"mime": "image/png", | ||||
| 									"position": 10, | ||||
| 									"dataFileName": "13_Geo map_image.png" | ||||
| 								}, | ||||
| 								{ | ||||
| 									"attachmentId": "FDP3JzIVSnuJ", | ||||
| 									"title": "image.png", | ||||
| 									"role": "image", | ||||
| 									"mime": "image/png", | ||||
| 									"position": 10, | ||||
| 									"dataFileName": "14_Geo map_image.png" | ||||
| 								}, | ||||
| 								{ | ||||
| 									"attachmentId": "GhHYO2LteDmZ", | ||||
| 									"title": "image.png", | ||||
| 									"role": "image", | ||||
| 									"mime": "image/png", | ||||
| 									"position": 10, | ||||
| 									"dataFileName": "15_Geo map_image.png" | ||||
| 								}, | ||||
| 								{ | ||||
| 									"attachmentId": "J0baLTpafs7C", | ||||
| 									"title": "image.png", | ||||
| 									"role": "image", | ||||
| 									"mime": "image/png", | ||||
| 									"position": 10, | ||||
| 									"dataFileName": "16_Geo map_image.png" | ||||
| 								}, | ||||
| 								{ | ||||
| 									"attachmentId": "uYdb9wWf5Nuv", | ||||
| 									"title": "image.png", | ||||
| 									"role": "image", | ||||
| 									"mime": "image/png", | ||||
| 									"position": 10, | ||||
| 									"dataFileName": "17_Geo map_image.png" | ||||
| 								}, | ||||
| 								{ | ||||
| 									"attachmentId": "iSpyhQ5Ya6Nk", | ||||
| 									"title": "image.png", | ||||
| 									"role": "image", | ||||
| 									"mime": "image/png", | ||||
| 									"position": 10, | ||||
| 									"dataFileName": "18_Geo map_image.png" | ||||
| 								}, | ||||
| 								{ | ||||
| 									"attachmentId": "MdC0DpifJwu4", | ||||
| 									"title": "image.png", | ||||
| 									"role": "image", | ||||
| 									"mime": "image/png", | ||||
| 									"position": 10, | ||||
| 									"dataFileName": "19_Geo map_image.png" | ||||
| 								} | ||||
| 							] | ||||
| 						} | ||||
| 					] | ||||
| 				}, | ||||
| 				{ | ||||
| 					"isClone": false, | ||||
| 					"noteId": "BDEpqZHDS51s", | ||||
| 					"notePath": [ | ||||
| 						"OkOZllzB3fqN", | ||||
| 						"BDEpqZHDS51s" | ||||
| 					], | ||||
| 					"title": "Working with notes", | ||||
| 					"notePosition": 30, | ||||
| 					"prefix": null, | ||||
| 					"isExpanded": false, | ||||
| 					"type": "text", | ||||
| 					"mime": "text/html", | ||||
| 					"attributes": [], | ||||
| 					"format": "html", | ||||
| 					"attachments": [], | ||||
| 					"dirFileName": "Working with notes", | ||||
| 					"children": [ | ||||
| 						{ | ||||
| 							"isClone": false, | ||||
| 							"noteId": "13D1lOc9sqmZ", | ||||
| 							"notePath": [ | ||||
| 								"OkOZllzB3fqN", | ||||
| 								"BDEpqZHDS51s", | ||||
| 								"13D1lOc9sqmZ" | ||||
| 							], | ||||
| 							"title": "Exporting as PDF", | ||||
| 							"notePosition": 10, | ||||
| 							"prefix": null, | ||||
| 							"isExpanded": false, | ||||
| 							"type": "text", | ||||
| 							"mime": "text/html", | ||||
| 							"attributes": [], | ||||
| 							"format": "html", | ||||
| 							"dataFileName": "Exporting as PDF.html", | ||||
| 							"attachments": [ | ||||
| 								{ | ||||
| 									"attachmentId": "b3v1pLE6TF1Y", | ||||
| 									"title": "image.png", | ||||
| 									"role": "image", | ||||
| 									"mime": "image/png", | ||||
| 									"position": 10, | ||||
| 									"dataFileName": "Exporting as PDF_image.png" | ||||
| 								}, | ||||
| 								{ | ||||
| 									"attachmentId": "xsGM34t8ssKV", | ||||
| 									"title": "image.png", | ||||
| 									"role": "image", | ||||
| 									"mime": "image/png", | ||||
| 									"position": 10, | ||||
| 									"dataFileName": "1_Exporting as PDF_image.png" | ||||
| 								}, | ||||
| 								{ | ||||
| 									"attachmentId": "cvyes4f1Vhmm", | ||||
| 									"title": "image.png", | ||||
| 									"role": "image", | ||||
| 									"mime": "image/png", | ||||
| 									"position": 10, | ||||
| 									"dataFileName": "2_Exporting as PDF_image.png" | ||||
| 								} | ||||
| 							] | ||||
| 						} | ||||
| 					] | ||||
| 				}, | ||||
| 				{ | ||||
| 					"isClone": false, | ||||
| 					"noteId": "XUG1egT28FBk", | ||||
| 					"notePath": [ | ||||
| 						"OkOZllzB3fqN", | ||||
| 						"XUG1egT28FBk" | ||||
| 					], | ||||
| 					"title": "Power users", | ||||
| 					"notePosition": 50, | ||||
| 					"prefix": null, | ||||
| 					"isExpanded": true, | ||||
| 					"type": "text", | ||||
| 					"mime": "text/html", | ||||
| 					"attributes": [], | ||||
| 					"format": "html", | ||||
| 					"attachments": [], | ||||
| 					"dirFileName": "Power users", | ||||
| 					"children": [ | ||||
| 						{ | ||||
| 							"isClone": false, | ||||
| 							"noteId": "DtJJ20yEozPA", | ||||
| 							"notePath": [ | ||||
| 								"OkOZllzB3fqN", | ||||
| 								"XUG1egT28FBk", | ||||
| 								"DtJJ20yEozPA" | ||||
| 							], | ||||
| 							"title": "Theme development", | ||||
| 							"notePosition": 10, | ||||
| 							"prefix": null, | ||||
| 							"isExpanded": false, | ||||
| 							"type": "text", | ||||
| 							"mime": "text/html", | ||||
| 							"attributes": [ | ||||
| 								{ | ||||
| 									"type": "label", | ||||
| 									"name": "iconClass", | ||||
| 									"value": "bx bx-palette", | ||||
| 									"isInheritable": false, | ||||
| 									"position": 10 | ||||
| 								} | ||||
| 							], | ||||
| 							"format": "html", | ||||
| 							"attachments": [], | ||||
| 							"dirFileName": "Theme development", | ||||
| 							"children": [ | ||||
| 								{ | ||||
| 									"isClone": false, | ||||
| 									"noteId": "5HH79ztN0fZA", | ||||
| 									"notePath": [ | ||||
| 										"OkOZllzB3fqN", | ||||
| 										"XUG1egT28FBk", | ||||
| 										"DtJJ20yEozPA", | ||||
| 										"5HH79ztN0fZA" | ||||
| 									], | ||||
| 									"title": "Creating a custom theme", | ||||
| 									"notePosition": 10, | ||||
| 									"prefix": null, | ||||
| 									"isExpanded": false, | ||||
| 									"type": "text", | ||||
| 									"mime": "text/html", | ||||
| 									"attributes": [ | ||||
| 										{ | ||||
| 											"type": "relation", | ||||
| 											"name": "internalLink", | ||||
| 											"value": "aH8Dk5aMiq7R", | ||||
| 											"isInheritable": false, | ||||
| 											"position": 10 | ||||
| 										} | ||||
| 									], | ||||
| 									"format": "html", | ||||
| 									"dataFileName": "Creating a custom theme.html", | ||||
| 									"attachments": [ | ||||
| 										{ | ||||
| 											"attachmentId": "bn93hwF7C8sR", | ||||
| 											"title": "image.png", | ||||
| 											"role": "image", | ||||
| 											"mime": "image/png", | ||||
| 											"position": 10, | ||||
| 											"dataFileName": "Creating a custom theme_im.png" | ||||
| 										}, | ||||
| 										{ | ||||
| 											"attachmentId": "17p6z24yW5eP", | ||||
| 											"title": "image.png", | ||||
| 											"role": "image", | ||||
| 											"mime": "image/png", | ||||
| 											"position": 10, | ||||
| 											"dataFileName": "1_Creating a custom theme_im.png" | ||||
| 										}, | ||||
| 										{ | ||||
| 											"attachmentId": "gXLyv5KXjfxg", | ||||
| 											"title": "image.png", | ||||
| 											"role": "image", | ||||
| 											"mime": "image/png", | ||||
| 											"position": 10, | ||||
| 											"dataFileName": "2_Creating a custom theme_im.png" | ||||
| 										}, | ||||
| 										{ | ||||
| 											"attachmentId": "AJHVfQtIQgJ7", | ||||
| 											"title": "image.png", | ||||
| 											"role": "image", | ||||
| 											"mime": "image/png", | ||||
| 											"position": 10, | ||||
| 											"dataFileName": "3_Creating a custom theme_im.png" | ||||
| 										}, | ||||
| 										{ | ||||
| 											"attachmentId": "on1gD7BzCWdN", | ||||
| 											"title": "image.png", | ||||
| 											"role": "image", | ||||
| 											"mime": "image/png", | ||||
| 											"position": 10, | ||||
| 											"dataFileName": "4_Creating a custom theme_im.png" | ||||
| 										}, | ||||
| 										{ | ||||
| 											"attachmentId": "K3cdwj8f90m0", | ||||
| 											"title": "image.png", | ||||
| 											"role": "image", | ||||
| 											"mime": "image/png", | ||||
| 											"position": 10, | ||||
| 											"dataFileName": "5_Creating a custom theme_im.png" | ||||
| 										} | ||||
| 									] | ||||
| 								}, | ||||
| 								{ | ||||
| 									"isClone": false, | ||||
| 									"noteId": "aH8Dk5aMiq7R", | ||||
| 									"notePath": [ | ||||
| 										"OkOZllzB3fqN", | ||||
| 										"XUG1egT28FBk", | ||||
| 										"DtJJ20yEozPA", | ||||
| 										"aH8Dk5aMiq7R" | ||||
| 									], | ||||
| 									"title": "Theme base (legacy vs. next)", | ||||
| 									"notePosition": 20, | ||||
| 									"prefix": null, | ||||
| 									"isExpanded": false, | ||||
| 									"type": "text", | ||||
| 									"mime": "text/html", | ||||
| 									"attributes": [], | ||||
| 									"format": "html", | ||||
| 									"dataFileName": "Theme base (legacy vs. next).html", | ||||
| 									"attachments": [ | ||||
| 										{ | ||||
| 											"attachmentId": "u0zkXkD7rGXA", | ||||
| 											"title": "image.png", | ||||
| 											"role": "image", | ||||
| 											"mime": "image/png", | ||||
| 											"position": 10, | ||||
| 											"dataFileName": "Theme base (legacy vs. nex.png" | ||||
| 										}, | ||||
| 										{ | ||||
| 											"attachmentId": "5z4bC0x0eH0P", | ||||
| 											"title": "image.png", | ||||
| 											"role": "image", | ||||
| 											"mime": "image/png", | ||||
| 											"position": 10, | ||||
| 											"dataFileName": "1_Theme base (legacy vs. nex.png" | ||||
| 										} | ||||
| 									] | ||||
| 								}, | ||||
| 								{ | ||||
| 									"isClone": false, | ||||
| 									"noteId": "pMq6N1oBV9oo", | ||||
| 									"notePath": [ | ||||
| 										"OkOZllzB3fqN", | ||||
| 										"XUG1egT28FBk", | ||||
| 										"DtJJ20yEozPA", | ||||
| 										"pMq6N1oBV9oo" | ||||
| 									], | ||||
| 									"title": "Reference", | ||||
| 									"notePosition": 30, | ||||
| 									"prefix": null, | ||||
| 									"isExpanded": false, | ||||
| 									"type": "text", | ||||
| 									"mime": "text/html", | ||||
| 									"attributes": [], | ||||
| 									"format": "html", | ||||
| 									"dataFileName": "Reference.html", | ||||
| 									"attachments": [] | ||||
| 								} | ||||
| 							] | ||||
| 						} | ||||
| 					] | ||||
| 				} | ||||
| 			] | ||||
| 		}, | ||||
| 		{ | ||||
| 			"noImport": true, | ||||
| 			"dataFileName": "navigation.html" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"noImport": true, | ||||
| 			"dataFileName": "index.html" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"noImport": true, | ||||
| 			"dataFileName": "style.css" | ||||
| 		} | ||||
| 	] | ||||
| } | ||||
| After Width: | Height: | Size: 28 KiB | 
| After Width: | Height: | Size: 14 KiB | 
| After Width: | Height: | Size: 26 KiB | 
| After Width: | Height: | Size: 11 KiB | 
| After Width: | Height: | Size: 57 KiB | 
| After Width: | Height: | Size: 69 KiB | 
| @@ -0,0 +1,94 @@ | ||||
| <html> | ||||
|    | ||||
|   <head> | ||||
|     <meta charset="utf-8"> | ||||
|     <meta name="viewport" content="width=device-width, initial-scale=1"> | ||||
|     <link rel="stylesheet" href="../../../style.css"> | ||||
|     <base target="_parent"> | ||||
|     <title data-trilium-title>Creating a custom theme</title> | ||||
|   </head> | ||||
|    | ||||
|   <body> | ||||
|     <div class="content"> | ||||
|        <h1 data-trilium-h1>Creating a custom theme</h1> | ||||
|  | ||||
|       <div class="ck-content"> | ||||
|         <h2>Step 1. Find a place to place the themes</h2> | ||||
|         <p>Organization is an important aspect of managing a knowledge base. When | ||||
|           developing a new theme or importing an existing one it's a good idea to | ||||
|           keep them into one place.</p> | ||||
|         <p>As such, the first step is to create a new note to gather all the themes.</p> | ||||
|         <p> | ||||
|           <img src="Creating a custom theme_im.png" width="181" height="84"> | ||||
|         </p> | ||||
|         <h2>Step 2. Create the theme</h2> | ||||
|         <figure class="table" style="width:100%;"> | ||||
|           <table class="ck-table-resized"> | ||||
|             <colgroup> | ||||
|               <col style="width:32.47%;"> | ||||
|                 <col style="width:67.53%;"> | ||||
|             </colgroup> | ||||
|             <tbody> | ||||
|               <tr> | ||||
|                 <td> | ||||
|                   <figure class="image"> | ||||
|                     <img style="aspect-ratio:651/220;" src="1_Creating a custom theme_im.png" | ||||
|                     width="651" height="220"> | ||||
|                   </figure> | ||||
|                 </td> | ||||
|                 <td style="vertical-align:top;">Themes are code notes with a special attribute. Start by creating a new | ||||
|                   code note.</td> | ||||
|               </tr> | ||||
|               <tr> | ||||
|                 <td> | ||||
|                   <figure class="image"> | ||||
|                     <img style="aspect-ratio:302/349;" src="2_Creating a custom theme_im.png" | ||||
|                     width="302" height="349"> | ||||
|                   </figure> | ||||
|                 </td> | ||||
|                 <td style="vertical-align:top;">Then change the note type to a CSS code.</td> | ||||
|               </tr> | ||||
|               <tr> | ||||
|                 <td> | ||||
|                   <figure class="image"> | ||||
|                     <img style="aspect-ratio:316/133;" src="3_Creating a custom theme_im.png" | ||||
|                     width="316" height="133"> | ||||
|                   </figure> | ||||
|                 </td> | ||||
|                 <td style="vertical-align:top;">In the <i>Owned Attributes</i> section define the <code>#appTheme</code> attribute | ||||
|                   to point to any desired name. This is the name that will show up in the | ||||
|                   appearance section in settings.</td> | ||||
|               </tr> | ||||
|             </tbody> | ||||
|           </table> | ||||
|         </figure> | ||||
|         <h2>Step 3. Define the theme's CSS</h2> | ||||
|         <p>As a very simple example we will change the background color of the launcher | ||||
|           pane to a shade of blue.</p> | ||||
|         <p>To alter the different variables of the theme:</p><pre><code class="language-text-css">:root { | ||||
| 	--launcher-pane-background-color: #0d6efd; | ||||
| }</code></pre> | ||||
|         <h2>Step 4. Activating the theme</h2> | ||||
|         <p>Refresh the application (Ctrl+Shift+R is a good way to do so) and go to | ||||
|           settings. You should see the newly created theme:</p> | ||||
|         <p> | ||||
|           <img src="4_Creating a custom theme_im.png" width="631" height="481"> | ||||
|         </p> | ||||
|         <p>Afterwards the application will refresh itself with the new theme:</p> | ||||
|         <p> | ||||
|           <img src="5_Creating a custom theme_im.png" width="653" height="554"> | ||||
|         </p> | ||||
|         <p>Do note that the theme will be based off of the legacy theme. To override | ||||
|           that and base the theme on the new TriliumNext theme, see: <a class="reference-link" | ||||
|           href="Theme%20base%20(legacy%20vs.%20next).html">Theme base (legacy vs. next)</a> | ||||
|         </p> | ||||
|         <h2>Step 5. Making changes</h2> | ||||
|         <p>Simply go back to the note and change according to needs. To apply the | ||||
|           changes to the current window, press Ctrl+Shift+R to refresh.</p> | ||||
|         <p>It's a good idea to keep two windows, one for editing and the other one | ||||
|           for previewing the changes.</p> | ||||
|       </div> | ||||
|     </div> | ||||
|   </body> | ||||
|  | ||||
| </html> | ||||
| After Width: | Height: | Size: 4.7 KiB | 
| @@ -0,0 +1,129 @@ | ||||
| <html> | ||||
|    | ||||
|   <head> | ||||
|     <meta charset="utf-8"> | ||||
|     <meta name="viewport" content="width=device-width, initial-scale=1"> | ||||
|     <link rel="stylesheet" href="../../../style.css"> | ||||
|     <base target="_parent"> | ||||
|     <title data-trilium-title>Reference</title> | ||||
|   </head> | ||||
|    | ||||
|   <body> | ||||
|     <div class="content"> | ||||
|        <h1 data-trilium-h1>Reference</h1> | ||||
|  | ||||
|       <div class="ck-content"> | ||||
|         <h2>Detecting horizontal vs. vertical layout</h2> | ||||
|         <p>The user can select between vertical layout (the classical one, where | ||||
|           the launcher bar is on the left) and a horizontal layout (where the launcher | ||||
|           bar is on the top and tabs are full-width).</p> | ||||
|         <p>Different styles can be applied by using classes at <code>body</code> level:</p><pre><code class="language-text-x-trilium-auto">body.layout-vertical #left-pane { | ||||
| 	/* Do something */ | ||||
| } | ||||
|  | ||||
| body.layout-horizontal #center-pane { | ||||
| 	/* Do something else */	 | ||||
| }</code></pre> | ||||
|         <p>The two different layouts use different containers (but they are present | ||||
|           in the DOM regardless of the user's choice), for example <code>#horizontal-main-container</code> and <code>#vertical-main-container</code> can | ||||
|           be used to customize the background of the content section.</p> | ||||
|         <h2>Detecting platform (Windows, macOS) or Electron</h2> | ||||
|         <p>It is possible to add particular styles that only apply to a given platform | ||||
|           by using the classes in <code>body</code>:</p> | ||||
|         <figure class="table"> | ||||
|           <table> | ||||
|             <thead> | ||||
|               <tr> | ||||
|                 <th>Windows</th> | ||||
|                 <th>macOS</th> | ||||
|               </tr> | ||||
|             </thead> | ||||
|             <tbody> | ||||
|               <tr> | ||||
|                 <td><pre><code class="language-text-x-trilium-auto">body.platform-win32 { | ||||
| 	background: red; | ||||
| }</code></pre> | ||||
|                 </td> | ||||
|                 <td><pre><code class="language-text-x-trilium-auto">body.platform-darwin { | ||||
| 	background: red; | ||||
| }</code></pre> | ||||
|                 </td> | ||||
|               </tr> | ||||
|             </tbody> | ||||
|           </table> | ||||
|         </figure> | ||||
|         <p>It is also possible to only apply a style if running under Electron (desktop | ||||
|           application):</p><pre><code class="language-text-x-trilium-auto">body.electron { | ||||
| 	background: blue; | ||||
| }</code></pre> | ||||
|         <h3>Native title bar</h3> | ||||
|         <p>It's possible to detect if the user has selected the native title bar | ||||
|           or the custom title bar by querying against <code>body</code>:</p><pre><code class="language-text-x-trilium-auto">body.electron.native-titlebar { | ||||
| 	/* Do something */ | ||||
| } | ||||
|  | ||||
| body.electron:not(.native-titlebar) { | ||||
| 	/* Do something else */ | ||||
| }</code></pre> | ||||
|         <h3>Native window buttons</h3> | ||||
|         <p>When running under Electron with native title bar off, a feature was introduced | ||||
|           to use the platform-specific window buttons such as the semaphore on macOS.</p> | ||||
|         <p>See <a href="https://github.com/TriliumNext/Notes/pull/702">Native title bar buttons by eliandoran · Pull Request #702 · TriliumNext/Notes</a> for | ||||
|           the original implementation of this feature, including screenshots.</p> | ||||
|         <h4>On Windows</h4> | ||||
|         <p>The colors of the native window button area can be adjusted using a RGB | ||||
|           hex color:</p><pre><code class="language-text-x-trilium-auto">body { | ||||
| 	--native-titlebar-foreground: #ffffff; | ||||
| 	--native-titlebar-background: #ff0000; | ||||
| }</code></pre> | ||||
|         <p>It is also possible to use transparency at the cost of reduced hover colors | ||||
|           using a RGBA hex color:</p><pre><code class="language-text-x-trilium-auto">body { | ||||
| 	--native-titlebar-background: #ff0000aa; | ||||
| }</code></pre> | ||||
|         <p>Note that the value is read when the window is initialized and then it | ||||
|           is refreshed only when the user changes their light/dark mode preference.</p> | ||||
|         <h4>On macOS</h4> | ||||
|         <p>On macOS the semaphore window buttons are enabled by default when the | ||||
|           native title bar is disabled. The offset of the buttons can be adjusted | ||||
|           using:</p><pre><code class="language-text-x-trilium-auto">body { | ||||
|     --native-titlebar-darwin-x-offset: 12; | ||||
|     --native-titlebar-darwin-y-offset: 14 !important; | ||||
| }</code></pre> | ||||
|         <h3>Background/transparency effects on Windows (Mica)</h3> | ||||
|         <p>Windows 11 offers a special background/transparency effect called Mica, | ||||
|           which can be enabled by themes by setting the <code>--background-material</code> variable | ||||
|           at <code>body</code> level:</p><pre><code class="language-text-x-trilium-auto">body.electron.platform-win32 { | ||||
| 	--background-material: tabbed;  | ||||
| }</code></pre> | ||||
|         <p>The value can be either <code>tabbed</code> (especially useful for the horizontal | ||||
|           layout) or <code>mica</code> (ideal for the vertical layout).</p> | ||||
|         <p>Do note that the Mica effect is applied at <code>body</code> level and the | ||||
|           theme needs to make the entire hierarchy (semi-)transparent in order for | ||||
|           it to be visible. Use the TrilumNext theme as an inspiration.</p> | ||||
|         <h2>Note icons, tab workspace accent color</h2> | ||||
|         <p>Theme capabilities are small adjustments done through CSS variables that | ||||
|           can affect the layout or the visual aspect of the application.</p> | ||||
|         <p>In the tab bar, to display the icons of notes instead of the icon of the | ||||
|           workspace:</p><pre><code class="language-text-x-trilium-auto">:root { | ||||
| 	--tab-note-icons: true; | ||||
| }</code></pre> | ||||
|         <p>When a workspace is hoisted for a given tab, it is possible to get the | ||||
|           background color of that workspace, for example to apply a small strip | ||||
|           on the tab instead of the whole background color:</p><pre><code class="language-text-x-trilium-auto">.note-tab .note-tab-wrapper { | ||||
|     --tab-background-color: initial !important; | ||||
| } | ||||
|  | ||||
| .note-tab .note-tab-wrapper::after { | ||||
|     content: ""; | ||||
|     position: absolute; | ||||
|     top: 0; | ||||
|     left: 0; | ||||
|     right: 0; | ||||
|     height: 3px; | ||||
|     background-color: var(--workspace-tab-background-color); | ||||
| }</code></pre> | ||||
|       </div> | ||||
|     </div> | ||||
|   </body> | ||||
|  | ||||
| </html> | ||||