Compare commits

..

3 Commits

Author SHA1 Message Date
perf3ct
5710becf05 feat(llm): migrate the calendar tool into the manage_note tool 2025-10-10 16:49:47 -07:00
perf3ct
4a239248b1 feat(llm): get rid of unused code 2025-10-10 13:28:03 -07:00
perf3ct
74a2fcdbba feat(llm): redo llm feature and tools 2025-10-10 12:25:39 -07:00
554 changed files with 27145 additions and 51267 deletions

View File

@@ -10,9 +10,9 @@ runs:
steps:
- uses: pnpm/action-setup@v4
- name: Set up node & dependencies
uses: actions/setup-node@v6
uses: actions/setup-node@v5
with:
node-version: 24
node-version: 22
cache: "pnpm"
- name: Install dependencies
shell: bash

View File

@@ -12,7 +12,7 @@ jobs:
steps:
- name: Check if PRs have conflicts
uses: eps1lon/actions-label-merge-conflict@v3
if: github.repository == ${{ vars.REPO_MAIN }}
if: github.repository == ${{ vars.REPO_MAIN }} && ${{secrets.MERGE_CONFLICT_LABEL_PAT}}
with:
dirtyLabel: "merge-conflicts"
repoToken: "${{ secrets.MERGE_CONFLICT_LABEL_PAT }}"

View File

@@ -1,4 +1,6 @@
name: Deploy Documentation
# GitHub Actions workflow for deploying MkDocs documentation to Cloudflare Pages
# This workflow builds and deploys your MkDocs site when changes are pushed to main
name: Deploy MkDocs Documentation
on:
# Trigger on push to main branch
@@ -9,8 +11,11 @@ on:
# Only run when docs files change
paths:
- 'docs/**'
- 'apps/edit-docs/**'
- 'packages/share-theme/**'
- 'README.md' # README is synced to docs/index.md
- 'mkdocs.yml'
- 'requirements-docs.txt'
- '.github/workflows/deploy-docs.yml'
- 'scripts/fix-mkdocs-structure.ts'
# Allow manual triggering from Actions tab
workflow_dispatch:
@@ -22,12 +27,15 @@ on:
- master
paths:
- 'docs/**'
- 'apps/edit-docs/**'
- 'packages/share-theme/**'
- 'README.md' # README is synced to docs/index.md
- 'mkdocs.yml'
- 'requirements-docs.txt'
- '.github/workflows/deploy-docs.yml'
- 'scripts/fix-mkdocs-structure.ts'
jobs:
build-and-deploy:
name: Build and Deploy Documentation
name: Build and Deploy MkDocs
runs-on: ubuntu-latest
timeout-minutes: 10
@@ -41,29 +49,76 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v5
with:
fetch-depth: 0 # Fetch all history for git info and mkdocs-git-revision-date plugin
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.14'
cache: 'pip'
cache-dependency-path: 'requirements-docs.txt'
- name: Install MkDocs and Dependencies
run: |
pip install --upgrade pip
pip install -r requirements-docs.txt
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
# Setup pnpm before fixing docs structure
- name: Setup pnpm
uses: pnpm/action-setup@v4
# Setup Node.js with pnpm
- name: Setup Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@v5
with:
node-version: '24'
node-version: '22'
cache: 'pnpm'
# Install Node.js dependencies for the TypeScript script
- name: Install Dependencies
run: pnpm install --frozen-lockfile
run: |
pnpm install --frozen-lockfile
- name: Trigger build of documentation
run: pnpm docs:build
- name: Fix Documentation Structure
run: |
# Fix duplicate navigation entries by moving overview pages to index.md
pnpm run chore:fix-mkdocs-structure
- name: Build MkDocs Site
run: |
# Build with strict mode but allow expected warnings
mkdocs build --verbose || {
EXIT_CODE=$?
# Check if the only issue is expected warnings
if mkdocs build 2>&1 | grep -E "WARNING.*(README|not found)" && \
[ $(mkdocs build 2>&1 | grep -c "ERROR") -eq 0 ]; then
echo "✅ Build succeeded with expected warnings"
mkdocs build --verbose
else
echo "❌ Build failed with unexpected errors"
exit $EXIT_CODE
fi
}
- name: Fix HTML Links
run: |
# Remove .md extensions from links in generated HTML
pnpm tsx ./scripts/fix-html-links.ts site
- name: Validate Built Site
run: |
# Basic validation that important files exist
test -f site/index.html || (echo "ERROR: site/index.html not found" && exit 1)
test -f site/sitemap.xml || (echo "ERROR: site/sitemap.xml not found" && exit 1)
test -d site/assets || (echo "ERROR: site/assets directory not found" && exit 1)
echo "✅ Site validation passed"
- name: Deploy
uses: ./.github/actions/deploy-to-cloudflare-pages
if: github.repository == ${{ vars.REPO_MAIN }}
if: github.repository == ${{ vars.REPO_MAIN }} && ${{secrets.CLOUDFLARE_API_TOKEN}}
with:
project_name: "trilium-docs"
comment_body: "📚 Documentation preview is ready"

View File

@@ -28,9 +28,9 @@ jobs:
- uses: pnpm/action-setup@v4
- name: Set up node & dependencies
uses: actions/setup-node@v6
uses: actions/setup-node@v5
with:
node-version: 24
node-version: 22
cache: "pnpm"
- run: pnpm install --frozen-lockfile

View File

@@ -44,9 +44,9 @@ jobs:
- uses: pnpm/action-setup@v4
- name: Set up node & dependencies
uses: actions/setup-node@v6
uses: actions/setup-node@v5
with:
node-version: 24
node-version: 22
cache: "pnpm"
- name: Install npm dependencies
@@ -86,12 +86,12 @@ jobs:
- name: Upload Playwright trace
if: failure()
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v4
with:
name: Playwright trace (${{ matrix.dockerfile }})
path: test-output/playwright/output
- uses: actions/upload-artifact@v5
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: Playwright report (${{ matrix.dockerfile }})
@@ -144,9 +144,9 @@ jobs:
uses: actions/checkout@v5
- uses: pnpm/action-setup@v4
- name: Set up node & dependencies
uses: actions/setup-node@v6
uses: actions/setup-node@v5
with:
node-version: 24
node-version: 22
cache: 'pnpm'
- name: Install dependencies
@@ -209,7 +209,7 @@ jobs:
touch "/tmp/digests/${digest#sha256:}"
- name: Upload digest
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v4
with:
name: digests-${{ env.PLATFORM_PAIR }}-${{ matrix.dockerfile }}
path: /tmp/digests/*
@@ -223,7 +223,7 @@ jobs:
- build
steps:
- name: Download digests
uses: actions/download-artifact@v6
uses: actions/download-artifact@v5
with:
path: /tmp/digests
pattern: digests-*

View File

@@ -50,9 +50,9 @@ jobs:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v4
- name: Set up node & dependencies
uses: actions/setup-node@v6
uses: actions/setup-node@v5
with:
node-version: 24
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
@@ -77,7 +77,7 @@ jobs:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGN_KEY }}
- name: Publish release
uses: softprops/action-gh-release@v2.4.1
uses: softprops/action-gh-release@v2.4.0
if: ${{ github.event_name != 'pull_request' }}
with:
make_latest: false
@@ -89,7 +89,7 @@ jobs:
name: Nightly Build
- name: Publish artifacts
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v4
if: ${{ github.event_name == 'pull_request' }}
with:
name: TriliumNotes ${{ matrix.os.name }} ${{ matrix.arch }}
@@ -118,7 +118,7 @@ jobs:
arch: ${{ matrix.arch }}
- name: Publish release
uses: softprops/action-gh-release@v2.4.1
uses: softprops/action-gh-release@v2.4.0
if: ${{ github.event_name != 'pull_request' }}
with:
make_latest: false

View File

@@ -22,9 +22,9 @@ jobs:
fetch-depth: 0
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
- uses: actions/setup-node@v5
with:
node-version: 24
node-version: 22
cache: 'pnpm'
- name: Install dependencies
@@ -35,7 +35,7 @@ jobs:
- name: Upload test report
if: failure()
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v4
with:
name: e2e report
path: apps/server-e2e/test-output

View File

@@ -48,9 +48,9 @@ jobs:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v4
- name: Set up node & dependencies
uses: actions/setup-node@v6
uses: actions/setup-node@v5
with:
node-version: 24
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
@@ -73,7 +73,7 @@ jobs:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGN_KEY }}
- name: Upload the artifact
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v4
with:
name: release-desktop-${{ matrix.os.name }}-${{ matrix.arch }}
path: apps/desktop/upload/*.*
@@ -100,7 +100,7 @@ jobs:
arch: ${{ matrix.arch }}
- name: Upload the artifact
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v4
with:
name: release-server-linux-${{ matrix.arch }}
path: upload/*.*
@@ -120,14 +120,14 @@ jobs:
docs/Release Notes
- name: Download all artifacts
uses: actions/download-artifact@v6
uses: actions/download-artifact@v5
with:
merge-multiple: true
pattern: release-*
path: upload
- name: Publish stable release
uses: softprops/action-gh-release@v2.4.1
uses: softprops/action-gh-release@v2.4.0
with:
draft: false
body_path: docs/Release Notes/Release Notes/${{ github.ref_name }}.md

View File

@@ -28,9 +28,9 @@ jobs:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v4
- name: Set up node & dependencies
uses: actions/setup-node@v6
uses: actions/setup-node@v5
with:
node-version: 24
node-version: 22
cache: "pnpm"
- name: Install dependencies

2
.nvmrc
View File

@@ -1 +1 @@
22.21.0
22.20.0

View File

@@ -14,7 +14,6 @@ usageMatchRegex:
# the `{key}` will be placed by a proper keypath matching regex,
# you can ignore it and use your own matching rules as well
- "[^\\w\\d]t\\(['\"`]({key})['\"`]"
- <Trans\s*i18nKey="({key})"[^>]*>
# A RegEx to set a custom scope range. This scope will be used as a prefix when detecting keys
# and works like how the i18next framework identifies the namespace scope from the

View File

@@ -5,8 +5,7 @@
"i18n-ally.keystyle": "nested",
"i18n-ally.localesPaths": [
"apps/server/src/assets/translations",
"apps/client/src/translations",
"apps/website/public/translations"
"apps/client/src/translations"
],
"npm.exclude": [
"**/dist",

View File

@@ -1,14 +1,3 @@
<div align="center">
<sup>Special thanks to:</sup><br />
<a href="https://go.warp.dev/Trilium" target="_blank">
<img alt="Warp sponsorship" width="400" src="https://github.com/warpdotdev/brand-assets/blob/main/Github/Sponsor/Warp-Github-LG-03.png"><br />
Warp, built for coding with multiple AI agents<br />
</a>
<sup>Available for macOS, Linux and Windows</sup>
</div>
<hr />
# Trilium Notes
![GitHub Sponsors](https://img.shields.io/github/sponsors/eliandoran) ![LiberaPay patrons](https://img.shields.io/liberapay/patrons/ElianDoran)
@@ -24,10 +13,6 @@ See [screenshots](https://triliumnext.github.io/Docs/Wiki/screenshot-tour) for q
<a href="https://triliumnext.github.io/Docs/Wiki/screenshot-tour"><img src="./docs/app.png" alt="Trilium Screenshot" width="1000"></a>
## ⏬ Download
- [Latest release](https://github.com/TriliumNext/Trilium/releases/latest) stable version, recommended for most users.
- [Nightly build](https://github.com/TriliumNext/Trilium/releases/tag/nightly) unstable development version, updated daily with the latest features and fixes.
## 📚 Documentation
**Visit our comprehensive documentation at [docs.triliumnotes.org](https://docs.triliumnotes.org/)**

View File

@@ -35,13 +35,13 @@
"chore:generate-openapi": "tsx bin/generate-openapi.js"
},
"devDependencies": {
"@playwright/test": "1.56.1",
"@stylistic/eslint-plugin": "5.5.0",
"@types/express": "5.0.5",
"@types/node": "24.9.1",
"@types/yargs": "17.0.34",
"@playwright/test": "1.56.0",
"@stylistic/eslint-plugin": "5.4.0",
"@types/express": "5.0.3",
"@types/node": "22.18.9",
"@types/yargs": "17.0.33",
"@vitest/coverage-v8": "3.2.4",
"eslint": "9.38.0",
"eslint": "9.37.0",
"eslint-plugin-simple-import-sort": "12.1.1",
"esm": "3.2.25",
"jsdoc": "4.0.5",
@@ -49,8 +49,8 @@
"rcedit": "4.0.1",
"rimraf": "6.0.1",
"tslib": "2.8.1",
"typedoc": "0.28.14",
"typedoc-plugin-missing-exports": "4.1.2"
"typedoc": "0.28.13",
"typedoc-plugin-missing-exports": "4.1.0"
},
"optionalDependencies": {
"appdmg": "0.6.6"

View File

@@ -1,3 +1,4 @@
import type child_process from "child_process";
import { describe, beforeAll, afterAll } from "vitest";
let etapiAuthToken: string | undefined;
@@ -11,6 +12,8 @@ type SpecDefinitionsFunc = () => void;
function describeEtapi(description: string, specDefinitions: SpecDefinitionsFunc): void {
describe(description, () => {
let appProcess: ReturnType<typeof child_process.spawn>;
beforeAll(async () => {});
afterAll(() => {});

View File

@@ -1,6 +1,6 @@
{
"name": "@triliumnext/client",
"version": "0.99.3",
"version": "0.99.1",
"description": "JQuery-based client for TriliumNext, used for both web and desktop (via Electron)",
"private": true,
"license": "AGPL-3.0-only",
@@ -15,7 +15,7 @@
"circular-deps": "dpdm -T src/**/*.ts --tree=false --warning=false --skip-dynamic-imports=circular"
},
"dependencies": {
"@eslint/js": "9.38.0",
"@eslint/js": "9.37.0",
"@excalidraw/excalidraw": "0.18.0",
"@fullcalendar/core": "6.1.19",
"@fullcalendar/daygrid": "6.1.19",
@@ -32,35 +32,33 @@
"@triliumnext/commons": "workspace:*",
"@triliumnext/highlightjs": "workspace:*",
"@triliumnext/share-theme": "workspace:*",
"@triliumnext/split.js": "workspace:*",
"autocomplete.js": "0.38.1",
"bootstrap": "5.3.8",
"boxicons": "2.1.4",
"color": "5.0.2",
"dayjs": "1.11.18",
"dayjs-plugin-utc": "0.1.2",
"debounce": "2.2.0",
"draggabilly": "3.0.0",
"force-graph": "1.51.0",
"globals": "16.4.0",
"i18next": "25.6.0",
"i18next": "25.5.3",
"i18next-http-backend": "3.0.2",
"jquery": "3.7.1",
"jquery.fancytree": "2.38.5",
"jsplumb": "2.15.6",
"katex": "0.16.25",
"katex": "0.16.23",
"knockout": "3.5.1",
"leaflet": "1.9.4",
"leaflet-gpx": "2.2.0",
"mark.js": "8.11.1",
"marked": "16.4.1",
"mermaid": "11.12.1",
"mind-elixir": "5.3.4",
"marked": "16.4.0",
"mermaid": "11.12.0",
"mind-elixir": "5.3.2",
"normalize.css": "8.0.1",
"panzoom": "9.4.3",
"preact": "10.27.2",
"react-i18next": "16.2.1",
"reveal.js": "5.2.1",
"react-i18next": "16.0.0",
"split.js": "1.6.5",
"svg-pan-zoom": "3.6.2",
"tabulator-tables": "6.3.1",
"vanilla-js-wheel-zoom": "9.0.4"
@@ -70,14 +68,13 @@
"@preact/preset-vite": "2.10.2",
"@types/bootstrap": "5.2.10",
"@types/jquery": "3.5.33",
"@types/leaflet": "1.9.21",
"@types/leaflet": "1.9.20",
"@types/leaflet-gpx": "1.3.8",
"@types/mark.js": "8.11.12",
"@types/reveal.js": "5.2.1",
"@types/tabulator-tables": "6.3.0",
"@types/tabulator-tables": "6.2.11",
"copy-webpack-plugin": "13.0.1",
"happy-dom": "20.0.8",
"happy-dom": "20.0.0",
"script-loader": "0.7.2",
"vite-plugin-static-copy": "3.1.4"
"vite-plugin-static-copy": "3.1.3"
}
}

View File

@@ -218,12 +218,12 @@ export type CommandMappings = {
/** Works only in the electron context menu. */
replaceMisspelling: CommandData;
importMarkdownInline: CommandData;
showPasswordNotSet: CommandData;
showProtectedSessionPasswordDialog: CommandData;
showUploadAttachmentsDialog: CommandData & { noteId: string };
showIncludeNoteDialog: CommandData & { textTypeWidget: EditableTextTypeWidget };
showAddLinkDialog: CommandData & { textTypeWidget: EditableTextTypeWidget, text: string };
showPasteMarkdownDialog: CommandData & { textTypeWidget: EditableTextTypeWidget };
closeProtectedSessionPasswordDialog: CommandData;
copyImageReferenceToClipboard: CommandData;
copyImageToClipboard: CommandData;

View File

@@ -326,11 +326,9 @@ class NoteContext extends Component implements EventListener<"entitiesReloaded">
}
// Collections must always display a note list, even if no children.
if (note.type === "book") {
const viewType = note.getLabelValue("viewType") ?? "grid";
if (!["list", "grid"].includes(viewType)) {
return true;
}
const viewType = note.getLabelValue("viewType") ?? "grid";
if (!["list", "grid"].includes(viewType)) {
return true;
}
if (!note.hasChildren()) {
@@ -440,22 +438,4 @@ class NoteContext extends Component implements EventListener<"entitiesReloaded">
}
}
export function openInCurrentNoteContext(evt: MouseEvent | JQuery.ClickEvent | JQuery.MouseDownEvent | React.PointerEvent<HTMLCanvasElement> | null, notePath: string, viewScope?: ViewScope) {
const ntxId = $(evt?.target as Element)
.closest("[data-ntx-id]")
.attr("data-ntx-id");
const noteContext = ntxId ? appContext.tabManager.getNoteContextById(ntxId) : appContext.tabManager.getActiveContext();
if (noteContext) {
noteContext.setNote(notePath, { viewScope }).then(() => {
if (noteContext !== appContext.tabManager.getActiveContext()) {
appContext.tabManager.activateNoteContext(noteContext.ntxId);
}
});
} else {
appContext.tabManager.openContextWithNote(notePath, { viewScope, activate: true });
}
}
export default NoteContext;

View File

@@ -1,5 +1,6 @@
import server from "../services/server.js";
import noteAttributeCache from "../services/note_attribute_cache.js";
import ws from "../services/ws.js";
import protectedSessionHolder from "../services/protected_session_holder.js";
import cssClassManager from "../services/css_class_manager.js";
import type { Froca } from "../services/froca-interface.js";
@@ -585,7 +586,7 @@ export default class FNote {
let childBranches = this.getChildBranches();
if (!childBranches) {
console.error(`No children for '${this.noteId}'. This shouldn't happen.`);
ws.logError(`No children for '${this.noteId}'. This shouldn't happen.`);
return [];
}

View File

@@ -138,7 +138,7 @@ export default class DesktopLayout {
.child(new PromotedAttributesWidget())
.child(<SqlTableSchemas />)
.child(new NoteDetailWidget())
.child(<NoteList media="screen" />)
.child(<NoteList />)
.child(<SearchResult />)
.child(<SqlResults />)
.child(<ScrollPadding />)

View File

@@ -29,9 +29,8 @@ import PromotedAttributesWidget from "../widgets/promoted_attributes.js";
import NoteDetailWidget from "../widgets/note_detail.js";
import CallToActionDialog from "../widgets/dialogs/call_to_action.jsx";
import NoteTitleWidget from "../widgets/note_title.jsx";
import FormattingToolbar from "../widgets/ribbon/FormattingToolbar.js";
import { PopupEditorFormattingToolbar } from "../widgets/ribbon/FormattingToolbar.js";
import NoteList from "../widgets/collections/NoteList.jsx";
import StandaloneRibbonAdapter from "../widgets/ribbon/components/StandaloneRibbonAdapter.jsx";
export function applyModals(rootContainer: RootContainer) {
rootContainer
@@ -64,9 +63,9 @@ export function applyModals(rootContainer: RootContainer) {
.cssBlock(".title-row > * { margin: 5px; }")
.child(<NoteIconWidget />)
.child(<NoteTitleWidget />))
.child(<StandaloneRibbonAdapter component={FormattingToolbar} />)
.child(<PopupEditorFormattingToolbar />)
.child(new PromotedAttributesWidget())
.child(new NoteDetailWidget())
.child(<NoteList media="screen" displayOnlyCollections />))
.child(<NoteList displayOnlyCollections />))
.child(<CallToActionDialog />);
}

View File

@@ -24,9 +24,6 @@ import CloseZenModeButton from "../widgets/close_zen_button.js";
import NoteWrapperWidget from "../widgets/note_wrapper.js";
import MobileDetailMenu from "../widgets/mobile_widgets/mobile_detail_menu.js";
import NoteList from "../widgets/collections/NoteList.jsx";
import StandaloneRibbonAdapter from "../widgets/ribbon/components/StandaloneRibbonAdapter.jsx";
import SearchDefinitionTab from "../widgets/ribbon/SearchDefinitionTab.jsx";
import SearchResult from "../widgets/search_result.jsx";
const MOBILE_CSS = `
<style>
@@ -157,9 +154,7 @@ export default class MobileLayout {
.filling()
.contentSized()
.child(new NoteDetailWidget())
.child(<NoteList media="screen" />)
.child(<StandaloneRibbonAdapter component={SearchDefinitionTab} />)
.child(<SearchResult />)
.child(<NoteList />)
.child(<FilePropertiesWrapper />)
)
.child(<MobileEditorToolbar />)

View File

@@ -1,155 +0,0 @@
:root {
--print-font-size: 11pt;
--ck-content-color-image-caption-background: transparent !important;
}
html,
body {
width: 100%;
height: 100%;
color: black;
}
@page {
margin: 2cm;
}
.note-list-widget.full-height,
.note-list-widget.full-height .note-list-widget-content {
height: unset !important;
}
.component {
contain: none !important;
}
body[data-note-type="text"] .ck-content {
font-size: var(--print-font-size);
text-align: justify;
}
.ck-content figcaption {
font-style: italic;
}
.ck-content a {
text-decoration: none;
}
.ck-content a:not([href^="#root/"]) {
text-decoration: underline;
color: #374a75;
}
.ck-content .todo-list__label * {
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
@supports selector(.todo-list__label__description:has(*)) and (height: 1lh) {
.ck-content .todo-list__label__description {
/* The percentage of the line height that the check box occupies */
--box-ratio: 0.75;
/* The size of the gap between the check box and the caption */
--box-text-gap: 0.25em;
--box-size: calc(1lh * var(--box-ratio));
--box-vert-offset: calc((1lh - var(--box-size)) / 2);
display: inline-block;
padding-inline-start: calc(var(--box-size) + var(--box-text-gap));
/* Source: https://pictogrammers.com/library/mdi/icon/checkbox-blank-outline/ */
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3e%3cpath d='M19%2c3H5C3.89%2c3 3%2c3.89 3%2c5V19A2%2c2 0 0%2c0 5%2c21H19A2%2c2 0 0%2c0 21%2c19V5C21%2c3.89 20.1%2c3 19%2c3M19%2c5V19H5V5H19Z' /%3e%3c/svg%3e");
background-position: 0 var(--box-vert-offset);
background-size: var(--box-size);
background-repeat: no-repeat;
}
.ck-content .todo-list__label:has(input[type="checkbox"]:checked) .todo-list__label__description {
/* Source: https://pictogrammers.com/library/mdi/icon/checkbox-outline/ */
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3e%3cpath d='M19%2c3H5A2%2c2 0 0%2c0 3%2c5V19A2%2c2 0 0%2c0 5%2c21H19A2%2c2 0 0%2c0 21%2c19V5A2%2c2 0 0%2c0 19%2c3M19%2c5V19H5V5H19M10%2c17L6%2c13L7.41%2c11.58L10%2c14.17L16.59%2c7.58L18%2c9' /%3e%3c/svg%3e");
}
.ck-content .todo-list__label input[type="checkbox"] {
display: none !important;
}
}
/* #region Footnotes */
.footnote-reference a,
.footnote-back-link a {
text-decoration: none !important;
}
li.footnote-item {
position: relative;
width: fit-content;
}
.ck-content .footnote-back-link {
margin-right: 0.25em;
}
.ck-content .footnote-content {
display: inline-block;
width: unset;
}
/* #endregion */
/* #region Widows and orphans */
p,
blockquote {
widows: 4;
orphans: 4;
}
pre > code {
widows: 6;
orphans: 6;
overflow: auto;
white-space: pre-wrap !important;
}
h1,
h2,
h3,
h4,
h5,
h6 {
page-break-after: avoid;
break-after: avoid;
}
/* #endregion */
/* #region Tables */
.table thead th,
.table td,
.table th {
/* Fix center vertical alignment of table cells */
vertical-align: middle;
}
pre {
box-shadow: unset !important;
border: 0.75pt solid gray !important;
border-radius: 2pt !important;
}
th,
span[style] {
print-color-adjust: exact;
-webkit-print-color-adjust: exact;
}
/* #endregion */
/* #region Page breaks */
.page-break {
page-break-after: always;
break-after: always;
}
.page-break > *,
.page-break::after {
display: none !important;
}
/* #endregion */

View File

@@ -1,105 +0,0 @@
import FNote from "./entities/fnote";
import { render } from "preact";
import { CustomNoteList } from "./widgets/collections/NoteList";
import { useCallback, useLayoutEffect, useRef } from "preact/hooks";
import content_renderer from "./services/content_renderer";
interface RendererProps {
note: FNote;
onReady: () => void;
}
async function main() {
const notePath = window.location.hash.substring(1);
const noteId = notePath.split("/").at(-1);
if (!noteId) return;
await import("./print.css");
const froca = (await import("./services/froca")).default;
const note = await froca.getNote(noteId);
render(<App note={note} noteId={noteId} />, document.body);
}
function App({ note, noteId }: { note: FNote | null | undefined, noteId: string }) {
const sentReadyEvent = useRef(false);
const onReady = useCallback(() => {
if (sentReadyEvent.current) return;
window.dispatchEvent(new Event("note-ready"));
window._noteReady = true;
sentReadyEvent.current = true;
}, []);
const props: RendererProps | undefined | null = note && { note, onReady };
if (!note || !props) return <Error404 noteId={noteId} />
useLayoutEffect(() => {
document.body.dataset.noteType = note.type;
}, [ note ]);
return (
<>
{note.type === "book"
? <CollectionRenderer {...props} />
: <SingleNoteRenderer {...props} />
}
</>
);
}
function SingleNoteRenderer({ note, onReady }: RendererProps) {
const containerRef = useRef<HTMLDivElement>(null);
useLayoutEffect(() => {
async function load() {
if (note.type === "text") {
await import("@triliumnext/ckeditor5/src/theme/ck-content.css");
}
const { $renderedContent } = await content_renderer.getRenderedContent(note, { noChildrenList: true });
const container = containerRef.current!;
container.replaceChildren(...$renderedContent);
// Wait for all images to load.
const images = Array.from(container.querySelectorAll("img"));
await Promise.all(
images.map(img => {
if (img.complete) return Promise.resolve();
return new Promise<void>(resolve => {
img.addEventListener("load", () => resolve(), { once: true });
img.addEventListener("error", () => resolve(), { once: true });
});
})
);
}
load().then(() => requestAnimationFrame(onReady))
}, [ note ]);
return <>
<h1>{note.title}</h1>
<main ref={containerRef} />
</>;
}
function CollectionRenderer({ note, onReady }: RendererProps) {
return <CustomNoteList
isEnabled
note={note}
notePath={note.getBestNotePath().join("/")}
ntxId="print"
highlightedTokens={null}
media="print"
onReady={onReady}
/>;
}
function Error404({ noteId }: { noteId: string }) {
return (
<main>
<p>The note you are trying to print could not be found.</p>
<small>{noteId}</small>
</main>
)
}
main();

View File

@@ -23,13 +23,11 @@ interface Options {
tooltip?: boolean;
trim?: boolean;
imageHasZoom?: boolean;
/** If enabled, it will prevent the default behavior in which an empty note would display a list of children. */
noChildrenList?: boolean;
}
const CODE_MIME_TYPES = new Set(["application/json"]);
export async function getRenderedContent(this: {} | { ctx: string }, entity: FNote | FAttachment, options: Options = {}) {
async function getRenderedContent(this: {} | { ctx: string }, entity: FNote | FAttachment, options: Options = {}) {
options = Object.assign(
{
@@ -44,7 +42,7 @@ export async function getRenderedContent(this: {} | { ctx: string }, entity: FNo
const $renderedContent = $('<div class="rendered-content">');
if (type === "text" || type === "book") {
await renderText(entity, $renderedContent, options);
await renderText(entity, $renderedContent);
} else if (type === "code") {
await renderCode(entity, $renderedContent);
} else if (["image", "canvas", "mindMap"].includes(type)) {
@@ -116,7 +114,7 @@ export async function getRenderedContent(this: {} | { ctx: string }, entity: FNo
};
}
async function renderText(note: FNote | FAttachment, $renderedContent: JQuery<HTMLElement>, options: Options = {}) {
async function renderText(note: FNote | FAttachment, $renderedContent: JQuery<HTMLElement>) {
// entity must be FNote
const blob = await note.getBlob();
@@ -137,7 +135,7 @@ async function renderText(note: FNote | FAttachment, $renderedContent: JQuery<HT
}
await formatCodeBlocks($renderedContent);
} else if (note instanceof FNote && !options.noChildrenList) {
} else if (note instanceof FNote) {
await renderChildrenList($renderedContent, note);
}
}

View File

@@ -1,39 +1,21 @@
import {readCssVar} from "../utils/css-var";
import Color, { ColorInstance } from "color";
const registeredClasses = new Set<string>();
// Read the color lightness limits defined in the theme as CSS variables
function createClassForColor(color: string | null) {
if (!color?.trim()) {
return "";
}
const lightThemeColorMaxLightness = readCssVar(
document.documentElement,
"tree-item-light-theme-max-color-lightness"
).asNumber(70);
const normalizedColorName = color.replace(/[^a-z0-9]/gi, "");
const darkThemeColorMinLightness = readCssVar(
document.documentElement,
"tree-item-dark-theme-min-color-lightness"
).asNumber(50);
if (!normalizedColorName.trim()) {
return "";
}
function createClassForColor(colorString: string | null) {
if (!colorString?.trim()) return "";
const color = parseColor(colorString);
if (!color) return "";
const className = `color-${color.hex().substring(1)}`;
const className = `color-${normalizedColorName}`;
if (!registeredClasses.has(className)) {
const adjustedColor = adjustColorLightness(color, lightThemeColorMaxLightness!,
darkThemeColorMinLightness!);
$("head").append(`<style>
.${className}, span.fancytree-active.${className} {
--light-theme-custom-color: ${adjustedColor.lightThemeColor};
--dark-theme-custom-color: ${adjustedColor.darkThemeColor};
--custom-color-hue: ${getHue(color) ?? 'unset'};
}
</style>`);
// make the active fancytree selector more specific than the normal color setting
$("head").append(`<style>.${className}, span.fancytree-active.${className} { color: ${color} !important; }</style>`);
registeredClasses.add(className);
}
@@ -41,41 +23,6 @@ function createClassForColor(colorString: string | null) {
return className;
}
function parseColor(color: string) {
try {
return Color(color);
} catch (ex) {
console.error(ex);
}
}
/**
* Returns a pair of colors — one optimized for light themes and the other for dark themes, derived
* from the specified color to maintain sufficient contrast with each theme.
* The adjustment is performed by limiting the colors lightness in the CIELAB color space,
* according to the lightThemeMaxLightness and darkThemeMinLightness parameters.
*/
function adjustColorLightness(color: ColorInstance, lightThemeMaxLightness: number, darkThemeMinLightness: number) {
const labColor = color.lab();
const lightness = labColor.l();
// For the light theme, limit the maximum lightness
const lightThemeColor = labColor.l(Math.min(lightness, lightThemeMaxLightness)).hex();
// For the dark theme, limit the minimum lightness
const darkThemeColor = labColor.l(Math.max(lightness, darkThemeMinLightness)).hex();
return {lightThemeColor, darkThemeColor};
}
/** Returns the hue of the specified color, or undefined if the color is grayscale. */
function getHue(color: ColorInstance) {
const hslColor = color.hsl();
if (hslColor.saturationl() > 0) {
return hslColor.hue();
}
}
export default {
createClassForColor
};

View File

@@ -40,23 +40,20 @@ class FrocaImpl implements Froca {
constructor() {
this.initializedPromise = this.loadInitialTree();
this.#clear();
}
async loadInitialTree() {
const resp = await server.get<SubtreeResponse>("tree");
// clear the cache only directly before adding new content which is important for e.g., switching to protected session
this.#clear();
this.addResp(resp);
}
#clear() {
this.notes = {};
this.branches = {};
this.attributes = {};
this.attachments = {};
this.blobPromises = {};
this.addResp(resp);
}
async loadSubTree(subTreeNoteId: string) {

View File

@@ -20,6 +20,9 @@ function setupGlobs() {
window.glob.froca = froca;
window.glob.treeCache = froca; // compatibility for CKEditor builds for a while
// for CKEditor integration (button on block toolbar)
window.glob.importMarkdownInline = async () => appContext.triggerCommand("importMarkdownInline");
window.onerror = function (msg, url, lineNo, columnNo, error) {
const string = String(msg).toLowerCase();

View File

@@ -27,8 +27,7 @@ export const byBookType: Record<ViewTypeOptions, string | null> = {
calendar: "xWbu3jpNWapp",
table: "2FvYrpmOXm29",
geoMap: "81SGnPGMk7Xc",
board: "CtBQqbwXDx1w",
presentation: null
board: "CtBQqbwXDx1w"
};
export function getHelpUrlForNote(note: FNote | null | undefined) {

View File

@@ -4,7 +4,6 @@ import appContext, { type NoteCommandData } from "../components/app_context.js";
import froca from "./froca.js";
import utils from "./utils.js";
import { ALLOWED_PROTOCOLS } from "@triliumnext/commons";
import { openInCurrentNoteContext } from "../components/note_context.js";
function getNotePathFromUrl(url: string) {
const notePathMatch = /#(root[A-Za-z0-9_/]*)$/.exec(url);
@@ -317,7 +316,21 @@ function goToLinkExt(evt: MouseEvent | JQuery.ClickEvent | JQuery.MouseDownEvent
viewScope
});
} else if (isLeftClick) {
openInCurrentNoteContext(evt, notePath, viewScope);
const ntxId = $(evt?.target as any)
.closest("[data-ntx-id]")
.attr("data-ntx-id");
const noteContext = ntxId ? appContext.tabManager.getNoteContextById(ntxId) : appContext.tabManager.getActiveContext();
if (noteContext) {
noteContext.setNote(notePath, { viewScope }).then(() => {
if (noteContext !== appContext.tabManager.getActiveContext()) {
appContext.tabManager.activateNoteContext(noteContext.ntxId);
}
});
} else {
appContext.tabManager.openContextWithNote(notePath, { viewScope, activate: true });
}
}
} else if (hrefLink) {
const withinEditLink = $link?.hasClass("ck-link-actions__preview");

View File

@@ -168,8 +168,7 @@ async function getBuiltInTemplates(title: string | null, command: TreeCommandNam
}
for (const templateNote of childNotes) {
if (templateNote.hasLabel("collection") !== filterCollections ||
!templateNote.hasLabel("template")) {
if (templateNote.hasLabel("collection") !== filterCollections) {
continue;
}

View File

@@ -1,5 +1,5 @@
import options from "./options.js";
import Split from "@triliumnext/split.js";
import Split from "split.js"
export const DEFAULT_GUTTER_SIZE = 5;
@@ -46,7 +46,6 @@ function setupLeftPaneResizer(leftPaneVisible: boolean) {
sizes: [leftPaneWidth, restPaneWidth],
gutterSize: DEFAULT_GUTTER_SIZE,
minSize: [150, 300],
rtl: glob.isRtl,
onDragEnd: (sizes) => {
leftPaneWidth = Math.round(sizes[0]);
options.save("leftPaneWidth", Math.round(sizes[0]));
@@ -80,7 +79,6 @@ function setupRightPaneResizer() {
sizes: [100 - rightPaneWidth, rightPaneWidth],
gutterSize: DEFAULT_GUTTER_SIZE,
minSize: [300, 180],
rtl: glob.isRtl,
onDragEnd: (sizes) => {
rightPaneWidth = Math.round(sizes[1]);
options.save("rightPaneWidth", Math.round(sizes[1]));
@@ -101,7 +99,7 @@ function setupNoteSplitResizer(ntxIds: string[]) {
let targetNtxIds: string[] | undefined;
for (const ntxId of ntxIds) {
targetNtxIds = findKeyByNtxId(ntxId);
if (targetNtxIds) break;
if (targetNtxIds) break;
}
if (targetNtxIds) {
@@ -156,7 +154,6 @@ function createSplitInstance(targetNtxIds: string[]) {
const splitPanels = [...splitNoteContainer.querySelectorAll<HTMLElement>(':scope > .note-split')]
.filter(el => targetNtxIds.includes(el.getAttribute('data-ntx-id') ?? ""));
const splitInstance = Split(splitPanels, {
rtl: glob.isRtl,
gutterSize: DEFAULT_GUTTER_SIZE,
minSize: 150,
});

View File

@@ -61,11 +61,7 @@ export async function applySingleBlockSyntaxHighlight($codeBlock: JQuery<HTMLEle
highlightedText = highlightAuto(text);
} else if (normalizedMimeType) {
await ensureMimeTypesForHighlighting(normalizedMimeType);
try {
highlightedText = highlight(text, { language: normalizedMimeType });
} catch (e) {
console.warn("Unable to apply syntax highlight.", e);
}
highlightedText = highlight(text, { language: normalizedMimeType });
}
if (highlightedText) {
@@ -80,7 +76,7 @@ export async function ensureMimeTypesForHighlighting(mimeTypeHint?: string) {
// Load theme.
const currentThemeName = String(options.get("codeBlockTheme"));
await loadHighlightingTheme(currentThemeName);
loadHighlightingTheme(currentThemeName);
// Load mime types.
let mimeTypes: MimeType[];
@@ -102,16 +98,17 @@ export async function ensureMimeTypesForHighlighting(mimeTypeHint?: string) {
highlightingLoaded = true;
}
export async function loadHighlightingTheme(themeName: string) {
export function loadHighlightingTheme(themeName: string) {
const themePrefix = "default:";
let theme: Theme | null = null;
if (glob.device === "print") {
theme = Themes.vs;
} else if (themeName.includes(themePrefix)) {
if (themeName.includes(themePrefix)) {
theme = Themes[themeName.substring(themePrefix.length)];
}
if (!theme) {
theme = Themes.default;
}
await loadTheme(theme ?? Themes.default);
loadTheme(theme);
}
/**

View File

@@ -4,6 +4,9 @@ import froca from "./froca.js";
import hoistedNoteService from "./hoisted_note.js";
import appContext from "../components/app_context.js";
/**
* @returns {string|null}
*/
async function resolveNotePath(notePath: string, hoistedNoteId = "root") {
const runPath = await resolveNotePathToSegments(notePath, hoistedNoteId);

View File

@@ -304,8 +304,6 @@ async function sendPing() {
}
setTimeout(() => {
if (glob.device === "print") return;
ws = connectWebSocket();
lastPingTs = Date.now();

84
apps/client/src/share.ts Normal file
View File

@@ -0,0 +1,84 @@
import "normalize.css";
import "boxicons/css/boxicons.min.css";
import "@triliumnext/ckeditor5/src/theme/ck-content.css";
import "@triliumnext/share-theme/styles/index.css";
import "@triliumnext/share-theme/scripts/index.js";
async function ensureJQuery() {
const $ = (await import("jquery")).default;
(window as any).$ = $;
}
async function applyMath() {
const anyMathBlock = document.querySelector("#content .math-tex");
if (!anyMathBlock) {
return;
}
const renderMathInElement = (await import("./services/math.js")).renderMathInElement;
renderMathInElement(document.getElementById("content"));
}
async function formatCodeBlocks() {
const anyCodeBlock = document.querySelector("#content pre");
if (!anyCodeBlock) {
return;
}
await ensureJQuery();
const { formatCodeBlocks } = await import("./services/syntax_highlight.js");
await formatCodeBlocks($("#content"));
}
async function setupTextNote() {
formatCodeBlocks();
applyMath();
const setupMermaid = (await import("./share/mermaid.js")).default;
setupMermaid();
}
/**
* Fetch note with given ID from backend
*
* @param noteId of the given note to be fetched. If false, fetches current note.
*/
async function fetchNote(noteId: string | null = null) {
if (!noteId) {
noteId = document.body.getAttribute("data-note-id");
}
const resp = await fetch(`api/notes/${noteId}`);
return await resp.json();
}
document.addEventListener(
"DOMContentLoaded",
() => {
const noteType = determineNoteType();
if (noteType === "text") {
setupTextNote();
}
const toggleMenuButton = document.getElementById("toggleMenuButton");
const layout = document.getElementById("layout");
if (toggleMenuButton && layout) {
toggleMenuButton.addEventListener("click", () => layout.classList.toggle("showMenu"));
}
},
false
);
function determineNoteType() {
const bodyClass = document.body.className;
const match = bodyClass.match(/type-([^\s]+)/);
return match ? match[1] : null;
}
// workaround to prevent webpack from removing "fetchNote" as dead code:
// add fetchNote as property to the window object
Object.defineProperty(window, "fetchNote", {
value: fetchNote
});

View File

@@ -1,12 +1,7 @@
export default async function setupMermaid() {
const mermaidEls = document.querySelectorAll("#content pre code.language-mermaid");
if (mermaidEls.length === 0) {
return;
}
import mermaid from "mermaid";
const mermaid = (await import("mermaid")).default;
for (const codeBlock of mermaidEls) {
export default function setupMermaid() {
for (const codeBlock of document.querySelectorAll("#content pre code.language-mermaid")) {
const parentPre = codeBlock.parentElement;
if (!parentPre) {
continue;

View File

@@ -0,0 +1,322 @@
:root {
--main-background-color: white;
--root-background: var(--main-background-color);
--launcher-pane-background-color: var(--main-background-color);
--main-text-color: black;
--input-text-color: var(--main-text-color);
--print-font-size: 11pt;
}
@page {
margin: 2cm;
}
.ck-content {
font-size: var(--print-font-size);
text-align: justify;
}
.note-detail-readonly-text {
padding: 0 !important;
}
.no-print,
.no-print *,
.tab-row-container,
.tab-row-widget,
.title-bar-buttons,
#launcher-pane,
#left-pane,
#center-pane > *:not(.split-note-container-widget),
#right-pane,
.title-row .note-icon-widget,
.title-row .icon-action,
.ribbon-container,
.promoted-attributes-widget,
.scroll-padding-widget,
.note-list-widget,
.spacer {
display: none !important;
}
body.mobile #mobile-sidebar-wrapper,
body.mobile .classic-toolbar-widget,
body.mobile .action-button {
display: none !important;
}
body.mobile #detail-container {
max-height: unset;
}
body.mobile .note-title-widget {
padding: 0 !important;
}
body,
#root-widget,
#rest-pane > div.component:first-child,
.note-detail-printable,
.note-detail-editable-text-editor {
height: unset !important;
overflow: auto;
}
.ck.ck-editor__editable_inline {
overflow: hidden !important;
}
.note-title-widget input,
.note-detail-editable-text,
.note-detail-editable-text-editor {
padding: 0 !important;
}
html,
body {
width: unset !important;
height: unset !important;
overflow: visible;
position: unset;
/* https://github.com/zadam/trilium/issues/3202 */
color: black;
}
#root-widget,
#horizontal-main-container,
#rest-pane,
#vertical-main-container,
#center-pane,
.split-note-container-widget,
.note-split:not(.hidden-ext),
body.mobile #mobile-rest-container {
display: block !important;
overflow: auto;
border-radius: 0 !important;
}
#center-pane,
#rest-pane,
.note-split,
body.mobile #detail-container {
width: unset !important;
max-width: unset !important;
}
.component {
contain: none !important;
}
/* Respect page breaks */
.page-break {
page-break-after: always;
break-after: always;
}
.page-break > * {
display: none !important;
}
.relation-map-wrapper {
height: 100vh !important;
}
.table thead th,
.table td,
.table th {
/* Fix center vertical alignment of table cells */
vertical-align: middle;
}
pre {
box-shadow: unset !important;
border: 0.75pt solid gray !important;
border-radius: 2pt !important;
}
th,
span[style] {
print-color-adjust: exact;
-webkit-print-color-adjust: exact;
}
/*
* Text note specific fixes
*/
.ck-widget {
outline: none !important;
}
.ck-placeholder,
.ck-widget__type-around,
.ck-widget__selection-handle {
display: none !important;
}
.ck-widget.table td.ck-editor__nested-editable.ck-editor__nested-editable_focused,
.ck-widget.table td.ck-editor__nested-editable:focus,
.ck-widget.table th.ck-editor__nested-editable.ck-editor__nested-editable_focused,
.ck-widget.table th.ck-editor__nested-editable:focus {
background: unset !important;
outline: unset !important;
}
.include-note .include-note-content {
max-height: unset !important;
overflow: unset !important;
}
/* TODO: This will break once we translate the language */
.ck-content pre[data-language="Auto-detected"]:after {
display: none !important;
}
/*
* Code note specific fixes.
*/
.note-detail-code pre {
border: unset !important;
border-radius: unset !important;
}
/*
* Links
*/
.note-detail-printable a {
text-decoration: none;
}
.note-detail-printable a:not([href^="#root/"]) {
text-decoration: underline;
color: #374a75;
}
.note-detail-printable a::after {
/* Hide the external link trailing arrow */
display: none !important;
}
/*
* TODO list check boxes
*/
.note-detail-printable .todo-list__label * {
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
@supports selector(.todo-list__label__description:has(*)) and (height: 1lh) {
.note-detail-printable .todo-list__label__description {
/* The percentage of the line height that the check box occupies */
--box-ratio: 0.75;
/* The size of the gap between the check box and the caption */
--box-text-gap: 0.25em;
--box-size: calc(1lh * var(--box-ratio));
--box-vert-offset: calc((1lh - var(--box-size)) / 2);
display: inline-block;
padding-inline-start: calc(var(--box-size) + var(--box-text-gap));
/* Source: https://pictogrammers.com/library/mdi/icon/checkbox-blank-outline/ */
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3e%3cpath d='M19%2c3H5C3.89%2c3 3%2c3.89 3%2c5V19A2%2c2 0 0%2c0 5%2c21H19A2%2c2 0 0%2c0 21%2c19V5C21%2c3.89 20.1%2c3 19%2c3M19%2c5V19H5V5H19Z' /%3e%3c/svg%3e");
background-position: 0 var(--box-vert-offset);
background-size: var(--box-size);
background-repeat: no-repeat;
}
.note-detail-printable .todo-list__label:has(input[type="checkbox"]:checked) .todo-list__label__description {
/* Source: https://pictogrammers.com/library/mdi/icon/checkbox-outline/ */
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3e%3cpath d='M19%2c3H5A2%2c2 0 0%2c0 3%2c5V19A2%2c2 0 0%2c0 5%2c21H19A2%2c2 0 0%2c0 21%2c19V5A2%2c2 0 0%2c0 19%2c3M19%2c5V19H5V5H19M10%2c17L6%2c13L7.41%2c11.58L10%2c14.17L16.59%2c7.58L18%2c9' /%3e%3c/svg%3e");
}
.note-detail-printable .todo-list__label input[type="checkbox"] {
display: none !important;
}
}
/*
* Blockquotes
*/
.note-detail-printable blockquote {
box-shadow: unset;
}
/*
* Figures
*/
.note-detail-printable figcaption {
--accented-background-color: transparent;
font-style: italic;
}
/*
* Footnotes
*/
.note-detail-printable .footnote-reference a,
.footnote-back-link a {
text-decoration: none;
}
/* Make the "^" link cover the whole area of the footnote item */
.footnote-section {
clear: both;
}
.note-detail-printable li.footnote-item {
position: relative;
width: fit-content;
}
.note-detail-printable .footnote-back-link,
.note-detail-printable .footnote-back-link *,
.note-detail-printable .footnote-back-link a {
display: block;
position: absolute;
top: 0;
inset-inline-start: 0;
width: 100%;
height: 100%;
}
.note-detail-printable .footnote-back-link a {
color: transparent;
}
.note-detail-printable .footnote-content {
display: inline-block;
width: unset;
}
/*
* Widows and orphans
*/
p,
blockquote {
widows: 4;
orphans: 4;
}
pre > code {
widows: 6;
orphans: 6;
overflow: auto;
white-space: pre-wrap !important;
}
h1,
h2,
h3,
h4,
h5,
h6 {
page-break-after: avoid;
break-after: avoid;
}

View File

@@ -360,8 +360,7 @@ button kbd {
}
.dropdown-menu,
.tabulator-popup-container,
:root .excalidraw .popover {
.tabulator-popup-container {
color: var(--menu-text-color) !important;
font-size: inherit;
background: var(--menu-background-color) !important;
@@ -372,9 +371,7 @@ button kbd {
}
body.desktop .dropdown-menu,
body.desktop .tabulator-popup-container,
:root .excalidraw .dropdown-menu .dropdown-menu-container,
:root .excalidraw .popover {
body.desktop .tabulator-popup-container {
border: 1px solid var(--dropdown-border-color);
column-rule: 1px solid var(--dropdown-border-color);
box-shadow: 0px 10px 20px rgba(0, 0, 0, var(--dropdown-shadow-opacity));
@@ -419,8 +416,7 @@ body.desktop .tabulator-popup-container,
.dropdown-menu a:hover:not(.disabled),
.dropdown-item:hover:not(.disabled, .dropdown-container-item),
.tabulator-menu-item:hover,
:root .excalidraw .context-menu .context-menu-item:hover {
.tabulator-menu-item:hover {
color: var(--hover-item-text-color) !important;
background-color: var(--hover-item-background-color) !important;
border-color: var(--hover-item-border-color) !important;
@@ -461,8 +457,7 @@ body #context-menu-container .dropdown-item > span {
}
.dropdown-item,
.dropdown-header,
:root .excalidraw .context-menu .context-menu-item:hover {
.dropdown-header {
color: var(--menu-text-color) !important;
border: 1px solid transparent !important;
}
@@ -1013,7 +1008,7 @@ svg.ck-icon .note-icon {
--ck-content-line-height: var(--bs-body-line-height);
}
:root .ck-content .table table:not(.layout-table) th {
.ck-content .table table th {
background-color: var(--accented-background-color);
}
@@ -1983,10 +1978,6 @@ body.electron.platform-darwin:not(.native-titlebar) .tab-row-container {
-webkit-app-region: drag;
}
body.electron.platform-darwin:not(.native-titlebar) #tab-row-left-spacer {
width: 80px;
}
.tab-row-widget {
padding-inline-end: calc(100vw - env(titlebar-area-width, 100vw));
}
@@ -2034,9 +2025,9 @@ body.zen #right-pane,
body.zen #mobile-sidebar-wrapper,
body.zen .tab-row-container,
body.zen .tab-row-widget,
body.zen .ribbon-container:not(:has(.classic-toolbar-widget)),
body.zen .ribbon-container:has(.classic-toolbar-widget) .ribbon-top-row,
body.zen .ribbon-container .ribbon-body:not(:has(.classic-toolbar-widget)),
body.zen .ribbon-container:not(:has(.classic-toolbar-widget.visible)),
body.zen .ribbon-container:has(.classic-toolbar-widget.visible) .ribbon-top-row,
body.zen .ribbon-container .ribbon-body:not(:has(.classic-toolbar-widget.visible)),
body.zen .note-icon-widget,
body.zen .title-row .icon-action,
body.zen .floating-buttons-children > *:not(.bx-edit-alt),
@@ -2286,8 +2277,9 @@ footer.webview-footer button {
.admonition {
--accent-color: var(--card-border-color);
background: color-mix(in srgb, var(--accent-color) 15%, transparent);
border: 1px solid var(--accent-color);
box-shadow: var(--card-box-shadow);
background: var(--card-background-color);
border-radius: 0.5em;
padding: 1em;
margin: 1.25em 0;
@@ -2422,18 +2414,4 @@ footer.webview-footer button {
.revision-diff-removed {
background: rgba(255, 100, 100, 0.5);
text-decoration: line-through;
}
iframe.print-iframe {
position: absolute;
top: 0;
left: -600px;
right: -600px;
bottom: 0;
width: 0;
height: 0;
}
.excalidraw.theme--dark canvas {
--theme-filter: invert(100%) hue-rotate(180deg);
}

View File

@@ -82,17 +82,6 @@ body ::-webkit-calendar-picker-indicator {
filter: invert(1);
}
#left-pane .fancytree-node.tinted {
--custom-color: var(--dark-theme-custom-color);
}
:root .reference-link,
:root .reference-link:hover,
.ck-content a.reference-link > span,
.board-note {
color: var(--dark-theme-custom-color, inherit);
}
.excalidraw.theme--dark {
--theme-filter: invert(80%) hue-rotate(180deg) !important;
}
@@ -108,4 +97,3 @@ body .todo-list input[type="checkbox"]:not(:checked):before {
.ck-content pre {
box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6) !important;
}

View File

@@ -81,14 +81,3 @@ html {
--mermaid-theme: default;
--native-titlebar-background: #ffffff00;
}
#left-pane .fancytree-node.tinted {
--custom-color: var(--light-theme-custom-color);
}
:root .reference-link,
:root .reference-link:hover,
.ck-content a.reference-link > span,
.board-note {
color: var(--light-theme-custom-color, inherit);
}

View File

@@ -160,9 +160,6 @@
--launcher-pane-horiz-background-color-bgfx: #ffffff17; /* When background effects enabled */
--launcher-pane-horiz-border-color-bgfx: #00000080; /* When background effects enabled */
--global-menu-update-available-badge-background-color: #7dbe61;
--global-menu-update-available-badge-color: black;
--protected-session-active-icon-color: #8edd8e;
--sync-status-error-pulse-color: #f47871;
@@ -268,22 +265,6 @@
* Dark color scheme tweaks
*/
#left-pane .fancytree-node.tinted {
--custom-color: var(--dark-theme-custom-color);
/* The background color of the active item in the note tree.
* The --custom-color-hue variable contains the hue of the user-selected note color.
* This value is unset for gray tones. */
--custom-bg-color: hsl(var(--custom-color-hue), 20%, 33%, 0.4);
}
:root .reference-link,
:root .reference-link:hover,
.ck-content a.reference-link > span,
.board-note {
color: var(--dark-theme-custom-color, inherit);
}
body ::-webkit-calendar-picker-indicator {
filter: invert(1);
}
@@ -294,4 +275,4 @@ body ::-webkit-calendar-picker-indicator {
body .todo-list input[type="checkbox"]:not(:checked):before {
border-color: var(--muted-text-color) !important;
}
}

View File

@@ -127,7 +127,7 @@
--left-pane-item-selected-color: black;
--left-pane-item-selected-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
--left-pane-item-action-button-background: rgba(0, 0, 0, 0.11);
--left-pane-item-action-button-color: var(--left-pane-text-color);
--left-pane-item-action-button-color: inherit;
--left-pane-item-action-button-hover-background: white;
--left-pane-item-action-button-hover-shadow: 2px 2px 3px rgba(0, 0, 0, 0.15);
--left-pane-item-selected-action-button-hover-shadow: 2px 2px 10px rgba(0, 0, 0, 0.25);
@@ -153,9 +153,6 @@
--launcher-pane-horiz-background-color-bgfx: #ffffffb3; /* When background effects enabled */
--launcher-pane-horiz-border-color-bgfx: #00000026; /* When background effects enabled */
--global-menu-update-available-badge-background-color: #4fa450;
--global-menu-update-available-badge-color: white;
--protected-session-active-icon-color: #16b516;
--sync-status-error-pulse-color: #ff5528;
@@ -261,13 +258,5 @@
--ck-editor-toolbar-button-on-color: black;
--ck-editor-toolbar-button-on-shadow: none;
--ck-editor-toolbar-dropdown-button-open-background: #0000000f;
}
#left-pane .fancytree-node.tinted {
--custom-color: var(--light-theme-custom-color);
/* The background color of the active item in the note tree.
* The --custom-color-hue variable contains the hue of the user-selected note color.
* This value is unset for gray tones. */
--custom-bg-color: hsl(var(--custom-color-hue), 37%, 89%, 1);
}

View File

@@ -4,7 +4,6 @@
@import url(./pages.css);
@import url(./ribbon.css);
@import url(./notes/text.css);
@import url(./notes/canvas.css);
@import url(./notes/collections/table.css);
@font-face {
@@ -82,20 +81,6 @@
/* Theme capabilities */
--tab-note-icons: true;
/* To ensure that a tree item's custom color remains sufficiently contrasted and readable,
* the color is adjusted based on the current color scheme (light or dark). The lightness
* component of the color represented in the CIELAB color space, will be
* constrained to a certain percentage defined below.
*
* Note: the tree background may vary when background effects are enabled, so it is recommended
* to maintain a higher contrast margin than on the usual note tree solid background. */
/* The maximum perceptual lightness for the custom color in the light theme (%): */
--tree-item-light-theme-max-color-lightness: 60;
/* The minimum perceptual lightness for the custom color in the dark theme (%): */
--tree-item-dark-theme-min-color-lightness: 65;
}
body.backdrop-effects-disabled {
@@ -111,10 +96,9 @@ body.backdrop-effects-disabled {
* supported when this class is used.
*/
.dropdown-menu:not(.static),
:root .excalidraw .popover {
.dropdown-menu:not(.static) {
border-radius: var(--dropdown-border-radius);
padding: var(--padding, var(--menu-padding-size)) !important;
padding: var(--menu-padding-size) !important;
font-size: 0.9rem !important;
}
@@ -130,8 +114,7 @@ body.mobile .dropdown-menu .dropdown-menu {
}
body.desktop .dropdown-menu::before,
:root .ck.ck-dropdown__panel::before,
:root .excalidraw .popover::before {
:root .ck.ck-dropdown__panel::before {
content: "";
backdrop-filter: var(--dropdown-backdrop-filter);
border-radius: var(--dropdown-border-radius);
@@ -165,17 +148,9 @@ body.desktop .dropdown-submenu .dropdown-menu {
}
.dropdown-item,
body.mobile .dropdown-submenu .dropdown-toggle,
.excalidraw .context-menu .context-menu-item {
--menu-item-start-padding: 8px;
--menu-item-end-padding: 22px;
--menu-item-vertical-padding: 2px;
padding-top: var(--menu-item-vertical-padding) !important;
padding-bottom: var(--menu-item-vertical-padding) !important;
padding-inline-start: var(--menu-item-start-padding) !important;
padding-inline-end: var(--menu-item-end-padding) !important;
body.mobile .dropdown-submenu .dropdown-toggle {
padding: 2px 2px 2px 8px !important;
padding-inline-end: 22px !important;
/* Note: the right padding should also accommodate the submenu arrow. */
border-radius: 6px;
cursor: default !important;
@@ -227,8 +202,7 @@ html body .dropdown-item[disabled] {
}
/* Menu item keyboard shortcut */
.dropdown-item kbd,
.excalidraw .context-menu-item__shortcut {
.dropdown-item kbd {
font-family: unset !important;
font-size: unset !important;
color: var(--menu-item-keyboard-shortcut-color) !important;
@@ -240,15 +214,13 @@ html body .dropdown-item[disabled] {
margin-inline-start: 16px;
}
.dropdown-divider,
.excalidraw .context-menu hr {
.dropdown-divider {
position: relative;
border-color: transparent !important;
overflow: visible;
}
.dropdown-divider::after,
.excalidraw .context-menu hr::before {
.dropdown-divider::after {
position: absolute;
content: "";
top: -1px;
@@ -281,9 +253,7 @@ body[dir=rtl] .dropdown-menu:not([data-popper-placement="bottom-start"]) .dropdo
/* Menu item group heading */
/* The heading body */
.dropdown-menu h6,
.excalidraw .dropdown-menu-container .dropdown-menu-group-title,
.excalidraw .dropdown-menu-container div[data-testid="canvas-background-label"] {
.dropdown-menu h6 {
position: relative;
background: transparent;
padding: 1em 8px 14px 8px;
@@ -294,9 +264,7 @@ body[dir=rtl] .dropdown-menu:not([data-popper-placement="bottom-start"]) .dropdo
}
/* The delimiter line */
.dropdown-menu h6::before,
.excalidraw .dropdown-menu-container .dropdown-menu-group-title::before,
.excalidraw .dropdown-menu-container div[data-testid="canvas-background-label"]::before {
.dropdown-menu h6::before {
content: "";
position: absolute;
bottom: 8px;

View File

@@ -392,8 +392,7 @@ div.tn-tool-dialog {
}
.delete-notes-list .note-path {
padding-inline-start: 8px;
color: var(--muted-text-color)
padding-inline-end: 8px;
}
/*

View File

@@ -1,261 +0,0 @@
:root .excalidraw {
--ui-font: var(--main-font-family);
/* Button hover background color */
--button-hover-bg: var(--hover-item-background-color);
--color-surface-high: var(--hover-item-background-color);
--button-active-border: transparent;
--color-brand-active: transparent;
--color-surface-mid: transparent;
--color-surface-low: transparent;
/* Slider colors */
--color-slider-track: var(--menu-item-delimiter-color);
--color-slider-thumb: var(--muted-text-color);
/* Selected button icon fill color */
--color-on-primary-container: var(--ck-editor-toolbar-button-on-color);
--color-primary: var(--ck-editor-toolbar-button-on-color);
/* Selected button icon background color */
--color-surface-primary-container: var(--ck-editor-toolbar-button-on-background);
--color-primary-light: var(--ck-editor-toolbar-button-on-background);
--island-bg-color: var(--floating-button-background-color);
}
/* Dark theme tweaks */
:root body .excalidraw.theme--dark {
--color-surface-high: transparent;
--color-brand-hover: transparent;
}
:root .excalidraw.theme--dark.excalidraw .App-mobile-menu,
:root .excalidraw.theme--dark.excalidraw .App-menu__left {
--button-hover-bg: var(--hover-item-background-color);
}
:root .excalidraw.theme--dark.excalidraw .dropdown-menu-button:hover {
--background: var(--hover-item-background-color);
}
/* Backdrop blur pseudo-element */
.Island:not(.App-menu__left)::before,
.excalidraw .picker::before,
:root .App-menu__left > .panelColumn > fieldset::before,
:root .App-menu__left > .panelColumn > label::before,
:root .App-menu__left > .panelColumn > div:has(> *)::before {
display: block;
position: absolute;
content: "";
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: inherit;
backdrop-filter: blur(10px) saturate(6);
z-index: -1;
}
/* Note's root */
:root .type-canvas {
--floating-buttons-vert-offset: 20px;
}
/* Context menus */
/* Context menu - outer wrapper */
:root .excalidraw .popover {
--padding: 0;
max-width: unset;
overflow: hidden;
font-family: var(--main-font-family);
}
/* Context menu - inner wrapper */
:root .excalidraw .popover > .context-menu {
margin: 0;
padding: 8px !important;
overflow-y: auto;
overflow-x: hidden;
height: 100%;
border: none;
padding: 0;
box-shadow: none;
background: transparent;
}
/* Context menu item */
:root .excalidraw .context-menu .context-menu-item {
--menu-item-start-padding: 22px;
border: 1px solid transparent;
}
/* Context menu item icon */
:root .excalidraw .dropdown-menu-item__icon {
color: var(--menu-item-icon-color);
}
/* Context menu item label */
:root .excalidraw .context-menu-item__label,
:root .excalidraw .context-menu-item.dangerous .context-menu-item__label {
color: var(--menu-text-color);
}
:root .excalidraw .context-menu-item:hover .context-menu-item__label {
color: var(--hover-item-text-color);
}
/* Context menu item keyboard shortcut */
:root .excalidraw .context-menu-item__shortcut {
padding: 0;
opacity: 1;
}
/* Context menu separator */
.excalidraw .context-menu .context-menu-item-separator {
margin: 8px 0;
opacity: 1;
}
/* Main menu */
/* Hide separators - no longer needed as the menu group headers feature a delimiter line */
.excalidraw .Island.dropdown-menu-container>div:not(:has(>*)) {
display: none;
}
/* Menu group header */
.excalidraw .dropdown-menu-container .dropdown-menu-group-title,
.excalidraw .Island.dropdown-menu-container div[data-testid="canvas-background-label"] {
margin: 0 !important;
}
/* Header */
.excalidraw .App-menu.App-menu_top {
align-items: center;
}
.excalidraw .App-menu.App-menu_top .App-menu_top__left {
/* Fixes a layout glitch with the header when the options panel is visbile */
--gap: 0 !important;
}
/* The parent element of the "Library" button */
.excalidraw .App-menu.App-menu_top > div:nth-child(3) {
flex-direction: row-reverse;
}
/* Panels */
.excalidraw .zoom-actions,
.undo-redo-buttons {
box-shadow: 1px 1px 1px var(--floating-button-shadow-color);
backdrop-filter: blur(10px) saturate(6);
}
:root .excalidraw .main-menu-trigger,
:root .excalidraw .sidebar-trigger,
:root .excalidraw .help-icon {
box-shadow: none;
}
/* Selected color outline */
:root .excalidraw .color-picker__button.active .color-picker__button-outline {
box-shadow: 0 0 0 2px var(--input-focus-outline-color);
}
:root .excalidraw .buttonList label.active {
border-color: transparent;
}
/* Options panel */
.excalidraw .Island.App-menu__left {
box-shadow: none;
background: transparent;
backdrop-filter: none;
width: 13.2em;
}
body[dir=ltr] .excalidraw .Island.App-menu__left {
right: 0;
}
body[dir=rtl] .excalidraw .Island.App-menu__left {
left: 0;
}
:root .App-menu__left > .panelColumn {
row-gap: 5px;
}
/* Options panel card */
:root .App-menu__left > .panelColumn > fieldset,
:root .App-menu__left > .panelColumn > label,
:root .App-menu__left > .panelColumn > div:has(> *) {
position: relative;
margin: 0;
border-radius: 4px;
box-shadow: 1px 1px 1px var(--floating-button-shadow-color);
background: var(--floating-button-background-color);
padding: 8px 12px;
/* backdrop: blur() creates a new stacking context that prevents some popovers like the
* arrowheads picker from being positioned correctly. To workaround this, the backdrop blur
* effect is applyed using a pseudo-element instead. */
}
/* Options panel card title */
:root .App-menu__left fieldset > legend,
:root .App-menu__left div > h3,
:root .App-menu__left > .panelColumn > label {
text-transform: uppercase;
font-size: .65rem;
letter-spacing: 1pt;
color: var(--muted-text-color);
}
/* Options panel button bar */
:root .excalidraw .App-menu__left .buttonList {
padding: 0;
}
/* Picker */
body[dir=ltr] .excalidraw .App-menu__left .buttonList .picker {
translate: -80% 0;
}
/* Properties panel */
body[dir=ltr] .excalidraw .exc-stats {
left: 0;
}
body[dir=rtl] .excalidraw .exc-stats {
right: 0;
}
/* Sidebar */
.split-note-container-widget > .component.type-canvas:has(.excalidraw-container > .Island.default-sidebar) > .floating-buttons {
/* Hide the floating buttons when the sidebar is open */
display: none;
}
/* Pickers */
.excalidraw .picker {
position: relative;
}

View File

@@ -354,7 +354,6 @@
align-items: center;
width: 100%;
margin: 4px;
background: color-mix(in srgb, var(--accent) 15%, var(--main-background-color));
padding-inline-end: 2em;
border: 1px solid var(--accent);
border-radius: 6px;
@@ -666,17 +665,4 @@ html .note-detail-editable-text :not(figure, .include-note, hr):first-child {
.ck-content .table > figcaption {
background: var(--accented-background-color);
color: var(--main-text-color);
}
/* Reference link */
.ck-content a.reference-link,
.ck-content a.reference-link:hover {
/* Apply underline only to the span inside the link so it can follow the
* target note's user defined color */
text-decoration: none;
}
.ck-content a.reference-link > span {
text-decoration: underline;
}

View File

@@ -63,7 +63,7 @@
/* Button bar */
.search-definition-widget .search-setting-table tbody:last-child div {
justify-content: flex-end;
justify-content: flex-end !important;
gap: 8px;
}

View File

@@ -18,7 +18,7 @@
body {
--native-titlebar-darwin-x-offset: 10;
--native-titlebar-darwin-y-offset: 12 !important;
--native-titlebar-darwin-y-offset: 17 !important;
}
body.layout-horizontal {
@@ -100,7 +100,7 @@ body.layout-horizontal > .horizontal {
align-items: center;
}
body[dir=ltr] #launcher-container {
#launcher-container {
scrollbar-gutter: stable both-edges;
}
@@ -279,13 +279,16 @@ body[dir=ltr] #launcher-container {
animation: sync-status-pulse 1s ease-in-out alternate-reverse infinite;
}
#launcher-pane button.global-menu-button {
--update-badge-x-offset: 3%;
--update-badge-y-offset: -12%;
#launcher-pane .global-menu-button {
--hover-item-background-color: transparent;
}
#launcher-pane.horizontal .global-menu-button .global-menu-button-update-available {
inset-inline-end: -23px;
bottom: -22px;
transform: scale(0.85);
}
.tooltip .tooltip-arrow {
display: none;
}
@@ -639,7 +642,7 @@ body.layout-vertical.background-effects div.quick-search .dropdown-menu {
#left-pane span.fancytree-node.fancytree-active {
position: relative;
background: transparent !important;
color: var(--custom-color, var(--left-pane-item-selected-color));
color: var(--left-pane-item-selected-color) !important;
}
@keyframes left-pane-item-select {
@@ -658,7 +661,7 @@ body.layout-vertical.background-effects div.quick-search .dropdown-menu {
inset-inline-start: var(--left-pane-item-selected-shadow-size);
bottom: var(--left-pane-item-selected-shadow-size);
inset-inline-end: var(--left-pane-item-selected-shadow-size);
background: var(--custom-bg-color, var(--left-pane-item-selected-background)) !important;
background: var(--left-pane-item-selected-background) !important;
box-shadow: var(--left-pane-item-selected-shadow);
border-radius: 6px;
animation: left-pane-item-select 200ms ease-out;
@@ -718,6 +721,9 @@ body.mobile .fancytree-node > span {
margin-top: 0; /* Use this to align the icon with the tree view item's caption */
}
#left-pane span .fancytree-title {
margin-top: -5px;
}
#left-pane span.fancytree-active .fancytree-title {
font-weight: normal;
@@ -1784,6 +1790,10 @@ div.find-replace-widget div.find-widget-found-wrapper > span {
--border-radius-lg: 6px;
}
.excalidraw .Island {
backdrop-filter: var(--dropdown-backdrop-filter);
}
.excalidraw .Island.App-toolbar {
--island-bg-color: var(--floating-button-background-color);
--shadow-island: 1px 1px 1px var(--floating-button-shadow-color);

View File

@@ -17,6 +17,8 @@ span.fancytree-node.fancytree-hide {
overflow: hidden;
margin-inline-start: 7px;
outline: none;
position: relative;
top: 2px;
}
.fancytree-expander {
@@ -40,7 +42,6 @@ span.fancytree-node.fancytree-hide {
text-overflow: ellipsis;
user-select: none !important;
-webkit-user-select: none !important;
color: var(--custom-color, inherit);
}
.fancytree-node:not(.fancytree-loading) .fancytree-expander {
@@ -180,7 +181,7 @@ span.fancytree-node.fancytree-active-clone:not(.fancytree-active) .fancytree-tit
}
span.fancytree-active {
color: var(--active-item-text-color);
color: var(--active-item-text-color) !important;
background-color: var(--active-item-background-color) !important;
border-color: transparent; /* invisible border */
border-radius: 5px;

View File

@@ -3,8 +3,6 @@ import FNote from "../entities/fnote.js";
import froca from "../services/froca.js";
import FAttribute from "../entities/fattribute.js";
import noteAttributeCache from "../services/note_attribute_cache.js";
import FBranch from "../entities/fbranch.js";
import FBlob from "../entities/fblob.js";
type AttributeDefinitions = { [key in `#${string}`]: string; };
type RelationDefinitions = { [key in `~${string}`]: string; };
@@ -12,8 +10,6 @@ type RelationDefinitions = { [key in `~${string}`]: string; };
interface NoteDefinition extends AttributeDefinitions, RelationDefinitions {
id?: string | undefined;
title: string;
children?: NoteDefinition[];
content?: string;
}
/**
@@ -51,38 +47,6 @@ export function buildNote(noteDef: NoteDefinition) {
blobId: ""
});
froca.notes[note.noteId] = note;
let childNotePosition = 0;
// Manage content.
const content = noteDef.content ?? "";
note.getContent = async () => content;
const blob = new FBlob({
blobId: utils.randomString(10),
content,
contentLength: content.length,
dateModified: new Date().toISOString(),
utcDateModified: new Date().toISOString()
});
note.getBlob = async () => blob;
// Manage children.
if (noteDef.children) {
for (const childDef of noteDef.children) {
const childNote = buildNote(childDef);
const branchId = `${note.noteId}_${childNote.noteId}`;
const branch = new FBranch(froca, {
branchId,
noteId: childNote.noteId,
parentNoteId: note.noteId,
notePosition: childNotePosition,
fromSearchNote: false
});
froca.branches[branchId] = branch;
note.addChild(childNote.noteId, branchId, false);
childNotePosition += 10;
}
}
let position = 0;
for (const [ key, value ] of Object.entries(noteDef)) {

File diff suppressed because it is too large Load Diff

View File

@@ -646,9 +646,7 @@
"about": "关于 TriliumNext 笔记",
"logout": "登出",
"show-cheatsheet": "显示快捷帮助",
"toggle-zen-mode": "禅模式",
"new-version-available": "新更新可用",
"download-update": "取得版本 {{latestVersion}}"
"toggle-zen-mode": "禅模式"
},
"zen_mode": {
"button_exit": "退出禅模式"
@@ -738,8 +736,7 @@
"insert_child_note": "插入子笔记",
"delete_this_note": "删除此笔记",
"error_cannot_get_branch_id": "无法获取 notePath '{{notePath}}' 的 branchId",
"error_unrecognized_command": "无法识别的命令 {{command}}",
"note_revisions": "笔记历史版本"
"error_unrecognized_command": "无法识别的命令 {{command}}"
},
"note_icon": {
"change_note_icon": "更改笔记图标",
@@ -752,7 +749,7 @@
"editable": "可编辑",
"basic_properties": "基本属性",
"language": "语言",
"configure_code_notes": "配置代码笔记…"
"configure_code_notes": "配置代码注释..."
},
"book_properties": {
"view_type": "视图类型",
@@ -768,8 +765,7 @@
"table": "表格",
"geo-map": "地理地图",
"board": "看板",
"include_archived_notes": "展示归档笔记",
"presentation": "演示"
"include_archived_notes": "展示归档笔记"
},
"edited_notes": {
"no_edited_notes_found": "今天还没有编辑过的笔记...",
@@ -1262,13 +1258,7 @@
"min-days-in-first-week": "第一周的最小天数",
"first-week-info": "第一周包含一年的第一个周四,基于 <a href=\"https://en.wikipedia.org/wiki/ISO_week_date#First_week\">ISO 8601</a> 标准。",
"first-week-warning": "更改第一周选项可能会导致与现有周笔记重复,已创建的周笔记将不会相应更新。",
"formatting-locale": "日期和数字格式",
"tuesday": "周二",
"wednesday": "周三",
"thursday": "周四",
"friday": "周五",
"saturday": "周六",
"formatting-locale-auto": "依应用的语言设置"
"formatting-locale": "日期和数字格式"
},
"backup": {
"automatic_backup": "自动备份",
@@ -2075,10 +2065,5 @@
},
"collections": {
"rendering_error": "出现错误无法显示内容。"
},
"presentation_view": {
"edit-slide": "编辑此幻灯片",
"start-presentation": "开始演示",
"slide-overview": "切换幻灯片概览"
}
}

View File

@@ -4,7 +4,7 @@
"homepage": "Domovská stránka:",
"app_version": "Verze aplikace:",
"db_version": "Verze DB:",
"sync_version": "Verze synchronizace:",
"sync_version": "Verze sync:",
"build_date": "Datum sestavení:",
"build_revision": "Revize sestavení:",
"data_directory": "Datový adresář:"
@@ -36,29 +36,6 @@
"add_link": "Přidat odkaz",
"help_on_links": "Nápověda k odkazům",
"note": "Poznámka",
"search_note": "hledat poznámku podle názvu",
"link_title": "Název odkazu",
"button_add_link": "Přidat odkaz"
},
"branch_prefix": {
"prefix": "Prefix: ",
"save": "Uložit"
},
"bulk_actions": {
"bulk_actions": "Hromadné akce",
"affected_notes": "Ovlivněné poznámky",
"notes": "Poznámky"
},
"confirm": {
"cancel": "Zrušit",
"ok": "OK"
},
"delete_notes": {
"cancel": "Zrušit",
"ok": "OK",
"close": "Zavřít"
},
"export": {
"close": "Zavřít"
"search_note": "hledat poznámku podle názvu"
}
}

View File

@@ -4,7 +4,7 @@
"homepage": "Startseite:",
"app_version": "App-Version:",
"db_version": "DB-Version:",
"sync_version": "Sync-Version:",
"sync_version": "Synch-version:",
"build_date": "Build-Datum:",
"build_revision": "Build-Revision:",
"data_directory": "Datenverzeichnis:"
@@ -184,8 +184,7 @@
},
"import-status": "Importstatus",
"in-progress": "Import läuft: {{progress}}",
"successful": "Import erfolgreich abgeschlossen.",
"importZipRecommendation": "Beim Import einer ZIP-Datei wird die Notizhierarchie aus der Ordnerstruktur im Archiv übernommen."
"successful": "Import erfolgreich abgeschlossen."
},
"include_note": {
"dialog_title": "Notiz beifügen",
@@ -647,9 +646,7 @@
"about": "Über Trilium Notes",
"logout": "Abmelden",
"show-cheatsheet": "Cheatsheet anzeigen",
"toggle-zen-mode": "Zen Modus",
"new-version-available": "Neues Update verfügbar",
"download-update": "Version {{latestVersion}} herunterladen"
"toggle-zen-mode": "Zen Modus"
},
"sync_status": {
"unknown": "<p>Der Synchronisations-Status wird bekannt, sobald der nächste Synchronisierungsversuch gestartet wird.</p><p>Klicke, um eine Synchronisierung jetzt auszulösen.</p>",
@@ -736,8 +733,7 @@
"insert_child_note": "Untergeordnete Notiz einfügen",
"delete_this_note": "Diese Notiz löschen",
"error_cannot_get_branch_id": "BranchId für notePath „{{notePath}}“ kann nicht abgerufen werden",
"error_unrecognized_command": "Unbekannter Befehl {{command}}",
"note_revisions": "Notiz Revisionen"
"error_unrecognized_command": "Unbekannter Befehl {{command}}"
},
"note_icon": {
"change_note_icon": "Notiz-Icon ändern",
@@ -766,8 +762,7 @@
"table": "Tabelle",
"geo-map": "Weltkarte",
"board": "Tafel",
"include_archived_notes": "Zeige archivierte Notizen",
"presentation": "Präsentation"
"include_archived_notes": "Zeige archivierte Notizen"
},
"edited_notes": {
"no_edited_notes_found": "An diesem Tag wurden noch keine Notizen bearbeitet...",
@@ -991,7 +986,7 @@
"enter_password_instruction": "Um die geschützte Notiz anzuzeigen, musst du dein Passwort eingeben:",
"start_session_button": "Starte eine geschützte Sitzung <kbd>Eingabetaste</kbd>",
"started": "Geschützte Sitzung gestartet.",
"wrong_password": "Passwort falsch.",
"wrong_password": "Passwort flasch.",
"protecting-finished-successfully": "Geschützt erfolgreich beendet.",
"unprotecting-finished-successfully": "Ungeschützt erfolgreich beendet.",
"protecting-in-progress": "Schützen läuft: {{count}}",
@@ -1260,13 +1255,7 @@
"min-days-in-first-week": "Mindestanzahl an Tagen in erster Woche",
"first-week-info": "Die erste Woche, die den ersten Donnerstag des Jahres enthält, basiert auf dem Standard <a href=\"https://en.wikipedia.org/wiki/ISO_week_date#First_week\">ISO 8601</a>.",
"first-week-warning": "Das Ändern der Optionen für die erste Woche kann zu Duplikaten mit bestehenden Wochen-Notizen führen. Bestehende Wochen-Notizen werden nicht entsprechend aktualisiert.",
"formatting-locale": "Datums- und Zahlenformat",
"tuesday": "Dienstag",
"wednesday": "Mittwoch",
"thursday": "Donnerstag",
"friday": "Freitag",
"saturday": "Samstag",
"formatting-locale-auto": "Basierend auf die Anwendungssprache"
"formatting-locale": "Datums- und Zahlenformat"
},
"backup": {
"automatic_backup": "Automatische Sicherung",
@@ -1523,9 +1512,7 @@
"window-on-top": "Dieses Fenster immer oben halten"
},
"note_detail": {
"could_not_find_typewidget": "Konnte typeWidget für Typ {{type}} nicht finden",
"printing": "Druckvorgang läuft…",
"printing_pdf": "PDF-Export läuft…"
"could_not_find_typewidget": "Konnte typeWidget für Typ {{type}} nicht finden"
},
"note_title": {
"placeholder": "Titel der Notiz hier eingeben…"
@@ -1658,7 +1645,7 @@
"add-term-to-dictionary": "Begriff \"{{term}}\" zum Wörterbuch hinzufügen",
"cut": "Ausschneiden",
"copy": "Kopieren",
"copy-link": "Link kopieren",
"copy-link": "Link opieren",
"paste": "Einfügen",
"paste-as-plain-text": "Als unformatierten Text einfügen",
"search_online": "Suche nach \"{{term}}\" mit {{searchEngine}} starten"
@@ -2080,10 +2067,5 @@
},
"collections": {
"rendering_error": "Aufgrund eines Fehlers können keine Inhalte angezeigt werden."
},
"presentation_view": {
"edit-slide": "Folie bearbeiten",
"start-presentation": "Präsentation starten",
"slide-overview": "Übersicht der Folien ein-/ausblenden"
}
}

View File

@@ -1,24 +1,18 @@
{
"about": {
"title": "Πληροφορίες για το Trilium Notes",
"homepage": "Αρχική Σελίδα:",
"app_version": "Έκδοση εφαρμογής:",
"db_version": "Έκδοση βάσης δεδομένων:",
"sync_version": "Έκδοση πρωτοκόλου συγχρονισμού:",
"build_date": "Ημερομηνία χτισίματος εφαρμογής:",
"build_revision": "Αριθμός αναθεώρησης χτισίματος:",
"data_directory": "Φάκελος δεδομένων:"
},
"toast": {
"critical-error": {
"title": "Κρίσιμο σφάλμα",
"message": "Συνέβη κάποιο κρίσιμο σφάλμα, το οποίο δεν επιτρέπει στην εφαρμογή χρήστη να ξεκινήσει:\n\n{{message}}\n\nΤο πιθανότερο είναι να προκλήθηκε από κάποιο script που απέτυχε απρόοπτα. Δοκιμάστε να ξεκινήσετε την εφαρμογή σε ασφαλή λειτουργία για να λύσετε το πρόβλημα."
"about": {
"title": "Πληροφορίες για το Trilium Notes",
"homepage": "Αρχική Σελίδα:",
"app_version": "Έκδοση εφαρμογής:",
"db_version": "Έκδοση βάσης δεδομένων:",
"sync_version": "Έκδοση πρωτοκόλου συγχρονισμού:",
"build_date": "Ημερομηνία χτισίματος εφαρμογής:",
"build_revision": "Αριθμός αναθεώρησης χτισίματος:",
"data_directory": "Φάκελος δεδομένων:"
},
"toast": {
"critical-error": {
"title": "Κρίσιμο σφάλμα",
"message": "Συνέβη κάποιο κρίσιμο σφάλμα, το οποίο δεν επιτρέπει στην εφαρμογή χρήστη να ξεκινήσει:\n\n{{message}}\n\nΤο πιθανότερο είναι να προκλήθηκε από κάποιο script που απέτυχε απρόοπτα. Δοκιμάστε να ξεκινήσετε την εφαρμογή σε ασφαλή λειτουργία για να λύσετε το πρόβλημα."
}
}
},
"ai_llm": {
"n_notes_queued": "{{ count }} σημείωση στην ουρά για εύρεση",
"n_notes_queued_plural": "{{ count }} σημειώσεις στην ουρά για εύρεση",
"notes_indexed": "{{ count }} σημείωση με ευρετήριο",
"notes_indexed_plural": "{{ count }} σημειώσεις με ευρετήριο"
}
}

View File

@@ -104,8 +104,7 @@
"export_status": "Export status",
"export_in_progress": "Export in progress: {{progressCount}}",
"export_finished_successfully": "Export finished successfully.",
"format_pdf": "PDF - for printing or sharing purposes.",
"share-format": "HTML for web publishing - uses the same theme that is used shared notes, but can be published as a static website."
"format_pdf": "PDF - for printing or sharing purposes."
},
"help": {
"title": "Cheatsheet",
@@ -165,7 +164,6 @@
"importIntoNote": "Import into note",
"chooseImportFile": "Choose import file",
"importDescription": "Content of the selected file(s) will be imported as child note(s) into",
"importZipRecommendation": "When importing a ZIP file, the note hierarchy will reflect the subdirectory structure within the archive.",
"options": "Options",
"safeImportTooltip": "Trilium <code>.zip</code> export files can contain executable scripts which may contain harmful behavior. Safe import will deactivate automatic execution of all imported scripts. Uncheck \"Safe import\" only if the imported archive is supposed to contain executable scripts and you completely trust the contents of the import file.",
"safeImport": "Safe import",
@@ -649,8 +647,7 @@
"logout": "Logout",
"show-cheatsheet": "Show Cheatsheet",
"toggle-zen-mode": "Zen Mode",
"new-version-available": "New Update Available",
"download-update": "Get Version {{latestVersion}}"
"update_available": "Version {{latestVersion}} is available, click to download."
},
"zen_mode": {
"button_exit": "Exit Zen Mode"
@@ -770,7 +767,6 @@
"table": "Table",
"geo-map": "Geo Map",
"board": "Board",
"presentation": "Presentation",
"include_archived_notes": "Show archived notes"
},
"edited_notes": {
@@ -1724,9 +1720,7 @@
"window-on-top": "Keep Window on Top"
},
"note_detail": {
"could_not_find_typewidget": "Could not find typeWidget for type '{{type}}'",
"printing": "Printing in progress...",
"printing_pdf": "Exporting to PDF in progress..."
"could_not_find_typewidget": "Could not find typeWidget for type '{{type}}'"
},
"note_title": {
"placeholder": "type note's title here..."
@@ -2034,11 +2028,6 @@
"edit-note-title": "Click to edit note title",
"edit-column-title": "Click to edit column title"
},
"presentation_view": {
"edit-slide": "Edit this slide",
"start-presentation": "Start presentation",
"slide-overview": "Toggle an overview of the slides"
},
"command_palette": {
"tree-action-name": "Tree: {{name}}",
"export_note_title": "Export Note",

View File

@@ -354,7 +354,7 @@
"calendar_root": "marca la nota que debe usarse como raíz para las notas del día. Sólo uno debe estar marcado como tal.",
"archived": "las notas con esta etiqueta no serán visibles de forma predeterminada en los resultados de búsqueda (tampoco en los cuadros de diálogo Saltar a, Agregar vínculo, etc.).",
"exclude_from_export": "las notas (con su subárbol) no se incluirán en ninguna exportación de notas",
"run": "define en qué eventos debe ejecutarse el script. Los valores posibles son:\n<ul>\n<li>frontendStartup - cuando Trilium frontend se inicia (o se actualiza), pero no en móvil.</li>\n<li>mobileStartup - cuando Trilium frontend se inicia (o se actualiza), en móvil.</li>\n<li>backendStartup - cuando Trilium backend se inicia</li>\n<li>hourly - se ejecuta una vez por hora. Se puede usar la etiqueta adicional <code>runAtHour</code> para especificar a qué hora.</li>\n<li>daily - se ejecuta una vez al día</li>\n</ul>",
"run": "define en qué eventos debe ejecutarse el script. Los valores posibles son:\n<ul>\n<li>frontendStartup - cuando el frontend de Trilium inicia (o es recargado), pero no en dispositivos móviles. </li>\n<li>backendStartup - cuando el backend de Trilium se inicia </li>\n<li>hourly - se ejecuta una vez cada hora. Puede usar etiqueta adicional <code>runAtHour</code> para especificar a la hora. </li>\n<li>daily - ejecutar una vez al día </li>\n</ul>",
"run_on_instance": "Definir en qué instancia de Trilium se debe ejecutar esto. Predeterminado para todas las instancias.",
"run_at_hour": "¿A qué hora debería funcionar? Debe usarse junto con <code>#run=hourly</code>. Se puede definir varias veces para varias ejecuciones durante el día.",
"disable_inclusion": "los scripts con esta etiqueta no se incluirán en la ejecución del script principal.",
@@ -384,7 +384,7 @@
"inbox": "ubicación predeterminada de la bandeja de entrada para nuevas notas - cuando crea una nota usando el botón \"nueva nota\" en la barra lateral, las notas serán creadas como subnotas de la nota marcada con la etiqueta <code>#inbox</code>.",
"workspace_inbox": "ubicación predeterminada de la bandeja de entrada para nuevas notas cuando se anclan a algún antecesor de esta nota del espacio de trabajo",
"sql_console_home": "ubicación predeterminada de las notas de la consola SQL",
"bookmark_folder": "la nota con esta etiqueta aparecerá en los marcadores como carpeta (permitiendo el acceso a sus elementos hijos)",
"bookmark_folder": "la nota con esta etiqueta aparecerá en los marcadores como carpeta (permitiendo el acceso a sus elementos hijos).",
"share_hidden_from_tree": "esta nota está oculta en el árbol de navegación izquierdo, pero aún se puede acceder a ella con su URL",
"share_external_link": "la nota actuará como un enlace a un sitio web externo en el árbol compartido",
"share_alias": "define un alias que al usar la nota va a estar disponible en https://your_trilium_host/share/[tu_alias]",
@@ -646,9 +646,7 @@
"about": "Acerca de Trilium Notes",
"logout": "Cerrar sesión",
"show-cheatsheet": "Mostrar hoja de trucos",
"toggle-zen-mode": "Modo Zen",
"new-version-available": "Nueva actualización disponible",
"download-update": "Obtener versión {{latestVersion}}"
"toggle-zen-mode": "Modo Zen"
},
"zen_mode": {
"button_exit": "Salir del modo Zen"
@@ -738,8 +736,7 @@
"insert_child_note": "Insertar subnota",
"delete_this_note": "Eliminar esta nota",
"error_cannot_get_branch_id": "No se puede obtener el branchID del notePath '{{notePath}}'",
"error_unrecognized_command": "Comando no reconocido {{command}}",
"note_revisions": "Revisiones de notas"
"error_unrecognized_command": "Comando no reconocido {{command}}"
},
"note_icon": {
"change_note_icon": "Cambiar icono de nota",
@@ -768,8 +765,7 @@
"table": "Tabla",
"geo-map": "Mapa Geo",
"board": "Tablero",
"include_archived_notes": "Mostrar notas archivadas",
"presentation": "Presentación"
"include_archived_notes": "Mostrar notas archivadas"
},
"edited_notes": {
"no_edited_notes_found": "Aún no hay notas editadas en este día...",
@@ -1014,7 +1010,7 @@
"start_dragging_relations": "Empiece a arrastrar relaciones desde aquí y suéltelas en otra nota.",
"note_not_found": "¡Nota {{noteId}} no encontrada!",
"cannot_match_transform": "No se puede coincidir con la transformación: {{transform}}",
"note_already_in_diagram": "La nota \"{{title}}\" ya está en el diagrama.",
"note_already_in_diagram": "Note \"{{title}}\" is already in the diagram.",
"enter_title_of_new_note": "Ingrese el título de la nueva nota",
"default_new_note_title": "nueva nota",
"click_on_canvas_to_place_new_note": "Haga clic en el lienzo para colocar una nueva nota"
@@ -1256,9 +1252,8 @@
"indexing_stopped": "Indexado detenido",
"indexing_in_progress": "Indexado en progreso...",
"last_indexed": "Último indexado",
"n_notes_queued_0": "{{ count }} nota agregada a la cola para indexar",
"n_notes_queued_1": "{{ count }} notas agregadas a la cola para indexar",
"n_notes_queued_2": "",
"n_notes_queued": "{{ count }} nota agregada a la cola para indexado",
"n_notes_queued_plural": "{{ count }} notas agregadas a la cola para indexado",
"note_chat": "Chat de nota",
"notes_indexed": "{{ count }} nota indexada",
"notes_indexed_plural": "{{ count }} notas indexadas",
@@ -1419,13 +1414,7 @@
"min-days-in-first-week": "Días mínimos en la primer semana",
"first-week-info": "Primer semana que contiene al primer jueves del año está basado en el estándar<a href=\"https://en.wikipedia.org/wiki/ISO_week_date#First_week\">ISO 8601</a>.",
"first-week-warning": "Cambiar las opciones de primer semana puede causar duplicados con las Notas Semanales existentes y las Notas Semanales existentes no serán actualizadas respectivamente.",
"formatting-locale": "Fecha y formato de número",
"tuesday": "Martes",
"wednesday": "Miércoles",
"thursday": "Jueves",
"friday": "Viernes",
"saturday": "Sábado",
"formatting-locale-auto": "Basado en el idioma de la aplicación"
"formatting-locale": "Fecha y formato de número"
},
"backup": {
"automatic_backup": "Copia de seguridad automática",
@@ -1518,7 +1507,7 @@
"recovery_keys_used": "Usado: {{date}}",
"recovery_keys_unused": "El código de recuperación {{index}} está sin usar",
"oauth_title": "OAuth/OpenID",
"oauth_description": "OpenID es un método estandarizado que permite iniciar sesión en sitios web usando una cuenta de otro servicio, como Google, para verificar tu identidad. El emisor predeterminado es Google, pero se puede cambiar a cualquier otro proveedor de OpenID. Consulta <a href=\"#root/_hidden/_help/_help_Otzi9La2YAUX/_help_WOcw2SLH6tbX/_help_7DAiwaf8Z7Rz\">aquí</a> para más información. Sigue estas <a href=\"https://developers.google.com/identity/openid-connect/openid-connect\">instrucciones</a> para configurar un servicio OpenID a través de Google.",
"oauth_description": "OpenID es una forma estandarizada de permitirle iniciar sesión en sitios web utilizando una cuenta de otro servicio, como Google, para verificar su identidad. Siga estas <a href = \"https://developers.google.com/identity/openid-connect/openid-connect\">instrucciones</a> para configurar un servicio OpenID a través de Google.",
"oauth_description_warning": "Para habilitar OAuth/OpenID, necesita establecer la URL base de OAuth/OpenID, ID de cliente y secreto de cliente en el archivo config.ini y reiniciar la aplicación. Si desea establecerlas desde variables de ambiente, por favor establezca TRILIUM_OAUTH_BASE_URL, TRILIUM_OAUTH_CLIENT_ID y TRILIUM_OAUTH_CLIENT_SECRET.",
"oauth_missing_vars": "Ajustes faltantes: {{-variables}}",
"oauth_user_account": "Cuenta de usuario: ",
@@ -1628,8 +1617,8 @@
"unarchive": "Desarchivar"
},
"shared_info": {
"shared_publicly": "Esta nota está compartida públicamente en {{- link}}.",
"shared_locally": "Esta nota está compartida localmente en {{- link}}.",
"shared_publicly": "Esta nota está compartida públicamente en {{- link}}",
"shared_locally": "Esta nota está compartida localmente en {{- link}}",
"help_link": "Para obtener ayuda visite <a href=\"https://triliumnext.github.io/Docs/Wiki/sharing.html\">wiki</a>."
},
"note_types": {
@@ -1991,8 +1980,7 @@
"new-item-placeholder": "Ingresar título de la nota...",
"add-column-placeholder": "Ingresar título de la columna...",
"edit-note-title": "Haga clic para editar el título de la nota",
"edit-column-title": "Haga clic para editar el título de la columna",
"remove-from-board": "Eliminar del tablero"
"edit-column-title": "Haga clic para editar el título de la columna"
},
"content_renderer": {
"open_externally": "Abrir externamente"
@@ -2047,7 +2035,7 @@
},
"call_to_action": {
"next_theme_title": "Prueba el nuevo tema de Trilium",
"next_theme_message": "Estás usando actualmente el tema heredado. ¿Te gustaría probar el nuevo tema?",
"next_theme_message": "Estas usando actualmente el tema heredado, ¿Te gustaría probar el nuevo tema?",
"next_theme_button": "Prueba el nuevo tema",
"background_effects_title": "Los efectos de fondo son ahora estables",
"background_effects_message": "En los dispositivos Windows, los efectos de fondo ya son totalmente estables. Los efectos de fondo añaden un toque de color a la interfaz de usuario difuminando el fondo que hay detrás. Esta técnica también se utiliza en otras aplicaciones como el Explorador de Windows.",
@@ -2075,13 +2063,5 @@
"pagination": {
"total_notes": "{{count}} notas",
"page_title": "Página de {{startIndex}} - {{endIndex}}"
},
"presentation_view": {
"edit-slide": "Editar este slide",
"start-presentation": "Iniciar presentación",
"slide-overview": "Alternar vista general de los slides"
},
"collections": {
"rendering_error": "No se puede mostrar contenido debido a un error."
}
}

View File

@@ -184,8 +184,7 @@
},
"import-status": "Statut de l'importation",
"in-progress": "Importation en cours : {{progress}}",
"successful": "Importation terminée avec succès.",
"importZipRecommendation": "Lors de l'importation d'un fichier ZIP, la hiérarchie des notes reflétera la structure des sous-répertoires au sein de l'archive."
"successful": "Importation terminée avec succès."
},
"include_note": {
"dialog_title": "Inclure une note",
@@ -277,12 +276,7 @@
"preview": "Aperçu :",
"preview_not_available": "L'aperçu n'est pas disponible pour ce type de note.",
"restore_button": "Restaurer",
"delete_button": "Supprimer",
"diff_on": "Afficher les différences",
"diff_off": "Afficher le contenu",
"diff_on_hint": "Cliquer pour afficher les différences avec la note d'origine",
"diff_off_hint": "Cliquer pour afficher le contenu de la note",
"diff_not_available": "La comparaison n'est pas disponible."
"delete_button": "Supprimer"
},
"sort_child_notes": {
"sort_children_by": "Trier les enfants par...",
@@ -647,9 +641,7 @@
"about": "À propos de Trilium Notes",
"logout": "Déconnexion",
"show-cheatsheet": "Afficher l'aide rapide",
"toggle-zen-mode": "Zen Mode",
"new-version-available": "Nouvelle mise à jour disponible",
"download-update": "Obtenir la version {{latestVersion}}"
"toggle-zen-mode": "Zen Mode"
},
"zen_mode": {
"button_exit": "Sortir du Zen mode"
@@ -676,7 +668,7 @@
"search_in_note": "Rechercher dans la note",
"note_source": "Code source",
"note_attachments": "Pièces jointes",
"open_note_externally": "Ouvrir la note en externe",
"open_note_externally": "Ouverture externe",
"open_note_externally_title": "Le fichier sera ouvert dans une application externe et les modifications apportées seront surveillées. Vous pourrez ensuite téléverser la version modifiée dans Trilium.",
"open_note_custom": "Ouvrir la note avec",
"import_files": "Importer des fichiers",
@@ -739,8 +731,7 @@
"insert_child_note": "Insérer une note enfant",
"delete_this_note": "Supprimer cette note",
"error_cannot_get_branch_id": "Impossible d'obtenir branchId pour notePath '{{notePath}}'",
"error_unrecognized_command": "Commande non reconnue {{command}}",
"note_revisions": "Révision de la note"
"error_unrecognized_command": "Commande non reconnue {{command}}"
},
"note_icon": {
"change_note_icon": "Changer l'icône de note",
@@ -769,8 +760,7 @@
"table": "Tableau",
"geo-map": "Carte géographique",
"board": "Tableau de bord",
"include_archived_notes": "Afficher les notes archivées",
"presentation": "Présentation"
"include_archived_notes": "Afficher les notes archivées"
},
"edited_notes": {
"no_edited_notes_found": "Aucune note modifiée ce jour-là...",
@@ -1145,8 +1135,7 @@
"code_auto_read_only_size": {
"title": "Taille pour la lecture seule automatique",
"description": "La taille pour la lecture seule automatique est le seuil au-delà de laquelle les notes seront affichées en mode lecture seule (pour optimiser les performances).",
"label": "Taille pour la lecture seule automatique (notes de code)",
"unit": "caractères"
"label": "Taille pour la lecture seule automatique (notes de code)"
},
"code_mime_types": {
"title": "Types MIME disponibles dans la liste déroulante"
@@ -1165,8 +1154,7 @@
"download_images_description": "Le HTML collé peut contenir des références à des images en ligne, Trilium trouvera ces références et téléchargera les images afin qu'elles soient disponibles hors ligne.",
"enable_image_compression": "Activer la compression des images",
"max_image_dimensions": "Largeur/hauteur maximale d'une image en pixels (l'image sera redimensionnée si elle dépasse ce paramètre).",
"jpeg_quality_description": "Qualité JPEG (10 - pire qualité, 100 - meilleure qualité, 50 - 85 est recommandé)",
"max_image_dimensions_unit": "pixels"
"jpeg_quality_description": "Qualité JPEG (10 - pire qualité, 100 - meilleure qualité, 50 - 85 est recommandé)"
},
"attachment_erasure_timeout": {
"attachment_erasure_timeout": "Délai d'effacement des pièces jointes",
@@ -1198,8 +1186,7 @@
"note_revisions_snapshot_limit_description": "La limite du nombre de versions de note désigne le nombre maximum de versions pouvant être enregistrées pour chaque note. -1 signifie aucune limite, 0 signifie supprimer toutes les versions. Vous pouvez définir le nombre maximal de versions pour une seule note avec le label #versioningLimit.",
"snapshot_number_limit_label": "Nombre limite de versions de note :",
"erase_excess_revision_snapshots": "Effacer maintenant les versions en excès",
"erase_excess_revision_snapshots_prompt": "Les versions en excès ont été effacées.",
"snapshot_number_limit_unit": "instantanés"
"erase_excess_revision_snapshots_prompt": "Les versions en excès ont été effacées."
},
"search_engine": {
"title": "Moteur de recherche",
@@ -1241,35 +1228,19 @@
"title": "Table des matières",
"description": "La table des matières apparaîtra dans les notes textuelles lorsque la note comporte plus d'un nombre défini de titres. Vous pouvez personnaliser ce nombre :",
"disable_info": "Vous pouvez également utiliser cette option pour désactiver la table des matières en définissant un nombre très élevé.",
"shortcut_info": "Vous pouvez configurer un raccourci clavier pour afficher/masquer le volet de droite (y compris la table des matières) dans Options -> Raccourcis (nom « toggleRightPane »).",
"unit": "titres"
"shortcut_info": "Vous pouvez configurer un raccourci clavier pour afficher/masquer le volet de droite (y compris la table des matières) dans Options -> Raccourcis (nom « toggleRightPane »)."
},
"text_auto_read_only_size": {
"title": "Taille automatique en lecture seule",
"description": "La taille automatique des notes en lecture seule est la taille au-delà de laquelle les notes seront affichées en mode lecture seule (pour des raisons de performances).",
"label": "Taille automatique en lecture seule (notes de texte)",
"unit": "caractères"
"label": "Taille automatique en lecture seule (notes de texte)"
},
"i18n": {
"title": "Paramètres régionaux",
"language": "Langue",
"first-day-of-the-week": "Premier jour de la semaine",
"sunday": "Dimanche",
"monday": "Lundi",
"tuesday": "Mardi",
"wednesday": "Mercredi",
"thursday": "Jeudi",
"friday": "Vendredi",
"saturday": "Samedi",
"first-week-of-the-year": "Première semaine de l'année",
"first-week-contains-first-day": "La première semaine contient le premier jour de l'année",
"first-week-contains-first-thursday": "La première semaine contient le premier jeudi de l'année",
"first-week-has-minimum-days": "La première semaine a un nombre minimum de jours",
"min-days-in-first-week": "Nombre minimum de jours dans la première semaine",
"first-week-info": "La première semaine contient le premier jeudi de l'année et est basée sur la norme <a href=\"https://en.wikipedia.org/wiki/ISO_week_date#First_week\">ISO 8601</a> .",
"first-week-warning": "La modification des options de la première semaine peut entraîner des doublons avec les notes de semaine existantes et les notes de semaine existantes ne seront pas mises à jour en conséquence.",
"formatting-locale": "Format de date et de nombre",
"formatting-locale-auto": "En fonction de la langue de l'application"
"monday": "Lundi"
},
"backup": {
"automatic_backup": "Sauvegarde automatique",
@@ -1307,9 +1278,7 @@
"delete_token": "Supprimer/désactiver ce token",
"rename_token_title": "Renommer le jeton",
"rename_token_message": "Veuillez saisir le nom du nouveau jeton",
"delete_token_confirmation": "Êtes-vous sûr de vouloir supprimer le jeton ETAPI « {{name}} » ?",
"see_more": "Voir plus de détails dans le {{- link_to_wiki}} et le {{- link_to_openapi_spec}} ou le {{- link_to_swagger_ui }}.",
"swagger_ui": "Interface utilisateur ETAPI Swagger"
"delete_token_confirmation": "Êtes-vous sûr de vouloir supprimer le jeton ETAPI « {{name}} » ?"
},
"options_widget": {
"options_status": "Statut des options",
@@ -1372,8 +1341,7 @@
"test_title": "Test de synchronisation",
"test_description": "Testera la connexion et la prise de contact avec le serveur de synchronisation. Si le serveur de synchronisation n'est pas initialisé, cela le configurera pour qu'il se synchronise avec le document local.",
"test_button": "Tester la synchronisation",
"handshake_failed": "Échec de la négociation avec le serveur de synchronisation, erreur : {{message}}",
"timeout_unit": "millisecondes"
"handshake_failed": "Échec de la négociation avec le serveur de synchronisation, erreur : {{message}}"
},
"api_log": {
"close": "Fermer"
@@ -1433,14 +1401,11 @@
"import-into-note": "Importer dans la note",
"apply-bulk-actions": "Appliquer des Actions groupées",
"converted-to-attachments": "Les notes {{count}} ont été converties en pièces jointes.",
"convert-to-attachment-confirm": "Êtes-vous sûr de vouloir convertir les notes sélectionnées en pièces jointes de leurs notes parentes ?",
"archive": "Archive",
"unarchive": "Désarchiver",
"open-in-popup": "Modification rapide"
"convert-to-attachment-confirm": "Êtes-vous sûr de vouloir convertir les notes sélectionnées en pièces jointes de leurs notes parentes ?"
},
"shared_info": {
"shared_publicly": "Cette note est partagée publiquement sur {{- link}}.",
"shared_locally": "Cette note est partagée localement sur {{- link}}.",
"shared_publicly": "Cette note est partagée publiquement sur {{- link}}",
"shared_locally": "Cette note est partagée localement sur {{- link}}",
"help_link": "Pour obtenir de l'aide, visitez le <a href=\"https://triliumnext.github.io/Docs/Wiki/sharing.html\">wiki</a>."
},
"note_types": {
@@ -1462,11 +1427,7 @@
"confirm-change": "Il n'est pas recommandé de modifier le type de note lorsque son contenu n'est pas vide. Voulez-vous continuer ?",
"geo-map": "Carte géo",
"beta-feature": "Beta",
"task-list": "Liste de tâches",
"book": "Collection",
"ai-chat": "Chat IA",
"new-feature": "Nouveau",
"collections": "Collections"
"task-list": "Liste de tâches"
},
"protect_note": {
"toggle-on": "Protéger la note",
@@ -1519,16 +1480,13 @@
"hoist-this-note-workspace": "Focus cette note (espace de travail)",
"refresh-saved-search-results": "Rafraîchir les résultats de recherche enregistrée",
"create-child-note": "Créer une note enfant",
"unhoist": "Désactiver le focus",
"toggle-sidebar": "Basculer la barre latérale"
"unhoist": "Désactiver le focus"
},
"title_bar_buttons": {
"window-on-top": "Épingler cette fenêtre au premier plan"
},
"note_detail": {
"could_not_find_typewidget": "Impossible de trouver typeWidget pour le type '{{type}}'",
"printing": "Impression en cours...",
"printing_pdf": "Export au format PDF en cours..."
"could_not_find_typewidget": "Impossible de trouver typeWidget pour le type '{{type}}'"
},
"note_title": {
"placeholder": "saisir le titre de la note ici..."
@@ -1579,9 +1537,7 @@
},
"clipboard": {
"cut": "Les note(s) ont été coupées dans le presse-papiers.",
"copied": "Les note(s) ont été coupées dans le presse-papiers.",
"copy_failed": "Impossible de copier dans le presse-papiers en raison de problèmes d'autorisation.",
"copy_success": "Copié dans le presse-papiers."
"copied": "Les note(s) ont été coupées dans le presse-papiers."
},
"entrypoints": {
"note-revision-created": "La version de la note a été créée.",
@@ -1603,9 +1559,7 @@
"ws": {
"sync-check-failed": "Le test de synchronisation a échoué !",
"consistency-checks-failed": "Les tests de cohérence ont échoué ! Consultez les journaux pour plus de détails.",
"encountered-error": "Erreur \"{{message}}\", consultez la console.",
"lost-websocket-connection-title": "Connexion au serveur perdue",
"lost-websocket-connection-message": "Vérifiez la configuration de votre proxy inverse (par exemple nginx ou Apache) pour vous assurer que les connexions WebSocket sont correctement autorisées et ne sont pas bloquées."
"encountered-error": "Erreur \"{{message}}\", consultez la console."
},
"hoisted_note": {
"confirm_unhoisting": "La note demandée «{{requestedNote}}» est en dehors du sous-arbre de la note focus «{{hoistedNote}}». Le focus doit être désactivé pour accéder à la note. Voulez-vous enlever le focus ?"
@@ -1627,15 +1581,13 @@
},
"highlighting": {
"description": "Contrôle la coloration syntaxique des blocs de code à l'intérieur des notes texte, les notes de code ne seront pas affectées.",
"color-scheme": "Jeu de couleurs",
"title": "Blocs de code"
"color-scheme": "Jeu de couleurs"
},
"code_block": {
"word_wrapping": "Saut à la ligne automatique suivant la largeur",
"theme_none": "Pas de coloration syntaxique",
"theme_group_light": "Thèmes clairs",
"theme_group_dark": "Thèmes sombres",
"copy_title": "Copier dans le presse-papiers"
"theme_group_dark": "Thèmes sombres"
},
"classic_editor_toolbar": {
"title": "Mise en forme"
@@ -1673,8 +1625,7 @@
"link_context_menu": {
"open_note_in_new_tab": "Ouvrir la note dans un nouvel onglet",
"open_note_in_new_split": "Ouvrir la note dans une nouvelle division",
"open_note_in_new_window": "Ouvrir la note dans une nouvelle fenêtre",
"open_note_in_popup": "Édition rapide"
"open_note_in_new_window": "Ouvrir la note dans une nouvelle fenêtre"
},
"electron_integration": {
"desktop-application": "Application de bureau",
@@ -1694,8 +1645,7 @@
"full-text-search": "Recherche dans le texte"
},
"note_tooltip": {
"note-has-been-deleted": "La note a été supprimée.",
"quick-edit": "Edition rapide"
"note-has-been-deleted": "La note a été supprimée."
},
"geo-map": {
"create-child-note-title": "Créer une nouvelle note enfant et l'ajouter à la carte",
@@ -1704,8 +1654,7 @@
},
"geo-map-context": {
"open-location": "Ouvrir la position",
"remove-from-map": "Retirer de la carte",
"add-note": "Ajouter un marqueur à cet endroit"
"remove-from-map": "Retirer de la carte"
},
"help-button": {
"title": "Ouvrir la page d'aide correspondante"
@@ -1732,41 +1681,10 @@
"minimum_input": "La valeur de temps saisie doit être d'au moins {{minimumSeconds}} secondes."
},
"multi_factor_authentication": {
"oauth_user_email": "Courriel de l'utilisateur : ",
"title": "Authentification multifacteur",
"description": "L'authentification multifacteur (MFA) renforce la sécurité de votre compte. Au lieu de simplement saisir un mot de passe pour vous connecter, le MFA vous demande de fournir une ou plusieurs preuves supplémentaires pour vérifier votre identité. Ainsi, même si quelqu'un obtient votre mot de passe, il ne peut accéder à votre compte sans cette deuxième information. C'est comme ajouter une serrure supplémentaire à votre porte, rendant l'effraction beaucoup plus difficile.<br><br>Veuillez suivre les instructions ci-dessous pour activer le MFA. Si vous ne configurez pas correctement, la connexion se fera uniquement par mot de passe.",
"mfa_enabled": "Activer l'authentification multifacteur",
"mfa_method": "Méthode MFA",
"electron_disabled": "L'authentification multifacteur n'est actuellement pas prise en charge dans la version de bureau.",
"totp_title": "Mot de passe à usage unique basé sur le temps (TOTP)",
"totp_description": "Le TOTP (Time-Based One-Time Password) est une fonctionnalité de sécurité qui génère un code unique et temporaire, modifié toutes les 30 secondes. Vous utilisez ce code, associé à votre mot de passe, pour vous connecter à votre compte, ce qui rend l'accès à celui-ci beaucoup plus difficile.",
"totp_secret_title": "Générer un secret TOTP",
"totp_secret_generate": "Générer un secret TOTP",
"totp_secret_regenerate": "Re-générer un secret TOTP",
"no_totp_secret_warning": "Pour activer TOTP, vous devez dabord générer un secret TOTP.",
"totp_secret_description_warning": "Après avoir généré un nouveau secret TOTP, vous devrez vous reconnecter avec le nouveau secret TOTP.",
"totp_secret_generated": "Secret TOTP généré",
"totp_secret_warning": "Veuillez conserver le secret généré dans un endroit sûr. Il ne sera plus affiché.",
"totp_secret_regenerate_confirm": "Voulez-vous vraiment régénérer le secret TOTP? Cela invalidera le secret TOTP précédent et tous les codes de récupération existants.",
"recovery_keys_title": "Clés de récupération d'authentification unique",
"recovery_keys_description": "Les clés de récupération d'authentification unique sont utilisées pour vous connecter même si vous ne pouvez pas accéder à vos codes d'authentification.",
"recovery_keys_description_warning": "Les clés de récupération ne seront plus affichées après avoir quitté la page, conservez-les dans un endroit sûr et sécurisé.<br>Une fois qu'une clé de récupération a été utilisée, elle devient inutilisable.",
"recovery_keys_error": "Erreur lors de la génération des codes de récupération",
"recovery_keys_no_key_set": "Aucun code de récupération défini",
"recovery_keys_generate": "Générer des codes de récupération",
"recovery_keys_regenerate": "Re-générer des codes de récupération",
"recovery_keys_used": "Utilisé : {{date}}",
"recovery_keys_unused": "Le code de récupération {{index}} n'est pas utilisé",
"oauth_title": "OAuth/OpenID",
"oauth_description": "OpenID est un moyen standardisé de vous connecter à des sites web avec un compte d'un autre service, comme Google, afin de vérifier votre identité. L'émetteur par défaut est Google, mais vous pouvez le modifier pour n'importe quel autre fournisseur OpenID. Consultez <a href=\"#root/_hidden/_help/_help_Otzi9La2YAUX/_help_WOcw2SLH6tbX/_help_7DAiwaf8Z7Rz\">ici</a> pour plus d'informations. Suivez ces <a href=\"https://developers.google.com/identity/openid-connect/openid-connect\">instructions</a> pour configurer un service OpenID via Google.",
"oauth_description_warning": "Pour activer OAuth/OpenID, vous devez définir l'URL de base, l'ID client et le secret client OAuth/OpenID dans le fichier config.ini, puis redémarrer l'application. Pour les définir à partir des variables d'environnement, définissez TRILIUM_OAUTH_BASE_URL, TRILIUM_OAUTH_CLIENT_ID et TRILIUM_OAUTH_CLIENT_SECRET.",
"oauth_missing_vars": "Paramètres manquants : {{-variables}}",
"oauth_user_account": "Compte utilisateur: ",
"oauth_user_not_logged_in": "Pas connecté!"
"oauth_user_email": "Courriel de l'utilisateur : "
},
"modal": {
"close": "Fermer",
"help_title": "Afficher plus d'informations sur cet écran"
"close": "Fermer"
},
"ai_llm": {
"not_started": "Non démarré",
@@ -1845,77 +1763,7 @@
"reprocess_index": "Rafraîchir l'index de recherche",
"reprocessing_index": "Mise à jour...",
"reprocess_index_started": "L'optimisation de l'indice de recherche à commencer en arrière-plan",
"reprocess_index_error": "Erreur dans le rafraichissement de l'indice de recherche",
"failed_notes": "Notes en erreur",
"last_processed": "Dernier traitement",
"restore_provider": "Restaurer le fournisseur de recherche",
"index_rebuild_progress": "Progression de la reconstruction de l'index",
"index_rebuilding": "Optimisation de l'index ({{percentage}}%)",
"index_rebuild_complete": "Optimisation de l'index terminée",
"index_rebuild_status_error": "Erreur lors de la vérification de l'état de reconstruction de l'index",
"provider_precedence": "Priorité du fournisseur",
"never": "Jamais",
"processing": "Traitement en cours ({{percentage}}%)",
"incomplete": "Incomplet ({{percentage}}%)",
"complete": "Terminé (100%)",
"refreshing": "Mise à jour...",
"auto_refresh_notice": "Actualisation automatique toutes les {{seconds}} secondes",
"note_queued_for_retry": "Note mise en file d'attente pour une nouvelle tentative",
"failed_to_retry_note": "Échec de la nouvelle tentative de note",
"all_notes_queued_for_retry": "Toutes les notes ayant échoué sont mises en file d'attente pour une nouvelle tentative",
"failed_to_retry_all": "Échec du ré essai des notes",
"ai_settings": "Paramètres IA",
"api_key_tooltip": "Clé API pour accéder au service",
"empty_key_warning": {
"anthropic": "La clé API Anthropic est vide. Veuillez saisir une clé API valide.",
"openai": "La clé API OpenAI est vide. Veuillez saisir une clé API valide.",
"voyage": "La clé API Voyage est vide. Veuillez saisir une clé API valide.",
"ollama": "La clé API Ollama est vide. Veuillez saisir une clé API valide."
},
"agent": {
"processing": "Traitement...",
"thinking": "Réflexion...",
"loading": "Chargement...",
"generating": "Génération..."
},
"name": "IA",
"openai": "OpenAI",
"use_enhanced_context": "Utiliser un contexte amélioré",
"enhanced_context_description": "Fournit à l'IA plus de contexte à partir de la note et de ses notes associées pour de meilleures réponses",
"show_thinking": "Montrer la réflexion",
"show_thinking_description": "Montrer la chaîne de pensée de l'IA",
"enter_message": "Entrez votre message...",
"error_contacting_provider": "Erreur lors de la connexion au fournisseur d'IA. Veuillez vérifier vos paramètres et votre connexion Internet.",
"error_generating_response": "Erreur lors de la génération de la réponse de l'IA",
"index_all_notes": "Indexer toutes les notes",
"index_status": "Statut de l'index",
"indexed_notes": "Notes indexées",
"indexing_stopped": "Arrêt de l'indexation",
"indexing_in_progress": "Indexation en cours...",
"last_indexed": "Dernière indexée",
"note_chat": "Note discussion",
"sources": "Sources",
"start_indexing": "Démarrage de l'indexation",
"use_advanced_context": "Utiliser le contexte avancé",
"ollama_no_url": "Ollama n'est pas configuré. Veuillez saisir une URL valide.",
"chat": {
"root_note_title": "Discussions IA",
"root_note_content": "Cette note contient vos conversations de chat IA enregistrées.",
"new_chat_title": "Nouvelle discussion",
"create_new_ai_chat": "Créer une nouvelle discussion IA"
},
"create_new_ai_chat": "Créer une nouvelle discussion IA",
"configuration_warnings": "Il y a quelques problèmes avec la configuration de votre IA. Veuillez vérifier vos paramètres.",
"experimental_warning": "La fonctionnalité LLM est actuellement expérimentale vous êtes prévenu.",
"selected_provider": "Fournisseur sélectionné",
"selected_provider_description": "Choisissez le fournisseur dIA pour les fonctionnalités de discussion et de complétion",
"select_model": "Sélectionner le modèle...",
"select_provider": "Sélectionnez un fournisseur...",
"ai_enabled": "Fonctionnalités d'IA activées",
"ai_disabled": "Fonctionnalités d'IA désactivées",
"no_models_found_online": "Aucun modèle trouvé. Veuillez vérifier votre clé API et vos paramètres.",
"no_models_found_ollama": "Aucun modèle Ollama trouvé. Veuillez vérifier si Ollama est en cours d'exécution.",
"error_fetching": "Erreur lors de la récupération des modèles : {{error}}"
"reprocess_index_error": "Erreur dans le rafraichissement de l'indice de recherche"
},
"ui-performance": {
"title": "Performance",
@@ -1924,168 +1772,5 @@
"enable-backdrop-effects": "Activer les effets d'arrière plan pour les menus, popups et panneaux",
"enable-smooth-scroll": "Active le défilement fluide",
"app-restart-required": "(redémarrer l'application pour appliquer les changements)"
},
"custom_date_time_format": {
"title": "Format de date/heure personnalisé",
"description": "Personnalisez le format de la date et de l'heure insérées via <shortcut /> ou la barre d'outils. Consultez la <doc>Day.js docs</doc> pour connaître les formats disponibles.",
"format_string": "Chaîne de format :",
"formatted_time": "Date/heure formatée :"
},
"table_view": {
"delete_column_confirmation": "Êtes-vous sûr de vouloir supprimer cette colonne ? L'attribut correspondant sera supprimé de toutes les notes.",
"delete-column": "Supprimer la colonne",
"new-column-label": "Étiquette",
"new-column-relation": "Relation",
"edit-column": "Editer la colonne",
"add-column-to-the-right": "Ajouter une colonne à droite",
"new-row": "Nouvelle ligne",
"new-column": "Nouvelle colonne",
"sort-column-by": "Trier par « {{title}} »",
"sort-column-ascending": "Ascendant",
"sort-column-descending": "Descendant",
"sort-column-clear": "Annuler le tri",
"hide-column": "Masquer la colonne \"{{title}}\"",
"show-hide-columns": "Afficher/masquer les colonnes",
"row-insert-above": "Insérer une ligne au-dessus",
"row-insert-below": "Insérer une ligne au-dessous",
"row-insert-child": "Insérer une note enfant",
"add-column-to-the-left": "Ajouter une colonne à gauche"
},
"book_properties_config": {
"hide-weekends": "Masquer les week-ends",
"display-week-numbers": "Afficher les numéros de semaine",
"map-style": "Style de carte :",
"max-nesting-depth": "Profondeur d'imbrication maximale :",
"raster": "Trame",
"vector_light": "Vecteur (clair)",
"vector_dark": "Vecteur (foncé)",
"show-scale": "Afficher l'échelle"
},
"table_context_menu": {
"delete_row": "Supprimer la ligne"
},
"board_view": {
"delete-note": "Supprimer la note...",
"remove-from-board": "Retirer du tableau",
"archive-note": "Note archivée",
"unarchive-note": "Note désarchivée",
"move-to": "Déplacer vers",
"insert-above": "Insérer au-dessus",
"insert-below": "Insérer au-dessous",
"delete-column": "Supprimer la colonne",
"delete-column-confirmation": "Êtes-vous sûr de vouloir supprimer cette colonne? L'attribut correspondant sera également supprimé dans les notes sous cette colonne.",
"new-item": "Nouvel article",
"new-item-placeholder": "Entrez le titre de note...",
"add-column": "Ajouter une colonne",
"add-column-placeholder": "Entrez le nom de la colonne...",
"edit-note-title": "Cliquez pour modifier le titre de la note",
"edit-column-title": "Cliquez pour modifier le titre de la colonne"
},
"presentation_view": {
"edit-slide": "Modifier cette diapositive",
"start-presentation": "Démarrer la présentation",
"slide-overview": "Afficher un aperçu des diapositives"
},
"command_palette": {
"tree-action-name": "Arborescence : {{name}}",
"export_note_title": "Exporter la note",
"export_note_description": "Exporter la note actuelle",
"show_attachments_title": "Afficher les pièces jointes",
"show_attachments_description": "Afficher les pièces jointes des notes",
"search_notes_title": "Rechercher des notes",
"search_notes_description": "Ouvrir la recherche avancée",
"search_subtree_title": "Rechercher dans la sous-arborescence",
"search_subtree_description": "Rechercher dans la sous-arborescence actuelle",
"search_history_title": "Afficher l'historique de recherche",
"search_history_description": "Afficher les recherches précédentes",
"configure_launch_bar_title": "Configurer la barre de lancement",
"configure_launch_bar_description": "Ouvrir la configuration de la barre de lancement pour ajouter ou supprimer des éléments."
},
"content_renderer": {
"open_externally": "Ouverture externe"
},
"call_to_action": {
"next_theme_title": "Essayez le nouveau thème Trilium",
"next_theme_message": "Vous utilisez actuellement le thème hérité de l'ancienne version, souhaitez-vous essayer le nouveau thème?",
"next_theme_button": "Essayez le nouveau thème",
"background_effects_title": "Les effets d'arrière-plan sont désormais stables",
"background_effects_message": "Sur les appareils Windows, les effets d'arrière-plan sont désormais parfaitement stables. Ils ajoutent une touche de couleur à l'interface utilisateur en floutant l'arrière-plan. Cette technique est également utilisée dans d'autres applications comme l'Explorateur Windows.",
"background_effects_button": "Activer les effets d'arrière-plan",
"dismiss": "Rejeter"
},
"settings": {
"related_settings": "Paramètres associés"
},
"settings_appearance": {
"related_code_blocks": "Schéma de coloration syntaxique pour les blocs de code dans les notes de texte",
"related_code_notes": "Schéma de couleurs pour les notes de code"
},
"units": {
"percentage": "%"
},
"pagination": {
"page_title": "Page de {{startIndex}} - {{endIndex}}",
"total_notes": "{{count}} notes"
},
"collections": {
"rendering_error": "Impossible d'afficher le contenu en raison d'une erreur."
},
"code-editor-options": {
"title": "Éditeur"
},
"tasks": {
"due": {
"today": "Aujourd'hui",
"tomorrow": "Demain",
"yesterday": "Hier"
}
},
"content_widget": {
"unknown_widget": "Widget inconnu pour « {{id}} »."
},
"note_language": {
"not_set": "Non défini",
"configure-languages": "Configurer les langues..."
},
"content_language": {
"title": "Contenu des langues",
"description": "Sélectionnez une ou plusieurs langues à afficher dans la section « Propriétés de base » d'une note textuelle en lecture seule ou modifiable. Cela permettra d'utiliser des fonctionnalités telles que la vérification orthographique ou la prise en charge de l'écriture de droite à gauche."
},
"switch_layout_button": {
"title_vertical": "Déplacer le volet d'édition vers le bas",
"title_horizontal": "Déplacer le panneau d'édition vers la gauche"
},
"toggle_read_only_button": {
"unlock-editing": "Déverrouiller l'édition",
"lock-editing": "Verrouiller l'édition"
},
"png_export_button": {
"button_title": "Exporter le diagramme au format PNG"
},
"svg": {
"export_to_png": "Le diagramme n'a pas pu être exporté au format PNG."
},
"code_theme": {
"title": "Apparence",
"word_wrapping": "retour à la ligne automatique",
"color-scheme": "Jeu de couleurs"
},
"cpu_arch_warning": {
"title": "Veuillez télécharger la version ARM64",
"message_macos": "TriliumNext fonctionne actuellement sous Rosetta 2, ce qui signifie que vous utilisez la version Intel (x64) sur un Mac Apple Silicon. Cela aura un impact significatif sur les performances et l'autonomie de la batterie.",
"message_windows": "TriliumNext fonctionne actuellement en mode émulation, ce qui signifie que vous utilisez la version Intel (x64) sur un appareil Windows sur ARM. Cela aura un impact significatif sur les performances et l'autonomie de la batterie.",
"recommendation": "Pour une expérience optimale, veuillez télécharger la version ARM64 native de TriliumNext depuis notre page de versions.",
"download_link": "Télécharger la version native",
"continue_anyway": "Continuer quand même",
"dont_show_again": "Ne plus afficher cet avertissement"
},
"editorfeatures": {
"title": "Caractéristiques",
"emoji_completion_enabled": "Activer la saisie semi-automatique des emojis",
"emoji_completion_description": "Si cette option est activée, les emojis peuvent être facilement insérés dans le texte en tapant `:` , suivi du nom d'un emoji.",
"note_completion_enabled": "Activer la saisie semi-automatique des notes",
"note_completion_description": "Si cette option est activée, des liens vers des notes peuvent être créés en tapant `@` suivi du titre d'une note.",
"slash_commands_enabled": "Activer les commandes slash",
"slash_commands_description": "Si cette option est activée, les commandes d'édition telles que l'insertion de sauts de ligne ou d'en-têtes peuvent être activées en tapant `/`."
}
}

View File

@@ -1,5 +0,0 @@
{
"about": {
"title": "ट्रिलियम नोट्स के बारें में"
}
}

View File

@@ -1,50 +1 @@
{
"about": {
"title": "A Trilium Notes-ról",
"homepage": "Kezdőlap:",
"app_version": "Alkalmazás verziója:",
"db_version": "Adatbázis verzió:",
"sync_version": "Verzió szinkronizálás :",
"build_revision": "Build revízió:",
"data_directory": "Adatkönyvtár:",
"build_date": "Build dátum:"
},
"toast": {
"critical-error": {
"title": "Kritikus hiba",
"message": "Kritikus hiba történt, amely megakadályozza a kliensalkalmazás indítását:\n\n{{message}}\n\nEzt valószínűleg egy váratlan szkripthiba okozza. Próbálja meg biztonságos módban elindítani az alkalmazást, és hárítsa el a problémát."
},
"widget-error": {
"title": "Nem sikerült inicializálni egy widgetet",
"message-custom": "A(z) \"{{id}}\" azonosítójú, \"{{title}}\" című jegyzetből származó egyéni widget inicializálása sikertelen volt a következő ok miatt:\n\n{{message}}",
"message-unknown": "Ismeretlen widget inicializálása sikertelen volt a következő ok miatt:\n\n{{message}}"
},
"bundle-error": {
"title": "Nem sikerült betölteni az egyéni szkriptet",
"message": "A(z) \"{{id}}\" azonosítójú, \"{{title}}\" című jegyzetből származó szkript nem hajtható végre a következő ok miatt:\n\n{{message}}"
}
},
"add_link": {
"add_link": "Link hozzáadása",
"help_on_links": "Segítség a linkekhez",
"note": "Jegyzet",
"search_note": "név szerinti jegyzetkeresés",
"link_title_mirrors": "A link cím tükrözi a jegyzet aktuális címét",
"link_title_arbitrary": "link cím önkényesen módosítható",
"link_title": "Link cím",
"button_add_link": "Link hozzáadása"
},
"branch_prefix": {
"edit_branch_prefix": "Az elágazás előtagjának szerkesztése",
"help_on_tree_prefix": "Segítség a fa előtagján",
"prefix": "Az előtag: ",
"save": "Mentés"
},
"bulk_actions": {
"bulk_actions": "Tömeges akciók",
"affected_notes": "Érintett jegyzetek",
"labels": "Címkék",
"relations": "Kapcsolatok",
"notes": "Jegyzetek"
}
}
{}

View File

@@ -3,30 +3,6 @@
"title": "Tentang Trilium Notes",
"homepage": "Halaman utama:",
"app_version": "Versi Aplikasi:",
"db_version": "Versi DB:",
"sync_version": "Versi sinkronisasi:",
"build_date": "Tanggal pembuatan:",
"build_revision": "Revisi pembuatan:",
"data_directory": "Direktori data:"
},
"toast": {
"critical-error": {
"title": "Kesalahan kritis",
"message": "Telah terjadi kesalahan kritis yang mencegah aplikasi klien untuk memulai:\n\n{{message}}\n\nHal ini kemungkinan besar disebabkan oleh skrip yang gagal secara tidak terduga. Coba jalankan aplikasi dalam mode aman dan atasi masalahnya."
},
"widget-error": {
"title": "Gagal menginisialisasi widget",
"message-custom": "Widget kustom dari catatan dengan ID \"{{id}}\", berjudul \"{{title}}\" tidak dapat diinisialisasi karena:\n\n{{message}}",
"message-unknown": "Widget tidak dikenal tidak dapat diinisialisasi karena:\n\n{{message}}"
},
"bundle-error": {
"title": "Gagal memuat skrip kustom",
"message": "Skrip dari catatan dengan ID \"{{id}}\", berjudul \"{{title}}\" tidak dapat dijalankan karena:\n\n{{message}}"
}
},
"add_link": {
"add_link": "Tambah tautan",
"help_on_links": "Bantuan pada tautan",
"note": "Catatan"
"db_version": "Versi DB:"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -68,12 +68,11 @@
"switch_to_desktop_version": "デスクトップ版に切り替え",
"configure_launchbar": "ランチャーバーの設定",
"show_shared_notes_subtree": "共有ノートのサブツリーを表示",
"new-version-available": "新しいアップデートが利用可能",
"download-update": "{{latestVersion}} をバージョンを入手"
"update_available": "バージョン {{latestVersion}} が利用可能です。クリックしてダウンロードしてください。"
},
"left_pane_toggle": {
"show_panel": "パネルを表示",
"hide_panel": "パネルを非表示"
"hide_panel": "パネルを隠す"
},
"move_pane_button": {
"move_left": "左に移動",
@@ -81,7 +80,7 @@
},
"clone_to": {
"notes_to_clone": "クローンするノート",
"target_parent_note": "対象の親ノート",
"target_parent_note": "ターゲットの親ノート",
"search_for_note_by_its_name": "ノート名で検索",
"cloned_note_prefix_title": "クローンされたノートは、指定された接頭辞を付けてノートツリーに表示されます",
"prefix_optional": "接頭辞(任意)",
@@ -165,12 +164,7 @@
"first-week-info": "最初の週は、その年の最初の木曜日を含む週を指し、<a href=\"https://en.wikipedia.org/wiki/ISO_week_date#First_week\">ISO 8601</a>規格に基づいています。",
"first-week-warning": "最初の週のオプションを変更すると、既存のウィークノートと重複する可能性があり、既存のウィークノートはそれに応じて更新されません。",
"formatting-locale": "日付と数値のフォーマット",
"formatting-locale-auto": "アプリケーションの言語に基づいて",
"tuesday": "火曜日",
"wednesday": "水曜日",
"thursday": "木曜日",
"friday": "金曜日",
"saturday": "土曜日"
"formatting-locale-auto": "アプリケーションの言語に基づいて"
},
"tab_row": {
"close_tab": "タブを閉じる",
@@ -282,11 +276,11 @@
"selectAllNotes": "現在のレベルのノートをすべて選択",
"selectNote": "ノートを選択",
"copyNotes": "アクティブなノート(または現在の選択範囲)をクリップボードにコピーする(<a class=\"external\" href=\"https://triliumnext.github.io/Docs/Wiki/cloning-notes.html#cloning-notes\">クローン</a>に使用)",
"cutNotes": "アクティブなノート(または現在の選択範囲)をクリップボードに切り取り(ノートの移動に使用)",
"pasteNotes": "ノートをサブノートとしてアクティブノートに貼り付ける(コピーされたか切り取りされたかに よって、移動またはクローンになる)",
"cutNotes": "アクティブなノート(または現在の選択範囲)をクリップボードにカットする(ノートの移動に使用)",
"pasteNotes": "ノートをサブノートとしてアクティブノートに貼り付ける(コピーされたかカットされたかに よって、移動またはクローンになる)",
"deleteNotes": "ノート/サブツリーを削除",
"editingNotes": "ノート編集",
"editNoteTitle": "ツリーペインでEnterキーを押すと、ツリーペインからノートタイトルに切り替わります。ノートタイトルだとテキストエディタにフォーカスが切り替わります。<kbd>Ctrl+.</kbd> を押すと、エディタからツリーペインに戻ります。",
"editNoteTitle": "押下するとツリーペインからタイトルの編集に移ります。タイトルの編集からEnterキーを押すと、本文の編集に移動します。<kbd>Ctrl+.</kbd> で本文の編集からツリーペインに戻ります。",
"createEditLink": "外部リンクの作成/編集",
"createInternalLink": "内部リンクの作成",
"followLink": "カーソル下のリンクをたどる",
@@ -302,7 +296,7 @@
"showDevTools": "開発者ツールを表示",
"showSQLConsole": "SQLコンソールを表示",
"other": "その他",
"quickSearch": "クイック検索にフォーカス",
"quickSearch": "クイックサーチにフォーカス",
"inPageSearch": "ページ内検索",
"showJumpToNoteDialog": "<a class=\"external\" href=\"https://triliumnext.github.io/Docs/Wiki/note-navigation.html#jump-to-note\">「ジャンプ先」ダイアログ</a>を表示",
"moveNoteUpDown": "ノートリストでノートを上/下に移動",
@@ -334,8 +328,7 @@
"import-status": "インポート状況",
"in-progress": "インポート中: {{progress}}",
"successful": "インポートは正常に終了しました。",
"explodeArchives": "<code>.zip</code>, <code>.enex</code> および <code>.opml</code> アーカイブの内容を読み取ります。",
"importZipRecommendation": "ZIP ファイルをインポートすると、ノートの階層はアーカイブ内のサブディレクトリ構造を反映します。"
"explodeArchives": "<code>.zip</code>, <code>.enex</code> および <code>.opml</code> アーカイブの内容を読み取ります。"
},
"password_not_set": {
"title": "パスワードが設定されていない",
@@ -353,18 +346,18 @@
},
"sort_child_notes": {
"sort_children_by": "子ノートの並び替え...",
"sorting_criteria": "並べ替えの基準",
"sorting_criteria": "ソート基準",
"title": "タイトル",
"date_created": "作成日",
"date_modified": "更新日",
"sorting_direction": "並べ替えの方向",
"sorting_direction": "ソート方向",
"ascending": "昇順",
"descending": "降順",
"folders": "フォルダ",
"sort_folders_at_top": "フォルダーを上にして並べ替える",
"sort_folders_at_top": "フォルダーを一番上にソートする",
"natural_sort": "自然順",
"sort_with_respect_to_different_character_sorting": "言語や地域によって異なる文字の並べ替えや照合順序の規則に従って並べ替える。",
"sort": "並べ替え",
"sort_with_respect_to_different_character_sorting": "言語や地域によって異なる文字の並べ替えや照合順序の規則に従ってソートする。",
"sort": "ソート",
"natural_sort_language": "自然順言語",
"the_language_code_for_natural_sort": "自然順の言語コード。例えば、中国語の場合は \"zh-CN\"。"
},
@@ -405,9 +398,9 @@
"protect-subtree": "サブツリーを保護",
"unprotect-subtree": "サブツリーの保護を解除",
"copy-clone": "コピー/クローン",
"clone-to": "クローン...",
"cut": "切り取り",
"move-to": "移動...",
"clone-to": "クローン...",
"cut": "カット",
"move-to": "移動...",
"paste-into": "貼り付け",
"paste-after": "後ろに貼り付け",
"duplicate": "複製",
@@ -417,7 +410,7 @@
"converted-to-attachments": "{{count}}ノートが添付ファイルに変換されました。",
"convert-to-attachment": "添付ファイルに変換",
"convert-to-attachment-confirm": "選択したノートを親ノートの添付ファイルに変換しますか?",
"open-in-popup": "クイック編集",
"open-in-popup": "クイックエディット",
"hoist-note": "ホイストノート",
"unhoist-note": "ノートをホイストしない",
"edit-branch-prefix": "ブランチの接頭辞を編集",
@@ -535,8 +528,7 @@
"table": "テーブル",
"geo-map": "ジオマップ",
"board": "ボード",
"include_archived_notes": "アーカイブされたノートを表示",
"presentation": "プレゼンテーション"
"include_archived_notes": "アーカイブされたノートを表示"
},
"note_types": {
"geo-map": "ジオマップ",
@@ -741,7 +733,7 @@
"new-column": "新しい列",
"sort-column-by": "\"{{title}}\" で並べ替え",
"sort-column-clear": "並べ替えをクリア",
"hide-column": "列 \"{{title}}\" を非表示",
"hide-column": "列 \"{{title}}\" を隠す",
"show-hide-columns": "列を表示/非表示",
"row-insert-above": "上に行を挿入",
"row-insert-below": "下に行を挿入",
@@ -1055,7 +1047,7 @@
"inheritable": "継承",
"related_notes_title": "このラベルが付いた他のノート",
"attr_detail_title": "属性の詳細なタイトル",
"target_note_title": "リレーションは、ソースノートと対象のノート間の名前付き接続です。",
"target_note_title": "リレーションは、ソースノートとターゲットノート間の名前付き接続です。",
"target_note": "対象のノート",
"promoted_title": "プロモート属性はノートに目立つように表示されます。",
"promoted": "プロモート",
@@ -1078,7 +1070,7 @@
"sorted": "子ノートをアルファベット順に並べ替える",
"sort_direction": "ASCデフォルトまたは DESC",
"sort_folders_first": "フォルダ(子を持つノート)を上にして並べる",
"top": "指定されたノートをその親ノートの一番上に表示します(並べ替えらた親ノートにのみ適用されます)",
"top": "指定されたノートをその親ノートの一番上に表示します(ソートされた親ノートにのみ適用されます)",
"hide_promoted_attributes": "このノートのプロモート属性を非表示にする",
"read_only": "エディターは読み取り専用モードです。テキストとコードノートのみ機能します。",
"auto_read_only_disabled": "テキスト/コードノートは、サイズが大きすぎる場合、自動的に読み取りモードに設定されます。このラベルをノートに追加することで、ノートごとにこの動作を無効にすることができます",
@@ -1152,13 +1144,13 @@
"print_page_size": "PDF にエクスポートするときに、ページのサイズを変更します。サポートされる値: <code>A0</code>, <code>A1</code>, <code>A2</code>, <code>A3</code>, <code>A4</code>, <code>A5</code>, <code>A6</code>, <code>Legal</code>, <code>Letter</code>, <code>Tabloid</code>, <code>Ledger</code>。"
},
"link_context_menu": {
"open_note_in_popup": "クイック編集",
"open_note_in_popup": "クイックエディット",
"open_note_in_new_tab": "新しいタブでノートを開く",
"open_note_in_new_split": "新しく分割してノートを開く",
"open_note_in_new_window": "新しいウィンドウでノートを開く"
},
"note_tooltip": {
"quick-edit": "クイック編集",
"quick-edit": "クイックエディット",
"note-has-been-deleted": "ノートは削除されました。"
},
"protect_note": {
@@ -1190,7 +1182,7 @@
"options": "オプション"
},
"quick-search": {
"placeholder": "クイック検索",
"placeholder": "クイックサーチ",
"searching": "検索中...",
"no-results": "結果は見つかりませんでした",
"more-results": "... および {{number}} 件の他の結果。",
@@ -1200,7 +1192,7 @@
"collapse-title": "ノートツリーを折りたたむ",
"scroll-active-title": "アクティブノートまでスクロール",
"tree-settings-title": "ツリーの設定",
"hide-archived-notes": "アーカイブノートを非表示",
"hide-archived-notes": "アーカイブノートを隠す",
"automatically-collapse-notes": "ノートを自動的に折りたたむ",
"automatically-collapse-notes-title": "一定期間使用されないと、ツリーを整理するためにノートは折りたたまれます。",
"save-changes": "変更を保存して適用",
@@ -1214,7 +1206,7 @@
},
"bulk_actions": {
"bulk_actions": "一括操作",
"affected_notes": "影響されノート",
"affected_notes": "影響されノート",
"include_descendants": "選択したノートの子ノートを含む",
"available_actions": "利用可能なアクション",
"chosen_actions": "選択されたアクション",
@@ -1246,7 +1238,7 @@
"duplicated": "ノート \"{{title}}\" は複製されました。"
},
"clipboard": {
"cut": "ノートはクリップボードに切り取りとられました。",
"cut": "ノートはクリップボードにカットされました。",
"copied": "ノートはクリップボードにコピーされました。",
"copy_failed": "権限の問題で、クリップボードにコピーできません。",
"copy_success": "クリップボードにコピーしました。"
@@ -1297,7 +1289,7 @@
},
"electron_context_menu": {
"add-term-to-dictionary": "辞書に \"{{term}}\" を追加",
"cut": "切り取り",
"cut": "カット",
"copy": "コピー",
"copy-link": "リンクをコピー",
"paste": "貼り付け",
@@ -1760,7 +1752,7 @@
"target_parent_note": "対象の親ノート",
"move_note_new_parent": "ノートに親が 1 つしかない場合は、ノートを新しい親に移動します (つまり、古いブランチが削除され、新しい親に新しいブランチが作成されます)",
"clone_note_new_parent": "ノートに複数のクローン/ブランチがある場合、ノートを新しい親にクローンします(どのブランチを削除すべきか不明なため)",
"nothing_will_happen": "ノートを対象のノートに移動できない場合は何も起こりません(つまり、ツリーサイクルが生じるため)",
"nothing_will_happen": "ノートをターゲットノートに移動できない場合は何も起こりません(つまり、ツリーサイクルが生じるため)",
"to": "次へ"
},
"onclick_button": {
@@ -1883,9 +1875,7 @@
"window-on-top": "ウィンドウを最前面に維持"
},
"note_detail": {
"could_not_find_typewidget": "タイプ {{type}} の typeWidget が見つかりませんでした",
"printing": "印刷中です...",
"printing_pdf": "PDF へのエクスポート中です..."
"could_not_find_typewidget": "タイプ {{type}} の typeWidget が見つかりませんでした"
},
"watched_file_update_status": {
"ignore_this_change": "この変更を無視する",
@@ -2078,10 +2068,5 @@
"role_and_size": "ロール: {{role}},サイズ: {{size}}",
"link_copied": "添付ファイルのリンクをクリップボードにコピーしました。",
"unrecognized_role": "添付ファイルのロール「{{role}}」は認識されません。"
},
"presentation_view": {
"edit-slide": "このスライドを編集",
"start-presentation": "プレゼンテーションを開始",
"slide-overview": "スライドの概要を切り替え"
}
}

View File

@@ -49,11 +49,5 @@
"chosen_actions": "선택한 액션들",
"execute_bulk_actions": "대량 액션들 실행",
"bulk_actions_executed": "대량 액션들이 성공적으로 실행되었습니다."
},
"i18n": {
"saturday": "토요일",
"sunday": "일요일",
"first-week-of-the-year": "일년의 첫째 주",
"first-week-contains-first-day": "첫 번째 주에는 올해의 첫날이 포함됩니다"
}
}

View File

@@ -1 +0,0 @@
{}

View File

@@ -13,13 +13,6 @@
"critical-error": {
"title": "Kritische Error",
"message": "Een kritieke fout heeft plaatsgevonden waardoor de cliënt zich aanmeldt vanaf het begin:\n\n84X\n\nDit is waarschijnlijk veroorzaakt door een script dat op een onverwachte manier faalt. Probeer de sollicitatie in veilige modus te starten en de kwestie aan te spreken."
},
"widget-error": {
"title": "Starten widget mislukt",
"message-unknown": "Onbekende widget kan niet gestart worden omdat:\n\n{{message}}"
},
"bundle-error": {
"title": "Custom script laden mislukt"
}
},
"add_link": {

File diff suppressed because it is too large Load Diff

View File

@@ -289,8 +289,7 @@
"table": "Tabel",
"geo-map": "Hartă geografică",
"board": "Tablă Kanban",
"include_archived_notes": "Afișează notițele arhivate",
"presentation": "Prezentare"
"include_archived_notes": "Afișează notițele arhivate"
},
"bookmark_switch": {
"bookmark": "Semn de carte",
@@ -612,9 +611,7 @@
"zoom_in": "Mărește",
"zoom_out": "Micșorează",
"show-cheatsheet": "Afișează ghidul rapid",
"toggle-zen-mode": "Mod zen",
"new-version-available": "Actualizare nouă disponibilă",
"download-update": "Obțineți versiunea {{latestVersion}}"
"toggle-zen-mode": "Mod zen"
},
"heading_style": {
"markdown": "Stil Markdown",
@@ -704,13 +701,7 @@
"first-week-has-minimum-days": "Prima săptămână are numărul minim de zile",
"min-days-in-first-week": "Numărul minim de zile pentru prima săptămână",
"first-week-info": "Opțiunea de prima săptămână conține prima zi de joi din an este bazată pe standardul <a href=\"https://en.wikipedia.org/wiki/ISO_week_date#First_week\">ISO 8601</a>.",
"first-week-warning": "Schimbarea opțiunii primei săptămâni poate cauza duplicate cu notițele săptămânale existente deoarece acestea nu vor fi actualizate retroactiv.",
"tuesday": "Marți",
"wednesday": "Miercuri",
"thursday": "Joi",
"friday": "Vineri",
"saturday": "Sâmbătă",
"formatting-locale-auto": "În funcție de limba aplicației"
"first-week-warning": "Schimbarea opțiunii primei săptămâni poate cauza duplicate cu notițele săptămânale existente deoarece acestea nu vor fi actualizate retroactiv."
},
"image_properties": {
"copy_reference_to_clipboard": "Copiază referință în clipboard",
@@ -812,8 +803,7 @@
"delete_this_note": "Șterge această notiță",
"error_cannot_get_branch_id": "Nu s-a putut obține branchId-ul pentru calea „{{notePath}}”",
"error_unrecognized_command": "Comandă nerecunoscută „{{command}}”",
"insert_child_note": "Inserează subnotiță",
"note_revisions": "Revizuiri ale notițelor"
"insert_child_note": "Inserează subnotiță"
},
"move_note": {
"clone_note_new_parent": "clonează notița la noul părinte dacă notița are mai multe clone/ramuri (când nu este clar care ramură trebuie ștearsă)",
@@ -2079,10 +2069,5 @@
},
"collections": {
"rendering_error": "Nu a putut fi afișat conținutul din cauza unei erori."
},
"presentation_view": {
"edit-slide": "Editați acest slide",
"start-presentation": "Începeți prezentarea",
"slide-overview": "Afișați o imagine de ansamblu a slide-urilor"
}
}

View File

@@ -320,8 +320,7 @@
"explodeArchivesTooltip": "Если этот флажок установлен, Trilium будет читать файлы <code>.zip</code>, <code>.enex</code> и <code>.opml</code> и создавать заметки из файлов внутри этих архивов. Если флажок не установлен, Trilium будет прикреплять сами архивы к заметке.",
"explodeArchives": "Прочитать содержимое архивов <code>.zip</code>, <code>.enex</code> и <code>.opml</code>.",
"shrinkImagesTooltip": "<p>Если этот параметр включен, Trilium попытается уменьшить размер импортируемых изображений путём масштабирования и оптимизации, что может повлиять на воспринимаемое качество изображения. Если этот параметр не установлен, изображения будут импортированы без изменений.</p><p>Это не относится к импорту файлов <code>.zip</code> с метаданными, поскольку предполагается, что эти файлы уже оптимизированы.</p>",
"codeImportedAsCode": "Импортировать распознанные файлы кода (например, <code>.json</code>) в виде заметок типа \"код\", если это неясно из метаданных",
"importZipRecommendation": "При импорте ZIP файла иерархия заметок будет отражена в структуре папок внутри архива."
"codeImportedAsCode": "Импортировать распознанные файлы кода (например, <code>.json</code>) в виде заметок типа \"код\", если это неясно из метаданных"
},
"markdown_import": {
"dialog_title": "Импорт Markdown",
@@ -981,8 +980,7 @@
"open_sql_console_history": "Открыть историю консоли SQL",
"show_shared_notes_subtree": "Поддерево общедоступных заметок",
"switch_to_mobile_version": "Перейти на мобильную версию",
"switch_to_desktop_version": "Переключиться на версию для ПК",
"new-version-available": "Доступно обновление"
"switch_to_desktop_version": "Переключиться на версию для ПК"
},
"zpetne_odkazy": {
"backlink": "{{count}} ссылки",

View File

@@ -1,8 +0,0 @@
{
"about": {
"title": "Om Trilium Notes",
"homepage": "Hemsida:",
"app_version": "App version:",
"db_version": "DB version:"
}
}

View File

@@ -184,8 +184,7 @@
},
"import-status": "匯入狀態",
"in-progress": "正在匯入:{{progress}}",
"successful": "匯入成功。",
"importZipRecommendation": "匯入 ZIP 檔案時,筆記層級將反映壓縮檔內的子目錄結構。"
"successful": "匯入成功。"
},
"include_note": {
"dialog_title": "內嵌筆記",
@@ -647,9 +646,7 @@
"about": "關於 TriliumNext 筆記",
"logout": "登出",
"show-cheatsheet": "顯示快捷鍵說明",
"toggle-zen-mode": "禪模式",
"new-version-available": "發現新更新",
"download-update": "取得版本 {{latestVersion}}"
"toggle-zen-mode": "禪模式"
},
"sync_status": {
"unknown": "<p>同步狀態將在下一次同步嘗試開始後顯示。</p><p>點擊以立即觸發同步。</p>",
@@ -736,8 +733,7 @@
"insert_child_note": "插入子筆記",
"delete_this_note": "刪除此筆記",
"error_cannot_get_branch_id": "無法獲取 notePath '{{notePath}}' 的 branchId",
"error_unrecognized_command": "無法識別的命令 {{command}}",
"note_revisions": "筆記歷史版本"
"error_unrecognized_command": "無法識別的命令 {{command}}"
},
"note_icon": {
"change_note_icon": "更改筆記圖標",
@@ -750,7 +746,7 @@
"editable": "可編輯",
"basic_properties": "基本屬性",
"language": "語言",
"configure_code_notes": "設定程式碼筆記…"
"configure_code_notes": "配寘代碼注釋..."
},
"book_properties": {
"view_type": "視圖類型",
@@ -766,8 +762,7 @@
"table": "表格",
"geo-map": "地理地圖",
"board": "看板",
"include_archived_notes": "顯示已封存筆記",
"presentation": "簡報"
"include_archived_notes": "顯示已封存筆記"
},
"edited_notes": {
"no_edited_notes_found": "今天還沒有編輯過的筆記...",
@@ -1255,13 +1250,7 @@
"min-days-in-first-week": "第一週的最少天數",
"first-week-info": "年度第一週包含第一個週四是基於 <a href=\"https://en.wikipedia.org/wiki/ISO_week_date#First_week\">ISO 8601</a> 標準。",
"first-week-warning": "變更第一週選項可能導致與現有的「週筆記」重複,現有的「週筆記」將不會相應更新。",
"formatting-locale": "日期和數字格式",
"tuesday": "週二",
"wednesday": "週三",
"thursday": "週四",
"friday": "週五",
"saturday": "週六",
"formatting-locale-auto": "根據應用程式的語言設定"
"formatting-locale": "日期和數字格式"
},
"backup": {
"automatic_backup": "自動備份",
@@ -1442,7 +1431,7 @@
"relation-map": "關聯圖",
"note-map": "筆記地圖",
"render-note": "渲染筆記",
"mermaid-diagram": "美人魚圖",
"mermaid-diagram": "美人魚圖Mermaid",
"canvas": "畫布",
"web-view": "網頁顯示",
"mind-map": "心智圖",
@@ -1518,9 +1507,7 @@
"window-on-top": "保持此視窗置頂"
},
"note_detail": {
"could_not_find_typewidget": "找不到類型為 '{{type}}' 的 typeWidget",
"printing": "正在列印…",
"printing_pdf": "正在匯出為 PDF…"
"could_not_find_typewidget": "找不到類型為 '{{type}}' 的 typeWidget"
},
"note_title": {
"placeholder": "請輸入筆記標題..."
@@ -1640,7 +1627,7 @@
"label": "格式工具欄",
"floating": {
"title": "浮動",
"description": "編輯工具出現在標附近"
"description": "編輯工具出現在標附近;"
},
"fixed": {
"title": "固定",
@@ -2078,10 +2065,5 @@
},
"collections": {
"rendering_error": "發現錯誤,無法顯示內容。"
},
"presentation_view": {
"edit-slide": "編輯此投影片",
"start-presentation": "開始簡報",
"slide-overview": "切換投影片概覽"
}
}

View File

@@ -4,15 +4,11 @@
"title": "Về Trilium Notes",
"app_version": "Phiên bản:",
"db_version": "Phiên bản DB:",
"sync_version": "Phiên bản liên kết:",
"build_date": "Ngày build:",
"build_revision": "Xây dựng bản sửa đổi:",
"data_directory": "Đường dẫn dữ liệu:"
"sync_version": "Phiên bản liên kết:"
},
"add_link": {
"add_link": "Thêm liên kết",
"button_add_link": "Thêm liên kết",
"help_on_links": "Trợ giúp về các liên kết"
"button_add_link": "Thêm liên kết"
},
"bulk_actions": {
"other": "Khác"
@@ -38,17 +34,7 @@
},
"toast": {
"critical-error": {
"title": "Lỗi nghiêm trọng",
"message": "Đã xảy ra lỗi nghiêm trọng ngăn ứng dụng client khởi động\n\n{{message}}\n\nĐiều này có khả năng bị gây ra bởi một script hoạt động không như mong đợi. Hãy thử khởi động ứng dụng ở chế độ an toàn và giải quyết vấn đề."
},
"widget-error": {
"title": "Khởi tạo widget thất bại",
"message-custom": "Tiện ích tùy chỉnh từ ghi chú với ID \"{{id}}\", tiêu đề \"{{title}}\" không thể khởi tạo vì:\n\n{{message}}",
"message-unknown": "Tiện ích chưa biết không thể được khởi tạo vì:\n\n{{message}}"
},
"bundle-error": {
"title": "Tải script tùy chọn thất bại",
"message": "Script từ ghi chú ID \"{{id}}\", tiêu đề \"{{title}}\" không thể chạy được vì:\n\n{{message}}"
"title": "Lỗi nghiêm trọng"
}
},
"import": {

View File

@@ -16,7 +16,7 @@ interface ElectronProcess {
interface CustomGlobals {
isDesktop: typeof utils.isDesktop;
isMobile: typeof utils.isMobile;
device: "mobile" | "desktop" | "print";
device: "mobile" | "desktop";
getComponentByEl: typeof appContext.getComponentByEl;
getHeaders: typeof server.getHeaders;
getReferenceLinkTitle: (href: string) => Promise<string>;
@@ -26,6 +26,7 @@ interface CustomGlobals {
appContext: AppContext;
froca: Froca;
treeCache: Froca;
importMarkdownInline: () => Promise<unknown>;
SEARCH_HELP_TEXT: string;
activeDialog: JQuery<HTMLElement> | null;
componentId: string;
@@ -58,9 +59,6 @@ declare global {
process?: ElectronProcess;
glob?: CustomGlobals;
/** On the printing endpoint, set to true when the note has fully loaded and is ready to be printed/exported as PDF. */
_noteReady?: boolean;
EXCALIDRAW_ASSET_PATH?: string;
}

View File

@@ -1,45 +0,0 @@
export function readCssVar(element: HTMLElement, varName: string) {
return new CssVarReader(getComputedStyle(element).getPropertyValue("--" + varName));
}
export class CssVarReader {
protected value: string;
constructor(rawValue: string) {
this.value = rawValue;
}
asString(defaultValue?: string) {
return (this.value) ? this.value : defaultValue;
}
asNumber(defaultValue?: number) {
let number: Number = NaN;
if (this.value) {
number = parseFloat(this.value);
}
return (!isNaN(number.valueOf()) ? number.valueOf() : defaultValue)
}
asEnum<T>(enumType: T, defaultValue?: T[keyof T]): T[keyof T] | undefined {
let result: T[keyof T] | undefined;
result = enumType[this.value as keyof T];
if (result === undefined) {
result = defaultValue;
}
return result;
}
asArray(delimiter: string = " "): CssVarReader[] {
// Note: ignoring delimiters inside quotation marks is currently unsupported
let values = this.value.split(delimiter);
return values.map((v) => new CssVarReader(v));
}
}

View File

@@ -1,19 +0,0 @@
import { describe, expect, it } from "vitest";
import options from "../services/options";
import { formatDateTime, normalizeLocale } from "./formatters";
describe("formatters", () => {
it("tolerates incorrect locale", () => {
options.set("formattingLocale", "cn_TW");
expect(formatDateTime(new Date())).toBeTruthy();
expect(formatDateTime(new Date(), "full", "none")).toBeTruthy();
expect(formatDateTime(new Date(), "none", "full")).toBeTruthy();
});
it("normalizes locale", () => {
expect(normalizeLocale("zh_CN")).toBe("zh-CN");
expect(normalizeLocale("cn")).toBe("zh-CN");
expect(normalizeLocale("tw")).toBe("zh-TW");
});
});

View File

@@ -10,7 +10,7 @@ export function formatDateTime(date: string | Date | number | null | undefined,
return "";
}
const locale = normalizeLocale(options.get("formattingLocale") || options.get("locale") || navigator.language);
const locale = options.get("formattingLocale") || options.get("locale") || navigator.language;
let parsedDate;
if (typeof date === "string" || typeof date === "number") {
@@ -26,37 +26,15 @@ export function formatDateTime(date: string | Date | number | null | undefined,
if (timeStyle !== "none" && dateStyle !== "none") {
// Format the date and time
try {
const formatter = new Intl.DateTimeFormat(locale, { dateStyle, timeStyle });
return formatter.format(parsedDate);
} catch (e) {
const formatter = new Intl.DateTimeFormat(undefined, { dateStyle, timeStyle });
return formatter.format(parsedDate);
}
const formatter = new Intl.DateTimeFormat(locale, { dateStyle, timeStyle });
return formatter.format(parsedDate);
} else if (timeStyle === "none" && dateStyle !== "none") {
// Format only the date
try {
return parsedDate.toLocaleDateString(locale, { dateStyle });
} catch (e) {
return parsedDate.toLocaleDateString(undefined, { dateStyle });
}
return parsedDate.toLocaleDateString(locale, { dateStyle });
} else if (dateStyle === "none" && timeStyle !== "none") {
// Format only the time
try {
return parsedDate.toLocaleTimeString(locale, { timeStyle });
} catch (e) {
return parsedDate.toLocaleTimeString(undefined, { timeStyle });
}
return parsedDate.toLocaleTimeString(locale, { timeStyle });
}
throw new Error("Incorrect state.");
}
export function normalizeLocale(locale: string) {
locale = locale.replaceAll("_", "-");
switch (locale) {
case "cn": return "zh-CN";
case "tw": return "zh-TW";
default: return locale;
}
}

View File

@@ -9,9 +9,6 @@
}
button.global-menu-button {
--update-badge-x-offset: 4%;
--update-badge-y-offset: -16%;
position: relative;
width: 100% !important;
height: 100% !important;
@@ -58,26 +55,13 @@ button.global-menu-button {
.global-menu-button-update-available {
position: absolute;
display: flex;
width: 16px;
height: 16px;
right: calc(0px - var(--update-badge-x-offset));
bottom: calc(0px - var(--update-badge-y-offset));
justify-content: center;
align-items: center;
border-radius: 50%;
background: var(--global-menu-update-available-badge-background-color, var(--admonition-tip-accent-color));
color: var(--global-menu-update-available-badge-color, var(--main-background-color));
font-size: 16px;
transition: transform 200ms ease-in-out;
inset-inline-end: -30px;
bottom: -30px;
width: 100%;
height: 100%;
pointer-events: none;
}
.global-menu-button.show .global-menu-button-update-available {
transform: scale(.75);
transform-origin: center;
}
.global-menu .zoom-container {
display: flex;
flex-direction: row;
@@ -115,6 +99,21 @@ button.global-menu-button {
margin-inline-end: 6px;
}
/* #region Update available */
.global-menu-button-update-available-button {
width: 21px !important;
height: 21px !important;
padding: 0 !important;
border-radius: var(--button-border-radius);
transform: scale(0.9);
border: none;
opacity: 0.8;
display: flex;
align-items: center;
justify-content: center;
}
.global-menu-button-wrapper:hover .global-menu-button-update-available-button {
opacity: 1;

View File

@@ -3,7 +3,7 @@ import "./global_menu.css";
import { useStaticTooltip, useStaticTooltipWithKeyboardShortcut, useTriliumOption, useTriliumOptionBool, useTriliumOptionInt } from "../react/hooks";
import { useContext, useEffect, useRef, useState } from "preact/hooks";
import { t } from "../../services/i18n";
import { FormDropdownDivider, FormDropdownSubmenu, FormListHeader, FormListItem } from "../react/FormList";
import { FormDropdownDivider, FormDropdownSubmenu, FormListItem } from "../react/FormList";
import { CommandNames } from "../../components/app_context";
import KeyboardShortcut from "../react/KeyboardShortcut";
import { KeyboardActionNames } from "@triliumnext/commons";
@@ -26,7 +26,7 @@ export default function GlobalMenu({ isHorizontalLayout }: { isHorizontalLayout:
const isVerticalLayout = !isHorizontalLayout;
const parentComponent = useContext(ParentComponent);
const { isUpdateAvailable, latestVersion } = useTriliumUpdateStatus();
return (
<Dropdown
className="global-menu"
@@ -34,7 +34,7 @@ export default function GlobalMenu({ isHorizontalLayout }: { isHorizontalLayout:
text={<>
{isVerticalLayout && <VerticalLayoutIcon />}
{isUpdateAvailable && <div class="global-menu-button-update-available">
<span className="bx bxs-down-arrow-alt global-menu-button-update-available-button" title={t("update_available.update_available")}></span>
<span className="bx bx-sync global-menu-button-update-available-button" title={t("update_available.update_available")}></span>
</div>}
</>}
noDropdownListStyle
@@ -58,14 +58,7 @@ export default function GlobalMenu({ isHorizontalLayout }: { isHorizontalLayout:
<KeyboardActionMenuItem command="showHelp" icon="bx bx-help-circle" text={t("global_menu.show_help")} />
<KeyboardActionMenuItem command="showCheatsheet" icon="bx bxs-keyboard" text={t("global_menu.show-cheatsheet")} />
<MenuItem command="openAboutDialog" icon="bx bx-info-circle" text={t("global_menu.about")} />
{isUpdateAvailable && <>
<FormListHeader text={t("global_menu.new-version-available")} />
<MenuItem command={() => window.open("https://github.com/TriliumNext/Trilium/releases/latest")}
icon="bx bx-download"
text={t("global_menu.download-update", {latestVersion})} />
</>}
{isUpdateAvailable && <MenuItem command={() => window.open("https://github.com/TriliumNext/Trilium/releases/latest")} icon="bx bx-sync" text={t("global_menu.update_available", { latestVersion })} /> }
{!isElectron() && <BrowserOnlyOptions />}
</Dropdown>
)

View File

@@ -1,29 +0,0 @@
@keyframes left-pane-toggle-button-expand {
from {
rotate: 0deg;
} to {
rotate: 180deg;
}
}
@keyframes left-pane-toggle-button-collapse {
from {
rotate: 180deg;
} to {
rotate: 360deg;
}
}
.layout-vertical .left-pane-toggle-button::before {
display: block;
}
.layout-vertical .left-pane-toggle-button.action-collapse::before {
rotate: 360deg;
animation: left-pane-toggle-button-collapse 600ms ease-in-out;
}
.layout-vertical .left-pane-toggle-button.action-expand::before {
rotate: 180deg;
animation: left-pane-toggle-button-expand 600ms ease-in-out;
}

View File

@@ -1,4 +1,3 @@
import "./left_pane_toggle.css";
import { useEffect, useState } from "preact/hooks";
import ActionButton from "../react/ActionButton";
import options from "../../services/options";
@@ -19,10 +18,12 @@ export default function LeftPaneToggle({ isHorizontalLayout }: { isHorizontalLay
return (
<ActionButton
className={`${isHorizontalLayout ? "toggle-button" : "launcher-button"} left-pane-toggle-button ${currentLeftPaneVisible ? "action-collapse" : "action-expand"}`}
className={`${isHorizontalLayout ? "toggle-button" : "launcher-button"}`}
text={currentLeftPaneVisible ? t("left_pane_toggle.hide_panel") : t("left_pane_toggle.show_panel")}
triggerCommand={currentLeftPaneVisible ? "hideLeftPane" : "showLeftPane"}
icon={isHorizontalLayout ? "bx bx-sidebar" : "bx bx-chevrons-left"}
icon={isHorizontalLayout
? "bx bx-sidebar"
: (currentLeftPaneVisible ? "bx bx-chevrons-left" : "bx bx-chevrons-right" )}
/>
)
}

View File

@@ -47,9 +47,8 @@ export default class RightDropdownButtonWidget extends BasicWidget {
}
});
this.$widget.attr("title", this.title);
this.tooltip = Tooltip.getOrCreateInstance(this.$widget[0], {
trigger: "hover",
this.$tooltip = this.$widget.find(".tooltip-trigger").attr("title", this.title);
this.tooltip = new Tooltip(this.$tooltip[0], {
placement: handleRightToLeftPlacement(this.settings.titlePlacement),
fallbackPlacements: [ handleRightToLeftPlacement(this.settings.titlePlacement) ]
});
@@ -57,7 +56,9 @@ export default class RightDropdownButtonWidget extends BasicWidget {
this.$widget
.find(".right-dropdown-button")
.addClass(this.iconClass)
.on("click", () => this.tooltip.hide());
.on("click", () => this.tooltip.hide())
.on("mouseenter", () => this.tooltip.show())
.on("mouseleave", () => this.tooltip.hide());
this.$widget.on("show.bs.dropdown", async () => {
await this.dropdownShown();

View File

@@ -1,4 +1,4 @@
import { allViewTypes, ViewModeMedia, ViewModeProps, ViewTypeOptions } from "./interface";
import { allViewTypes, ViewModeProps, ViewTypeOptions } from "./interface";
import { useNoteContext, useNoteLabel, useNoteLabelBoolean, useTriliumEvent } from "../react/hooks";
import FNote from "../../entities/fnote";
import "./NoteList.css";
@@ -12,9 +12,8 @@ import BoardView from "./board";
import { subscribeToMessages, unsubscribeToMessage as unsubscribeFromMessage } from "../../services/ws";
import { WebSocketMessage } from "@triliumnext/commons";
import froca from "../../services/froca";
import PresentationView from "./presentation";
interface NoteListProps {
interface NoteListProps<T extends object> {
note: FNote | null | undefined;
notePath: string | null | undefined;
highlightedTokens?: string[] | null;
@@ -22,24 +21,22 @@ interface NoteListProps {
displayOnlyCollections?: boolean;
isEnabled: boolean;
ntxId: string | null | undefined;
media: ViewModeMedia;
onReady?: () => void;
}
export default function NoteList<T extends object>(props: Pick<NoteListProps, "displayOnlyCollections" | "media" | "onReady">) {
export default function NoteList<T extends object>(props: Pick<NoteListProps<T>, "displayOnlyCollections">) {
const { note, noteContext, notePath, ntxId } = useNoteContext();
const isEnabled = noteContext?.hasNoteList();
return <CustomNoteList note={note} isEnabled={!!isEnabled} notePath={notePath} ntxId={ntxId} {...props} />
}
export function SearchNoteList<T extends object>(props: Omit<NoteListProps, "isEnabled">) {
export function SearchNoteList<T extends object>(props: Omit<NoteListProps<T>, "isEnabled">) {
return <CustomNoteList {...props} isEnabled={true} />
}
export function CustomNoteList<T extends object>({ note, isEnabled: shouldEnable, notePath, highlightedTokens, displayOnlyCollections, ntxId, onReady, ...restProps }: NoteListProps) {
function CustomNoteList<T extends object>({ note, isEnabled: shouldEnable, notePath, highlightedTokens, displayOnlyCollections, ntxId }: NoteListProps<T>) {
const widgetRef = useRef<HTMLDivElement>(null);
const viewType = useNoteViewType(note);
const noteIds = useNoteIds(shouldEnable ? note : null, viewType, ntxId);
const noteIds = useNoteIds(note, viewType, ntxId);
const isFullHeight = (viewType && viewType !== "list" && viewType !== "grid");
const [ isIntersecting, setIsIntersecting ] = useState(false);
const shouldRender = (isFullHeight || isIntersecting || note?.type === "book");
@@ -78,14 +75,12 @@ export function CustomNoteList<T extends object>({ note, isEnabled: shouldEnable
note, noteIds, notePath,
highlightedTokens,
viewConfig: viewModeConfig[0],
saveConfig: viewModeConfig[1],
onReady: onReady ?? (() => {}),
...restProps
saveConfig: viewModeConfig[1]
}
}
return (
<div ref={widgetRef} className={`note-list-widget component ${isFullHeight && isEnabled ? "full-height" : ""}`}>
<div ref={widgetRef} className={`note-list-widget component ${isFullHeight ? "full-height" : ""}`}>
{props && isEnabled && (
<div className="note-list-widget-content">
{getComponentByViewType(viewType, props)}
@@ -109,8 +104,6 @@ function getComponentByViewType(viewType: ViewTypeOptions, props: ViewModeProps<
return <TableView {...props} />
case "board":
return <BoardView {...props} />
case "presentation":
return <PresentationView {...props} />
}
}
@@ -127,7 +120,7 @@ function useNoteViewType(note?: FNote | null): ViewTypeOptions | undefined {
}
}
export function useNoteIds(note: FNote | null | undefined, viewType: ViewTypeOptions | undefined, ntxId: string | null | undefined) {
function useNoteIds(note: FNote | null | undefined, viewType: ViewTypeOptions | undefined, ntxId: string | null | undefined) {
const [ noteIds, setNoteIds ] = useState<string[]>([]);
const [ includeArchived ] = useNoteLabelBoolean(note, "includeArchived");
@@ -140,7 +133,7 @@ export function useNoteIds(note: FNote | null | undefined, viewType: ViewTypeOpt
}
async function getNoteIds(note: FNote) {
if (viewType === "list" || viewType === "grid" || viewType === "table" || note.type === "search") {
if (viewType === "list" || viewType === "grid") {
return note.getChildNoteIds();
} else {
return await note.getSubtreeNoteIds(includeArchived);
@@ -191,7 +184,7 @@ export function useNoteIds(note: FNote | null | undefined, viewType: ViewTypeOpt
return noteIds;
}
export function useViewModeConfig<T extends object>(note: FNote | null | undefined, viewType: ViewTypeOptions | undefined) {
function useViewModeConfig<T extends object>(note: FNote | null | undefined, viewType: ViewTypeOptions | undefined) {
const [ viewConfig, setViewConfig ] = useState<[T | undefined, (data: T) => void]>();
useEffect(() => {

View File

@@ -66,7 +66,7 @@ async function recursiveGroupBy(branches: FBranch[], byColumn: ColumnMap, groupB
const note = await branch.getNote();
if (!note || (!includeArchived && note.isArchived)) continue;
if (note.type !== "search" && note.hasChildren()) {
if (note.hasChildren()) {
await recursiveGroupBy(note.getChildBranches(), byColumn, groupByColumn, includeArchived);
}

View File

@@ -66,7 +66,6 @@ export const LOCALE_MAPPINGS: Record<DISPLAYABLE_LOCALE_IDS, (() => Promise<{ de
de: () => import("@fullcalendar/core/locales/de"),
es: () => import("@fullcalendar/core/locales/es"),
fr: () => import("@fullcalendar/core/locales/fr"),
it: () => import("@fullcalendar/core/locales/it"),
cn: () => import("@fullcalendar/core/locales/zh-cn"),
tw: () => import("@fullcalendar/core/locales/zh-tw"),
ro: () => import("@fullcalendar/core/locales/ro"),

View File

@@ -1,10 +1,8 @@
import FNote from "../../entities/fnote";
export const allViewTypes = ["list", "grid", "calendar", "table", "geoMap", "board", "presentation"] as const;
export const allViewTypes = ["list", "grid", "calendar", "table", "geoMap", "board"] as const;
export type ViewTypeOptions = typeof allViewTypes[number];
export type ViewModeMedia = "screen" | "print";
export interface ViewModeProps<T extends object> {
note: FNote;
notePath: string;
@@ -15,6 +13,4 @@ export interface ViewModeProps<T extends object> {
highlightedTokens: string[] | null | undefined;
viewConfig: T | undefined;
saveConfig(newConfig: T): void;
media: ViewModeMedia;
onReady(): void;
}

View File

@@ -106,12 +106,6 @@
text-align: center;
}
.note-list.list-view .note-path {
margin-left: 0.5em;
vertical-align: middle;
opacity: 0.5;
}
/* #region Grid view */
.note-list.grid-view .note-list-container {
display: flex;

View File

@@ -74,12 +74,12 @@ function ListNoteCard({ note, parentNote, expand, highlightedTokens }: { note: F
/>
<Icon className="note-icon" icon={note.getIcon()} />
<NoteLink className="note-book-title" notePath={notePath} noPreview showNotePath={parentNote.type === "search"} highlightedTokens={highlightedTokens} />
<NoteLink className="note-book-title" notePath={notePath} noPreview showNotePath={note.type === "search"} highlightedTokens={highlightedTokens} />
<NoteAttributes note={note} />
</h5>
{isExpanded && <>
<NoteContent note={note} highlightedTokens={highlightedTokens} noChildrenList />
<NoteContent note={note} highlightedTokens={highlightedTokens} />
<NoteChildren note={note} parentNote={parentNote} highlightedTokens={highlightedTokens} />
</>}
</div>
@@ -110,11 +110,7 @@ function GridNoteCard({ note, parentNote, highlightedTokens }: { note: FNote, pa
<span ref={titleRef} className="note-book-title">{noteTitle}</span>
<NoteAttributes note={note} />
</h5>
<NoteContent
note={note}
trim
highlightedTokens={highlightedTokens}
/>
<NoteContent note={note} trim highlightedTokens={highlightedTokens} />
</div>
)
}
@@ -130,22 +126,15 @@ function NoteAttributes({ note }: { note: FNote }) {
return <span className="note-list-attributes" ref={ref} />
}
function NoteContent({ note, trim, noChildrenList, highlightedTokens }: { note: FNote, trim?: boolean, noChildrenList?: boolean, highlightedTokens: string[] | null | undefined }) {
function NoteContent({ note, trim, highlightedTokens }: { note: FNote, trim?: boolean, highlightedTokens }) {
const contentRef = useRef<HTMLDivElement>(null);
const highlightSearch = useImperativeSearchHighlighlighting(highlightedTokens);
useEffect(() => {
content_renderer.getRenderedContent(note, {
trim,
noChildrenList
})
content_renderer.getRenderedContent(note, { trim })
.then(({ $renderedContent, type }) => {
if (!contentRef.current) return;
if ($renderedContent[0].innerHTML) {
contentRef.current.replaceChildren(...$renderedContent);
} else {
contentRef.current.replaceChildren();
}
contentRef.current.replaceChildren(...$renderedContent);
contentRef.current.classList.add(`type-${type}`);
highlightSearch(contentRef.current);
})

View File

@@ -1,10 +0,0 @@
.presentation-button-bar {
position: absolute;
top: 1em;
right: 1em;
}
.presentation-container {
width: 100%;
height: 100%;
}

View File

@@ -1,245 +0,0 @@
import { ViewModeMedia, ViewModeProps } from "../interface";
import { useEffect, useLayoutEffect, useRef, useState } from "preact/hooks";
import Reveal from "reveal.js";
import slideBaseStylesheet from "reveal.js/dist/reveal.css?raw";
import slideCustomStylesheet from "./slidejs.css?raw";
import { buildPresentationModel, PresentationModel, PresentationSlideBaseModel } from "./model";
import ShadowDom from "../../react/ShadowDom";
import ActionButton from "../../react/ActionButton";
import "./index.css";
import { RefObject } from "preact";
import { openInCurrentNoteContext } from "../../../components/note_context";
import { useNoteLabelWithDefault, useTriliumEvent } from "../../react/hooks";
import { t } from "../../../services/i18n";
import { DEFAULT_THEME, loadPresentationTheme } from "./themes";
import FNote from "../../../entities/fnote";
export default function PresentationView({ note, noteIds, media, onReady }: ViewModeProps<{}>) {
const [ presentation, setPresentation ] = useState<PresentationModel>();
const containerRef = useRef<HTMLDivElement>(null);
const [ api, setApi ] = useState<Reveal.Api>();
const stylesheets = usePresentationStylesheets(note, media);
function refresh() {
buildPresentationModel(note).then(setPresentation);
}
useTriliumEvent("entitiesReloaded", ({ loadResults }) => {
if (loadResults.getNoteIds().find(noteId => noteIds.includes(noteId)) ||
loadResults.getAttributeRows().find(attr => attr.noteId && attr.name?.startsWith("slide:") && noteIds.includes(attr.noteId))) {
refresh();
}
});
useLayoutEffect(refresh, [ note, noteIds ]);
useEffect(() => {
// We need to wait for Reveal.js to initialize (by setting api) and for the presentation to become available.
if (api && presentation) {
// Timeout is necessary because it otherwise can cause flakiness by rendering only the first slide.
setTimeout(onReady, 200);
}
}, [ api, presentation ]);
if (!presentation || !stylesheets) return;
const content = (
<>
{stylesheets.map(stylesheet => <style>{stylesheet}</style>)}
<Presentation presentation={presentation} setApi={setApi} />
</>
);
if (media === "screen") {
return (
<>
<ShadowDom
className="presentation-container"
containerRef={containerRef}
>{content}</ShadowDom>
<ButtonOverlay containerRef={containerRef} api={api} />
</>
)
} else if (media === "print") {
// Printing needs a query parameter that is read by Reveal.js.
const url = new URL(window.location.href);
url.searchParams.set("print-pdf", "");
window.history.replaceState({}, '', url);
// Shadow DOM doesn't work well with Reveal.js's PDF printing mechanism.
return content;
}
}
function usePresentationStylesheets(note: FNote, media: ViewModeMedia) {
const [ themeName ] = useNoteLabelWithDefault(note, "presentation:theme", DEFAULT_THEME);
const [ stylesheets, setStylesheets ] = useState<string[]>();
useLayoutEffect(() => {
loadPresentationTheme(themeName).then((themeStylesheet) => {
let stylesheets = [
slideBaseStylesheet,
themeStylesheet,
slideCustomStylesheet
];
if (media === "screen") {
// We are rendering in the shadow DOM, so the global variables are not set correctly.
stylesheets = stylesheets.map(stylesheet => stylesheet.replace(/:root/g, ":host"));
}
setStylesheets(stylesheets);
});
}, [ themeName ]);
return stylesheets;
}
function ButtonOverlay({ containerRef, api }: { containerRef: RefObject<HTMLDivElement>, api: Reveal.Api | undefined }) {
const [ isOverviewActive, setIsOverviewActive ] = useState(false);
useEffect(() => {
if (!api) return;
setIsOverviewActive(api.isOverview());
const onEnabled = () => setIsOverviewActive(true);
const onDisabled = () => setIsOverviewActive(false);
api.on("overviewshown", onEnabled);
api.on("overviewhidden", onDisabled);
return () => {
api.off("overviewshown", onEnabled);
api.off("overviewhidden", onDisabled);
};
}, [ api ]);
return (
<div className="presentation-button-bar">
<div className="floating-buttons-children">
<ActionButton
className="floating-button"
icon="bx bx-edit"
text={t("presentation_view.edit-slide")}
noIconActionClass
onClick={e => {
const currentSlide = api?.getCurrentSlide();
const noteId = getNoteIdFromSlide(currentSlide);
if (noteId) {
openInCurrentNoteContext(e, noteId);
}
}}
/>
<ActionButton
className="floating-button"
icon="bx bx-grid-horizontal"
text={t("presentation_view.slide-overview")}
active={isOverviewActive}
noIconActionClass
onClick={() => api?.toggleOverview()}
/>
<ActionButton
className="floating-button"
icon="bx bx-fullscreen"
text={t("presentation_view.start-presentation")}
noIconActionClass
onClick={() => containerRef.current?.requestFullscreen()}
/>
</div>
</div>
)
}
function Presentation({ presentation, setApi } : { presentation: PresentationModel, setApi: (api: Reveal.Api | undefined) => void }) {
const containerRef = useRef<HTMLDivElement>(null);
const [revealApi, setRevealApi] = useState<Reveal.Api>();
useEffect(() => {
if (!containerRef.current) return;
const api = new Reveal(containerRef.current, {
transition: "slide",
embedded: true,
pdfMaxPagesPerSlide: 1,
keyboardCondition(event) {
// Full-screen requests sometimes fail, we rely on the UI button instead.
if (event.key === "f") {
return false;
}
return true;
},
});
api.initialize().then(() => {
setRevealApi(api);
setApi(api);
if (containerRef.current) {
rewireLinks(containerRef.current, api);
}
});
return () => {
api.destroy();
setRevealApi(undefined);
setApi(undefined);
}
}, []);
useEffect(() => {
revealApi?.sync();
}, [ presentation, revealApi ]);
return (
<div ref={containerRef} className="reveal">
<div className="slides">
{presentation.slides?.map(slide => {
if (!slide.verticalSlides) {
return <Slide key={slide.noteId} slide={slide} />
} else {
return (
<section>
<Slide key={slide.noteId} slide={slide} />
{slide.verticalSlides.map(slide => <Slide key={slide.noteId} slide={slide} /> )}
</section>
);
}
})}
</div>
</div>
)
}
function Slide({ slide }: { slide: PresentationSlideBaseModel }) {
return (
<section
id={`slide-${slide.noteId}`}
data-note-id={slide.noteId}
data-background-color={slide.backgroundColor}
data-background-gradient={slide.backgroundGradient}
dangerouslySetInnerHTML={slide.content}
/>
);
}
function getNoteIdFromSlide(slide: HTMLElement | undefined) {
if (!slide) return;
return slide.dataset.noteId;
}
function rewireLinks(container: HTMLElement, api: Reveal.Api) {
const links = container.querySelectorAll<HTMLLinkElement>("a.reference-link");
for (const link of links) {
link.addEventListener("click", () => {
/**
* Reveal.js has built-in navigation by either index or ID. However, the ID-based navigation doesn't work because it tries to look
* outside the shadom DOM (via document.getElementById).
*/
const url = new URL(link.href);
if (!url.hash.startsWith("#/slide-")) return;
const targetId = url.hash.substring(8);
const slide = container.querySelector<HTMLElement>(`#slide-${targetId}`);
if (!slide) return;
const { h, v, f } = api.getIndices(slide);
api.slide(h, v, f);
});
}
}

View File

@@ -1,83 +0,0 @@
import { beforeAll, describe, expect, it } from "vitest";
import { buildNote } from "../../../test/easy-froca";
import FNote from "../../../entities/fnote";
import { buildPresentationModel, PresentationModel } from "./model";
let presentationNote!: FNote;
let data!: PresentationModel;
describe("Presentation model", () => {
beforeAll(async () => {
presentationNote = buildNote({
title: "Presentation",
id: "presentation",
"#viewType": "presentation",
"children": [
{
id: "slide1",
title: "First slide",
children: [
{
id: "slide2",
title: "First-sub",
content: `<p>Go to&nbsp;<a class="reference-link" href="#root/other">Other note</a>.</p>`
}
]
},
{
title: "Second slide",
id: "slide3",
content: `<p>Go to&nbsp;<a class="reference-link" href="#root/presentation/slide1">First slide</a>.</p>`,
children: [
{
id: "slide4",
title: "Second-sub",
content: `<p>Go to&nbsp;<a class="reference-link" href="#root/presentation/slide2">First-sub</a>.</p>`,
}
]
}
]
});
buildNote({
id: "other",
title: "Other note"
});
data = await buildPresentationModel(presentationNote);
});
it("it correctly maps horizontal and vertical slides", () => {
expect(data).toMatchObject({
slides: [
{
noteId: "slide1",
verticalSlides: [
{
noteId: "slide2"
}
]
},
{
noteId: "slide3",
verticalSlides: [
{
noteId: "slide4"
}
]
}
]
})
});
it("empty slides don't render children", () => {
expect(data.slides[0].content.__html).toStrictEqual("");
});
it("rewrites links to other slides", () => {
expect(data.slides[1].content.__html).toStrictEqual(`<div class="ck-content"><p>Go to&nbsp;<a class="reference-link" href="#/slide-slide1"><span class="bx bx-folder"></span>First slide</a>.</p></div>`);
expect(data.slides[1].verticalSlides![0].content.__html).toStrictEqual(`<div class="ck-content"><p>Go to&nbsp;<a class="reference-link" href="#/slide-slide2"><span class="bx bx-note"></span>First-sub</a>.</p></div>`);
});
it("rewrites links even if they are not part of the slideshow", () => {
expect(data.slides[0].verticalSlides![0].content.__html).toStrictEqual(`<div class="ck-content"><p>Go to&nbsp;<a class="reference-link" href="#/slide-other"><span class="bx bx-note"></span>Other note</a>.</p></div>`);
});
});

View File

@@ -1,73 +0,0 @@
import { NoteType } from "@triliumnext/commons";
import FNote from "../../../entities/fnote";
import contentRenderer from "../../../services/content_renderer";
type DangerouslySetInnerHTML = { __html: string; };
/** A top-level slide with optional vertical slides. */
interface PresentationSlideModel extends PresentationSlideBaseModel {
verticalSlides: PresentationSlideBaseModel[] | undefined;
}
/** Either a top-level slide or a vertical slide. */
export interface PresentationSlideBaseModel {
noteId: string;
type: NoteType;
content: DangerouslySetInnerHTML;
backgroundColor?: string;
backgroundGradient?: string;
}
export interface PresentationModel {
slides: PresentationSlideModel[];
}
export async function buildPresentationModel(note: FNote): Promise<PresentationModel> {
const slideNotes = await note.getChildNotes();
const slides: PresentationSlideModel[] = await Promise.all(slideNotes.map(async slideNote => ({
...(await buildSlideModel(slideNote)),
verticalSlides: note.type !== "search" ? await buildVerticalSlides(slideNote) : undefined
})));
postProcessSlides(slides);
return { slides };
}
async function buildVerticalSlides(parentSlideNote: FNote): Promise<undefined | PresentationSlideBaseModel[]> {
const children = await parentSlideNote.getChildNotes();
if (!children.length) return;
const slides: PresentationSlideBaseModel[] = await Promise.all(children.map(buildSlideModel));
return slides;
}
async function buildSlideModel(note: FNote): Promise<PresentationSlideBaseModel> {
const slideBackground = note.getLabelValue("slide:background") ?? undefined;
const isGradient = slideBackground?.includes("gradient(");
return {
noteId: note.noteId,
type: note.type,
content: await processContent(note),
backgroundColor: !isGradient ? slideBackground : undefined,
backgroundGradient: isGradient ? slideBackground : undefined
}
}
async function processContent(note: FNote): Promise<DangerouslySetInnerHTML> {
const { $renderedContent } = await contentRenderer.getRenderedContent(note, {
noChildrenList: true
});
return { __html: $renderedContent.html() };
}
async function postProcessSlides(slides: (PresentationSlideModel | PresentationSlideBaseModel)[]) {
for (const slide of slides) {
if (slide.type !== "text") continue;
slide.content.__html = slide.content.__html.replaceAll(/href="[^"]*#root[a-zA-Z0-9_\/]*\/([a-zA-Z0-9_]+)[^"]*"/g, `href="#/slide-$1"`);
if ("verticalSlides" in slide && slide.verticalSlides) {
postProcessSlides(slide.verticalSlides);
}
}
}

View File

@@ -1,29 +0,0 @@
figure img {
aspect-ratio: unset !important;
height: auto !important;
}
span.katex-html {
display: none !important;
}
p:has(span.text-tiny),
p:has(span.text-small),
p:has(span.text-big),
p:has(span.text-huge) {
line-height: unset !important;
}
span.text-tiny { font-size: 0.5em; }
span.text-small { font-size: 0.75em; }
span.text-big { font-size: 1.5em; }
span.text-huge { font-size: 2em; }
footer.file-footer {
display: none !important;
}
.reveal video {
max-width: unset;
max-height: unset;
}

View File

@@ -1,10 +0,0 @@
import { it, describe } from "vitest";
import { getPresentationThemes, loadPresentationTheme } from "./themes";
describe("Presentation themes", () => {
it("can load all themes", async () => {
const themes = getPresentationThemes();
await Promise.all(themes.map(theme => loadPresentationTheme(theme.id)));
});
});

View File

@@ -1,58 +0,0 @@
export const DEFAULT_THEME = "white";
const themes = {
black: {
name: "Black",
loadTheme: () => import("reveal.js/dist/theme/black.css?raw")
},
white: {
name: "White",
loadTheme: () => import("reveal.js/dist/theme/white.css?raw")
},
beige: {
name: "Beige",
loadTheme: () => import("reveal.js/dist/theme/beige.css?raw")
},
serif: {
name: "Serif",
loadTheme: () => import("reveal.js/dist/theme/serif.css?raw")
},
simple: {
name: "Simple",
loadTheme: () => import("reveal.js/dist/theme/simple.css?raw")
},
solarized: {
name: "Solarized",
loadTheme: () => import("reveal.js/dist/theme/solarized.css?raw")
},
moon: {
name: "Moon",
loadTheme: () => import("reveal.js/dist/theme/moon.css?raw")
},
dracula: {
name: "Dracula",
loadTheme: () => import("reveal.js/dist/theme/dracula.css?raw")
},
sky: {
name: "Sky",
loadTheme: () => import("reveal.js/dist/theme/sky.css?raw")
},
blood: {
name: "Blood",
loadTheme: () => import("reveal.js/dist/theme/blood.css?raw")
}
} as const;
export function getPresentationThemes() {
return Object.entries(themes).map(([ id, theme ]) => ({
id: id,
name: theme.name
}));
}
export async function loadPresentationTheme(name: keyof typeof themes | string) {
let theme = themes[name];
if (!theme) theme = themes[DEFAULT_THEME];
return (await theme.loadTheme()).default;
}

View File

@@ -2,7 +2,7 @@ import { useCallback, useContext, useEffect, useMemo, useRef, useState } from "p
import { ViewModeProps } from "../interface";
import { buildColumnDefinitions } from "./columns";
import getAttributeDefinitionInformation, { buildRowDefinitions, TableData } from "./rows";
import { useLegacyWidget, useNoteLabelBoolean, useNoteLabelInt, useTriliumEvent } from "../../react/hooks";
import { useLegacyWidget, useNoteLabelBoolean, useNoteLabelInt, useSpacedUpdate, useTriliumEvent } from "../../react/hooks";
import Tabulator from "./tabulator";
import { Tabulator as VanillaTabulator, SortModule, FormatModule, InteractionModule, EditModule, ResizeColumnsModule, FrozenColumnsModule, PersistenceModule, MoveColumnsModule, MoveRowsModule, ColumnDefinition, DataTreeModule, Options, RowComponent} from 'tabulator-tables';
import { useContextMenu } from "./context_menu";
@@ -17,7 +17,6 @@ import AttributeDetailWidget from "../../attribute_widgets/attribute_detail";
import attributes from "../../../services/attributes";
import { RefObject } from "preact";
import SpacedUpdate from "../../../services/spaced_update";
import froca from "../../../services/froca";
interface TableConfig {
tableData: {
@@ -133,27 +132,25 @@ function useData(note: FNote, noteIds: string[], viewConfig: TableConfig | undef
const [ isSorted ] = useNoteLabelBoolean(note, "sorted");
const [ movableRows, setMovableRows ] = useState(false);
async function refresh() {
function refresh() {
const info = getAttributeDefinitionInformation(note);
// Ensure all note IDs are loaded.
await froca.getNotes(noteIds);
const { definitions: rowData, hasSubtree: hasChildren, rowNumber } = await buildRowDefinitions(note, info, includeArchived, maxDepth);
const columnDefs = buildColumnDefinitions({
info,
movableRows,
existingColumnData: viewConfig?.tableData?.columns,
rowNumberHint: rowNumber,
position: newAttributePosition.current ?? undefined
buildRowDefinitions(note, info, includeArchived, maxDepth).then(({ definitions: rowData, hasSubtree: hasChildren, rowNumber }) => {
const columnDefs = buildColumnDefinitions({
info,
movableRows,
existingColumnData: viewConfig?.tableData?.columns,
rowNumberHint: rowNumber,
position: newAttributePosition.current ?? undefined
});
setColumnDefs(columnDefs);
setRowData(rowData);
setHasChildren(hasChildren);
resetNewAttributePosition();
});
setColumnDefs(columnDefs);
setRowData(rowData);
setHasChildren(hasChildren);
resetNewAttributePosition();
}
useEffect(() => { refresh() }, [ note, noteIds, maxDepth, movableRows ]);
useEffect(refresh, [ note, noteIds, maxDepth, movableRows ]);
useTriliumEvent("entitiesReloaded", ({ loadResults}) => {
// React to column changes.

View File

@@ -20,10 +20,6 @@ export async function buildRowDefinitions(parentNote: FNote, infos: AttributeDef
let hasSubtree = false;
let rowNumber = childBranches.length;
if (parentNote.type === "search") {
maxDepth = 0;
}
for (const branch of childBranches) {
const note = await branch.getNote();
if (!note || (!includeArchived && note.isArchived)) {

View File

@@ -79,8 +79,7 @@ export default function ExportDialog() {
values={[
{ value: "html", label: t("export.format_html_zip") },
{ value: "markdown", label: t("export.format_markdown") },
{ value: "opml", label: t("export.format_opml") },
{ value: "share", label: t("export.share-format") }
{ value: "opml", label: t("export.format_opml") }
]}
/>

View File

@@ -37,7 +37,7 @@ export default function ImportDialog() {
onSubmit={async () => {
if (!files || !parentNoteId) {
return;
}
}
const options: UploadFilesOptions = {
safeImport: boolToString(safeImport),
@@ -51,19 +51,11 @@ export default function ImportDialog() {
setShown(false);
await importService.uploadFiles("notes", parentNoteId, Array.from(files), options);
}}
onHidden={() => {
setShown(false);
setFiles(null);
}}
onHidden={() => setShown(false)}
footer={<Button text={t("import.import")} primary disabled={!files} />}
show={shown}
>
<FormGroup name="files" label={t("import.chooseImportFile")} description={
<>
{t("import.importDescription")} <strong>{ noteTitle }</strong>.<br />
{t("import.importZipRecommendation")}
</>
}>
<FormGroup name="files" label={t("import.chooseImportFile")} description={<>{t("import.importDescription")} <strong>{ noteTitle }</strong></>}>
<FormFileUpload multiple onChange={setFiles} />
</FormGroup>
@@ -90,7 +82,7 @@ export default function ImportDialog() {
currentValue={codeImportedAsCode} onChange={setCodeImportedAsCode}
/>
<FormCheckbox
name="replace-underscores-with-spaces" label={t("import.replaceUnderscoresWithSpaces")}
name="replace-underscores-with-spaces" label={t("import.replaceUnderscoresWithSpaces")}
currentValue={replaceUnderscoresWithSpaces} onChange={setReplaceUnderscoresWithSpaces}
/>
</FormMultiGroup>
@@ -100,4 +92,4 @@ export default function ImportDialog() {
function boolToString(value: boolean) {
return value ? "true" : "false";
}
}

View File

@@ -7,7 +7,6 @@ import utils from "../../services/utils";
import Modal from "../react/Modal";
import Button from "../react/Button";
import { useTriliumEvent } from "../react/hooks";
import EditableTextTypeWidget from "../type_widgets/editable_text";
interface RenderMarkdownResponse {
htmlContent: string;
@@ -15,34 +14,39 @@ interface RenderMarkdownResponse {
export default function MarkdownImportDialog() {
const markdownImportTextArea = useRef<HTMLTextAreaElement>(null);
const [textTypeWidget, setTextTypeWidget] = useState<EditableTextTypeWidget>();
const [ text, setText ] = useState("");
const [ shown, setShown ] = useState(false);
useTriliumEvent("showPasteMarkdownDialog", ({ textTypeWidget }) => {
setTextTypeWidget(textTypeWidget);
const triggerImport = useCallback(() => {
if (appContext.tabManager.getActiveContextNoteType() !== "text") {
return;
}
if (utils.isElectron()) {
const { clipboard } = utils.dynamicRequire("electron");
const text = clipboard.readText();
convertMarkdownToHtml(text, textTypeWidget);
convertMarkdownToHtml(text);
} else {
setShown(true);
}
});
}, []);
useTriliumEvent("importMarkdownInline", triggerImport);
useTriliumEvent("pasteMarkdownIntoText", triggerImport);
async function sendForm() {
await convertMarkdownToHtml(text);
setText("");
setShown(false);
}
return (
<Modal
className="markdown-import-dialog" title={t("markdown_import.dialog_title")} size="lg"
footer={<Button className="markdown-import-button" text={t("markdown_import.import_button")} onClick={() => setShown(false)} keyboardShortcut="Ctrl+Enter" />}
footer={<Button className="markdown-import-button" text={t("markdown_import.import_button")} onClick={sendForm} keyboardShortcut="Ctrl+Space" />}
onShown={() => markdownImportTextArea.current?.focus()}
onHidden={async () => {
if (textTypeWidget) {
await convertMarkdownToHtml(text, textTypeWidget);
}
setShown(false);
setText("");
}}
onHidden={() => setShown(false) }
show={shown}
>
<p>{t("markdown_import.modal_body_text")}</p>
@@ -52,17 +56,26 @@ export default function MarkdownImportDialog() {
onKeyDown={(e) => {
if (e.key === "Enter" && e.ctrlKey) {
e.preventDefault();
setShown(false);
sendForm();
}
}}></textarea>
</Modal>
)
}
async function convertMarkdownToHtml(markdownContent: string, textTypeWidget: EditableTextTypeWidget) {
async function convertMarkdownToHtml(markdownContent: string) {
const { htmlContent } = await server.post<RenderMarkdownResponse>("other/render-markdown", { markdownContent });
await textTypeWidget.addHtmlToEditor(htmlContent);
const textEditor = await appContext.tabManager.getActiveContext()?.getTextEditor();
if (!textEditor) {
return;
}
const viewFragment = textEditor.data.processor.toView(htmlContent);
const modelFragment = textEditor.data.toModel(viewFragment);
textEditor.model.insertContent(modelFragment, textEditor.model.document.selection);
textEditor.editing.view.focus();
toast.showMessage(t("markdown_import.import_success"));
}

Some files were not shown because too many files have changed in this diff Show More