mirror of
https://github.com/zadam/trilium.git
synced 2025-11-10 15:25:51 +01:00
Compare commits
2 Commits
v0.99.4
...
copilot/fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71eb1edf07 | ||
|
|
f3e6ba8f37 |
77
.github/workflows/deploy-docs.yml
vendored
77
.github/workflows/deploy-docs.yml
vendored
@@ -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:
|
on:
|
||||||
# Trigger on push to main branch
|
# Trigger on push to main branch
|
||||||
@@ -9,9 +11,11 @@ on:
|
|||||||
# Only run when docs files change
|
# Only run when docs files change
|
||||||
paths:
|
paths:
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
- 'apps/edit-docs/**'
|
- 'README.md' # README is synced to docs/index.md
|
||||||
- 'apps/build-docs/**'
|
- 'mkdocs.yml'
|
||||||
- 'packages/share-theme/**'
|
- 'requirements-docs.txt'
|
||||||
|
- '.github/workflows/deploy-docs.yml'
|
||||||
|
- 'scripts/fix-mkdocs-structure.ts'
|
||||||
|
|
||||||
# Allow manual triggering from Actions tab
|
# Allow manual triggering from Actions tab
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@@ -23,13 +27,15 @@ on:
|
|||||||
- master
|
- master
|
||||||
paths:
|
paths:
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
- 'apps/edit-docs/**'
|
- 'README.md' # README is synced to docs/index.md
|
||||||
- 'apps/build-docs/**'
|
- 'mkdocs.yml'
|
||||||
- 'packages/share-theme/**'
|
- 'requirements-docs.txt'
|
||||||
|
- '.github/workflows/deploy-docs.yml'
|
||||||
|
- 'scripts/fix-mkdocs-structure.ts'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
name: Build and Deploy Documentation
|
name: Build and Deploy MkDocs
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
|
|
||||||
@@ -43,27 +49,72 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v5
|
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
|
- name: Setup pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4
|
||||||
|
|
||||||
|
# Setup Node.js with pnpm
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version: '24'
|
node-version: '24'
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
||||||
|
# Install Node.js dependencies for the TypeScript script
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: |
|
||||||
|
pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Trigger build of documentation
|
- name: Fix Documentation Structure
|
||||||
run: pnpm docs:build
|
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
|
- name: Validate Built Site
|
||||||
run: |
|
run: |
|
||||||
|
# Basic validation that important files exist
|
||||||
test -f site/index.html || (echo "ERROR: site/index.html not found" && exit 1)
|
test -f site/index.html || (echo "ERROR: site/index.html not found" && exit 1)
|
||||||
test -f site/developer-guide/index.html || (echo "ERROR: site/developer-guide/index.html not found" && exit 1)
|
test -f site/sitemap.xml || (echo "ERROR: site/sitemap.xml not found" && exit 1)
|
||||||
echo "✓ User Guide and Developer Guide built successfully"
|
test -d site/assets || (echo "ERROR: site/assets directory not found" && exit 1)
|
||||||
|
echo "✅ Site validation passed"
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: ./.github/actions/deploy-to-cloudflare-pages
|
uses: ./.github/actions/deploy-to-cloudflare-pages
|
||||||
|
|||||||
6
.github/workflows/main-docker.yml
vendored
6
.github/workflows/main-docker.yml
vendored
@@ -116,12 +116,6 @@ jobs:
|
|||||||
- dockerfile: Dockerfile
|
- dockerfile: Dockerfile
|
||||||
platform: linux/arm64
|
platform: linux/arm64
|
||||||
image: ubuntu-24.04-arm
|
image: ubuntu-24.04-arm
|
||||||
- dockerfile: Dockerfile.legacy
|
|
||||||
platform: linux/arm/v7
|
|
||||||
image: ubuntu-24.04-arm
|
|
||||||
- dockerfile: Dockerfile.legacy
|
|
||||||
platform: linux/arm/v8
|
|
||||||
image: ubuntu-24.04-arm
|
|
||||||
runs-on: ${{ matrix.image }}
|
runs-on: ${{ matrix.image }}
|
||||||
needs:
|
needs:
|
||||||
- test_docker
|
- test_docker
|
||||||
|
|||||||
4
.github/workflows/nightly.yml
vendored
4
.github/workflows/nightly.yml
vendored
@@ -77,7 +77,7 @@ jobs:
|
|||||||
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGN_KEY }}
|
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGN_KEY }}
|
||||||
|
|
||||||
- name: Publish release
|
- name: Publish release
|
||||||
uses: softprops/action-gh-release@v2.4.2
|
uses: softprops/action-gh-release@v2.4.1
|
||||||
if: ${{ github.event_name != 'pull_request' }}
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
with:
|
with:
|
||||||
make_latest: false
|
make_latest: false
|
||||||
@@ -118,7 +118,7 @@ jobs:
|
|||||||
arch: ${{ matrix.arch }}
|
arch: ${{ matrix.arch }}
|
||||||
|
|
||||||
- name: Publish release
|
- name: Publish release
|
||||||
uses: softprops/action-gh-release@v2.4.2
|
uses: softprops/action-gh-release@v2.4.1
|
||||||
if: ${{ github.event_name != 'pull_request' }}
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
with:
|
with:
|
||||||
make_latest: false
|
make_latest: false
|
||||||
|
|||||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -127,7 +127,7 @@ jobs:
|
|||||||
path: upload
|
path: upload
|
||||||
|
|
||||||
- name: Publish stable release
|
- name: Publish stable release
|
||||||
uses: softprops/action-gh-release@v2.4.2
|
uses: softprops/action-gh-release@v2.4.1
|
||||||
with:
|
with:
|
||||||
draft: false
|
draft: false
|
||||||
body_path: docs/Release Notes/Release Notes/${{ github.ref_name }}.md
|
body_path: docs/Release Notes/Release Notes/${{ github.ref_name }}.md
|
||||||
|
|||||||
@@ -38,17 +38,19 @@
|
|||||||
"@playwright/test": "1.56.1",
|
"@playwright/test": "1.56.1",
|
||||||
"@stylistic/eslint-plugin": "5.5.0",
|
"@stylistic/eslint-plugin": "5.5.0",
|
||||||
"@types/express": "5.0.5",
|
"@types/express": "5.0.5",
|
||||||
"@types/node": "24.10.0",
|
"@types/node": "24.9.1",
|
||||||
"@types/yargs": "17.0.34",
|
"@types/yargs": "17.0.34",
|
||||||
"@vitest/coverage-v8": "3.2.4",
|
"@vitest/coverage-v8": "3.2.4",
|
||||||
"eslint": "9.39.1",
|
"eslint": "9.38.0",
|
||||||
"eslint-plugin-simple-import-sort": "12.1.1",
|
"eslint-plugin-simple-import-sort": "12.1.1",
|
||||||
"esm": "3.2.25",
|
"esm": "3.2.25",
|
||||||
"jsdoc": "4.0.5",
|
"jsdoc": "4.0.5",
|
||||||
"lorem-ipsum": "2.0.8",
|
"lorem-ipsum": "2.0.8",
|
||||||
"rcedit": "5.0.0",
|
"rcedit": "4.0.1",
|
||||||
"rimraf": "6.1.0",
|
"rimraf": "6.0.1",
|
||||||
"tslib": "2.8.1"
|
"tslib": "2.8.1",
|
||||||
|
"typedoc": "0.28.14",
|
||||||
|
"typedoc-plugin-missing-exports": "4.1.2"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"appdmg": "0.6.6"
|
"appdmg": "0.6.6"
|
||||||
|
|||||||
15
_regroup/typedoc.json
Normal file
15
_regroup/typedoc.json
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"entryPoints": [
|
||||||
|
"src/services/backend_script_entrypoint.ts",
|
||||||
|
"src/public/app/services/frontend_script_entrypoint.ts"
|
||||||
|
],
|
||||||
|
"plugin": [
|
||||||
|
"typedoc-plugin-missing-exports"
|
||||||
|
],
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "html",
|
||||||
|
"path": "./docs/Script API"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "build-docs",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"description": "",
|
|
||||||
"main": "src/main.ts",
|
|
||||||
"scripts": {
|
|
||||||
"start": "tsx ."
|
|
||||||
},
|
|
||||||
"keywords": [],
|
|
||||||
"author": "Elian Doran <contact@eliandoran.me>",
|
|
||||||
"license": "AGPL-3.0-only",
|
|
||||||
"packageManager": "pnpm@10.20.0",
|
|
||||||
"devDependencies": {
|
|
||||||
"@redocly/cli": "2.11.0",
|
|
||||||
"archiver": "7.0.1",
|
|
||||||
"fs-extra": "11.3.2",
|
|
||||||
"react": "19.2.0",
|
|
||||||
"react-dom": "19.2.0",
|
|
||||||
"typedoc": "0.28.14",
|
|
||||||
"typedoc-plugin-missing-exports": "4.1.2"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
/**
|
|
||||||
* The backend script API is accessible to code notes with the "JS (backend)" language.
|
|
||||||
*
|
|
||||||
* The entire API is exposed as a single global: {@link api}
|
|
||||||
*
|
|
||||||
* @module Backend Script API
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This file creates the entrypoint for TypeDoc that simulates the context from within a
|
|
||||||
* script note on the server side.
|
|
||||||
*
|
|
||||||
* Make sure to keep in line with backend's `script_context.ts`.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export type { default as AbstractBeccaEntity } from "../../server/src/becca/entities/abstract_becca_entity.js";
|
|
||||||
export type { default as BAttachment } from "../../server/src/becca/entities/battachment.js";
|
|
||||||
export type { default as BAttribute } from "../../server/src/becca/entities/battribute.js";
|
|
||||||
export type { default as BBranch } from "../../server/src/becca/entities/bbranch.js";
|
|
||||||
export type { default as BEtapiToken } from "../../server/src/becca/entities/betapi_token.js";
|
|
||||||
export type { BNote };
|
|
||||||
export type { default as BOption } from "../../server/src/becca/entities/boption.js";
|
|
||||||
export type { default as BRecentNote } from "../../server/src/becca/entities/brecent_note.js";
|
|
||||||
export type { default as BRevision } from "../../server/src/becca/entities/brevision.js";
|
|
||||||
|
|
||||||
import BNote from "../../server/src/becca/entities/bnote.js";
|
|
||||||
import BackendScriptApi, { type Api } from "../../server/src/services/backend_script_api.js";
|
|
||||||
|
|
||||||
export type { Api };
|
|
||||||
|
|
||||||
const fakeNote = new BNote();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The `api` global variable allows access to the backend script API, which is documented in {@link Api}.
|
|
||||||
*/
|
|
||||||
export const api: Api = new BackendScriptApi(fakeNote, {});
|
|
||||||
@@ -1,147 +0,0 @@
|
|||||||
process.env.TRILIUM_INTEGRATION_TEST = "memory-no-store";
|
|
||||||
process.env.TRILIUM_RESOURCE_DIR = "../server/src";
|
|
||||||
process.env.NODE_ENV = "development";
|
|
||||||
|
|
||||||
import cls from "@triliumnext/server/src/services/cls.js";
|
|
||||||
import { dirname, join, resolve } from "path";
|
|
||||||
import * as fs from "fs/promises";
|
|
||||||
import * as fsExtra from "fs-extra";
|
|
||||||
import archiver from "archiver";
|
|
||||||
import { WriteStream } from "fs";
|
|
||||||
import { execSync } from "child_process";
|
|
||||||
import BuildContext from "./context.js";
|
|
||||||
|
|
||||||
const DOCS_ROOT = "../../../docs";
|
|
||||||
const OUTPUT_DIR = "../../site";
|
|
||||||
|
|
||||||
async function importAndExportDocs(sourcePath: string, outputSubDir: string) {
|
|
||||||
const note = await importData(sourcePath);
|
|
||||||
|
|
||||||
// Use a meaningful name for the temporary zip file
|
|
||||||
const zipName = outputSubDir || "user-guide";
|
|
||||||
const zipFilePath = `output-${zipName}.zip`;
|
|
||||||
try {
|
|
||||||
const { exportToZip } = (await import("@triliumnext/server/src/services/export/zip.js")).default;
|
|
||||||
const branch = note.getParentBranches()[0];
|
|
||||||
const taskContext = new (await import("@triliumnext/server/src/services/task_context.js")).default(
|
|
||||||
"no-progress-reporting",
|
|
||||||
"export",
|
|
||||||
null
|
|
||||||
);
|
|
||||||
const fileOutputStream = fsExtra.createWriteStream(zipFilePath);
|
|
||||||
await exportToZip(taskContext, branch, "share", fileOutputStream);
|
|
||||||
await waitForStreamToFinish(fileOutputStream);
|
|
||||||
|
|
||||||
// Output to root directory if outputSubDir is empty, otherwise to subdirectory
|
|
||||||
const outputPath = outputSubDir ? join(OUTPUT_DIR, outputSubDir) : OUTPUT_DIR;
|
|
||||||
await extractZip(zipFilePath, outputPath);
|
|
||||||
} finally {
|
|
||||||
if (await fsExtra.exists(zipFilePath)) {
|
|
||||||
await fsExtra.rm(zipFilePath);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function buildDocsInner() {
|
|
||||||
const i18n = await import("@triliumnext/server/src/services/i18n.js");
|
|
||||||
await i18n.initializeTranslations();
|
|
||||||
|
|
||||||
const sqlInit = (await import("../../server/src/services/sql_init.js")).default;
|
|
||||||
await sqlInit.createInitialDatabase(true);
|
|
||||||
|
|
||||||
// Wait for becca to be loaded before importing data
|
|
||||||
const beccaLoader = await import("../../server/src/becca/becca_loader.js");
|
|
||||||
await beccaLoader.beccaLoaded;
|
|
||||||
|
|
||||||
// Build User Guide
|
|
||||||
console.log("Building User Guide...");
|
|
||||||
await importAndExportDocs(join(__dirname, DOCS_ROOT, "User Guide"), "user-guide");
|
|
||||||
|
|
||||||
// Build Developer Guide
|
|
||||||
console.log("Building Developer Guide...");
|
|
||||||
await importAndExportDocs(join(__dirname, DOCS_ROOT, "Developer Guide"), "developer-guide");
|
|
||||||
|
|
||||||
// Copy favicon.
|
|
||||||
await fs.copyFile("../../apps/website/src/assets/favicon.ico", join(OUTPUT_DIR, "favicon.ico"));
|
|
||||||
await fs.copyFile("../../apps/website/src/assets/favicon.ico", join(OUTPUT_DIR, "user-guide", "favicon.ico"));
|
|
||||||
await fs.copyFile("../../apps/website/src/assets/favicon.ico", join(OUTPUT_DIR, "developer-guide", "favicon.ico"));
|
|
||||||
|
|
||||||
console.log("Documentation built successfully!");
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function importData(path: string) {
|
|
||||||
const buffer = await createImportZip(path);
|
|
||||||
const importService = (await import("../../server/src/services/import/zip.js")).default;
|
|
||||||
const TaskContext = (await import("../../server/src/services/task_context.js")).default;
|
|
||||||
const context = new TaskContext("no-progress-reporting", "importNotes", null);
|
|
||||||
const becca = (await import("../../server/src/becca/becca.js")).default;
|
|
||||||
|
|
||||||
const rootNote = becca.getRoot();
|
|
||||||
if (!rootNote) {
|
|
||||||
throw new Error("Missing root note for import.");
|
|
||||||
}
|
|
||||||
return await importService.importZip(context, buffer, rootNote, {
|
|
||||||
preserveIds: true
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async function createImportZip(path: string) {
|
|
||||||
const inputFile = "input.zip";
|
|
||||||
const archive = archiver("zip", {
|
|
||||||
zlib: { level: 0 }
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log("Archive path is ", resolve(path))
|
|
||||||
archive.directory(path, "/");
|
|
||||||
|
|
||||||
const outputStream = fsExtra.createWriteStream(inputFile);
|
|
||||||
archive.pipe(outputStream);
|
|
||||||
archive.finalize();
|
|
||||||
await waitForStreamToFinish(outputStream);
|
|
||||||
|
|
||||||
try {
|
|
||||||
return await fsExtra.readFile(inputFile);
|
|
||||||
} finally {
|
|
||||||
await fsExtra.rm(inputFile);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function waitForStreamToFinish(stream: WriteStream) {
|
|
||||||
return new Promise<void>((res, rej) => {
|
|
||||||
stream.on("finish", () => res());
|
|
||||||
stream.on("error", (err) => rej(err));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function extractZip(zipFilePath: string, outputPath: string, ignoredFiles?: Set<string>) {
|
|
||||||
const { readZipFile, readContent } = (await import("@triliumnext/server/src/services/import/zip.js"));
|
|
||||||
await readZipFile(await fs.readFile(zipFilePath), async (zip, entry) => {
|
|
||||||
// We ignore directories since they can appear out of order anyway.
|
|
||||||
if (!entry.fileName.endsWith("/") && !ignoredFiles?.has(entry.fileName)) {
|
|
||||||
const destPath = join(outputPath, entry.fileName);
|
|
||||||
const fileContent = await readContent(zip, entry);
|
|
||||||
|
|
||||||
await fsExtra.mkdirs(dirname(destPath));
|
|
||||||
await fs.writeFile(destPath, fileContent);
|
|
||||||
}
|
|
||||||
|
|
||||||
zip.readEntry();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export default async function buildDocs({ gitRootDir }: BuildContext) {
|
|
||||||
// Build the share theme.
|
|
||||||
execSync(`pnpm run --filter share-theme build`, {
|
|
||||||
stdio: "inherit",
|
|
||||||
cwd: gitRootDir
|
|
||||||
});
|
|
||||||
|
|
||||||
// Trigger the actual build.
|
|
||||||
await new Promise((res, rej) => {
|
|
||||||
cls.init(() => {
|
|
||||||
buildDocsInner()
|
|
||||||
.catch(rej)
|
|
||||||
.then(res);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
export default interface BuildContext {
|
|
||||||
gitRootDir: string;
|
|
||||||
baseDir: string;
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
/**
|
|
||||||
* The front script API is accessible to code notes with the "JS (frontend)" language.
|
|
||||||
*
|
|
||||||
* The entire API is exposed as a single global: {@link api}
|
|
||||||
*
|
|
||||||
* @module Frontend Script API
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This file creates the entrypoint for TypeDoc that simulates the context from within a
|
|
||||||
* script note.
|
|
||||||
*
|
|
||||||
* Make sure to keep in line with frontend's `script_context.ts`.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export type { default as BasicWidget } from "../../client/src/widgets/basic_widget.js";
|
|
||||||
export type { default as FAttachment } from "../../client/src/entities/fattachment.js";
|
|
||||||
export type { default as FAttribute } from "../../client/src/entities/fattribute.js";
|
|
||||||
export type { default as FBranch } from "../../client/src/entities/fbranch.js";
|
|
||||||
export type { default as FNote } from "../../client/src/entities/fnote.js";
|
|
||||||
export type { Api } from "../../client/src/services/frontend_script_api.js";
|
|
||||||
export type { default as NoteContextAwareWidget } from "../../client/src/widgets/note_context_aware_widget.js";
|
|
||||||
export type { default as RightPanelWidget } from "../../client/src/widgets/right_panel_widget.js";
|
|
||||||
|
|
||||||
import FrontendScriptApi, { type Api } from "../../client/src/services/frontend_script_api.js";
|
|
||||||
|
|
||||||
//@ts-expect-error
|
|
||||||
export const api: Api = new FrontendScriptApi();
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="refresh" content="0; url=/user-guide">
|
|
||||||
<title>Redirecting...</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<p>If you are not redirected automatically, <a href="/user-guide">click here</a>.</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
import { join } from "path";
|
|
||||||
import BuildContext from "./context";
|
|
||||||
import buildSwagger from "./swagger";
|
|
||||||
import { cpSync, existsSync, mkdirSync, rmSync } from "fs";
|
|
||||||
import buildDocs from "./build-docs";
|
|
||||||
import buildScriptApi from "./script-api";
|
|
||||||
|
|
||||||
const context: BuildContext = {
|
|
||||||
gitRootDir: join(__dirname, "../../../"),
|
|
||||||
baseDir: join(__dirname, "../../../site")
|
|
||||||
};
|
|
||||||
|
|
||||||
async function main() {
|
|
||||||
// Clean input dir.
|
|
||||||
if (existsSync(context.baseDir)) {
|
|
||||||
rmSync(context.baseDir, { recursive: true });
|
|
||||||
}
|
|
||||||
mkdirSync(context.baseDir);
|
|
||||||
|
|
||||||
// Start building.
|
|
||||||
await buildDocs(context);
|
|
||||||
buildSwagger(context);
|
|
||||||
buildScriptApi(context);
|
|
||||||
|
|
||||||
// Copy index and 404 files.
|
|
||||||
cpSync(join(__dirname, "index.html"), join(context.baseDir, "index.html"));
|
|
||||||
cpSync(join(context.baseDir, "user-guide/404.html"), join(context.baseDir, "404.html"));
|
|
||||||
}
|
|
||||||
|
|
||||||
main();
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
import { execSync } from "child_process";
|
|
||||||
import BuildContext from "./context";
|
|
||||||
import { join } from "path";
|
|
||||||
|
|
||||||
export default function buildScriptApi({ baseDir, gitRootDir }: BuildContext) {
|
|
||||||
// Generate types
|
|
||||||
execSync(`pnpm typecheck`, { stdio: "inherit", cwd: gitRootDir });
|
|
||||||
|
|
||||||
for (const config of [ "backend", "frontend" ]) {
|
|
||||||
const outDir = join(baseDir, "script-api", config);
|
|
||||||
execSync(`pnpm typedoc --options typedoc.${config}.json --html "${outDir}"`, {
|
|
||||||
stdio: "inherit"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
import BuildContext from "./context";
|
|
||||||
import { join } from "path";
|
|
||||||
import { execSync } from "child_process";
|
|
||||||
import { mkdirSync } from "fs";
|
|
||||||
|
|
||||||
interface BuildInfo {
|
|
||||||
specPath: string;
|
|
||||||
outDir: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const DIR_PREFIX = "rest-api";
|
|
||||||
|
|
||||||
const buildInfos: BuildInfo[] = [
|
|
||||||
{
|
|
||||||
// Paths are relative to Git root.
|
|
||||||
specPath: "apps/server/internal.openapi.yaml",
|
|
||||||
outDir: `${DIR_PREFIX}/internal`
|
|
||||||
},
|
|
||||||
{
|
|
||||||
specPath: "apps/server/etapi.openapi.yaml",
|
|
||||||
outDir: `${DIR_PREFIX}/etapi`
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
export default function buildSwagger({ baseDir, gitRootDir }: BuildContext) {
|
|
||||||
for (const { specPath, outDir } of buildInfos) {
|
|
||||||
const absSpecPath = join(gitRootDir, specPath);
|
|
||||||
const targetDir = join(baseDir, outDir);
|
|
||||||
mkdirSync(targetDir, { recursive: true });
|
|
||||||
execSync(`pnpm redocly build-docs ${absSpecPath} -o ${targetDir}/index.html`, { stdio: "inherit" });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../../tsconfig.base.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"module": "ESNext",
|
|
||||||
"moduleResolution": "bundler",
|
|
||||||
"target": "ES2020",
|
|
||||||
"outDir": "dist",
|
|
||||||
"strict": false,
|
|
||||||
"types": [
|
|
||||||
"node",
|
|
||||||
"express"
|
|
||||||
],
|
|
||||||
"rootDir": "src",
|
|
||||||
"tsBuildInfoFile": "dist/tsconfig.app.tsbuildinfo"
|
|
||||||
},
|
|
||||||
"include": [
|
|
||||||
"src/**/*.ts",
|
|
||||||
"../server/src/*.d.ts"
|
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"eslint.config.js",
|
|
||||||
"eslint.config.cjs",
|
|
||||||
"eslint.config.mjs"
|
|
||||||
],
|
|
||||||
"references": [
|
|
||||||
{
|
|
||||||
"path": "../server/tsconfig.app.json"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "../desktop/tsconfig.app.json"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "../client/tsconfig.app.json"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../../tsconfig.base.json",
|
|
||||||
"include": [],
|
|
||||||
"references": [
|
|
||||||
{
|
|
||||||
"path": "../server"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "../client"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "./tsconfig.app.json"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://typedoc.org/schema.json",
|
|
||||||
"name": "Trilium Backend API",
|
|
||||||
"entryPoints": [
|
|
||||||
"src/backend_script_entrypoint.ts"
|
|
||||||
],
|
|
||||||
"plugin": [
|
|
||||||
"typedoc-plugin-missing-exports"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://typedoc.org/schema.json",
|
|
||||||
"name": "Trilium Frontend API",
|
|
||||||
"entryPoints": [
|
|
||||||
"src/frontend_script_entrypoint.ts"
|
|
||||||
],
|
|
||||||
"plugin": [
|
|
||||||
"typedoc-plugin-missing-exports"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@triliumnext/client",
|
"name": "@triliumnext/client",
|
||||||
"version": "0.99.4",
|
"version": "0.99.3",
|
||||||
"description": "JQuery-based client for TriliumNext, used for both web and desktop (via Electron)",
|
"description": "JQuery-based client for TriliumNext, used for both web and desktop (via Electron)",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
"circular-deps": "dpdm -T src/**/*.ts --tree=false --warning=false --skip-dynamic-imports=circular"
|
"circular-deps": "dpdm -T src/**/*.ts --tree=false --warning=false --skip-dynamic-imports=circular"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint/js": "9.39.1",
|
"@eslint/js": "9.38.0",
|
||||||
"@excalidraw/excalidraw": "0.18.0",
|
"@excalidraw/excalidraw": "0.18.0",
|
||||||
"@fullcalendar/core": "6.1.19",
|
"@fullcalendar/core": "6.1.19",
|
||||||
"@fullcalendar/daygrid": "6.1.19",
|
"@fullcalendar/daygrid": "6.1.19",
|
||||||
@@ -37,13 +37,13 @@
|
|||||||
"bootstrap": "5.3.8",
|
"bootstrap": "5.3.8",
|
||||||
"boxicons": "2.1.4",
|
"boxicons": "2.1.4",
|
||||||
"color": "5.0.2",
|
"color": "5.0.2",
|
||||||
"dayjs": "1.11.19",
|
"dayjs": "1.11.18",
|
||||||
"dayjs-plugin-utc": "0.1.2",
|
"dayjs-plugin-utc": "0.1.2",
|
||||||
"debounce": "3.0.0",
|
"debounce": "2.2.0",
|
||||||
"draggabilly": "3.0.0",
|
"draggabilly": "3.0.0",
|
||||||
"force-graph": "1.51.0",
|
"force-graph": "1.51.0",
|
||||||
"globals": "16.5.0",
|
"globals": "16.4.0",
|
||||||
"i18next": "25.6.1",
|
"i18next": "25.6.0",
|
||||||
"i18next-http-backend": "3.0.2",
|
"i18next-http-backend": "3.0.2",
|
||||||
"jquery": "3.7.1",
|
"jquery": "3.7.1",
|
||||||
"jquery.fancytree": "2.38.5",
|
"jquery.fancytree": "2.38.5",
|
||||||
@@ -53,13 +53,13 @@
|
|||||||
"leaflet": "1.9.4",
|
"leaflet": "1.9.4",
|
||||||
"leaflet-gpx": "2.2.0",
|
"leaflet-gpx": "2.2.0",
|
||||||
"mark.js": "8.11.1",
|
"mark.js": "8.11.1",
|
||||||
"marked": "16.4.2",
|
"marked": "16.4.1",
|
||||||
"mermaid": "11.12.1",
|
"mermaid": "11.12.1",
|
||||||
"mind-elixir": "5.3.5",
|
"mind-elixir": "5.3.4",
|
||||||
"normalize.css": "8.0.1",
|
"normalize.css": "8.0.1",
|
||||||
"panzoom": "9.4.3",
|
"panzoom": "9.4.3",
|
||||||
"preact": "10.27.2",
|
"preact": "10.27.2",
|
||||||
"react-i18next": "16.2.4",
|
"react-i18next": "16.2.1",
|
||||||
"reveal.js": "5.2.1",
|
"reveal.js": "5.2.1",
|
||||||
"svg-pan-zoom": "3.6.2",
|
"svg-pan-zoom": "3.6.2",
|
||||||
"tabulator-tables": "6.3.1",
|
"tabulator-tables": "6.3.1",
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
"@types/reveal.js": "5.2.1",
|
"@types/reveal.js": "5.2.1",
|
||||||
"@types/tabulator-tables": "6.3.0",
|
"@types/tabulator-tables": "6.3.0",
|
||||||
"copy-webpack-plugin": "13.0.1",
|
"copy-webpack-plugin": "13.0.1",
|
||||||
"happy-dom": "20.0.10",
|
"happy-dom": "20.0.8",
|
||||||
"script-loader": "0.7.2",
|
"script-loader": "0.7.2",
|
||||||
"vite-plugin-static-copy": "3.1.4"
|
"vite-plugin-static-copy": "3.1.4"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -270,7 +270,6 @@ export type CommandMappings = {
|
|||||||
closeThisNoteSplit: CommandData;
|
closeThisNoteSplit: CommandData;
|
||||||
moveThisNoteSplit: CommandData & { isMovingLeft: boolean };
|
moveThisNoteSplit: CommandData & { isMovingLeft: boolean };
|
||||||
jumpToNote: CommandData;
|
jumpToNote: CommandData;
|
||||||
openTodayNote: CommandData;
|
|
||||||
commandPalette: CommandData;
|
commandPalette: CommandData;
|
||||||
|
|
||||||
// Keyboard shortcuts
|
// Keyboard shortcuts
|
||||||
@@ -499,10 +498,6 @@ type EventMappings = {
|
|||||||
noteIds: string[];
|
noteIds: string[];
|
||||||
};
|
};
|
||||||
refreshData: { ntxId: string | null | undefined };
|
refreshData: { ntxId: string | null | undefined };
|
||||||
contentSafeMarginChanged: {
|
|
||||||
top: number;
|
|
||||||
noteContext: NoteContext;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export type EventListener<T extends EventNames> = {
|
export type EventListener<T extends EventNames> = {
|
||||||
|
|||||||
@@ -159,16 +159,6 @@ export default class Entrypoints extends Component {
|
|||||||
this.openInWindowCommand({ notePath: "", hoistedNoteId: "root" });
|
this.openInWindowCommand({ notePath: "", hoistedNoteId: "root" });
|
||||||
}
|
}
|
||||||
|
|
||||||
async openTodayNoteCommand() {
|
|
||||||
const todayNote = await dateNoteService.getTodayNote();
|
|
||||||
if (!todayNote) {
|
|
||||||
console.warn("Missing today note.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
await appContext.tabManager.openInSameTab(todayNote.noteId);
|
|
||||||
}
|
|
||||||
|
|
||||||
async runActiveNoteCommand() {
|
async runActiveNoteCommand() {
|
||||||
const noteContext = appContext.tabManager.getActiveContext();
|
const noteContext = appContext.tabManager.getActiveContext();
|
||||||
if (!noteContext) {
|
if (!noteContext) {
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import protectedSessionService from "../services/protected_session.js";
|
|||||||
import options from "../services/options.js";
|
import options from "../services/options.js";
|
||||||
import froca from "../services/froca.js";
|
import froca from "../services/froca.js";
|
||||||
import utils from "../services/utils.js";
|
import utils from "../services/utils.js";
|
||||||
|
import LlmChatPanel from "../widgets/llm_chat_panel.js";
|
||||||
import toastService from "../services/toast.js";
|
import toastService from "../services/toast.js";
|
||||||
import noteCreateService from "../services/note_create.js";
|
import noteCreateService from "../services/note_create.js";
|
||||||
|
|
||||||
@@ -170,8 +171,7 @@ export default class RootCommandExecutor extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
toggleTrayCommand() {
|
toggleTrayCommand() {
|
||||||
if (!utils.isElectron() || options.is("disableTray")) return;
|
if (!utils.isElectron()) return;
|
||||||
|
|
||||||
const { BrowserWindow } = utils.dynamicRequire("@electron/remote");
|
const { BrowserWindow } = utils.dynamicRequire("@electron/remote");
|
||||||
const windows = BrowserWindow.getAllWindows() as Electron.BaseWindow[];
|
const windows = BrowserWindow.getAllWindows() as Electron.BaseWindow[];
|
||||||
const isVisible = windows.every((w) => w.isVisible());
|
const isVisible = windows.every((w) => w.isVisible());
|
||||||
|
|||||||
@@ -417,7 +417,7 @@ export default class FNote {
|
|||||||
return notePaths;
|
return notePaths;
|
||||||
}
|
}
|
||||||
|
|
||||||
getSortedNotePathRecords(hoistedNoteId = "root", activeNotePath: string | null = null): NotePathRecord[] {
|
getSortedNotePathRecords(hoistedNoteId = "root"): NotePathRecord[] {
|
||||||
const isHoistedRoot = hoistedNoteId === "root";
|
const isHoistedRoot = hoistedNoteId === "root";
|
||||||
|
|
||||||
const notePaths: NotePathRecord[] = this.getAllNotePaths().map((path) => ({
|
const notePaths: NotePathRecord[] = this.getAllNotePaths().map((path) => ({
|
||||||
@@ -428,23 +428,7 @@ export default class FNote {
|
|||||||
isHidden: path.includes("_hidden")
|
isHidden: path.includes("_hidden")
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// Calculate the length of the prefix match between two arrays
|
|
||||||
const prefixMatchLength = (path: string[], target: string[]) => {
|
|
||||||
const diffIndex = path.findIndex((seg, i) => seg !== target[i]);
|
|
||||||
return diffIndex === -1 ? Math.min(path.length, target.length) : diffIndex;
|
|
||||||
};
|
|
||||||
|
|
||||||
notePaths.sort((a, b) => {
|
notePaths.sort((a, b) => {
|
||||||
if (activeNotePath) {
|
|
||||||
const activeSegments = activeNotePath.split('/');
|
|
||||||
const aOverlap = prefixMatchLength(a.notePath, activeSegments);
|
|
||||||
const bOverlap = prefixMatchLength(b.notePath, activeSegments);
|
|
||||||
// Paths with more matching prefix segments are prioritized
|
|
||||||
// when the match count is equal, other criteria are used for sorting
|
|
||||||
if (bOverlap !== aOverlap) {
|
|
||||||
return bOverlap - aOverlap;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (a.isInHoistedSubTree !== b.isInHoistedSubTree) {
|
if (a.isInHoistedSubTree !== b.isInHoistedSubTree) {
|
||||||
return a.isInHoistedSubTree ? -1 : 1;
|
return a.isInHoistedSubTree ? -1 : 1;
|
||||||
} else if (a.isArchived !== b.isArchived) {
|
} else if (a.isArchived !== b.isArchived) {
|
||||||
@@ -465,11 +449,10 @@ export default class FNote {
|
|||||||
* Returns the note path considered to be the "best"
|
* Returns the note path considered to be the "best"
|
||||||
*
|
*
|
||||||
* @param {string} [hoistedNoteId='root']
|
* @param {string} [hoistedNoteId='root']
|
||||||
* @param {string|null} [activeNotePath=null]
|
|
||||||
* @return {string[]} array of noteIds constituting the particular note path
|
* @return {string[]} array of noteIds constituting the particular note path
|
||||||
*/
|
*/
|
||||||
getBestNotePath(hoistedNoteId = "root", activeNotePath: string | null = null) {
|
getBestNotePath(hoistedNoteId = "root") {
|
||||||
return this.getSortedNotePathRecords(hoistedNoteId, activeNotePath)[0]?.notePath;
|
return this.getSortedNotePathRecords(hoistedNoteId)[0]?.notePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,49 +1,47 @@
|
|||||||
import { applyModals } from "./layout_commons.js";
|
|
||||||
import { DESKTOP_FLOATING_BUTTONS } from "../widgets/FloatingButtonsDefinitions.jsx";
|
|
||||||
import ApiLog from "../widgets/api_log.jsx";
|
|
||||||
import ClosePaneButton from "../widgets/buttons/close_pane_button.js";
|
|
||||||
import CloseZenModeButton from "../widgets/close_zen_button.jsx";
|
|
||||||
import ContentHeader from "../widgets/containers/content-header.js";
|
|
||||||
import CreatePaneButton from "../widgets/buttons/create_pane_button.js";
|
|
||||||
import FindWidget from "../widgets/find.js";
|
|
||||||
import FlexContainer from "../widgets/containers/flex_container.js";
|
import FlexContainer from "../widgets/containers/flex_container.js";
|
||||||
import FloatingButtons from "../widgets/FloatingButtons.jsx";
|
|
||||||
import GlobalMenu from "../widgets/buttons/global_menu.jsx";
|
|
||||||
import HighlightsListWidget from "../widgets/highlights_list.js";
|
|
||||||
import LauncherContainer from "../widgets/containers/launcher_container.js";
|
|
||||||
import LeftPaneContainer from "../widgets/containers/left_pane_container.js";
|
|
||||||
import LeftPaneToggle from "../widgets/buttons/left_pane_toggle.js";
|
|
||||||
import MovePaneButton from "../widgets/buttons/move_pane_button.js";
|
|
||||||
import NoteDetailWidget from "../widgets/note_detail.js";
|
|
||||||
import NoteIconWidget from "../widgets/note_icon.jsx";
|
|
||||||
import NoteList from "../widgets/collections/NoteList.jsx";
|
|
||||||
import NoteTitleWidget from "../widgets/note_title.jsx";
|
|
||||||
import NoteTreeWidget from "../widgets/note_tree.js";
|
|
||||||
import NoteWrapperWidget from "../widgets/note_wrapper.js";
|
|
||||||
import options from "../services/options.js";
|
|
||||||
import PasswordNoteSetDialog from "../widgets/dialogs/password_not_set.js";
|
|
||||||
import PromotedAttributesWidget from "../widgets/promoted_attributes.js";
|
|
||||||
import QuickSearchWidget from "../widgets/quick_search.js";
|
|
||||||
import ReadOnlyNoteInfoBar from "../widgets/ReadOnlyNoteInfoBar.jsx";
|
|
||||||
import Ribbon from "../widgets/ribbon/Ribbon.jsx";
|
|
||||||
import RightPaneContainer from "../widgets/containers/right_pane_container.js";
|
|
||||||
import RootContainer from "../widgets/containers/root_container.js";
|
|
||||||
import ScrollingContainer from "../widgets/containers/scrolling_container.js";
|
|
||||||
import ScrollPadding from "../widgets/scroll_padding.js";
|
|
||||||
import SearchResult from "../widgets/search_result.jsx";
|
|
||||||
import SharedInfo from "../widgets/shared_info.jsx";
|
|
||||||
import SpacerWidget from "../widgets/spacer.js";
|
|
||||||
import SplitNoteContainer from "../widgets/containers/split_note_container.js";
|
|
||||||
import SqlResults from "../widgets/sql_result.js";
|
|
||||||
import SqlTableSchemas from "../widgets/sql_table_schemas.js";
|
|
||||||
import TabRowWidget from "../widgets/tab_row.js";
|
import TabRowWidget from "../widgets/tab_row.js";
|
||||||
import TitleBarButtons from "../widgets/title_bar_buttons.jsx";
|
import LeftPaneContainer from "../widgets/containers/left_pane_container.js";
|
||||||
|
import NoteTreeWidget from "../widgets/note_tree.js";
|
||||||
|
import NoteTitleWidget from "../widgets/note_title.jsx";
|
||||||
|
import NoteDetailWidget from "../widgets/note_detail.js";
|
||||||
|
import PromotedAttributesWidget from "../widgets/promoted_attributes.js";
|
||||||
|
import NoteIconWidget from "../widgets/note_icon.jsx";
|
||||||
|
import ScrollingContainer from "../widgets/containers/scrolling_container.js";
|
||||||
|
import RootContainer from "../widgets/containers/root_container.js";
|
||||||
|
import WatchedFileUpdateStatusWidget from "../widgets/watched_file_update_status.js";
|
||||||
|
import SpacerWidget from "../widgets/spacer.js";
|
||||||
|
import QuickSearchWidget from "../widgets/quick_search.js";
|
||||||
|
import SplitNoteContainer from "../widgets/containers/split_note_container.js";
|
||||||
|
import CreatePaneButton from "../widgets/buttons/create_pane_button.js";
|
||||||
|
import ClosePaneButton from "../widgets/buttons/close_pane_button.js";
|
||||||
|
import RightPaneContainer from "../widgets/containers/right_pane_container.js";
|
||||||
|
import NoteWrapperWidget from "../widgets/note_wrapper.js";
|
||||||
|
import FindWidget from "../widgets/find.js";
|
||||||
import TocWidget from "../widgets/toc.js";
|
import TocWidget from "../widgets/toc.js";
|
||||||
|
import HighlightsListWidget from "../widgets/highlights_list.js";
|
||||||
|
import PasswordNoteSetDialog from "../widgets/dialogs/password_not_set.js";
|
||||||
|
import LauncherContainer from "../widgets/containers/launcher_container.js";
|
||||||
|
import MovePaneButton from "../widgets/buttons/move_pane_button.js";
|
||||||
|
import UploadAttachmentsDialog from "../widgets/dialogs/upload_attachments.js";
|
||||||
|
import ScrollPadding from "../widgets/scroll_padding.js";
|
||||||
|
import options from "../services/options.js";
|
||||||
|
import utils from "../services/utils.js";
|
||||||
import type { AppContext } from "../components/app_context.js";
|
import type { AppContext } from "../components/app_context.js";
|
||||||
import type { WidgetsByParent } from "../services/bundle.js";
|
import type { WidgetsByParent } from "../services/bundle.js";
|
||||||
import UploadAttachmentsDialog from "../widgets/dialogs/upload_attachments.js";
|
import { applyModals } from "./layout_commons.js";
|
||||||
import utils from "../services/utils.js";
|
import Ribbon from "../widgets/ribbon/Ribbon.jsx";
|
||||||
import WatchedFileUpdateStatusWidget from "../widgets/watched_file_update_status.js";
|
import FloatingButtons from "../widgets/FloatingButtons.jsx";
|
||||||
|
import { DESKTOP_FLOATING_BUTTONS } from "../widgets/FloatingButtonsDefinitions.jsx";
|
||||||
|
import SearchResult from "../widgets/search_result.jsx";
|
||||||
|
import GlobalMenu from "../widgets/buttons/global_menu.jsx";
|
||||||
|
import SqlResults from "../widgets/sql_result.js";
|
||||||
|
import SqlTableSchemas from "../widgets/sql_table_schemas.js";
|
||||||
|
import TitleBarButtons from "../widgets/title_bar_buttons.jsx";
|
||||||
|
import LeftPaneToggle from "../widgets/buttons/left_pane_toggle.js";
|
||||||
|
import ApiLog from "../widgets/api_log.jsx";
|
||||||
|
import CloseZenModeButton from "../widgets/close_zen_button.jsx";
|
||||||
|
import SharedInfo from "../widgets/shared_info.jsx";
|
||||||
|
import NoteList from "../widgets/collections/NoteList.jsx";
|
||||||
|
|
||||||
export default class DesktopLayout {
|
export default class DesktopLayout {
|
||||||
|
|
||||||
@@ -131,15 +129,12 @@ export default class DesktopLayout {
|
|||||||
.child(<CreatePaneButton />)
|
.child(<CreatePaneButton />)
|
||||||
)
|
)
|
||||||
.child(<Ribbon />)
|
.child(<Ribbon />)
|
||||||
|
.child(<SharedInfo />)
|
||||||
.child(new WatchedFileUpdateStatusWidget())
|
.child(new WatchedFileUpdateStatusWidget())
|
||||||
.child(<FloatingButtons items={DESKTOP_FLOATING_BUTTONS} />)
|
.child(<FloatingButtons items={DESKTOP_FLOATING_BUTTONS} />)
|
||||||
.child(
|
.child(
|
||||||
new ScrollingContainer()
|
new ScrollingContainer()
|
||||||
.filling()
|
.filling()
|
||||||
.child(new ContentHeader()
|
|
||||||
.child(<ReadOnlyNoteInfoBar />)
|
|
||||||
.child(<SharedInfo />)
|
|
||||||
)
|
|
||||||
.child(new PromotedAttributesWidget())
|
.child(new PromotedAttributesWidget())
|
||||||
.child(<SqlTableSchemas />)
|
.child(<SqlTableSchemas />)
|
||||||
.child(new NoteDetailWidget())
|
.child(new NoteDetailWidget())
|
||||||
|
|||||||
@@ -1,34 +1,32 @@
|
|||||||
import { applyModals } from "./layout_commons.js";
|
|
||||||
import { MOBILE_FLOATING_BUTTONS } from "../widgets/FloatingButtonsDefinitions.jsx";
|
|
||||||
import { useNoteContext } from "../widgets/react/hooks.jsx";
|
|
||||||
import CloseZenModeButton from "../widgets/close_zen_button.js";
|
|
||||||
import FilePropertiesTab from "../widgets/ribbon/FilePropertiesTab.jsx";
|
|
||||||
import FlexContainer from "../widgets/containers/flex_container.js";
|
import FlexContainer from "../widgets/containers/flex_container.js";
|
||||||
import FloatingButtons from "../widgets/FloatingButtons.jsx";
|
|
||||||
import GlobalMenuWidget from "../widgets/buttons/global_menu.js";
|
|
||||||
import LauncherContainer from "../widgets/containers/launcher_container.js";
|
|
||||||
import MobileDetailMenu from "../widgets/mobile_widgets/mobile_detail_menu.js";
|
|
||||||
import MobileEditorToolbar from "../widgets/type_widgets/ckeditor/mobile_editor_toolbar.js";
|
|
||||||
import NoteDetailWidget from "../widgets/note_detail.js";
|
|
||||||
import NoteList from "../widgets/collections/NoteList.jsx";
|
|
||||||
import NoteTitleWidget from "../widgets/note_title.js";
|
import NoteTitleWidget from "../widgets/note_title.js";
|
||||||
import ContentHeader from "../widgets/containers/content-header.js";
|
import NoteDetailWidget from "../widgets/note_detail.js";
|
||||||
import NoteTreeWidget from "../widgets/note_tree.js";
|
|
||||||
import NoteWrapperWidget from "../widgets/note_wrapper.js";
|
|
||||||
import PromotedAttributesWidget from "../widgets/promoted_attributes.js";
|
|
||||||
import QuickSearchWidget from "../widgets/quick_search.js";
|
import QuickSearchWidget from "../widgets/quick_search.js";
|
||||||
import ReadOnlyNoteInfoBar from "../widgets/ReadOnlyNoteInfoBar.jsx";
|
import NoteTreeWidget from "../widgets/note_tree.js";
|
||||||
import RootContainer from "../widgets/containers/root_container.js";
|
|
||||||
import ScreenContainer from "../widgets/mobile_widgets/screen_container.js";
|
import ScreenContainer from "../widgets/mobile_widgets/screen_container.js";
|
||||||
import ScrollingContainer from "../widgets/containers/scrolling_container.js";
|
import ScrollingContainer from "../widgets/containers/scrolling_container.js";
|
||||||
|
import GlobalMenuWidget from "../widgets/buttons/global_menu.js";
|
||||||
|
import LauncherContainer from "../widgets/containers/launcher_container.js";
|
||||||
|
import RootContainer from "../widgets/containers/root_container.js";
|
||||||
|
import SharedInfoWidget from "../widgets/shared_info.js";
|
||||||
|
import PromotedAttributesWidget from "../widgets/promoted_attributes.js";
|
||||||
|
import SidebarContainer from "../widgets/mobile_widgets/sidebar_container.js";
|
||||||
|
import type AppContext from "../components/app_context.js";
|
||||||
|
import TabRowWidget from "../widgets/tab_row.js";
|
||||||
|
import MobileEditorToolbar from "../widgets/type_widgets/ckeditor/mobile_editor_toolbar.js";
|
||||||
|
import { applyModals } from "./layout_commons.js";
|
||||||
|
import FilePropertiesTab from "../widgets/ribbon/FilePropertiesTab.jsx";
|
||||||
|
import { useNoteContext } from "../widgets/react/hooks.jsx";
|
||||||
|
import FloatingButtons from "../widgets/FloatingButtons.jsx";
|
||||||
|
import { MOBILE_FLOATING_BUTTONS } from "../widgets/FloatingButtonsDefinitions.jsx";
|
||||||
|
import ToggleSidebarButton from "../widgets/mobile_widgets/toggle_sidebar_button.jsx";
|
||||||
|
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 SearchDefinitionTab from "../widgets/ribbon/SearchDefinitionTab.jsx";
|
||||||
import SearchResult from "../widgets/search_result.jsx";
|
import SearchResult from "../widgets/search_result.jsx";
|
||||||
import SharedInfoWidget from "../widgets/shared_info.js";
|
|
||||||
import SidebarContainer from "../widgets/mobile_widgets/sidebar_container.js";
|
|
||||||
import StandaloneRibbonAdapter from "../widgets/ribbon/components/StandaloneRibbonAdapter.jsx";
|
|
||||||
import TabRowWidget from "../widgets/tab_row.js";
|
|
||||||
import ToggleSidebarButton from "../widgets/mobile_widgets/toggle_sidebar_button.jsx";
|
|
||||||
import type AppContext from "../components/app_context.js";
|
|
||||||
|
|
||||||
const MOBILE_CSS = `
|
const MOBILE_CSS = `
|
||||||
<style>
|
<style>
|
||||||
@@ -151,16 +149,13 @@ export default class MobileLayout {
|
|||||||
.child(<NoteTitleWidget />)
|
.child(<NoteTitleWidget />)
|
||||||
.child(<MobileDetailMenu />)
|
.child(<MobileDetailMenu />)
|
||||||
)
|
)
|
||||||
|
.child(<SharedInfoWidget />)
|
||||||
.child(<FloatingButtons items={MOBILE_FLOATING_BUTTONS} />)
|
.child(<FloatingButtons items={MOBILE_FLOATING_BUTTONS} />)
|
||||||
.child(new PromotedAttributesWidget())
|
.child(new PromotedAttributesWidget())
|
||||||
.child(
|
.child(
|
||||||
new ScrollingContainer()
|
new ScrollingContainer()
|
||||||
.filling()
|
.filling()
|
||||||
.contentSized()
|
.contentSized()
|
||||||
.child(new ContentHeader()
|
|
||||||
.child(<ReadOnlyNoteInfoBar />)
|
|
||||||
.child(<SharedInfoWidget />)
|
|
||||||
)
|
|
||||||
.child(new NoteDetailWidget())
|
.child(new NoteDetailWidget())
|
||||||
.child(<NoteList media="screen" />)
|
.child(<NoteList media="screen" />)
|
||||||
.child(<StandaloneRibbonAdapter component={SearchDefinitionTab} />)
|
.child(<StandaloneRibbonAdapter component={SearchDefinitionTab} />)
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ export default class TreeContextMenu implements SelectMenuItemEventListener<Tree
|
|||||||
command: "editBranchPrefix",
|
command: "editBranchPrefix",
|
||||||
keyboardShortcut: "editBranchPrefix",
|
keyboardShortcut: "editBranchPrefix",
|
||||||
uiIcon: "bx bx-rename",
|
uiIcon: "bx bx-rename",
|
||||||
enabled: isNotRoot && parentNotSearch && notOptionsOrHelp
|
enabled: isNotRoot && parentNotSearch && noSelectedNotes && notOptionsOrHelp
|
||||||
},
|
},
|
||||||
{ title: t("tree-context-menu.convert-to-attachment"), command: "convertNoteToAttachment", uiIcon: "bx bx-paperclip", enabled: isNotRoot && !isHoisted && notOptionsOrHelp },
|
{ title: t("tree-context-menu.convert-to-attachment"), command: "convertNoteToAttachment", uiIcon: "bx bx-paperclip", enabled: isNotRoot && !isHoisted && notOptionsOrHelp },
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
@import "boxicons/css/boxicons.min.css";
|
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--print-font-size: 11pt;
|
--print-font-size: 11pt;
|
||||||
--ck-content-color-image-caption-background: transparent !important;
|
--ck-content-color-image-caption-background: transparent !important;
|
||||||
|
|||||||
@@ -70,9 +70,6 @@ function SingleNoteRenderer({ note, onReady }: RendererProps) {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
// Check custom CSS.
|
|
||||||
await loadCustomCss(note);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
load().then(() => requestAnimationFrame(onReady))
|
load().then(() => requestAnimationFrame(onReady))
|
||||||
@@ -92,10 +89,7 @@ function CollectionRenderer({ note, onReady }: RendererProps) {
|
|||||||
ntxId="print"
|
ntxId="print"
|
||||||
highlightedTokens={null}
|
highlightedTokens={null}
|
||||||
media="print"
|
media="print"
|
||||||
onReady={async () => {
|
onReady={onReady}
|
||||||
await loadCustomCss(note);
|
|
||||||
onReady();
|
|
||||||
}}
|
|
||||||
/>;
|
/>;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,25 +102,4 @@ function Error404({ noteId }: { noteId: string }) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
async function loadCustomCss(note: FNote) {
|
|
||||||
const printCssNotes = await note.getRelationTargets("printCss");
|
|
||||||
let loadPromises: JQueryPromise<void>[] = [];
|
|
||||||
|
|
||||||
for (const printCssNote of printCssNotes) {
|
|
||||||
if (!printCssNote || (printCssNote.type !== "code" && printCssNote.mime !== "text/css")) continue;
|
|
||||||
|
|
||||||
const linkEl = document.createElement("link");
|
|
||||||
linkEl.href = `/api/notes/${printCssNote.noteId}/download`;
|
|
||||||
linkEl.rel = "stylesheet";
|
|
||||||
|
|
||||||
const promise = $.Deferred();
|
|
||||||
loadPromises.push(promise.promise());
|
|
||||||
linkEl.onload = () => promise.resolve();
|
|
||||||
|
|
||||||
document.head.appendChild(linkEl);
|
|
||||||
}
|
|
||||||
|
|
||||||
await Promise.allSettled(loadPromises);
|
|
||||||
}
|
|
||||||
|
|
||||||
main();
|
main();
|
||||||
|
|||||||
28
apps/client/src/services/frontend_script_entrypoint.ts
Normal file
28
apps/client/src/services/frontend_script_entrypoint.ts
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
/**
|
||||||
|
* The front script API is accessible to code notes with the "JS (frontend)" language.
|
||||||
|
*
|
||||||
|
* The entire API is exposed as a single global: {@link api}
|
||||||
|
*
|
||||||
|
* @module Frontend Script API
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file creates the entrypoint for TypeDoc that simulates the context from within a
|
||||||
|
* script note.
|
||||||
|
*
|
||||||
|
* Make sure to keep in line with frontend's `script_context.ts`.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export type { default as BasicWidget } from "../widgets/basic_widget.js";
|
||||||
|
export type { default as FAttachment } from "../entities/fattachment.js";
|
||||||
|
export type { default as FAttribute } from "../entities/fattribute.js";
|
||||||
|
export type { default as FBranch } from "../entities/fbranch.js";
|
||||||
|
export type { default as FNote } from "../entities/fnote.js";
|
||||||
|
export type { Api } from "./frontend_script_api.js";
|
||||||
|
export type { default as NoteContextAwareWidget } from "../widgets/note_context_aware_widget.js";
|
||||||
|
export type { default as RightPanelWidget } from "../widgets/right_panel_widget.js";
|
||||||
|
|
||||||
|
import FrontendScriptApi, { type Api } from "./frontend_script_api.js";
|
||||||
|
|
||||||
|
//@ts-expect-error
|
||||||
|
export const api: Api = new FrontendScriptApi();
|
||||||
@@ -10,7 +10,7 @@ export const byNoteType: Record<Exclude<NoteType, "book">, string | null> = {
|
|||||||
file: null,
|
file: null,
|
||||||
image: null,
|
image: null,
|
||||||
launcher: null,
|
launcher: null,
|
||||||
mermaid: "s1aBHPd79XYj",
|
mermaid: null,
|
||||||
mindMap: null,
|
mindMap: null,
|
||||||
noteMap: null,
|
noteMap: null,
|
||||||
relationMap: null,
|
relationMap: null,
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ describe("shortcuts", () => {
|
|||||||
expect(matchesShortcut(event, "Shift+F1")).toBeTruthy();
|
expect(matchesShortcut(event, "Shift+F1")).toBeTruthy();
|
||||||
|
|
||||||
// Special keys
|
// Special keys
|
||||||
for (const keyCode of [ "Delete", "Enter", "NumpadEnter" ]) {
|
for (const keyCode of [ "Delete", "Enter" ]) {
|
||||||
event = createKeyboardEvent({ key: keyCode, code: keyCode });
|
event = createKeyboardEvent({ key: keyCode, code: keyCode });
|
||||||
expect(matchesShortcut(event, keyCode), `Key ${keyCode}`).toBeTruthy();
|
expect(matchesShortcut(event, keyCode), `Key ${keyCode}`).toBeTruthy();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ for (let i = 1; i <= 19; i++) {
|
|||||||
const KEYCODES_WITH_NO_MODIFIER = new Set([
|
const KEYCODES_WITH_NO_MODIFIER = new Set([
|
||||||
"Delete",
|
"Delete",
|
||||||
"Enter",
|
"Enter",
|
||||||
"NumpadEnter",
|
|
||||||
...functionKeyCodes
|
...functionKeyCodes
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
@@ -26,12 +26,21 @@ async function resolveNotePathToSegments(notePath: string, hoistedNoteId = "root
|
|||||||
}
|
}
|
||||||
|
|
||||||
const path = notePath.split("/").reverse();
|
const path = notePath.split("/").reverse();
|
||||||
|
|
||||||
|
if (!path.includes("root")) {
|
||||||
|
path.push("root");
|
||||||
|
}
|
||||||
|
|
||||||
const effectivePathSegments: string[] = [];
|
const effectivePathSegments: string[] = [];
|
||||||
let childNoteId: string | null = null;
|
let childNoteId: string | null = null;
|
||||||
let i = 0;
|
let i = 0;
|
||||||
|
|
||||||
for (let i = 0; i < path.length; i++) {
|
while (true) {
|
||||||
const parentNoteId = path[i];
|
if (i >= path.length) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
const parentNoteId = path[i++];
|
||||||
|
|
||||||
if (childNoteId !== null) {
|
if (childNoteId !== null) {
|
||||||
const child = await froca.getNote(childNoteId, !logErrors);
|
const child = await froca.getNote(childNoteId, !logErrors);
|
||||||
@@ -56,7 +65,7 @@ async function resolveNotePathToSegments(notePath: string, hoistedNoteId = "root
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!parents.some(p => p.noteId === parentNoteId) || (i === path.length - 1 && parentNoteId !== 'root')) {
|
if (!parents.some((p) => p.noteId === parentNoteId)) {
|
||||||
if (logErrors) {
|
if (logErrors) {
|
||||||
const parent = froca.getNoteFromCache(parentNoteId);
|
const parent = froca.getNoteFromCache(parentNoteId);
|
||||||
|
|
||||||
@@ -68,8 +77,7 @@ async function resolveNotePathToSegments(notePath: string, hoistedNoteId = "root
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const activeNotePath = appContext.tabManager.getActiveContextNotePath();
|
const bestNotePath = child.getBestNotePath(hoistedNoteId);
|
||||||
const bestNotePath = child.getBestNotePath(hoistedNoteId, activeNotePath);
|
|
||||||
|
|
||||||
if (bestNotePath) {
|
if (bestNotePath) {
|
||||||
const pathToRoot = bestNotePath.reverse().slice(1);
|
const pathToRoot = bestNotePath.reverse().slice(1);
|
||||||
@@ -100,9 +108,7 @@ async function resolveNotePathToSegments(notePath: string, hoistedNoteId = "root
|
|||||||
if (!note) {
|
if (!note) {
|
||||||
throw new Error(`Unable to find note: ${notePath}.`);
|
throw new Error(`Unable to find note: ${notePath}.`);
|
||||||
}
|
}
|
||||||
|
const bestNotePath = note.getBestNotePath(hoistedNoteId);
|
||||||
const activeNotePath = appContext.tabManager.getActiveContextNotePath();
|
|
||||||
const bestNotePath = note.getBestNotePath(hoistedNoteId, activeNotePath);
|
|
||||||
|
|
||||||
if (!bestNotePath) {
|
if (!bestNotePath) {
|
||||||
throw new Error(`Did not find any path segments for '${note.toString()}', hoisted note '${hoistedNoteId}'`);
|
throw new Error(`Did not find any path segments for '${note.toString()}', hoisted note '${hoistedNoteId}'`);
|
||||||
|
|||||||
@@ -11,11 +11,7 @@ export function reloadFrontendApp(reason?: string) {
|
|||||||
logInfo(`Frontend app reload: ${reason}`);
|
logInfo(`Frontend app reload: ${reason}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isElectron()) {
|
window.location.reload();
|
||||||
dynamicRequire("@electron/remote").BrowserWindow.getFocusedWindow()?.reload();
|
|
||||||
} else {
|
|
||||||
window.location.reload();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function restartDesktopApp() {
|
export function restartDesktopApp() {
|
||||||
@@ -841,7 +837,7 @@ export function arrayEqual<T>(a: T[], b: T[]) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Indexed<T extends object> = T & { index: number };
|
type Indexed<T extends object> = T & { index: number };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given an object array, alters every object in the array to have an index field assigned to it.
|
* Given an object array, alters every object in the array to have an index field assigned to it.
|
||||||
|
|||||||
24
apps/client/src/share.ts
Normal file
24
apps/client/src/share.ts
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
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 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();
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
.note-detail-relation-map {
|
.note-detail-relation-map {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden !important;
|
overflow: hidden !important;
|
||||||
|
padding: 10px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1104,6 +1104,7 @@ a.external:not(.no-arrow):after, a[href^="http://"]:not(.no-arrow):after, a[href
|
|||||||
|
|
||||||
.card {
|
.card {
|
||||||
color: inherit !important;
|
color: inherit !important;
|
||||||
|
background-color: inherit !important;
|
||||||
border-color: var(--main-border-color) !important;
|
border-color: var(--main-border-color) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1758,10 +1759,10 @@ body:not(.mobile) #launcher-pane.horizontal .dropdown-submenu > .dropdown-menu {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin-inline-start: 10px;
|
margin-inline-start: 10px;
|
||||||
margin-inline-end: 5px;
|
margin-inline-end: 5px;
|
||||||
background: transparent;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#right-pane .card-header {
|
#right-pane .card-header {
|
||||||
|
background: inherit;
|
||||||
padding: 6px 0 3px 0;
|
padding: 6px 0 3px 0;
|
||||||
width: 99%; /* to give minimal right margin */
|
width: 99%; /* to give minimal right margin */
|
||||||
background-color: var(--button-background-color);
|
background-color: var(--button-background-color);
|
||||||
@@ -1808,15 +1809,12 @@ body:not(.mobile) #launcher-pane.horizontal .dropdown-submenu > .dropdown-menu {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.note-split {
|
.note-split {
|
||||||
/* Limits the maximum width of the note */
|
|
||||||
--max-content-width: var(--preferred-max-content-width);
|
|
||||||
|
|
||||||
margin-inline-start: auto;
|
margin-inline-start: auto;
|
||||||
margin-inline-end: auto;
|
margin-inline-end: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.note-split.full-content-width {
|
.note-split.full-content-width {
|
||||||
--max-content-width: unset;
|
max-width: 999999px;
|
||||||
}
|
}
|
||||||
|
|
||||||
button.close:hover {
|
button.close:hover {
|
||||||
@@ -2036,16 +2034,13 @@ body.zen #right-pane,
|
|||||||
body.zen #mobile-sidebar-wrapper,
|
body.zen #mobile-sidebar-wrapper,
|
||||||
body.zen .tab-row-container,
|
body.zen .tab-row-container,
|
||||||
body.zen .tab-row-widget,
|
body.zen .tab-row-widget,
|
||||||
body.zen .shared-info-widget,
|
|
||||||
body.zen .ribbon-container:not(:has(.classic-toolbar-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:has(.classic-toolbar-widget) .ribbon-top-row,
|
||||||
body.zen .ribbon-container .ribbon-body:not(:has(.classic-toolbar-widget)),
|
body.zen .ribbon-container .ribbon-body:not(:has(.classic-toolbar-widget)),
|
||||||
body.zen .note-icon-widget,
|
body.zen .note-icon-widget,
|
||||||
body.zen .title-row .icon-action,
|
body.zen .title-row .icon-action,
|
||||||
body.zen .promoted-attributes-widget,
|
|
||||||
body.zen .floating-buttons-children > *:not(.bx-edit-alt),
|
body.zen .floating-buttons-children > *:not(.bx-edit-alt),
|
||||||
body.zen .action-button,
|
body.zen .action-button {
|
||||||
body.zen .note-list-widget:not(.full-height) {
|
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2089,121 +2084,12 @@ body.zen .note-title-widget,
|
|||||||
body.zen .note-title-widget input {
|
body.zen .note-title-widget input {
|
||||||
font-size: 1rem !important;
|
font-size: 1rem !important;
|
||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
pointer-events: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body.zen #detail-container {
|
body.zen #detail-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.zen .note-split:not(.full-content-width) .scrolling-container {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
scroll-behavior: unset !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
body.zen .note-split:not(.full-content-width) .note-detail {
|
|
||||||
margin: auto;
|
|
||||||
padding-bottom: 25vh;
|
|
||||||
max-width: var(--max-content-width);
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
body.zen .note-split:not(.full-content-width) .scroll-padding-widget {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
body.zen .note-split.type-text {
|
|
||||||
position: relative;
|
|
||||||
font-size: 1.15em;
|
|
||||||
}
|
|
||||||
|
|
||||||
body.zen:not(.backdrop-effects-disabled) .note-split.type-text .title-row {
|
|
||||||
--start-color: var(--main-background-color);
|
|
||||||
|
|
||||||
position: absolute;
|
|
||||||
width: 100%;
|
|
||||||
background: linear-gradient(var(--start-color) 30%, transparent 100%);
|
|
||||||
z-index: 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
@supports (background: color-mix(in srgb, white, transparent)) {
|
|
||||||
body.zen .note-split.type-text .title-row {
|
|
||||||
--start-color: color-mix(in srgb, var(--main-background-color), transparent 10%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
body.zen .note-split.type-text .scrolling-container {
|
|
||||||
--padding-bottom: 130px; /* Should be enough to avoid caret being hidden by the formatting toolbar */
|
|
||||||
|
|
||||||
/* (Usually) keeps the caret above the fixed toolbar */
|
|
||||||
scroll-padding-bottom: var(--padding-bottom);
|
|
||||||
}
|
|
||||||
|
|
||||||
body.zen:not(.backdrop-effects-disabled) .note-split.type-text .scrolling-container {
|
|
||||||
--padding-top: 50px; /* Should be enough to cover the title row */
|
|
||||||
|
|
||||||
padding-top: var(--padding-top);
|
|
||||||
scroll-padding-top: var(--padding-top);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Fixed formatting toolbar */
|
|
||||||
|
|
||||||
body.zen .note-split .ribbon-container {
|
|
||||||
position: fixed;
|
|
||||||
left: 0;
|
|
||||||
bottom: 20px;
|
|
||||||
width: 100%;
|
|
||||||
z-index: 1000;
|
|
||||||
opacity: 0; /* Hidden unless the current note split is focused */
|
|
||||||
pointer-events: none;
|
|
||||||
transition: opacity 100ms linear;
|
|
||||||
}
|
|
||||||
|
|
||||||
body.zen .note-split:focus-within .ribbon-container {
|
|
||||||
opacity: 1; /* Show when the note split is focused */
|
|
||||||
}
|
|
||||||
|
|
||||||
body.zen .note-split .ribbon-container .ribbon-body {
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
body.zen .note-split .ribbon-container .classic-toolbar-widget {
|
|
||||||
margin: auto;
|
|
||||||
width: fit-content;
|
|
||||||
box-shadow: 0px 10px 20px rgba(0, 0, 0, .1);
|
|
||||||
border-radius: 8px;
|
|
||||||
border: 1px solid var(--main-border-color);
|
|
||||||
padding: 4px;
|
|
||||||
background: var(--menu-background-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
body.zen .note-split .ribbon-container .classic-toolbar-widget:not(:has(> .ck-toolbar)) {
|
|
||||||
/* Hide the toolbar wrapper if the toolbar is missing */
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
body.zen .note-split:focus-within .ribbon-container .classic-toolbar-widget {
|
|
||||||
pointer-events: all;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 1300px) {
|
|
||||||
body.zen .note-split .ribbon-container .classic-toolbar-widget {
|
|
||||||
/* Set the toolbar to full with */
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
body.zen .classic-toolbar-widget .ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,
|
|
||||||
body.zen .classic-toolbar-widget .ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw,
|
|
||||||
body.zen .classic-toolbar-widget .ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw,
|
|
||||||
body.zen .classic-toolbar-widget .ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme,
|
|
||||||
body.zen .classic-toolbar-widget .ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s {
|
|
||||||
/* Force toolbar items overflow dropdowns open upwards */
|
|
||||||
top: auto;
|
|
||||||
bottom: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Content renderer */
|
/* Content renderer */
|
||||||
|
|
||||||
footer.file-footer,
|
footer.file-footer,
|
||||||
@@ -2520,7 +2406,7 @@ footer.webview-footer button {
|
|||||||
transform: rotate(180deg);
|
transform: rotate(180deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* CK Editor */
|
/* CK Edito */
|
||||||
|
|
||||||
/* Insert text snippet: limit the width of the listed items to avoid overly long names */
|
/* Insert text snippet: limit the width of the listed items to avoid overly long names */
|
||||||
:root body.desktop div.ck-template-form li.ck-list__item .ck-template-form__text-part > span {
|
:root body.desktop div.ck-template-form li.ck-list__item .ck-template-form__text-part > span {
|
||||||
@@ -2550,18 +2436,4 @@ iframe.print-iframe {
|
|||||||
|
|
||||||
.excalidraw.theme--dark canvas {
|
.excalidraw.theme--dark canvas {
|
||||||
--theme-filter: invert(100%) hue-rotate(180deg);
|
--theme-filter: invert(100%) hue-rotate(180deg);
|
||||||
}
|
|
||||||
|
|
||||||
/* Scrolling container */
|
|
||||||
|
|
||||||
.scrolling-container:has(> :is(.note-detail.full-height, .note-list-widget.full-height)) {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scrolling-container > .note-detail.full-height,
|
|
||||||
.scrolling-container > .note-list-widget.full-height {
|
|
||||||
position: relative;
|
|
||||||
flex-grow: 1;
|
|
||||||
width: 100%;
|
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
--native-titlebar-background: #00000000;
|
--native-titlebar-background: #00000000;
|
||||||
--window-background-color-bgfx: transparent; /* When background effects enabled */
|
--window-background-color-bgfx: transparent; /* When background effects enabled */
|
||||||
|
|
||||||
--main-background-color: #242424;
|
--main-background-color: #272727;
|
||||||
--main-text-color: #ccc;
|
--main-text-color: #ccc;
|
||||||
--main-border-color: #454545;
|
--main-border-color: #454545;
|
||||||
--subtle-border-color: #313131;
|
--subtle-border-color: #313131;
|
||||||
@@ -166,9 +166,6 @@
|
|||||||
--protected-session-active-icon-color: #8edd8e;
|
--protected-session-active-icon-color: #8edd8e;
|
||||||
--sync-status-error-pulse-color: #f47871;
|
--sync-status-error-pulse-color: #f47871;
|
||||||
|
|
||||||
--center-pane-vert-layout-background-color-bgfx: #0c0c0c69;
|
|
||||||
--center-pane-horiz-layout-background-color-bgfx: #1e1e1ec7;
|
|
||||||
|
|
||||||
--right-pane-heading-color: gray;
|
--right-pane-heading-color: gray;
|
||||||
|
|
||||||
--root-background: var(--left-pane-background-color);
|
--root-background: var(--left-pane-background-color);
|
||||||
@@ -195,9 +192,9 @@
|
|||||||
--badge-background-color: #ffffff1a;
|
--badge-background-color: #ffffff1a;
|
||||||
--badge-text-color: var(--muted-text-color);
|
--badge-text-color: var(--muted-text-color);
|
||||||
|
|
||||||
--promoted-attribute-card-background-color: #ffffff21;
|
--promoted-attribute-card-background-color: var(--card-background-color);
|
||||||
--promoted-attribute-card-shadow: none;
|
--promoted-attribute-card-shadow-color: #000000b3;
|
||||||
|
|
||||||
--floating-button-shadow-color: #00000080;
|
--floating-button-shadow-color: #00000080;
|
||||||
--floating-button-background-color: #494949d2;
|
--floating-button-background-color: #494949d2;
|
||||||
--floating-button-color: var(--button-text-color);
|
--floating-button-color: var(--button-text-color);
|
||||||
@@ -211,8 +208,6 @@
|
|||||||
--floating-button-hide-button-background: #00000029;
|
--floating-button-hide-button-background: #00000029;
|
||||||
--floating-button-hide-button-color: #ffffff63;
|
--floating-button-hide-button-color: #ffffff63;
|
||||||
|
|
||||||
--right-pane-background-color: var(--main-background-color);
|
|
||||||
--right-pane-background-color-bgfx: #0c0c0c24; /* Only for the vertical layout */
|
|
||||||
--right-pane-item-hover-background: #ffffff26;
|
--right-pane-item-hover-background: #ffffff26;
|
||||||
--right-pane-item-hover-color: white;
|
--right-pane-item-hover-color: white;
|
||||||
|
|
||||||
@@ -230,9 +225,10 @@
|
|||||||
--code-block-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
|
--code-block-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
|
||||||
|
|
||||||
--card-background-color: #ffffff12;
|
--card-background-color: #ffffff12;
|
||||||
--card-background-hover-color: #ffffff20;
|
--card-background-hover-color: #3c3c3c;
|
||||||
--card-border-color: transparent;
|
--card-background-press-color: #464646;
|
||||||
--card-box-shadow: none;
|
--card-border-color: #222222;
|
||||||
|
--card-box-shadow: 0 0 12px rgba(0, 0, 0, 0.15);
|
||||||
|
|
||||||
--calendar-color: var(--menu-text-color);
|
--calendar-color: var(--menu-text-color);
|
||||||
--calendar-weekday-labels-color: var(--muted-text-color);
|
--calendar-weekday-labels-color: var(--muted-text-color);
|
||||||
@@ -298,10 +294,4 @@ body ::-webkit-calendar-picker-indicator {
|
|||||||
|
|
||||||
body .todo-list input[type="checkbox"]:not(:checked):before {
|
body .todo-list input[type="checkbox"]:not(:checked):before {
|
||||||
border-color: var(--muted-text-color) !important;
|
border-color: var(--muted-text-color) !important;
|
||||||
}
|
|
||||||
|
|
||||||
.tinted-quick-edit-dialog {
|
|
||||||
--modal-background-color: hsl(var(--custom-color-hue), 8.8%, 11.2%);
|
|
||||||
--modal-border-color: hsl(var(--custom-color-hue), 9.4%, 25.1%);
|
|
||||||
--promoted-attribute-card-background-color: hsl(var(--custom-color-hue), 13.2%, 20.8%);
|
|
||||||
}
|
}
|
||||||
@@ -159,9 +159,6 @@
|
|||||||
--protected-session-active-icon-color: #16b516;
|
--protected-session-active-icon-color: #16b516;
|
||||||
--sync-status-error-pulse-color: #ff5528;
|
--sync-status-error-pulse-color: #ff5528;
|
||||||
|
|
||||||
--center-pane-vert-layout-background-color-bgfx: #ffffff75;
|
|
||||||
--center-pane-horiz-layout-background-color-bgfx: #ffffffd6;
|
|
||||||
|
|
||||||
--right-pane-heading-color: gray;
|
--right-pane-heading-color: gray;
|
||||||
|
|
||||||
--root-background: var(--left-pane-background-color);
|
--root-background: var(--left-pane-background-color);
|
||||||
@@ -183,13 +180,13 @@
|
|||||||
--inactive-tab-hover-background-color: #00000016;
|
--inactive-tab-hover-background-color: #00000016;
|
||||||
--inactive-tab-text-color: #4e4e4e;
|
--inactive-tab-text-color: #4e4e4e;
|
||||||
|
|
||||||
--alert-bar-background: #f9cf2b29;
|
--alert-bar-background: #32637b29;
|
||||||
|
|
||||||
--badge-background-color: #00000011;
|
--badge-background-color: #00000011;
|
||||||
--badge-text-color: var(--muted-text-color);
|
--badge-text-color: var(--muted-text-color);
|
||||||
|
|
||||||
--promoted-attribute-card-background-color: #00000014;
|
--promoted-attribute-card-background-color: var(--card-background-color);
|
||||||
--promoted-attribute-card-shadow: none;
|
--promoted-attribute-card-shadow-color: #00000033;
|
||||||
|
|
||||||
--floating-button-shadow-color: #00000042;
|
--floating-button-shadow-color: #00000042;
|
||||||
--floating-button-background-color: #eaeaeacc;
|
--floating-button-background-color: #eaeaeacc;
|
||||||
@@ -210,9 +207,7 @@
|
|||||||
--new-tab-button-hover-background: white;
|
--new-tab-button-hover-background: white;
|
||||||
--new-tab-button-hover-color: black;
|
--new-tab-button-hover-color: black;
|
||||||
|
|
||||||
--right-pane-background-color: var(--main-background-color);
|
--right-pane-item-hover-background: #ececec;
|
||||||
--right-pane-background-color-bgfx: #ffffff9e; /* Only for the vertical layout */
|
|
||||||
--right-pane-item-hover-background: #00000013;
|
|
||||||
--right-pane-item-hover-color: inherit;
|
--right-pane-item-hover-color: inherit;
|
||||||
|
|
||||||
--scrollbar-thumb-color: #0000005c;
|
--scrollbar-thumb-color: #0000005c;
|
||||||
@@ -228,11 +223,12 @@
|
|||||||
|
|
||||||
--code-block-box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.1), 0px 0px 2px rgba(0, 0, 0, 0.2);
|
--code-block-box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.1), 0px 0px 2px rgba(0, 0, 0, 0.2);
|
||||||
|
|
||||||
--card-background-color: #0000000d;
|
--card-background-color: var(--accented-background-color);
|
||||||
--card-background-hover-color: #0000001c;
|
--card-background-hover-color: #f9f9f9;
|
||||||
--card-border-color: transparent;
|
--card-background-press-color: #efefef;
|
||||||
|
--card-border-color: #eaeaea;
|
||||||
--card-shadow-color: rgba(0, 0, 0, 0.1);
|
--card-shadow-color: rgba(0, 0, 0, 0.1);
|
||||||
--card-box-shadow: none;
|
--card-box-shadow: 0 0 12px var(--card-shadow-color);
|
||||||
|
|
||||||
--calendar-color: var(--menu-text-color);
|
--calendar-color: var(--menu-text-color);
|
||||||
--calendar-weekday-labels-color: var(--muted-text-color);
|
--calendar-weekday-labels-color: var(--muted-text-color);
|
||||||
@@ -274,10 +270,4 @@
|
|||||||
* The --custom-color-hue variable contains the hue of the user-selected note color.
|
* The --custom-color-hue variable contains the hue of the user-selected note color.
|
||||||
* This value is unset for gray tones. */
|
* This value is unset for gray tones. */
|
||||||
--custom-bg-color: hsl(var(--custom-color-hue), 37%, 89%, 1);
|
--custom-bg-color: hsl(var(--custom-color-hue), 37%, 89%, 1);
|
||||||
}
|
|
||||||
|
|
||||||
.tinted-quick-edit-dialog {
|
|
||||||
--modal-background-color: hsl(var(--custom-color-hue), 56%, 96%);
|
|
||||||
--modal-border-color: hsl(var(--custom-color-hue), 33%, 41%);
|
|
||||||
--promoted-attribute-card-background-color: hsl(var(--custom-color-hue), 40%, 88%);
|
|
||||||
}
|
}
|
||||||
@@ -82,7 +82,6 @@
|
|||||||
|
|
||||||
/* Theme capabilities */
|
/* Theme capabilities */
|
||||||
--tab-note-icons: true;
|
--tab-note-icons: true;
|
||||||
--allow-background-effects: true;
|
|
||||||
|
|
||||||
/* To ensure that a tree item's custom color remains sufficiently contrasted and readable,
|
/* 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
|
* the color is adjusted based on the current color scheme (light or dark). The lightness
|
||||||
@@ -132,8 +131,7 @@ body.mobile .dropdown-menu .dropdown-menu {
|
|||||||
|
|
||||||
body.desktop .dropdown-menu::before,
|
body.desktop .dropdown-menu::before,
|
||||||
:root .ck.ck-dropdown__panel::before,
|
:root .ck.ck-dropdown__panel::before,
|
||||||
:root .excalidraw .popover::before,
|
:root .excalidraw .popover::before {
|
||||||
body.zen .note-split .ribbon-container .classic-toolbar-widget::before {
|
|
||||||
content: "";
|
content: "";
|
||||||
backdrop-filter: var(--dropdown-backdrop-filter);
|
backdrop-filter: var(--dropdown-backdrop-filter);
|
||||||
border-radius: var(--dropdown-border-radius);
|
border-radius: var(--dropdown-border-radius);
|
||||||
@@ -487,21 +485,13 @@ li.dropdown-item a.dropdown-item-button:focus-visible {
|
|||||||
--note-list-vertical-padding: 15px;
|
--note-list-vertical-padding: 15px;
|
||||||
background-color: var(--card-background-color);
|
background-color: var(--card-background-color);
|
||||||
border: 1px solid var(--card-border-color) !important;
|
border: 1px solid var(--card-border-color) !important;
|
||||||
|
box-shadow: 2px 3px 4px var(--card-shadow-color);
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 5px 10px 5px 0;
|
margin: 5px 10px 5px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
:root .note-list .note-book-card:hover {
|
|
||||||
background-color: var(--card-background-hover-color);
|
|
||||||
transition: background-color 200ms ease-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
:root .note-list .note-book-card:active {
|
|
||||||
transform: scale(.98);
|
|
||||||
}
|
|
||||||
|
|
||||||
.note-list.list-view .note-book-card {
|
.note-list.list-view .note-book-card {
|
||||||
box-shadow: 0 0 3px var(--card-shadow-color);
|
box-shadow: 0 0 3px var(--card-shadow-color);
|
||||||
}
|
}
|
||||||
@@ -510,6 +500,10 @@ li.dropdown-item a.dropdown-item-button:focus-visible {
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.note-list-wrapper .note-book-card:active {
|
||||||
|
background-color: var(--card-background-press-color);
|
||||||
|
}
|
||||||
|
|
||||||
.note-list-wrapper .note-book-card a {
|
.note-list-wrapper .note-book-card a {
|
||||||
color: inherit !important;
|
color: inherit !important;
|
||||||
}
|
}
|
||||||
@@ -591,6 +585,7 @@ li.dropdown-item a.dropdown-item-button:focus-visible {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.note-list.grid-view .note-book-card:hover {
|
.note-list.grid-view .note-book-card:hover {
|
||||||
|
background: var(--card-background-color) !important;
|
||||||
filter: contrast(105%);
|
filter: contrast(105%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -258,6 +258,11 @@
|
|||||||
border-inline-start: 1px solid var(--ck-color-toolbar-border);
|
border-inline-start: 1px solid var(--ck-color-toolbar-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* The last separator of the toolbar */
|
||||||
|
:root .classic-toolbar-widget .ck.ck-toolbar__separator:last-of-type {
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* Heading dropdown */
|
/* Heading dropdown */
|
||||||
|
|
||||||
:root .ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__panel .ck-list__item {
|
:root .ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__panel .ck-list__item {
|
||||||
@@ -674,17 +679,4 @@ html .note-detail-editable-text :not(figure, .include-note, hr):first-child {
|
|||||||
|
|
||||||
.ck-content a.reference-link > span {
|
.ck-content a.reference-link > span {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Read-only text content
|
|
||||||
*/
|
|
||||||
|
|
||||||
.note-detail-readonly-text:focus-visible {
|
|
||||||
outline: 2px solid var(--input-focus-outline-color);
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.note-list-widget {
|
|
||||||
outline: 0 !important;
|
|
||||||
}
|
}
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
.sql-table-schemas-widget .sql-table-schemas button:hover,
|
.sql-table-schemas-widget .sql-table-schemas button:hover,
|
||||||
.sql-table-schemas-widget .sql-table-schemas button:active,
|
.sql-table-schemas-widget .sql-table-schemas button:active,
|
||||||
.sql-table-schemas-widget .sql-table-schemas button:focus-visible {
|
.sql-table-schemas-widget .sql-table-schemas button:focus-visible {
|
||||||
--background: var(--card-background-hover-color);
|
--background: var(--card-background-press-color);
|
||||||
--color: var(--main-text-color);
|
--color: var(--main-text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,7 +148,7 @@ div.note-detail-empty {
|
|||||||
--options-card-min-width: 500px;
|
--options-card-min-width: 500px;
|
||||||
--options-card-max-width: 900px;
|
--options-card-max-width: 900px;
|
||||||
--options-card-padding: 17px;
|
--options-card-padding: 17px;
|
||||||
--options-title-font-size: .75rem;
|
--options-title-font-size: 1rem;
|
||||||
--options-title-offset: 13px;
|
--options-title-offset: 13px;
|
||||||
}
|
}
|
||||||
/* Create a gap at the top of the option pages */
|
/* Create a gap at the top of the option pages */
|
||||||
@@ -173,19 +173,16 @@ div.note-detail-empty {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.options-section:not(.tn-no-card) {
|
.options-section:not(.tn-no-card) {
|
||||||
margin-bottom: calc(var(--options-title-offset) + 26px) !important;
|
margin: auto;
|
||||||
box-shadow: var(--card-box-shadow);
|
border-radius: 12px;
|
||||||
border: 1px solid var(--card-border-color) !important;
|
border: 1px solid var(--card-border-color) !important;
|
||||||
border-radius: 8px;
|
box-shadow: var(--card-box-shadow);
|
||||||
background: var(--card-background-color);
|
background: var(--card-background-color);
|
||||||
padding: var(--options-card-padding);
|
padding: var(--options-card-padding);
|
||||||
|
margin-bottom: calc(var(--options-title-offset) + 26px) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.prefers-centered-content .options-section:not(.tn-no-card) {
|
body.desktop .option-section:not(.tn-no-card) {
|
||||||
margin-inline: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
body.desktop .options-section:not(.tn-no-card) {
|
|
||||||
min-width: var(--options-card-min-width);
|
min-width: var(--options-card-min-width);
|
||||||
max-width: var(--options-card-max-width);
|
max-width: var(--options-card-max-width);
|
||||||
}
|
}
|
||||||
@@ -196,16 +193,9 @@ body.desktop .options-section:not(.tn-no-card) {
|
|||||||
padding-bottom: var(--default-padding);
|
padding-bottom: var(--default-padding);
|
||||||
}
|
}
|
||||||
|
|
||||||
.options-section:not(.tn-no-card) h4,
|
|
||||||
.options-section:not(.tn-no-card) h5 {
|
|
||||||
text-transform: uppercase;
|
|
||||||
letter-spacing: .4pt;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.options-section:not(.tn-no-card) h4 {
|
.options-section:not(.tn-no-card) h4 {
|
||||||
font-size: var(--options-title-font-size);
|
font-size: var(--options-title-font-size);
|
||||||
font-weight: 600;
|
font-weight: bold;
|
||||||
color: var(--launcher-pane-text-color);
|
color: var(--launcher-pane-text-color);
|
||||||
margin-top: calc(-1 * var(--options-card-padding) - var(--options-title-font-size) - var(--options-title-offset)) !important;
|
margin-top: calc(-1 * var(--options-card-padding) - var(--options-title-font-size) - var(--options-title-offset)) !important;
|
||||||
margin-bottom: calc(var(--options-title-offset) + var(--options-card-padding)) !important;
|
margin-bottom: calc(var(--options-title-offset) + var(--options-card-padding)) !important;
|
||||||
|
|||||||
@@ -34,7 +34,6 @@
|
|||||||
div.promoted-attributes-container {
|
div.promoted-attributes-container {
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
margin-inline-start: 12px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--dropdown-backdrop-filter: blur(20px) saturate(6);
|
--dropdown-backdrop-filter: blur(10px) saturate(6);
|
||||||
--dropdown-border-radius: 10px;
|
--dropdown-border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,53 +35,30 @@ body.mobile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* #region Mica */
|
/* #region Mica */
|
||||||
|
|
||||||
body.background-effects.platform-win32 {
|
body.background-effects.platform-win32 {
|
||||||
/* Quirk: --background-material is read before "theme-supports-background-effects" class
|
|
||||||
* is applied. Apply the matterial even if the theme doesn't support it. */
|
|
||||||
--background-material: tabbed;
|
--background-material: tabbed;
|
||||||
}
|
|
||||||
|
|
||||||
body.background-effects.theme-supports-background-effects.platform-win32 {
|
|
||||||
--launcher-pane-horiz-border-color: var(--launcher-pane-horiz-border-color-bgfx);
|
--launcher-pane-horiz-border-color: var(--launcher-pane-horiz-border-color-bgfx);
|
||||||
--launcher-pane-horiz-background-color: var(--launcher-pane-horiz-background-color-bgfx);
|
--launcher-pane-horiz-background-color: var(--launcher-pane-horiz-background-color-bgfx);
|
||||||
--launcher-pane-vert-background-color: var(--launcher-pane-vert-background-color-bgfx);
|
--launcher-pane-vert-background-color: var(--launcher-pane-vert-background-color-bgfx);
|
||||||
--tab-background-color: var(--window-background-color-bgfx);
|
--tab-background-color: var(--window-background-color-bgfx);
|
||||||
--new-tab-button-background: var(--window-background-color-bgfx);
|
--new-tab-button-background: var(--window-background-color-bgfx);
|
||||||
--active-tab-background-color: var(--launcher-pane-horiz-background-color);
|
--active-tab-background-color: var(--launcher-pane-horiz-background-color);
|
||||||
--root-background: transparent;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body.background-effects.platform-win32.layout-vertical {
|
body.background-effects.platform-win32.layout-vertical {
|
||||||
|
--left-pane-background-color: var(--window-background-color-bgfx);
|
||||||
--background-material: mica;
|
--background-material: mica;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.background-effects.theme-supports-background-effects.platform-win32.layout-vertical {
|
body.background-effects.platform-win32,
|
||||||
--left-pane-background-color: var(--window-background-color-bgfx);
|
body.background-effects.platform-win32 #root-widget {
|
||||||
--center-pane-background-color-bgfx: var(--center-pane-vert-layout-background-color-bgfx);
|
|
||||||
--right-pane-background-color: var(--right-pane-background-color-bgfx);
|
|
||||||
}
|
|
||||||
|
|
||||||
body.background-effects.theme-supports-background-effects.platform-win32.layout-horizontal {
|
|
||||||
--center-pane-background-color-bgfx: var(--center-pane-horiz-layout-background-color-bgfx);
|
|
||||||
--gutter-color: var(--left-pane-background-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
body.background-effects.theme-supports-background-effects.platform-win32,
|
|
||||||
body.background-effects.theme-supports-background-effects.platform-win32 #root-widget {
|
|
||||||
background: var(--window-background-color-bgfx) !important;
|
background: var(--window-background-color-bgfx) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.background-effects.theme-supports-background-effects.platform-win32.layout-horizontal #horizontal-main-container,
|
body.background-effects.platform-win32.layout-horizontal #horizontal-main-container,
|
||||||
body.background-effects.theme-supports-background-effects.platform-win32.layout-vertical #vertical-main-container {
|
body.background-effects.platform-win32.layout-vertical #vertical-main-container {
|
||||||
background-color: var(--root-background);
|
background-color: var(--root-background);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Note split with background effects */
|
|
||||||
body.background-effects.theme-supports-background-effects.platform-win32 #center-pane .note-split.bgfx {
|
|
||||||
--note-split-background-color: var(--center-pane-background-color-bgfx);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* #endregion */
|
/* #endregion */
|
||||||
|
|
||||||
/* Matches when the left pane is collapsed */
|
/* Matches when the left pane is collapsed */
|
||||||
@@ -95,21 +72,9 @@ body.layout-vertical #horizontal-main-container.left-pane-hidden #launcher-pane.
|
|||||||
border-inline-end: 2px solid var(--left-pane-collapsed-border-color);
|
border-inline-end: 2px solid var(--left-pane-collapsed-border-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
body.background-effects.zen #root-widget {
|
||||||
* Zen mode
|
--main-background-color: transparent;
|
||||||
*/
|
--root-background: transparent;
|
||||||
|
|
||||||
@keyframes zen-formatting-toolbar-entrance {
|
|
||||||
from {
|
|
||||||
transform: translateY(200%);
|
|
||||||
} to {
|
|
||||||
transform: translateY(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
body.zen .note-split .ribbon-container .classic-toolbar-widget {
|
|
||||||
position: relative;
|
|
||||||
animation: zen-formatting-toolbar-entrance 300ms ease-out;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1206,18 +1171,23 @@ body.layout-vertical .tab-row-widget-is-sorting .note-tab.note-tab-is-dragging .
|
|||||||
* CENTER PANE
|
* CENTER PANE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* The first visible note split */
|
#center-pane {
|
||||||
.vertical-layout #center-pane .note-split:not(.visible ~ .visible) {
|
background: var(--main-background-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.vertical-layout #center-pane {
|
||||||
border-radius: var(--center-pane-border-radius) 0 0 0;
|
border-radius: var(--center-pane-border-radius) 0 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#center-pane .note-split {
|
.note-split {
|
||||||
padding-top: 2px;
|
padding-top: 2px;
|
||||||
background-color: var(--note-split-background-color, var(--main-background-color));
|
animation: note-entrance 100ms linear;
|
||||||
|
/* will-change: opacity; -- causes some weird artifacts to the note menu in split view */
|
||||||
}
|
}
|
||||||
|
|
||||||
body:not(.background-effects) #center-pane .note-split {
|
.split-note-container-widget > .gutter {
|
||||||
animation: note-entrance 100ms linear;
|
background: var(--root-background) !important;
|
||||||
|
transition: background 150ms ease-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1230,9 +1200,9 @@ body:not(.background-effects) #center-pane .note-split {
|
|||||||
|
|
||||||
@keyframes note-entrance {
|
@keyframes note-entrance {
|
||||||
from {
|
from {
|
||||||
filter: opacity(0);
|
opacity: 0;
|
||||||
} to {
|
} to {
|
||||||
filter: opacity(1);
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1358,7 +1328,8 @@ div.promoted-attribute-cell {
|
|||||||
--pa-card-padding-inline-end: 2px;
|
--pa-card-padding-inline-end: 2px;
|
||||||
--input-background-color: transparent;
|
--input-background-color: transparent;
|
||||||
|
|
||||||
box-shadow: var(--promoted-attribute-card-shadow);
|
box-shadow: 1px 1px 2px var(--promoted-attribute-card-shadow-color);
|
||||||
|
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
@@ -1745,7 +1716,7 @@ div.find-replace-widget div.find-widget-found-wrapper > span {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#right-pane {
|
#right-pane {
|
||||||
background: var(--right-pane-background-color);
|
background: var(--main-background-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
#right-pane div.card-header {
|
#right-pane div.card-header {
|
||||||
|
|||||||
@@ -520,7 +520,9 @@
|
|||||||
"max_content_width": {
|
"max_content_width": {
|
||||||
"max_width_unit": "بكسل",
|
"max_width_unit": "بكسل",
|
||||||
"title": "عرض المحتوى",
|
"title": "عرض المحتوى",
|
||||||
"max_width_label": "اقصى عرض للمحتوى"
|
"reload_button": "اعادة تحميل الواجهة",
|
||||||
|
"max_width_label": "اقصى عرض للمحتوى",
|
||||||
|
"reload_description": "تغييرات من خيارات المظهر"
|
||||||
},
|
},
|
||||||
"native_title_bar": {
|
"native_title_bar": {
|
||||||
"enabled": "مفعل",
|
"enabled": "مفعل",
|
||||||
@@ -714,6 +716,7 @@
|
|||||||
"backup_database_now": "نسخ اختياطي لقاعدة البيانات الان"
|
"backup_database_now": "نسخ اختياطي لقاعدة البيانات الان"
|
||||||
},
|
},
|
||||||
"etapi": {
|
"etapi": {
|
||||||
|
"wiki": "ويكي",
|
||||||
"created": "تم الأنشاء",
|
"created": "تم الأنشاء",
|
||||||
"actions": "أجراءات",
|
"actions": "أجراءات",
|
||||||
"title": "ETAPI",
|
"title": "ETAPI",
|
||||||
|
|||||||
@@ -39,10 +39,7 @@
|
|||||||
"help_on_tree_prefix": "有关树前缀的帮助",
|
"help_on_tree_prefix": "有关树前缀的帮助",
|
||||||
"prefix": "前缀: ",
|
"prefix": "前缀: ",
|
||||||
"save": "保存",
|
"save": "保存",
|
||||||
"branch_prefix_saved": "分支前缀已保存。",
|
"branch_prefix_saved": "分支前缀已保存。"
|
||||||
"edit_branch_prefix_multiple": "编辑 {{count}} 个分支的前缀",
|
|
||||||
"branch_prefix_saved_multiple": "已为 {{count}} 个分支保存分支前缀。",
|
|
||||||
"affected_branches": "受影响的分支 {{count}}:"
|
|
||||||
},
|
},
|
||||||
"bulk_actions": {
|
"bulk_actions": {
|
||||||
"bulk_actions": "批量操作",
|
"bulk_actions": "批量操作",
|
||||||
@@ -54,7 +51,7 @@
|
|||||||
"bulk_actions_executed": "批量操作已成功执行。",
|
"bulk_actions_executed": "批量操作已成功执行。",
|
||||||
"none_yet": "暂无操作 ... 通过点击上方的可用操作添加一个操作。",
|
"none_yet": "暂无操作 ... 通过点击上方的可用操作添加一个操作。",
|
||||||
"labels": "标签",
|
"labels": "标签",
|
||||||
"relations": "关系",
|
"relations": "关联关系",
|
||||||
"notes": "笔记",
|
"notes": "笔记",
|
||||||
"other": "其它"
|
"other": "其它"
|
||||||
},
|
},
|
||||||
@@ -107,8 +104,7 @@
|
|||||||
"export_status": "导出状态",
|
"export_status": "导出状态",
|
||||||
"export_in_progress": "导出进行中:{{progressCount}}",
|
"export_in_progress": "导出进行中:{{progressCount}}",
|
||||||
"export_finished_successfully": "导出成功完成。",
|
"export_finished_successfully": "导出成功完成。",
|
||||||
"format_pdf": "PDF - 用于打印或共享目的。",
|
"format_pdf": "PDF - 用于打印或共享目的。"
|
||||||
"share-format": "HTML 网页发布——采用与共享笔记相同的主题,但可发布为静态网站。"
|
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"noteNavigation": "笔记导航",
|
"noteNavigation": "笔记导航",
|
||||||
@@ -188,8 +184,7 @@
|
|||||||
},
|
},
|
||||||
"import-status": "导入状态",
|
"import-status": "导入状态",
|
||||||
"in-progress": "导入进行中:{{progress}}",
|
"in-progress": "导入进行中:{{progress}}",
|
||||||
"successful": "导入成功完成。",
|
"successful": "导入成功完成。"
|
||||||
"importZipRecommendation": "导入 ZIP 文件时,笔记层级将反映压缩文件内的子目录结构。"
|
|
||||||
},
|
},
|
||||||
"include_note": {
|
"include_note": {
|
||||||
"dialog_title": "包含笔记",
|
"dialog_title": "包含笔记",
|
||||||
@@ -1110,6 +1105,9 @@
|
|||||||
"title": "内容宽度",
|
"title": "内容宽度",
|
||||||
"default_description": "Trilium默认会限制内容的最大宽度以提高在宽屏中全屏时的可读性。",
|
"default_description": "Trilium默认会限制内容的最大宽度以提高在宽屏中全屏时的可读性。",
|
||||||
"max_width_label": "内容最大宽度(像素)",
|
"max_width_label": "内容最大宽度(像素)",
|
||||||
|
"apply_changes_description": "要应用内容宽度更改,请点击",
|
||||||
|
"reload_button": "重载前端",
|
||||||
|
"reload_description": "来自外观选项的更改",
|
||||||
"max_width_unit": "像素"
|
"max_width_unit": "像素"
|
||||||
},
|
},
|
||||||
"native_title_bar": {
|
"native_title_bar": {
|
||||||
@@ -1289,6 +1287,10 @@
|
|||||||
"etapi": {
|
"etapi": {
|
||||||
"title": "ETAPI",
|
"title": "ETAPI",
|
||||||
"description": "ETAPI 是一个 REST API,用于以编程方式访问 Trilium 实例,而无需 UI。",
|
"description": "ETAPI 是一个 REST API,用于以编程方式访问 Trilium 实例,而无需 UI。",
|
||||||
|
"see_more": "有关更多详细信息,请参见 {{- link_to_wiki}} 和 {{- link_to_openapi_spec}} 或 {{- link_to_swagger_ui}}。",
|
||||||
|
"wiki": "维基",
|
||||||
|
"openapi_spec": "ETAPI OpenAPI 规范",
|
||||||
|
"swagger_ui": "ETAPI Swagger UI",
|
||||||
"create_token": "创建新的 ETAPI 令牌",
|
"create_token": "创建新的 ETAPI 令牌",
|
||||||
"existing_tokens": "现有令牌",
|
"existing_tokens": "现有令牌",
|
||||||
"no_tokens_yet": "目前还没有令牌。点击上面的按钮创建一个。",
|
"no_tokens_yet": "目前还没有令牌。点击上面的按钮创建一个。",
|
||||||
@@ -1555,9 +1557,7 @@
|
|||||||
"window-on-top": "保持此窗口置顶"
|
"window-on-top": "保持此窗口置顶"
|
||||||
},
|
},
|
||||||
"note_detail": {
|
"note_detail": {
|
||||||
"could_not_find_typewidget": "找不到类型为 '{{type}}' 的 typeWidget",
|
"could_not_find_typewidget": "找不到类型为 '{{type}}' 的 typeWidget"
|
||||||
"printing": "正在打印…",
|
|
||||||
"printing_pdf": "正在导出为PDF…"
|
|
||||||
},
|
},
|
||||||
"note_title": {
|
"note_title": {
|
||||||
"placeholder": "请输入笔记标题..."
|
"placeholder": "请输入笔记标题..."
|
||||||
@@ -1917,7 +1917,7 @@
|
|||||||
},
|
},
|
||||||
"custom_date_time_format": {
|
"custom_date_time_format": {
|
||||||
"title": "自定义日期/时间格式",
|
"title": "自定义日期/时间格式",
|
||||||
"description": "自定义通过 <shortcut /> 或工具栏插入的日期和时间格式。有关日期/时间格式字符串中各个字符的含义,请参阅<doc>Day.js docs</doc>。",
|
"description": "通过<shortcut />或工具栏的方式可自定义日期和时间格式,有关日期/时间格式字符串中各个字符的含义,请参阅<doc>Day.js docs</doc>。",
|
||||||
"format_string": "日期/时间格式字符串:",
|
"format_string": "日期/时间格式字符串:",
|
||||||
"formatted_time": "格式化后日期/时间:"
|
"formatted_time": "格式化后日期/时间:"
|
||||||
},
|
},
|
||||||
@@ -2079,8 +2079,5 @@
|
|||||||
"edit-slide": "编辑此幻灯片",
|
"edit-slide": "编辑此幻灯片",
|
||||||
"start-presentation": "开始演示",
|
"start-presentation": "开始演示",
|
||||||
"slide-overview": "切换幻灯片概览"
|
"slide-overview": "切换幻灯片概览"
|
||||||
},
|
|
||||||
"calendar_view": {
|
|
||||||
"delete_note": "删除笔记..."
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,8 +104,7 @@
|
|||||||
"export_status": "Exportstatus",
|
"export_status": "Exportstatus",
|
||||||
"export_in_progress": "Export läuft: {{progressCount}}",
|
"export_in_progress": "Export läuft: {{progressCount}}",
|
||||||
"export_finished_successfully": "Der Export wurde erfolgreich abgeschlossen.",
|
"export_finished_successfully": "Der Export wurde erfolgreich abgeschlossen.",
|
||||||
"format_pdf": "PDF - für Ausdrucke oder Teilen.",
|
"format_pdf": "PDF - für Ausdrucke oder Teilen."
|
||||||
"share-format": "HTML für die Web-Veröffentlichung – verwendet dasselbe Theme wie bei freigegebenen Notizen, kann jedoch als statische Website veröffentlicht werden."
|
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"noteNavigation": "Notiz Navigation",
|
"noteNavigation": "Notiz Navigation",
|
||||||
@@ -1104,6 +1103,9 @@
|
|||||||
"title": "Inhaltsbreite",
|
"title": "Inhaltsbreite",
|
||||||
"default_description": "Trilium begrenzt standardmäßig die maximale Inhaltsbreite, um die Lesbarkeit für maximierte Bildschirme auf Breitbildschirmen zu verbessern.",
|
"default_description": "Trilium begrenzt standardmäßig die maximale Inhaltsbreite, um die Lesbarkeit für maximierte Bildschirme auf Breitbildschirmen zu verbessern.",
|
||||||
"max_width_label": "Maximale Inhaltsbreite in Pixel",
|
"max_width_label": "Maximale Inhaltsbreite in Pixel",
|
||||||
|
"apply_changes_description": "Um Änderungen an der Inhaltsbreite anzuwenden, klicke auf",
|
||||||
|
"reload_button": "Frontend neu laden",
|
||||||
|
"reload_description": "Änderungen an den Darstellungsoptionen",
|
||||||
"max_width_unit": "Pixel"
|
"max_width_unit": "Pixel"
|
||||||
},
|
},
|
||||||
"native_title_bar": {
|
"native_title_bar": {
|
||||||
@@ -1283,6 +1285,10 @@
|
|||||||
"etapi": {
|
"etapi": {
|
||||||
"title": "ETAPI",
|
"title": "ETAPI",
|
||||||
"description": "ETAPI ist eine REST-API, die für den programmgesteuerten Zugriff auf die Trilium-Instanz ohne Benutzeroberfläche verwendet wird.",
|
"description": "ETAPI ist eine REST-API, die für den programmgesteuerten Zugriff auf die Trilium-Instanz ohne Benutzeroberfläche verwendet wird.",
|
||||||
|
"see_more": "Weitere Details können im {{- link_to_wiki}} und in der {{- link_to_openapi_spec}} oder der {{- link_to_swagger_ui }} gefunden werden.",
|
||||||
|
"wiki": "Wiki",
|
||||||
|
"openapi_spec": "ETAPI OpenAPI-Spezifikation",
|
||||||
|
"swagger_ui": "ETAPI Swagger UI",
|
||||||
"create_token": "Erstelle ein neues ETAPI-Token",
|
"create_token": "Erstelle ein neues ETAPI-Token",
|
||||||
"existing_tokens": "Vorhandene Token",
|
"existing_tokens": "Vorhandene Token",
|
||||||
"no_tokens_yet": "Es sind noch keine Token vorhanden. Klicke auf die Schaltfläche oben, um eine zu erstellen.",
|
"no_tokens_yet": "Es sind noch keine Token vorhanden. Klicke auf die Schaltfläche oben, um eine zu erstellen.",
|
||||||
|
|||||||
@@ -36,13 +36,10 @@
|
|||||||
},
|
},
|
||||||
"branch_prefix": {
|
"branch_prefix": {
|
||||||
"edit_branch_prefix": "Edit branch prefix",
|
"edit_branch_prefix": "Edit branch prefix",
|
||||||
"edit_branch_prefix_multiple": "Edit branch prefix for {{count}} branches",
|
|
||||||
"help_on_tree_prefix": "Help on Tree prefix",
|
"help_on_tree_prefix": "Help on Tree prefix",
|
||||||
"prefix": "Prefix: ",
|
"prefix": "Prefix: ",
|
||||||
"save": "Save",
|
"save": "Save",
|
||||||
"branch_prefix_saved": "Branch prefix has been saved.",
|
"branch_prefix_saved": "Branch prefix has been saved."
|
||||||
"branch_prefix_saved_multiple": "Branch prefix has been saved for {{count}} branches.",
|
|
||||||
"affected_branches": "Affected branches ({{count}}):"
|
|
||||||
},
|
},
|
||||||
"bulk_actions": {
|
"bulk_actions": {
|
||||||
"bulk_actions": "Bulk actions",
|
"bulk_actions": "Bulk actions",
|
||||||
@@ -1111,7 +1108,9 @@
|
|||||||
"default_description": "Trilium by default limits max content width to improve readability for maximized screens on wide screens.",
|
"default_description": "Trilium by default limits max content width to improve readability for maximized screens on wide screens.",
|
||||||
"max_width_label": "Max content width",
|
"max_width_label": "Max content width",
|
||||||
"max_width_unit": "pixels",
|
"max_width_unit": "pixels",
|
||||||
"centerContent": "Keep content centered"
|
"apply_changes_description": "To apply content width changes, click on",
|
||||||
|
"reload_button": "reload frontend",
|
||||||
|
"reload_description": "changes from appearance options"
|
||||||
},
|
},
|
||||||
"native_title_bar": {
|
"native_title_bar": {
|
||||||
"title": "Native Title Bar (requires app restart)",
|
"title": "Native Title Bar (requires app restart)",
|
||||||
@@ -1454,6 +1453,10 @@
|
|||||||
"etapi": {
|
"etapi": {
|
||||||
"title": "ETAPI",
|
"title": "ETAPI",
|
||||||
"description": "ETAPI is a REST API used to access Trilium instance programmatically, without UI.",
|
"description": "ETAPI is a REST API used to access Trilium instance programmatically, without UI.",
|
||||||
|
"see_more": "See more details in the {{- link_to_wiki}} and the {{- link_to_openapi_spec}} or the {{- link_to_swagger_ui }}.",
|
||||||
|
"wiki": "wiki",
|
||||||
|
"openapi_spec": "ETAPI OpenAPI spec",
|
||||||
|
"swagger_ui": "ETAPI Swagger UI",
|
||||||
"create_token": "Create new ETAPI token",
|
"create_token": "Create new ETAPI token",
|
||||||
"existing_tokens": "Existing tokens",
|
"existing_tokens": "Existing tokens",
|
||||||
"no_tokens_yet": "There are no tokens yet. Click on the button above to create one.",
|
"no_tokens_yet": "There are no tokens yet. Click on the button above to create one.",
|
||||||
@@ -1637,12 +1640,6 @@
|
|||||||
"shared_locally": "This note is shared locally on {{- link}}.",
|
"shared_locally": "This note is shared locally on {{- link}}.",
|
||||||
"help_link": "For help visit <a href=\"https://triliumnext.github.io/Docs/Wiki/sharing.html\">wiki</a>."
|
"help_link": "For help visit <a href=\"https://triliumnext.github.io/Docs/Wiki/sharing.html\">wiki</a>."
|
||||||
},
|
},
|
||||||
"read-only-info": {
|
|
||||||
"read-only-note": "Currently viewing a read-only note.",
|
|
||||||
"auto-read-only-note": "This note is shown in a read-only mode for faster loading.",
|
|
||||||
"auto-read-only-learn-more": "Learn more",
|
|
||||||
"edit-note": "Edit note"
|
|
||||||
},
|
|
||||||
"note_types": {
|
"note_types": {
|
||||||
"text": "Text",
|
"text": "Text",
|
||||||
"code": "Code",
|
"code": "Code",
|
||||||
@@ -2041,9 +2038,6 @@
|
|||||||
"start-presentation": "Start presentation",
|
"start-presentation": "Start presentation",
|
||||||
"slide-overview": "Toggle an overview of the slides"
|
"slide-overview": "Toggle an overview of the slides"
|
||||||
},
|
},
|
||||||
"calendar_view": {
|
|
||||||
"delete_note": "Delete note..."
|
|
||||||
},
|
|
||||||
"command_palette": {
|
"command_palette": {
|
||||||
"tree-action-name": "Tree: {{name}}",
|
"tree-action-name": "Tree: {{name}}",
|
||||||
"export_note_title": "Export Note",
|
"export_note_title": "Export Note",
|
||||||
|
|||||||
@@ -104,8 +104,7 @@
|
|||||||
"export_status": "Estado de exportación",
|
"export_status": "Estado de exportación",
|
||||||
"export_in_progress": "Exportación en curso: {{progressCount}}",
|
"export_in_progress": "Exportación en curso: {{progressCount}}",
|
||||||
"export_finished_successfully": "La exportación finalizó exitosamente.",
|
"export_finished_successfully": "La exportación finalizó exitosamente.",
|
||||||
"format_pdf": "PDF - para propósitos de impresión o compartición.",
|
"format_pdf": "PDF - para propósitos de impresión o compartición."
|
||||||
"share-format": "HTML para publicación web: utiliza el mismo tema que se utiliza en las notas compartidas, pero se puede publicar como un sitio web estático."
|
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"noteNavigation": "Navegación de notas",
|
"noteNavigation": "Navegación de notas",
|
||||||
@@ -185,8 +184,7 @@
|
|||||||
},
|
},
|
||||||
"import-status": "Estado de importación",
|
"import-status": "Estado de importación",
|
||||||
"in-progress": "Importación en progreso: {{progress}}",
|
"in-progress": "Importación en progreso: {{progress}}",
|
||||||
"successful": "Importación finalizada exitosamente.",
|
"successful": "Importación finalizada exitosamente."
|
||||||
"importZipRecommendation": "Al importar un archivo ZIP, la jerarquía de notas reflejará la estructura de subdirectorios dentro del archivo comprimido."
|
|
||||||
},
|
},
|
||||||
"include_note": {
|
"include_note": {
|
||||||
"dialog_title": "Incluir nota",
|
"dialog_title": "Incluir nota",
|
||||||
@@ -1107,7 +1105,10 @@
|
|||||||
"title": "Ancho del contenido",
|
"title": "Ancho del contenido",
|
||||||
"default_description": "Trilium limita de forma predeterminada el ancho máximo del contenido para mejorar la legibilidad de ventanas maximizadas en pantallas anchas.",
|
"default_description": "Trilium limita de forma predeterminada el ancho máximo del contenido para mejorar la legibilidad de ventanas maximizadas en pantallas anchas.",
|
||||||
"max_width_label": "Ancho máximo del contenido en píxeles",
|
"max_width_label": "Ancho máximo del contenido en píxeles",
|
||||||
"max_width_unit": "píxeles"
|
"max_width_unit": "píxeles",
|
||||||
|
"apply_changes_description": "Para aplicar cambios en el ancho del contenido, haga clic en",
|
||||||
|
"reload_button": "recargar la interfaz",
|
||||||
|
"reload_description": "cambios desde las opciones de apariencia"
|
||||||
},
|
},
|
||||||
"native_title_bar": {
|
"native_title_bar": {
|
||||||
"title": "Barra de título nativa (requiere reiniciar la aplicación)",
|
"title": "Barra de título nativa (requiere reiniciar la aplicación)",
|
||||||
@@ -1443,6 +1444,10 @@
|
|||||||
"etapi": {
|
"etapi": {
|
||||||
"title": "ETAPI",
|
"title": "ETAPI",
|
||||||
"description": "ETAPI es una REST API que se utiliza para acceder a la instancia de Trilium mediante programación, sin interfaz de usuario.",
|
"description": "ETAPI es una REST API que se utiliza para acceder a la instancia de Trilium mediante programación, sin interfaz de usuario.",
|
||||||
|
"see_more": "Véa más detalles en el {{- link_to_wiki}} y el {{- link_to_openapi_spec}} o el {{- link_to_swagger_ui }}.",
|
||||||
|
"wiki": "wiki",
|
||||||
|
"openapi_spec": "Especificación ETAPI OpenAPI",
|
||||||
|
"swagger_ui": "ETAPI Swagger UI",
|
||||||
"create_token": "Crear nuevo token ETAPI",
|
"create_token": "Crear nuevo token ETAPI",
|
||||||
"existing_tokens": "Tokens existentes",
|
"existing_tokens": "Tokens existentes",
|
||||||
"no_tokens_yet": "Aún no hay tokens. Dé clic en el botón de arriba para crear uno.",
|
"no_tokens_yet": "Aún no hay tokens. Dé clic en el botón de arriba para crear uno.",
|
||||||
@@ -1589,7 +1594,7 @@
|
|||||||
"tree-context-menu": {
|
"tree-context-menu": {
|
||||||
"open-in-a-new-tab": "Abrir en nueva pestaña",
|
"open-in-a-new-tab": "Abrir en nueva pestaña",
|
||||||
"open-in-a-new-split": "Abrir en nueva división",
|
"open-in-a-new-split": "Abrir en nueva división",
|
||||||
"insert-note-after": "Insertar nota contigua",
|
"insert-note-after": "Insertar nota después de",
|
||||||
"insert-child-note": "Insertar subnota",
|
"insert-child-note": "Insertar subnota",
|
||||||
"delete": "Eliminar",
|
"delete": "Eliminar",
|
||||||
"search-in-subtree": "Buscar en subárbol",
|
"search-in-subtree": "Buscar en subárbol",
|
||||||
@@ -1709,9 +1714,7 @@
|
|||||||
"window-on-top": "Mantener esta ventana en la parte superior"
|
"window-on-top": "Mantener esta ventana en la parte superior"
|
||||||
},
|
},
|
||||||
"note_detail": {
|
"note_detail": {
|
||||||
"could_not_find_typewidget": "No se pudo encontrar typeWidget para el tipo '{{type}}'",
|
"could_not_find_typewidget": "No se pudo encontrar typeWidget para el tipo '{{type}}'"
|
||||||
"printing": "Impresión en curso...",
|
|
||||||
"printing_pdf": "Exportando a PDF en curso.."
|
|
||||||
},
|
},
|
||||||
"note_title": {
|
"note_title": {
|
||||||
"placeholder": "escriba el título de la nota aquí..."
|
"placeholder": "escriba el título de la nota aquí..."
|
||||||
|
|||||||
@@ -1106,6 +1106,9 @@
|
|||||||
"title": "Largeur du contenu",
|
"title": "Largeur du contenu",
|
||||||
"default_description": "Trilium limite par défaut la largeur maximale du contenu pour améliorer la lisibilité sur des écrans larges.",
|
"default_description": "Trilium limite par défaut la largeur maximale du contenu pour améliorer la lisibilité sur des écrans larges.",
|
||||||
"max_width_label": "Largeur maximale du contenu en pixels",
|
"max_width_label": "Largeur maximale du contenu en pixels",
|
||||||
|
"apply_changes_description": "Pour appliquer les modifications de largeur du contenu, cliquez sur",
|
||||||
|
"reload_button": "recharger l'interface",
|
||||||
|
"reload_description": "changements par rapport aux options d'apparence",
|
||||||
"max_width_unit": "Pixels"
|
"max_width_unit": "Pixels"
|
||||||
},
|
},
|
||||||
"native_title_bar": {
|
"native_title_bar": {
|
||||||
@@ -1285,6 +1288,8 @@
|
|||||||
"etapi": {
|
"etapi": {
|
||||||
"title": "ETAPI",
|
"title": "ETAPI",
|
||||||
"description": "ETAPI est une API REST utilisée pour accéder à l'instance Trilium par programme, sans interface utilisateur.",
|
"description": "ETAPI est une API REST utilisée pour accéder à l'instance Trilium par programme, sans interface utilisateur.",
|
||||||
|
"wiki": "wiki",
|
||||||
|
"openapi_spec": "Spec ETAPI OpenAPI",
|
||||||
"create_token": "Créer un nouveau jeton ETAPI",
|
"create_token": "Créer un nouveau jeton ETAPI",
|
||||||
"existing_tokens": "Jetons existants",
|
"existing_tokens": "Jetons existants",
|
||||||
"no_tokens_yet": "Il n'y a pas encore de jetons. Cliquez sur le bouton ci-dessus pour en créer un.",
|
"no_tokens_yet": "Il n'y a pas encore de jetons. Cliquez sur le bouton ci-dessus pour en créer un.",
|
||||||
@@ -1301,7 +1306,9 @@
|
|||||||
"delete_token": "Supprimer/désactiver ce token",
|
"delete_token": "Supprimer/désactiver ce token",
|
||||||
"rename_token_title": "Renommer le jeton",
|
"rename_token_title": "Renommer le jeton",
|
||||||
"rename_token_message": "Veuillez saisir le nom du nouveau 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}} » ?"
|
"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"
|
||||||
},
|
},
|
||||||
"options_widget": {
|
"options_widget": {
|
||||||
"options_status": "Statut des options",
|
"options_status": "Statut des options",
|
||||||
|
|||||||
@@ -109,8 +109,7 @@
|
|||||||
"export_type_single": "Solo questa nota, senza le sottostanti",
|
"export_type_single": "Solo questa nota, senza le sottostanti",
|
||||||
"format_opml": "OPML - formato per scambio informazioni outline. Formattazione, immagini e files non sono inclusi.",
|
"format_opml": "OPML - formato per scambio informazioni outline. Formattazione, immagini e files non sono inclusi.",
|
||||||
"opml_version_1": "OPML v.1.0 - solo testo semplice",
|
"opml_version_1": "OPML v.1.0 - solo testo semplice",
|
||||||
"opml_version_2": "OPML v2.0 - supporta anche HTML",
|
"opml_version_2": "OPML v2.0 - supporta anche HTML"
|
||||||
"share-format": "HTML per la pubblicazione sul web - utilizza lo stesso tema utilizzato per le note condivise, ma può essere pubblicato come sito web statico."
|
|
||||||
},
|
},
|
||||||
"password_not_set": {
|
"password_not_set": {
|
||||||
"body1": "Le note protette sono crittografate utilizzando una password utente, ma la password non è stata ancora impostata.",
|
"body1": "Le note protette sono crittografate utilizzando una password utente, ma la password non è stata ancora impostata.",
|
||||||
@@ -133,6 +132,10 @@
|
|||||||
"new_token_message": "Inserisci il nome del nuovo token",
|
"new_token_message": "Inserisci il nome del nuovo token",
|
||||||
"title": "ETAPI",
|
"title": "ETAPI",
|
||||||
"description": "ETAPI è un'API REST utilizzata per accedere alle istanze di Trilium in modo programmatico, senza interfaccia utente.",
|
"description": "ETAPI è un'API REST utilizzata per accedere alle istanze di Trilium in modo programmatico, senza interfaccia utente.",
|
||||||
|
"see_more": "Per maggiori dettagli consulta {{- link_to_wiki}} e {{- link_to_openapi_spec}} o {{- link_to_swagger_ui}}.",
|
||||||
|
"wiki": "wiki",
|
||||||
|
"openapi_spec": "Specifiche ETAPI OpenAPI",
|
||||||
|
"swagger_ui": "Interfaccia utente ETAPI Swagger",
|
||||||
"create_token": "Crea un nuovo token ETAPI",
|
"create_token": "Crea un nuovo token ETAPI",
|
||||||
"existing_tokens": "Token esistenti",
|
"existing_tokens": "Token esistenti",
|
||||||
"no_tokens_yet": "Non ci sono ancora token. Clicca sul pulsante qui sopra per crearne uno.",
|
"no_tokens_yet": "Non ci sono ancora token. Clicca sul pulsante qui sopra per crearne uno.",
|
||||||
@@ -1570,7 +1573,10 @@
|
|||||||
"title": "Larghezza del contenuto",
|
"title": "Larghezza del contenuto",
|
||||||
"default_description": "Per impostazione predefinita, Trilium limita la larghezza massima del contenuto per migliorare la leggibilità sugli schermi più grandi.",
|
"default_description": "Per impostazione predefinita, Trilium limita la larghezza massima del contenuto per migliorare la leggibilità sugli schermi più grandi.",
|
||||||
"max_width_label": "Larghezza massima del contenuto",
|
"max_width_label": "Larghezza massima del contenuto",
|
||||||
"max_width_unit": "pixel"
|
"max_width_unit": "pixel",
|
||||||
|
"apply_changes_description": "Per applicare le modifiche alla larghezza del contenuto, fare clic su",
|
||||||
|
"reload_button": "ricarica frontend",
|
||||||
|
"reload_description": "modifiche dalle opzioni di aspetto"
|
||||||
},
|
},
|
||||||
"native_title_bar": {
|
"native_title_bar": {
|
||||||
"title": "Barra del titolo nativa (richiede il riavvio dell'app)",
|
"title": "Barra del titolo nativa (richiede il riavvio dell'app)",
|
||||||
|
|||||||
@@ -39,10 +39,7 @@
|
|||||||
"edit_branch_prefix": "ブランチ接頭辞の編集",
|
"edit_branch_prefix": "ブランチ接頭辞の編集",
|
||||||
"help_on_tree_prefix": "ツリー接頭辞に関するヘルプ",
|
"help_on_tree_prefix": "ツリー接頭辞に関するヘルプ",
|
||||||
"prefix": "接頭辞: ",
|
"prefix": "接頭辞: ",
|
||||||
"branch_prefix_saved": "ブランチの接頭辞が保存されました。",
|
"branch_prefix_saved": "ブランチの接頭辞が保存されました。"
|
||||||
"edit_branch_prefix_multiple": "{{count}} ブランチのブランチ接頭辞を編集",
|
|
||||||
"branch_prefix_saved_multiple": "{{count}} 個のブランチのブランチ接頭辞が保存されました。",
|
|
||||||
"affected_branches": "影響を受けるブランチ {{count}}:"
|
|
||||||
},
|
},
|
||||||
"global_menu": {
|
"global_menu": {
|
||||||
"menu": "メニュー",
|
"menu": "メニュー",
|
||||||
@@ -257,8 +254,7 @@
|
|||||||
"export_status": "エクスポート状況",
|
"export_status": "エクスポート状況",
|
||||||
"export_in_progress": "エクスポート処理中: {{progressCount}}",
|
"export_in_progress": "エクスポート処理中: {{progressCount}}",
|
||||||
"export_finished_successfully": "エクスポートが正常に完了しました。",
|
"export_finished_successfully": "エクスポートが正常に完了しました。",
|
||||||
"format_pdf": "PDF - 印刷または共有目的に。",
|
"format_pdf": "PDF - 印刷または共有目的に。"
|
||||||
"share-format": "Web 公開用の HTML - 共有ノートで使用されるのと同じテーマを使用しますが、静的 Web サイトとして公開できます。"
|
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"title": "チートシート",
|
"title": "チートシート",
|
||||||
@@ -660,6 +656,10 @@
|
|||||||
"created": "作成日時",
|
"created": "作成日時",
|
||||||
"title": "ETAPI",
|
"title": "ETAPI",
|
||||||
"description": "ETAPI は、Trilium インスタンスに UI なしでプログラム的にアクセスするための REST API です。",
|
"description": "ETAPI は、Trilium インスタンスに UI なしでプログラム的にアクセスするための REST API です。",
|
||||||
|
"see_more": "詳細は{{- link_to_wiki}}と{{- link_to_openapi_spec}}または{{- link_to_swagger_ui }}を参照してください。",
|
||||||
|
"wiki": "wiki",
|
||||||
|
"openapi_spec": "ETAPI OpenAPIの仕様",
|
||||||
|
"swagger_ui": "ETAPI Swagger UI",
|
||||||
"create_token": "新しくETAPIトークンを作成",
|
"create_token": "新しくETAPIトークンを作成",
|
||||||
"existing_tokens": "既存のトークン",
|
"existing_tokens": "既存のトークン",
|
||||||
"no_tokens_yet": "トークンはまだありません。上のボタンをクリックして作成してください。",
|
"no_tokens_yet": "トークンはまだありません。上のボタンをクリックして作成してください。",
|
||||||
@@ -833,10 +833,13 @@
|
|||||||
"theme_defined": "テーマが定義されました"
|
"theme_defined": "テーマが定義されました"
|
||||||
},
|
},
|
||||||
"max_content_width": {
|
"max_content_width": {
|
||||||
|
"reload_button": "フロントエンドをリロード",
|
||||||
"title": "コンテンツ幅",
|
"title": "コンテンツ幅",
|
||||||
"default_description": "Triliumは、ワイドスクリーンで最大化された画面での可読性を向上させるために、デフォルトでコンテンツの最大幅を制限しています。",
|
"default_description": "Triliumは、ワイドスクリーンで最大化された画面での可読性を向上させるために、デフォルトでコンテンツの最大幅を制限しています。",
|
||||||
"max_width_label": "最大コンテンツ幅",
|
"max_width_label": "最大コンテンツ幅",
|
||||||
"max_width_unit": "ピクセル"
|
"max_width_unit": "ピクセル",
|
||||||
|
"apply_changes_description": "コンテンツ幅の変更を適用するには、クリックしてください",
|
||||||
|
"reload_description": "外観設定から変更"
|
||||||
},
|
},
|
||||||
"theme": {
|
"theme": {
|
||||||
"title": "アプリのテーマ",
|
"title": "アプリのテーマ",
|
||||||
@@ -2079,8 +2082,5 @@
|
|||||||
"edit-slide": "このスライドを編集",
|
"edit-slide": "このスライドを編集",
|
||||||
"start-presentation": "プレゼンテーションを開始",
|
"start-presentation": "プレゼンテーションを開始",
|
||||||
"slide-overview": "スライドの概要を切り替え"
|
"slide-overview": "スライドの概要を切り替え"
|
||||||
},
|
|
||||||
"calendar_view": {
|
|
||||||
"delete_note": "ノートを削除..."
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1464,7 +1464,10 @@
|
|||||||
"title": "Szerokość zawartości",
|
"title": "Szerokość zawartości",
|
||||||
"default_description": "Trilium domyślnie ogranicza maksymalną szerokość zawartości, aby poprawić czytelność na zmaksymalizowanych ekranach o dużej szerokości.",
|
"default_description": "Trilium domyślnie ogranicza maksymalną szerokość zawartości, aby poprawić czytelność na zmaksymalizowanych ekranach o dużej szerokości.",
|
||||||
"max_width_label": "Maksymalna szerokość zawartości",
|
"max_width_label": "Maksymalna szerokość zawartości",
|
||||||
"max_width_unit": "piksele"
|
"max_width_unit": "piksele",
|
||||||
|
"apply_changes_description": "Aby zastosować zmiany szerokości zawartości, kliknij na",
|
||||||
|
"reload_button": "przeładuj frontend",
|
||||||
|
"reload_description": "zmiany z opcji wyglądu"
|
||||||
},
|
},
|
||||||
"native_title_bar": {
|
"native_title_bar": {
|
||||||
"title": "Natywny pasek tytułu (wymaga ponownego uruchomienia aplikacji)",
|
"title": "Natywny pasek tytułu (wymaga ponownego uruchomienia aplikacji)",
|
||||||
@@ -1660,6 +1663,10 @@
|
|||||||
"etapi": {
|
"etapi": {
|
||||||
"title": "ETAPI",
|
"title": "ETAPI",
|
||||||
"description": "ETAPI to interfejs API REST używany do programowego dostępu do instancji Trilium, bez interfejsu użytkownika.",
|
"description": "ETAPI to interfejs API REST używany do programowego dostępu do instancji Trilium, bez interfejsu użytkownika.",
|
||||||
|
"see_more": "Zobacz więcej szczegółów w {{- link_to_wiki}} oraz w {{- link_to_openapi_spec}} lub {{- link_to_swagger_ui }}.",
|
||||||
|
"wiki": "wiki",
|
||||||
|
"openapi_spec": "specyfikacja ETAPI OpenAPI",
|
||||||
|
"swagger_ui": "ETAPI Swagger UI",
|
||||||
"create_token": "Utwórz nowy token ETAPI",
|
"create_token": "Utwórz nowy token ETAPI",
|
||||||
"existing_tokens": "Istniejące tokeny",
|
"existing_tokens": "Istniejące tokeny",
|
||||||
"no_tokens_yet": "Nie ma jeszcze żadnych tokenów. Kliknij przycisk powyżej, aby utworzyć jeden.",
|
"no_tokens_yet": "Nie ma jeszcze żadnych tokenów. Kliknij przycisk powyżej, aby utworzyć jeden.",
|
||||||
|
|||||||
@@ -1082,7 +1082,10 @@
|
|||||||
"title": "Largura do Conteúdo",
|
"title": "Largura do Conteúdo",
|
||||||
"default_description": "Por padrão, o Trilium limita a largura máxima do conteúdo para melhorar a legibilidade em janelas maximizadas em ecrãs largos.",
|
"default_description": "Por padrão, o Trilium limita a largura máxima do conteúdo para melhorar a legibilidade em janelas maximizadas em ecrãs largos.",
|
||||||
"max_width_label": "Largura máxima do conteúdo",
|
"max_width_label": "Largura máxima do conteúdo",
|
||||||
"max_width_unit": "pixels"
|
"max_width_unit": "pixels",
|
||||||
|
"apply_changes_description": "Para aplicar as alterações de largura do conteúdo, clique em",
|
||||||
|
"reload_button": "recarregar frontend",
|
||||||
|
"reload_description": "alterações de opções de aparência"
|
||||||
},
|
},
|
||||||
"native_title_bar": {
|
"native_title_bar": {
|
||||||
"title": "Barra de Título Nativa (requer recarregar a app)",
|
"title": "Barra de Título Nativa (requer recarregar a app)",
|
||||||
@@ -1419,6 +1422,10 @@
|
|||||||
"etapi": {
|
"etapi": {
|
||||||
"title": "ETAPI",
|
"title": "ETAPI",
|
||||||
"description": "ETAPI é uma API REST usada para aceder a instância do Trilium programaticamente, sem interface gráfica.",
|
"description": "ETAPI é uma API REST usada para aceder a instância do Trilium programaticamente, sem interface gráfica.",
|
||||||
|
"see_more": "Veja mais pormenores no {{- link_to_wiki}}, na {{- link_to_openapi_spec}} ou na {{- link_to_swagger_ui}}.",
|
||||||
|
"wiki": "wiki",
|
||||||
|
"openapi_spec": "Especificação OpenAPI do ETAPI",
|
||||||
|
"swagger_ui": "ETAPI Swagger UI",
|
||||||
"create_token": "Criar token ETAPI",
|
"create_token": "Criar token ETAPI",
|
||||||
"existing_tokens": "Tokens existentes",
|
"existing_tokens": "Tokens existentes",
|
||||||
"no_tokens_yet": "Ainda não existem tokens. Clique no botão acima para criar um.",
|
"no_tokens_yet": "Ainda não existem tokens. Clique no botão acima para criar um.",
|
||||||
|
|||||||
@@ -1304,6 +1304,9 @@
|
|||||||
"title": "Largura do Conteúdo",
|
"title": "Largura do Conteúdo",
|
||||||
"max_width_label": "Largura máxima do conteúdo",
|
"max_width_label": "Largura máxima do conteúdo",
|
||||||
"max_width_unit": "pixels",
|
"max_width_unit": "pixels",
|
||||||
|
"apply_changes_description": "Para aplicar as alterações de largura do conteúdo, clique em",
|
||||||
|
"reload_button": "recarregar frontend",
|
||||||
|
"reload_description": "alterações de opções de aparência",
|
||||||
"default_description": "Por padrão, o Trilium limita a largura máxima do conteúdo para melhorar a legibilidade em janelas maximizadas em telas wide."
|
"default_description": "Por padrão, o Trilium limita a largura máxima do conteúdo para melhorar a legibilidade em janelas maximizadas em telas wide."
|
||||||
},
|
},
|
||||||
"native_title_bar": {
|
"native_title_bar": {
|
||||||
@@ -1929,6 +1932,10 @@
|
|||||||
"etapi": {
|
"etapi": {
|
||||||
"title": "ETAPI",
|
"title": "ETAPI",
|
||||||
"description": "ETAPI é uma API REST usada para acessar a instância do Trilium programaticamente, sem interface gráfica.",
|
"description": "ETAPI é uma API REST usada para acessar a instância do Trilium programaticamente, sem interface gráfica.",
|
||||||
|
"see_more": "Veja mais detalhes no {{- link_to_wiki}}, na {{- link_to_openapi_spec}} ou na {{- link_to_swagger_ui}}.",
|
||||||
|
"wiki": "wiki",
|
||||||
|
"openapi_spec": "Especificação OpenAPI do ETAPI",
|
||||||
|
"swagger_ui": "ETAPI Swagger UI",
|
||||||
"create_token": "Criar novo token ETAPI",
|
"create_token": "Criar novo token ETAPI",
|
||||||
"existing_tokens": "Tokens existentes",
|
"existing_tokens": "Tokens existentes",
|
||||||
"no_tokens_yet": "Ainda não existem tokens. Clique no botão acima para criar um.",
|
"no_tokens_yet": "Ainda não existem tokens. Clique no botão acima para criar um.",
|
||||||
|
|||||||
@@ -507,13 +507,17 @@
|
|||||||
"new_token_message": "Introduceți denumirea noului token",
|
"new_token_message": "Introduceți denumirea noului token",
|
||||||
"new_token_title": "Token ETAPI nou",
|
"new_token_title": "Token ETAPI nou",
|
||||||
"no_tokens_yet": "Nu există încă token-uri. Clic pe butonul de deasupra pentru a crea una.",
|
"no_tokens_yet": "Nu există încă token-uri. Clic pe butonul de deasupra pentru a crea una.",
|
||||||
|
"openapi_spec": "Specificația OpenAPI pentru ETAPI",
|
||||||
|
"swagger_ui": "UI-ul Swagger pentru ETAPI",
|
||||||
"rename_token": "Redenumește token-ul",
|
"rename_token": "Redenumește token-ul",
|
||||||
"rename_token_message": "Introduceți denumirea noului token",
|
"rename_token_message": "Introduceți denumirea noului token",
|
||||||
"rename_token_title": "Redenumire token",
|
"rename_token_title": "Redenumire token",
|
||||||
|
"see_more": "Vedeți mai multe detalii în {{- link_to_wiki}} și în {{- link_to_openapi_spec}} sau în {{- link_to_swagger_ui }}.",
|
||||||
"title": "ETAPI",
|
"title": "ETAPI",
|
||||||
"token_created_message": "Copiați token-ul creat în clipboard. Trilium stochează token-ul ca hash așadar această valoare poate fi văzută doar acum.",
|
"token_created_message": "Copiați token-ul creat în clipboard. Trilium stochează token-ul ca hash așadar această valoare poate fi văzută doar acum.",
|
||||||
"token_created_title": "Token ETAPI creat",
|
"token_created_title": "Token ETAPI creat",
|
||||||
"token_name": "Denumire token"
|
"token_name": "Denumire token",
|
||||||
|
"wiki": "wiki"
|
||||||
},
|
},
|
||||||
"execute_script": {
|
"execute_script": {
|
||||||
"example_1": "De exemplu, pentru a adăuga un șir de caractere la titlul unei notițe, se poate folosi acest mic script:",
|
"example_1": "De exemplu, pentru a adăuga un șir de caractere la titlul unei notițe, se poate folosi acest mic script:",
|
||||||
@@ -796,9 +800,12 @@
|
|||||||
"modal_body_text": "Din cauza limitărilor la nivel de navigator, nu este posibilă citirea clipboard-ului din JavaScript. Inserați Markdown-ul pentru a-l importa în caseta de mai jos și dați clic pe butonul Import"
|
"modal_body_text": "Din cauza limitărilor la nivel de navigator, nu este posibilă citirea clipboard-ului din JavaScript. Inserați Markdown-ul pentru a-l importa în caseta de mai jos și dați clic pe butonul Import"
|
||||||
},
|
},
|
||||||
"max_content_width": {
|
"max_content_width": {
|
||||||
|
"apply_changes_description": "Pentru a aplica schimbările de lățime a conținutului, dați click pe",
|
||||||
"default_description": "În mod implicit Trilium limitează lățimea conținutului pentru a îmbunătăți lizibilitatea pentru ferestrele maximizate pe ecrane late.",
|
"default_description": "În mod implicit Trilium limitează lățimea conținutului pentru a îmbunătăți lizibilitatea pentru ferestrele maximizate pe ecrane late.",
|
||||||
"max_width_label": "Lungimea maximă a conținutului",
|
"max_width_label": "Lungimea maximă a conținutului",
|
||||||
"max_width_unit": "pixeli",
|
"max_width_unit": "pixeli",
|
||||||
|
"reload_button": "reîncarcă interfața",
|
||||||
|
"reload_description": "schimbări din opțiunile de afișare",
|
||||||
"title": "Lățime conținut"
|
"title": "Lățime conținut"
|
||||||
},
|
},
|
||||||
"mobile_detail_menu": {
|
"mobile_detail_menu": {
|
||||||
|
|||||||
@@ -1203,8 +1203,11 @@
|
|||||||
"max_content_width": {
|
"max_content_width": {
|
||||||
"max_width_unit": "пикселей",
|
"max_width_unit": "пикселей",
|
||||||
"title": "Ширина контентной области",
|
"title": "Ширина контентной области",
|
||||||
|
"reload_button": "перезагрузить интерфейс",
|
||||||
"default_description": "Trilium по умолчанию ограничивает максимальную ширину контента, чтобы улучшить читаемость на широких экранах.",
|
"default_description": "Trilium по умолчанию ограничивает максимальную ширину контента, чтобы улучшить читаемость на широких экранах.",
|
||||||
"max_width_label": "Максимальная ширина контентной области"
|
"max_width_label": "Максимальная ширина контентной области",
|
||||||
|
"apply_changes_description": "Чтобы применить изменения, нажмите на",
|
||||||
|
"reload_description": "изменения в параметрах внешнего вида"
|
||||||
},
|
},
|
||||||
"native_title_bar": {
|
"native_title_bar": {
|
||||||
"enabled": "включено",
|
"enabled": "включено",
|
||||||
@@ -1437,6 +1440,7 @@
|
|||||||
},
|
},
|
||||||
"etapi": {
|
"etapi": {
|
||||||
"title": "ETAPI",
|
"title": "ETAPI",
|
||||||
|
"wiki": "вики",
|
||||||
"created": "Создано",
|
"created": "Создано",
|
||||||
"actions": "Действия",
|
"actions": "Действия",
|
||||||
"existing_tokens": "Существующие токены",
|
"existing_tokens": "Существующие токены",
|
||||||
@@ -1444,7 +1448,10 @@
|
|||||||
"default_token_name": "новый токен",
|
"default_token_name": "новый токен",
|
||||||
"rename_token_title": "Переименовать токен",
|
"rename_token_title": "Переименовать токен",
|
||||||
"description": "ETAPI — это REST API, используемый для программного доступа к экземпляру Trilium без пользовательского интерфейса.",
|
"description": "ETAPI — это REST API, используемый для программного доступа к экземпляру Trilium без пользовательского интерфейса.",
|
||||||
|
"see_more": "Более подробную информацию смотрите в {{- link_to_wiki}} и {{- link_to_openapi_spec}} или {{- link_to_swagger_ui }}.",
|
||||||
"create_token": "Создать новый токен ETAPI",
|
"create_token": "Создать новый токен ETAPI",
|
||||||
|
"openapi_spec": "Спецификация ETAPI OpenAPI",
|
||||||
|
"swagger_ui": "Пользовательский интерфейс ETAPI Swagger",
|
||||||
"new_token_title": "Новый токен ETAPI",
|
"new_token_title": "Новый токен ETAPI",
|
||||||
"token_created_title": "Создан токен ETAPI",
|
"token_created_title": "Создан токен ETAPI",
|
||||||
"rename_token": "Переименовать этот токен",
|
"rename_token": "Переименовать этот токен",
|
||||||
|
|||||||
@@ -39,10 +39,7 @@
|
|||||||
"help_on_tree_prefix": "有關樹前綴的說明",
|
"help_on_tree_prefix": "有關樹前綴的說明",
|
||||||
"prefix": "前綴: ",
|
"prefix": "前綴: ",
|
||||||
"save": "儲存",
|
"save": "儲存",
|
||||||
"branch_prefix_saved": "已儲存分支前綴。",
|
"branch_prefix_saved": "已儲存分支前綴。"
|
||||||
"edit_branch_prefix_multiple": "編輯 {{count}} 個分支的前綴",
|
|
||||||
"branch_prefix_saved_multiple": "已為 {{count}} 個分支儲存分支前綴。",
|
|
||||||
"affected_branches": "受影響的分支 ({{count}}):"
|
|
||||||
},
|
},
|
||||||
"bulk_actions": {
|
"bulk_actions": {
|
||||||
"bulk_actions": "批次操作",
|
"bulk_actions": "批次操作",
|
||||||
@@ -107,8 +104,7 @@
|
|||||||
"export_in_progress": "正在匯出:{{progressCount}}",
|
"export_in_progress": "正在匯出:{{progressCount}}",
|
||||||
"export_finished_successfully": "成功匯出。",
|
"export_finished_successfully": "成功匯出。",
|
||||||
"format_html": "HTML - 推薦,因為它保留了所有格式",
|
"format_html": "HTML - 推薦,因為它保留了所有格式",
|
||||||
"format_pdf": "PDF - 用於列印或與他人分享。",
|
"format_pdf": "PDF - 用於列印或與他人分享。"
|
||||||
"share-format": "HTML 網頁發佈——使用與共享筆記相同的佈景主題,但可發佈為靜態網站。"
|
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"noteNavigation": "筆記導航",
|
"noteNavigation": "筆記導航",
|
||||||
@@ -1107,6 +1103,9 @@
|
|||||||
"title": "內容寬度",
|
"title": "內容寬度",
|
||||||
"default_description": "Trilium 預設會限制內容的最大寬度以提高在寬螢幕中全螢幕時的可讀性。",
|
"default_description": "Trilium 預設會限制內容的最大寬度以提高在寬螢幕中全螢幕時的可讀性。",
|
||||||
"max_width_label": "內容最大寬度(像素)",
|
"max_width_label": "內容最大寬度(像素)",
|
||||||
|
"apply_changes_description": "要套用內容寬度更改,請點擊",
|
||||||
|
"reload_button": "重新載入前端",
|
||||||
|
"reload_description": "來自外觀選項的更改",
|
||||||
"max_width_unit": "像素"
|
"max_width_unit": "像素"
|
||||||
},
|
},
|
||||||
"native_title_bar": {
|
"native_title_bar": {
|
||||||
@@ -1281,6 +1280,8 @@
|
|||||||
"etapi": {
|
"etapi": {
|
||||||
"title": "ETAPI",
|
"title": "ETAPI",
|
||||||
"description": "ETAPI 是一個 REST API,用於以編程方式訪問 Trilium 實例,而無需 UI。",
|
"description": "ETAPI 是一個 REST API,用於以編程方式訪問 Trilium 實例,而無需 UI。",
|
||||||
|
"wiki": "維基",
|
||||||
|
"openapi_spec": "ETAPI OpenAPI 規範",
|
||||||
"create_token": "新增 ETAPI 令牌",
|
"create_token": "新增 ETAPI 令牌",
|
||||||
"existing_tokens": "現有令牌",
|
"existing_tokens": "現有令牌",
|
||||||
"no_tokens_yet": "目前還沒有令牌。點擊上面的按鈕新增一個。",
|
"no_tokens_yet": "目前還沒有令牌。點擊上面的按鈕新增一個。",
|
||||||
@@ -1297,7 +1298,9 @@
|
|||||||
"delete_token": "刪除 / 停用此令牌",
|
"delete_token": "刪除 / 停用此令牌",
|
||||||
"rename_token_title": "重新命名令牌",
|
"rename_token_title": "重新命名令牌",
|
||||||
"rename_token_message": "請輸入新的令牌名稱",
|
"rename_token_message": "請輸入新的令牌名稱",
|
||||||
"delete_token_confirmation": "您確定要刪除 ETAPI 令牌 \"{{name}}\" 嗎?"
|
"delete_token_confirmation": "您確定要刪除 ETAPI 令牌 \"{{name}}\" 嗎?",
|
||||||
|
"see_more": "有關更多詳細資訊,請參閱 {{- link_to_wiki}} 和 {{- link_to_openapi_spec}} 或 {{- link_to_swagger_ui}}。",
|
||||||
|
"swagger_ui": "ETAPI Swagger UI"
|
||||||
},
|
},
|
||||||
"options_widget": {
|
"options_widget": {
|
||||||
"options_status": "選項狀態",
|
"options_status": "選項狀態",
|
||||||
@@ -2079,8 +2082,5 @@
|
|||||||
"edit-slide": "編輯此投影片",
|
"edit-slide": "編輯此投影片",
|
||||||
"start-presentation": "開始簡報",
|
"start-presentation": "開始簡報",
|
||||||
"slide-overview": "切換投影片概覽"
|
"slide-overview": "切換投影片概覽"
|
||||||
},
|
|
||||||
"calendar_view": {
|
|
||||||
"delete_note": "刪除筆記…"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1204,7 +1204,10 @@
|
|||||||
"title": "Ширина вмісту",
|
"title": "Ширина вмісту",
|
||||||
"default_description": "Trilium за замовчуванням обмежує максимальну ширину вмісту, щоб поліпшити читабельність на широкоформатних екранах у режимі максимального розширення.",
|
"default_description": "Trilium за замовчуванням обмежує максимальну ширину вмісту, щоб поліпшити читабельність на широкоформатних екранах у режимі максимального розширення.",
|
||||||
"max_width_label": "Максимальна ширина вмісту",
|
"max_width_label": "Максимальна ширина вмісту",
|
||||||
"max_width_unit": "пікселів"
|
"max_width_unit": "пікселів",
|
||||||
|
"apply_changes_description": "Щоб застосувати зміни ширини вмісту, натисніть на",
|
||||||
|
"reload_button": "перезавантажити інтерфейс",
|
||||||
|
"reload_description": "зміни в параметрах зовнішнього вигляду"
|
||||||
},
|
},
|
||||||
"native_title_bar": {
|
"native_title_bar": {
|
||||||
"title": "Нативний рядок заголовка (потрібен перезапуск)",
|
"title": "Нативний рядок заголовка (потрібен перезапуск)",
|
||||||
@@ -1399,6 +1402,10 @@
|
|||||||
"etapi": {
|
"etapi": {
|
||||||
"title": "ETAPI",
|
"title": "ETAPI",
|
||||||
"description": "ETAPI — це REST API, який використовується для програмного доступу до екземпляра Trilium без інтерфейсу користувача.",
|
"description": "ETAPI — це REST API, який використовується для програмного доступу до екземпляра Trilium без інтерфейсу користувача.",
|
||||||
|
"see_more": "Див. докладнішу інформацію у {{- link_to_wiki}} та {{- link_to_openapi_spec}} або {{- link_to_swagger_ui }}.",
|
||||||
|
"wiki": "вікі",
|
||||||
|
"openapi_spec": "ETAPI OpenAPI spec",
|
||||||
|
"swagger_ui": "ETAPI Swagger UI",
|
||||||
"create_token": "Створити новий токен ETAPI",
|
"create_token": "Створити новий токен ETAPI",
|
||||||
"existing_tokens": "Існуючі токени",
|
"existing_tokens": "Існуючі токени",
|
||||||
"no_tokens_yet": "Токенів поки що немає. Натисніть кнопку вище, щоб створити його.",
|
"no_tokens_yet": "Токенів поки що немає. Натисніть кнопку вище, щоб створити його.",
|
||||||
|
|||||||
26
apps/client/src/types-fancytree.d.ts
vendored
26
apps/client/src/types-fancytree.d.ts
vendored
@@ -215,30 +215,6 @@ declare namespace Fancytree {
|
|||||||
enableUpdate(enabled: boolean): void;
|
enableUpdate(enabled: boolean): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface FancytreeNodeData {
|
|
||||||
noteId: string;
|
|
||||||
parentNoteId: string;
|
|
||||||
branchId: string;
|
|
||||||
isProtected: boolean;
|
|
||||||
noteType: NoteType;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface FancytreeNewNode extends FancytreeNodeData {
|
|
||||||
title: string;
|
|
||||||
extraClasses: string;
|
|
||||||
icon: string;
|
|
||||||
refKey: string;
|
|
||||||
/** True if this node is loaded on demand, i.e. on first expansion. */
|
|
||||||
lazy: boolean;
|
|
||||||
/** Folder nodes have different default icons and click behavior. Note: Also non-folders may have children. */
|
|
||||||
folder: boolean;
|
|
||||||
/** Use isExpanded(), setExpanded() to access this property. */
|
|
||||||
expanded: boolean;
|
|
||||||
/** Node id (must be unique inside the tree) */
|
|
||||||
key: string;
|
|
||||||
children?: FancytreeNewNode[];
|
|
||||||
}
|
|
||||||
|
|
||||||
/** A FancytreeNode represents the hierarchical data model and operations. */
|
/** A FancytreeNode represents the hierarchical data model and operations. */
|
||||||
interface FancytreeNode {
|
interface FancytreeNode {
|
||||||
// #region Properties
|
// #region Properties
|
||||||
@@ -251,7 +227,7 @@ declare namespace Fancytree {
|
|||||||
/** Display name (may contain HTML) */
|
/** Display name (may contain HTML) */
|
||||||
title: string;
|
title: string;
|
||||||
/** Contains all extra data that was passed on node creation */
|
/** Contains all extra data that was passed on node creation */
|
||||||
data: FancytreeNodeData;
|
data: any;
|
||||||
/** Array of child nodes. For lazy nodes, null or undefined means 'not yet loaded'. Use an empty array to define a node that has no children. */
|
/** Array of child nodes. For lazy nodes, null or undefined means 'not yet loaded'. Use an empty array to define a node that has no children. */
|
||||||
children: FancytreeNode[];
|
children: FancytreeNode[];
|
||||||
/** Use isExpanded(), setExpanded() to access this property. */
|
/** Use isExpanded(), setExpanded() to access this property. */
|
||||||
|
|||||||
@@ -23,24 +23,6 @@ export class CssVarReader {
|
|||||||
return (!isNaN(number.valueOf()) ? number.valueOf() : defaultValue)
|
return (!isNaN(number.valueOf()) ? number.valueOf() : defaultValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
asBoolean(defaultValue?: boolean) {
|
|
||||||
let value = this.value.toLocaleLowerCase().trim();
|
|
||||||
let result: boolean | undefined;
|
|
||||||
|
|
||||||
switch (value) {
|
|
||||||
case "true":
|
|
||||||
case "1":
|
|
||||||
result = true;
|
|
||||||
break;
|
|
||||||
case "false":
|
|
||||||
case "0":
|
|
||||||
result = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (result !== undefined) ? result : defaultValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
asEnum<T>(enumType: T, defaultValue?: T[keyof T]): T[keyof T] | undefined {
|
asEnum<T>(enumType: T, defaultValue?: T[keyof T]): T[keyof T] | undefined {
|
||||||
let result: T[keyof T] | undefined;
|
let result: T[keyof T] | undefined;
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
.floating-buttons-children,
|
.floating-buttons-children,
|
||||||
.show-floating-buttons {
|
.show-floating-buttons {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: var(--floating-buttons-vert-offset, 14px);
|
top: var(--floating-buttons-vert-offset, 10px);
|
||||||
inset-inline-end: var(--floating-buttons-horiz-offset, 10px);
|
inset-inline-end: var(--floating-buttons-horiz-offset, 10px);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { t } from "i18next";
|
import { t } from "i18next";
|
||||||
import "./FloatingButtons.css";
|
import "./FloatingButtons.css";
|
||||||
import { useNoteContext, useNoteLabel, useNoteLabelBoolean, useTriliumEvent } from "./react/hooks";
|
import { useNoteContext, useNoteLabel, useNoteLabelBoolean } from "./react/hooks";
|
||||||
import { useContext, useEffect, useMemo, useState } from "preact/hooks";
|
import { useContext, useEffect, useMemo, useState } from "preact/hooks";
|
||||||
import { ParentComponent } from "./react/react_utils";
|
import { ParentComponent } from "./react/react_utils";
|
||||||
import { EventData, EventNames } from "../components/app_context";
|
import { EventData, EventNames } from "../components/app_context";
|
||||||
@@ -20,7 +20,6 @@ interface FloatingButtonsProps {
|
|||||||
* properly handle rounded corners, as defined by the --border-radius CSS variable.
|
* properly handle rounded corners, as defined by the --border-radius CSS variable.
|
||||||
*/
|
*/
|
||||||
export default function FloatingButtons({ items }: FloatingButtonsProps) {
|
export default function FloatingButtons({ items }: FloatingButtonsProps) {
|
||||||
const [ top, setTop ] = useState(0);
|
|
||||||
const { note, noteContext } = useNoteContext();
|
const { note, noteContext } = useNoteContext();
|
||||||
const parentComponent = useContext(ParentComponent);
|
const parentComponent = useContext(ParentComponent);
|
||||||
const [ viewType ] = useNoteLabel(note, "viewType");
|
const [ viewType ] = useNoteLabel(note, "viewType");
|
||||||
@@ -48,14 +47,8 @@ export default function FloatingButtons({ items }: FloatingButtonsProps) {
|
|||||||
const [ visible, setVisible ] = useState(true);
|
const [ visible, setVisible ] = useState(true);
|
||||||
useEffect(() => setVisible(true), [ note ]);
|
useEffect(() => setVisible(true), [ note ]);
|
||||||
|
|
||||||
useTriliumEvent("contentSafeMarginChanged", (e) => {
|
|
||||||
if (e.noteContext === noteContext) {
|
|
||||||
setTop(e.top);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="floating-buttons no-print" style={{top}}>
|
<div className="floating-buttons no-print">
|
||||||
<div className={`floating-buttons-children ${!visible ? "temporarily-hidden" : ""}`}>
|
<div className={`floating-buttons-children ${!visible ? "temporarily-hidden" : ""}`}>
|
||||||
{context && items.map((Component) => (
|
{context && items.map((Component) => (
|
||||||
<Component {...context} />
|
<Component {...context} />
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import Component from "../components/component";
|
|||||||
import NoteContext from "../components/note_context";
|
import NoteContext from "../components/note_context";
|
||||||
import FNote from "../entities/fnote";
|
import FNote from "../entities/fnote";
|
||||||
import ActionButton, { ActionButtonProps } from "./react/ActionButton";
|
import ActionButton, { ActionButtonProps } from "./react/ActionButton";
|
||||||
import { useIsNoteReadOnly, useNoteLabelBoolean, useTriliumEvent, useTriliumOption, useWindowSize } from "./react/hooks";
|
import { useNoteLabelBoolean, useTriliumEvent, useTriliumOption, useWindowSize } from "./react/hooks";
|
||||||
import { useEffect, useLayoutEffect, useMemo, useRef, useState } from "preact/hooks";
|
import { useEffect, useLayoutEffect, useMemo, useRef, useState } from "preact/hooks";
|
||||||
import { createImageSrcUrl, openInAppHelpFromUrl } from "../services/utils";
|
import { createImageSrcUrl, openInAppHelpFromUrl } from "../services/utils";
|
||||||
import server from "../services/server";
|
import server from "../services/server";
|
||||||
@@ -13,6 +13,8 @@ import toast from "../services/toast";
|
|||||||
import { t } from "../services/i18n";
|
import { t } from "../services/i18n";
|
||||||
import { copyImageReferenceToClipboard } from "../services/image";
|
import { copyImageReferenceToClipboard } from "../services/image";
|
||||||
import tree from "../services/tree";
|
import tree from "../services/tree";
|
||||||
|
import protected_session_holder from "../services/protected_session_holder";
|
||||||
|
import options from "../services/options";
|
||||||
import { getHelpUrlForNote } from "../services/in_app_help";
|
import { getHelpUrlForNote } from "../services/in_app_help";
|
||||||
import froca from "../services/froca";
|
import froca from "../services/froca";
|
||||||
import NoteLink from "./react/NoteLink";
|
import NoteLink from "./react/NoteLink";
|
||||||
@@ -99,26 +101,48 @@ function ToggleReadOnlyButton({ note, viewType, isDefaultViewMode }: FloatingBut
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|
||||||
function EditButton({ note, noteContext }: FloatingButtonContext) {
|
function EditButton({ note, noteContext, isDefaultViewMode }: FloatingButtonContext) {
|
||||||
const [animationClass, setAnimationClass] = useState("");
|
const [ animationClass, setAnimationClass ] = useState("");
|
||||||
const {isReadOnly, enableEditing} = useIsNoteReadOnly(note, noteContext);
|
const [ isEnabled, setIsEnabled ] = useState(false);
|
||||||
|
|
||||||
const isReadOnlyInfoBarDismissed = false; // TODO
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isReadOnly) {
|
noteContext.isReadOnly().then(isReadOnly => {
|
||||||
|
setIsEnabled(
|
||||||
|
isDefaultViewMode
|
||||||
|
&& (!note.isProtected || protected_session_holder.isProtectedSessionAvailable())
|
||||||
|
&& !options.is("databaseReadonly")
|
||||||
|
&& isReadOnly
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}, [ note ]);
|
||||||
|
|
||||||
|
useTriliumEvent("readOnlyTemporarilyDisabled", ({ noteContext: eventNoteContext }) => {
|
||||||
|
if (noteContext?.ntxId === eventNoteContext.ntxId) {
|
||||||
|
setIsEnabled(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// make the edit button stand out on the first display, otherwise
|
||||||
|
// it's difficult to notice that the note is readonly
|
||||||
|
useEffect(() => {
|
||||||
|
if (isEnabled) {
|
||||||
setAnimationClass("bx-tada bx-lg");
|
setAnimationClass("bx-tada bx-lg");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setAnimationClass("");
|
setAnimationClass("");
|
||||||
}, 1700);
|
}, 1700);
|
||||||
}
|
}
|
||||||
}, [ isReadOnly ]);
|
}, [ isEnabled ]);
|
||||||
|
|
||||||
return !!isReadOnly && isReadOnlyInfoBarDismissed && <FloatingButton
|
return isEnabled && <FloatingButton
|
||||||
text={t("edit_button.edit_this_note")}
|
text={t("edit_button.edit_this_note")}
|
||||||
icon="bx bx-pencil"
|
icon="bx bx-pencil"
|
||||||
className={animationClass}
|
className={animationClass}
|
||||||
onClick={() => enableEditing()}
|
onClick={() => {
|
||||||
|
if (noteContext.viewScope) {
|
||||||
|
noteContext.viewScope.readOnlyTemporarilyDisabled = true;
|
||||||
|
appContext.triggerEvent("readOnlyTemporarilyDisabled", { noteContext });
|
||||||
|
}
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
body.zen div.read-only-note-info-bar-widget {
|
|
||||||
width: fit-content;
|
|
||||||
max-width: var(--max-content-width);
|
|
||||||
border-radius: 8px;
|
|
||||||
border: unset;
|
|
||||||
margin: 0 auto 10px auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.read-only-note-info-bar-widget-content {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
gap: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:root div.read-only-note-info-bar-widget button {
|
|
||||||
white-space: nowrap;
|
|
||||||
padding: 2px 8px;
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
import "./ReadOnlyNoteInfoBar.css";
|
|
||||||
import { t } from "../services/i18n";
|
|
||||||
import { useIsNoteReadOnly, useNoteContext, useTriliumEvent } from "./react/hooks"
|
|
||||||
import Button from "./react/Button";
|
|
||||||
import InfoBar from "./react/InfoBar";
|
|
||||||
|
|
||||||
export default function ReadOnlyNoteInfoBar(props: {}) {
|
|
||||||
const {note, noteContext} = useNoteContext();
|
|
||||||
const {isReadOnly, enableEditing} = useIsNoteReadOnly(note, noteContext);
|
|
||||||
const isExplicitReadOnly = note?.isLabelTruthy("readOnly");
|
|
||||||
|
|
||||||
return <InfoBar className="read-only-note-info-bar-widget"
|
|
||||||
type={(isExplicitReadOnly ? "subtle" : "prominent")}
|
|
||||||
style={{display: (!isReadOnly) ? "none" : undefined}}>
|
|
||||||
|
|
||||||
<div class="read-only-note-info-bar-widget-content">
|
|
||||||
{(isExplicitReadOnly) ? (
|
|
||||||
<div>{t("read-only-info.read-only-note")}</div>
|
|
||||||
) : (
|
|
||||||
<div>
|
|
||||||
{t("read-only-info.auto-read-only-note")}
|
|
||||||
|
|
||||||
<a class="tn-link"
|
|
||||||
href="https://docs.triliumnotes.org/user-guide/concepts/notes/read-only-notes#automatic-read-only-mode">
|
|
||||||
|
|
||||||
{t("read-only-info.auto-read-only-learn-more")}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<Button text={t("read-only-info.edit-note")}
|
|
||||||
icon="bx-pencil" onClick={() => enableEditing()} />
|
|
||||||
</div>
|
|
||||||
</InfoBar>
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,16 +1,9 @@
|
|||||||
.note-list-widget {
|
.note-list-widget {
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
max-width: var(--max-content-width); /* Inherited from .note-split */
|
|
||||||
|
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
contain: none !important;
|
contain: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.prefers-centered-content .note-list-widget:not(.full-height) {
|
|
||||||
/* Horizontally center the widget in its parent when the "Keep content centered" option is on */
|
|
||||||
margin-inline: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.note-list-widget .note-list {
|
.note-list-widget .note-list {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
import { it, describe, expect } from "vitest";
|
|
||||||
import { buildNote } from "../../../test/easy-froca";
|
|
||||||
import { getBoardData } from "./data";
|
|
||||||
import FBranch from "../../../entities/fbranch";
|
|
||||||
import froca from "../../../services/froca";
|
|
||||||
|
|
||||||
describe("Board data", () => {
|
|
||||||
it("deduplicates cloned notes", async () => {
|
|
||||||
const parentNote = buildNote({
|
|
||||||
title: "Board",
|
|
||||||
"#collection": "",
|
|
||||||
"#viewType": "board",
|
|
||||||
children: [
|
|
||||||
{ id: "note1", title: "First note", "#status": "To Do" },
|
|
||||||
{ id: "note2", title: "Second note", "#status": "In progress" },
|
|
||||||
{ id: "note3", title: "Third note", "#status": "Done" }
|
|
||||||
]
|
|
||||||
});
|
|
||||||
const branch = new FBranch(froca, {
|
|
||||||
branchId: "note1_note2",
|
|
||||||
notePosition: 10,
|
|
||||||
fromSearchNote: false,
|
|
||||||
noteId: "note2",
|
|
||||||
parentNoteId: "note1"
|
|
||||||
});
|
|
||||||
froca.branches["note1_note2"] = branch;
|
|
||||||
froca.getNoteFromCache("note1").addChild("note2", "note1_note2", false);
|
|
||||||
const data = await getBoardData(parentNote, "status", {}, false);
|
|
||||||
const noteIds = Array.from(data.byColumn.values()).flat().map(item => item.note.noteId);
|
|
||||||
expect(noteIds.length).toBe(3);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -11,7 +11,7 @@ export async function getBoardData(parentNote: FNote, groupByColumn: string, per
|
|||||||
const byColumn: ColumnMap = new Map();
|
const byColumn: ColumnMap = new Map();
|
||||||
|
|
||||||
// First, scan all notes to find what columns actually exist
|
// First, scan all notes to find what columns actually exist
|
||||||
await recursiveGroupBy(parentNote.getChildBranches(), byColumn, groupByColumn, includeArchived, new Set<string>());
|
await recursiveGroupBy(parentNote.getChildBranches(), byColumn, groupByColumn, includeArchived);
|
||||||
|
|
||||||
// Get all columns that exist in the notes
|
// Get all columns that exist in the notes
|
||||||
const columnsFromNotes = [...byColumn.keys()];
|
const columnsFromNotes = [...byColumn.keys()];
|
||||||
@@ -61,28 +61,26 @@ export async function getBoardData(parentNote: FNote, groupByColumn: string, per
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
async function recursiveGroupBy(branches: FBranch[], byColumn: ColumnMap, groupByColumn: string, includeArchived: boolean, seenNoteIds: Set<string>) {
|
async function recursiveGroupBy(branches: FBranch[], byColumn: ColumnMap, groupByColumn: string, includeArchived: boolean) {
|
||||||
for (const branch of branches) {
|
for (const branch of branches) {
|
||||||
const note = await branch.getNote();
|
const note = await branch.getNote();
|
||||||
if (!note || (!includeArchived && note.isArchived)) continue;
|
if (!note || (!includeArchived && note.isArchived)) continue;
|
||||||
|
|
||||||
if (note.type !== "search" && note.hasChildren()) {
|
if (note.type !== "search" && note.hasChildren()) {
|
||||||
await recursiveGroupBy(note.getChildBranches(), byColumn, groupByColumn, includeArchived, seenNoteIds);
|
await recursiveGroupBy(note.getChildBranches(), byColumn, groupByColumn, includeArchived);
|
||||||
}
|
}
|
||||||
|
|
||||||
const group = note.getLabelValue(groupByColumn);
|
const group = note.getLabelValue(groupByColumn);
|
||||||
if (!group || seenNoteIds.has(note.noteId)) {
|
if (!group) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!byColumn.has(group)) {
|
if (!byColumn.has(group)) {
|
||||||
byColumn.set(group, []);
|
byColumn.set(group, []);
|
||||||
}
|
}
|
||||||
|
|
||||||
byColumn.get(group)!.push({
|
byColumn.get(group)!.push({
|
||||||
branch,
|
branch,
|
||||||
note
|
note
|
||||||
});
|
});
|
||||||
seenNoteIds.add(note.noteId);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
import FNote from "../../../entities/fnote";
|
|
||||||
import contextMenu, { ContextMenuEvent } from "../../../menus/context_menu";
|
|
||||||
import link_context_menu from "../../../menus/link_context_menu";
|
|
||||||
import branches from "../../../services/branches";
|
|
||||||
import { t } from "../../../services/i18n";
|
|
||||||
|
|
||||||
export function openCalendarContextMenu(e: ContextMenuEvent, noteId: string, parentNote: FNote) {
|
|
||||||
e.preventDefault();
|
|
||||||
e.stopPropagation();
|
|
||||||
|
|
||||||
contextMenu.show({
|
|
||||||
x: e.pageX,
|
|
||||||
y: e.pageY,
|
|
||||||
items: [
|
|
||||||
...link_context_menu.getItems(),
|
|
||||||
{ kind: "separator" },
|
|
||||||
{
|
|
||||||
title: t("calendar_view.delete_note"),
|
|
||||||
uiIcon: "bx bx-trash",
|
|
||||||
handler: async () => {
|
|
||||||
const branchId = parentNote.childToBranch[noteId];
|
|
||||||
await branches.deleteNotes([ branchId ], false, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
selectMenuItemHandler: ({ command }) => link_context_menu.handleLinkContextMenuItem(command, noteId),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
.calendar-view {
|
.calendar-view {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
outline: 0;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
@@ -68,7 +67,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
body.desktop:not(.zen) .calendar-view .calendar-header {
|
body.desktop:not(.zen) .calendar-view .calendar-header {
|
||||||
padding-block-start: 4px;
|
|
||||||
padding-inline-end: 5em;
|
padding-inline-end: 5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ import Button, { ButtonGroup } from "../../react/Button";
|
|||||||
import ActionButton from "../../react/ActionButton";
|
import ActionButton from "../../react/ActionButton";
|
||||||
import { RefObject } from "preact";
|
import { RefObject } from "preact";
|
||||||
import TouchBar, { TouchBarButton, TouchBarLabel, TouchBarSegmentedControl, TouchBarSpacer } from "../../react/TouchBar";
|
import TouchBar, { TouchBarButton, TouchBarLabel, TouchBarSegmentedControl, TouchBarSpacer } from "../../react/TouchBar";
|
||||||
import { openCalendarContextMenu } from "./context_menu";
|
|
||||||
|
|
||||||
interface CalendarViewData {
|
interface CalendarViewData {
|
||||||
|
|
||||||
@@ -107,7 +106,7 @@ export default function CalendarView({ note, noteIds }: ViewModeProps<CalendarVi
|
|||||||
const plugins = usePlugins(isEditable, isCalendarRoot);
|
const plugins = usePlugins(isEditable, isCalendarRoot);
|
||||||
const locale = useLocale();
|
const locale = useLocale();
|
||||||
|
|
||||||
const { eventDidMount } = useEventDisplayCustomization(note);
|
const { eventDidMount } = useEventDisplayCustomization();
|
||||||
const editingProps = useEditing(note, isEditable, isCalendarRoot);
|
const editingProps = useEditing(note, isEditable, isCalendarRoot);
|
||||||
|
|
||||||
// React to changes.
|
// React to changes.
|
||||||
@@ -197,11 +196,11 @@ function usePlugins(isEditable: boolean, isCalendarRoot: boolean) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function useLocale() {
|
function useLocale() {
|
||||||
const [ formattingLocale ] = useTriliumOption("formattingLocale");
|
const [ locale ] = useTriliumOption("locale");
|
||||||
const [ calendarLocale, setCalendarLocale ] = useState<LocaleInput>();
|
const [ calendarLocale, setCalendarLocale ] = useState<LocaleInput>();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const correspondingLocale = LOCALE_MAPPINGS[formattingLocale];
|
const correspondingLocale = LOCALE_MAPPINGS[locale];
|
||||||
if (correspondingLocale) {
|
if (correspondingLocale) {
|
||||||
correspondingLocale().then((locale) => setCalendarLocale(locale.default));
|
correspondingLocale().then((locale) => setCalendarLocale(locale.default));
|
||||||
} else {
|
} else {
|
||||||
@@ -254,7 +253,7 @@ function useEditing(note: FNote, isEditable: boolean, isCalendarRoot: boolean) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function useEventDisplayCustomization(parentNote: FNote) {
|
function useEventDisplayCustomization() {
|
||||||
const eventDidMount = useCallback((e: EventMountArg) => {
|
const eventDidMount = useCallback((e: EventMountArg) => {
|
||||||
const { iconClass, promotedAttributes } = e.event.extendedProps;
|
const { iconClass, promotedAttributes } = e.event.extendedProps;
|
||||||
|
|
||||||
@@ -303,11 +302,6 @@ function useEventDisplayCustomization(parentNote: FNote) {
|
|||||||
}
|
}
|
||||||
$(mainContainer ?? e.el).append($(promotedAttributesHtml));
|
$(mainContainer ?? e.el).append($(promotedAttributesHtml));
|
||||||
}
|
}
|
||||||
|
|
||||||
e.el.addEventListener("contextmenu", (contextMenuEvent) => {
|
|
||||||
const noteId = e.event.extendedProps.noteId;
|
|
||||||
openCalendarContextMenu(contextMenuEvent, noteId, parentNote);
|
|
||||||
});
|
|
||||||
}, []);
|
}, []);
|
||||||
return { eventDidMount };
|
return { eventDidMount };
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,62 +0,0 @@
|
|||||||
import { EventData } from "../../components/app_context";
|
|
||||||
import BasicWidget from "../basic_widget";
|
|
||||||
import Container from "./container";
|
|
||||||
import NoteContext from "../../components/note_context";
|
|
||||||
|
|
||||||
export default class ContentHeader extends Container<BasicWidget> {
|
|
||||||
|
|
||||||
noteContext?: NoteContext;
|
|
||||||
thisElement?: HTMLElement;
|
|
||||||
parentElement?: HTMLElement;
|
|
||||||
resizeObserver: ResizeObserver;
|
|
||||||
currentHeight: number = 0;
|
|
||||||
currentSafeMargin: number = NaN;
|
|
||||||
|
|
||||||
constructor() {
|
|
||||||
super();
|
|
||||||
|
|
||||||
this.css("contain", "unset");
|
|
||||||
this.resizeObserver = new ResizeObserver(this.onResize.bind(this));
|
|
||||||
}
|
|
||||||
|
|
||||||
setNoteContextEvent({ noteContext }: EventData<"setNoteContext">) {
|
|
||||||
this.noteContext = noteContext;
|
|
||||||
this.init();
|
|
||||||
}
|
|
||||||
|
|
||||||
init() {
|
|
||||||
this.parentElement = this.parent?.$widget.get(0);
|
|
||||||
if (!this.parentElement) {
|
|
||||||
console.warn("No parent set for <ContentHeader>.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.thisElement = this.$widget.get(0)!;
|
|
||||||
|
|
||||||
this.resizeObserver.observe(this.thisElement);
|
|
||||||
this.parentElement.addEventListener("scroll", this.updateSafeMargin.bind(this));
|
|
||||||
}
|
|
||||||
|
|
||||||
updateSafeMargin() {
|
|
||||||
const newSafeMargin = Math.max(this.currentHeight - this.parentElement!.scrollTop, 0);
|
|
||||||
|
|
||||||
if (newSafeMargin !== this.currentSafeMargin) {
|
|
||||||
this.currentSafeMargin = newSafeMargin;
|
|
||||||
|
|
||||||
this.triggerEvent("contentSafeMarginChanged", {
|
|
||||||
top: newSafeMargin,
|
|
||||||
noteContext: this.noteContext!
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onResize(entries: ResizeObserverEntry[]) {
|
|
||||||
for (const entry of entries) {
|
|
||||||
if (entry.target === this.thisElement) {
|
|
||||||
this.currentHeight = entry.contentRect.height;
|
|
||||||
this.updateSafeMargin();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
import { EventData } from "../../components/app_context.js";
|
import { EventData } from "../../components/app_context.js";
|
||||||
import { LOCALES } from "@triliumnext/commons";
|
|
||||||
import { readCssVar } from "../../utils/css-var.js";
|
|
||||||
import FlexContainer from "./flex_container.js";
|
import FlexContainer from "./flex_container.js";
|
||||||
import options from "../../services/options.js";
|
import options from "../../services/options.js";
|
||||||
import type BasicWidget from "../basic_widget.js";
|
import type BasicWidget from "../basic_widget.js";
|
||||||
import utils from "../../services/utils.js";
|
import utils from "../../services/utils.js";
|
||||||
|
import { LOCALES } from "@triliumnext/commons";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The root container is the top-most widget/container, from which the entire layout derives.
|
* The root container is the top-most widget/container, from which the entire layout derives.
|
||||||
@@ -31,11 +30,9 @@ export default class RootContainer extends FlexContainer<BasicWidget> {
|
|||||||
window.visualViewport?.addEventListener("resize", () => this.#onMobileResize());
|
window.visualViewport?.addEventListener("resize", () => this.#onMobileResize());
|
||||||
}
|
}
|
||||||
|
|
||||||
this.#setMaxContentWidth();
|
this.#setMotion(options.is("motionEnabled"));
|
||||||
this.#setMotion();
|
this.#setShadows(options.is("shadowsEnabled"));
|
||||||
this.#setShadows();
|
this.#setBackdropEffects(options.is("backdropEffectsEnabled"));
|
||||||
this.#setBackdropEffects();
|
|
||||||
this.#setThemeCapabilities();
|
|
||||||
this.#setLocaleAndDirection(options.get("locale"));
|
this.#setLocaleAndDirection(options.get("locale"));
|
||||||
|
|
||||||
return super.render();
|
return super.render();
|
||||||
@@ -43,21 +40,15 @@ export default class RootContainer extends FlexContainer<BasicWidget> {
|
|||||||
|
|
||||||
entitiesReloadedEvent({ loadResults }: EventData<"entitiesReloaded">) {
|
entitiesReloadedEvent({ loadResults }: EventData<"entitiesReloaded">) {
|
||||||
if (loadResults.isOptionReloaded("motionEnabled")) {
|
if (loadResults.isOptionReloaded("motionEnabled")) {
|
||||||
this.#setMotion();
|
this.#setMotion(options.is("motionEnabled"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (loadResults.isOptionReloaded("shadowsEnabled")) {
|
if (loadResults.isOptionReloaded("shadowsEnabled")) {
|
||||||
this.#setShadows();
|
this.#setShadows(options.is("shadowsEnabled"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (loadResults.isOptionReloaded("backdropEffectsEnabled")) {
|
if (loadResults.isOptionReloaded("backdropEffectsEnabled")) {
|
||||||
this.#setBackdropEffects();
|
this.#setBackdropEffects(options.is("backdropEffectsEnabled"));
|
||||||
}
|
|
||||||
|
|
||||||
if (loadResults.isOptionReloaded("maxContentWidth")
|
|
||||||
|| loadResults.isOptionReloaded("centerContent")) {
|
|
||||||
|
|
||||||
this.#setMaxContentWidth();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,38 +58,19 @@ export default class RootContainer extends FlexContainer<BasicWidget> {
|
|||||||
this.$widget.toggleClass("virtual-keyboard-opened", isKeyboardOpened);
|
this.$widget.toggleClass("virtual-keyboard-opened", isKeyboardOpened);
|
||||||
}
|
}
|
||||||
|
|
||||||
#setMaxContentWidth() {
|
#setMotion(enabled: boolean) {
|
||||||
const width = Math.max(options.getInt("maxContentWidth") || 0, 640);
|
|
||||||
document.body.style.setProperty("--preferred-max-content-width", `${width}px`);
|
|
||||||
|
|
||||||
document.body.classList.toggle("prefers-centered-content", options.is("centerContent"));
|
|
||||||
}
|
|
||||||
|
|
||||||
#setMotion() {
|
|
||||||
const enabled = options.is("motionEnabled");
|
|
||||||
document.body.classList.toggle("motion-disabled", !enabled);
|
document.body.classList.toggle("motion-disabled", !enabled);
|
||||||
jQuery.fx.off = !enabled;
|
jQuery.fx.off = !enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
#setShadows() {
|
#setShadows(enabled: boolean) {
|
||||||
const enabled = options.is("shadowsEnabled");
|
|
||||||
document.body.classList.toggle("shadows-disabled", !enabled);
|
document.body.classList.toggle("shadows-disabled", !enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
#setBackdropEffects() {
|
#setBackdropEffects(enabled: boolean) {
|
||||||
const enabled = options.is("backdropEffectsEnabled");
|
|
||||||
document.body.classList.toggle("backdrop-effects-disabled", !enabled);
|
document.body.classList.toggle("backdrop-effects-disabled", !enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
#setThemeCapabilities() {
|
|
||||||
// Supports background effects
|
|
||||||
|
|
||||||
const useBgfx = readCssVar(document.documentElement, "allow-background-effects")
|
|
||||||
.asBoolean(false);
|
|
||||||
|
|
||||||
document.body.classList.toggle("theme-supports-background-effects", useBgfx);
|
|
||||||
}
|
|
||||||
|
|
||||||
#setLocaleAndDirection(locale: string) {
|
#setLocaleAndDirection(locale: string) {
|
||||||
const correspondingLocale = LOCALES.find(l => l.id === locale);
|
const correspondingLocale = LOCALES.find(l => l.id === locale);
|
||||||
document.body.lang = locale;
|
document.body.lang = locale;
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
.branch-prefix-dialog .branch-prefix-notes-list {
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.branch-prefix-dialog .branch-prefix-notes-list ul {
|
|
||||||
max-height: 200px;
|
|
||||||
overflow: auto;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.branch-prefix-dialog .branch-prefix-current {
|
|
||||||
opacity: 0.6;
|
|
||||||
}
|
|
||||||
@@ -10,86 +10,53 @@ import Button from "../react/Button.jsx";
|
|||||||
import FormGroup from "../react/FormGroup.js";
|
import FormGroup from "../react/FormGroup.js";
|
||||||
import { useTriliumEvent } from "../react/hooks.jsx";
|
import { useTriliumEvent } from "../react/hooks.jsx";
|
||||||
import FBranch from "../../entities/fbranch.js";
|
import FBranch from "../../entities/fbranch.js";
|
||||||
import type { ContextMenuCommandData } from "../../components/app_context.js";
|
|
||||||
import "./branch_prefix.css";
|
|
||||||
|
|
||||||
// Virtual branches (e.g., from search results) start with this prefix
|
|
||||||
const VIRTUAL_BRANCH_PREFIX = "virt-";
|
|
||||||
|
|
||||||
export default function BranchPrefixDialog() {
|
export default function BranchPrefixDialog() {
|
||||||
const [ shown, setShown ] = useState(false);
|
const [ shown, setShown ] = useState(false);
|
||||||
const [ branches, setBranches ] = useState<FBranch[]>([]);
|
const [ branch, setBranch ] = useState<FBranch>();
|
||||||
const [ prefix, setPrefix ] = useState("");
|
const [ prefix, setPrefix ] = useState("");
|
||||||
const branchInput = useRef<HTMLInputElement>(null);
|
const branchInput = useRef<HTMLInputElement>(null);
|
||||||
|
|
||||||
useTriliumEvent("editBranchPrefix", async (data?: ContextMenuCommandData) => {
|
useTriliumEvent("editBranchPrefix", async () => {
|
||||||
let branchIds: string[] = [];
|
const notePath = appContext.tabManager.getActiveContextNotePath();
|
||||||
|
if (!notePath) {
|
||||||
if (data?.selectedOrActiveBranchIds && data.selectedOrActiveBranchIds.length > 0) {
|
|
||||||
// Multi-select mode from tree context menu
|
|
||||||
branchIds = data.selectedOrActiveBranchIds.filter((branchId) => !branchId.startsWith(VIRTUAL_BRANCH_PREFIX));
|
|
||||||
} else {
|
|
||||||
// Single branch mode from keyboard shortcut or when no selection
|
|
||||||
const notePath = appContext.tabManager.getActiveContextNotePath();
|
|
||||||
if (!notePath) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const { noteId, parentNoteId } = tree.getNoteIdAndParentIdFromUrl(notePath);
|
|
||||||
|
|
||||||
if (!noteId || !parentNoteId) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const branchId = await froca.getBranchId(parentNoteId, noteId);
|
|
||||||
if (!branchId) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const parentNote = await froca.getNote(parentNoteId);
|
|
||||||
if (!parentNote || parentNote.type === "search") {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
branchIds = [branchId];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (branchIds.length === 0) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const newBranches = branchIds
|
const { noteId, parentNoteId } = tree.getNoteIdAndParentIdFromUrl(notePath);
|
||||||
.map(id => froca.getBranch(id))
|
|
||||||
.filter((branch): branch is FBranch => branch !== null);
|
|
||||||
|
|
||||||
if (newBranches.length === 0) {
|
if (!noteId || !parentNoteId) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
setBranches(newBranches);
|
const newBranchId = await froca.getBranchId(parentNoteId, noteId);
|
||||||
// Use the prefix of the first branch as the initial value
|
if (!newBranchId) {
|
||||||
setPrefix(newBranches[0]?.prefix ?? "");
|
return;
|
||||||
|
}
|
||||||
|
const parentNote = await froca.getNote(parentNoteId);
|
||||||
|
if (!parentNote || parentNote.type === "search") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const newBranch = froca.getBranch(newBranchId);
|
||||||
|
setBranch(newBranch);
|
||||||
|
setPrefix(newBranch?.prefix ?? "");
|
||||||
setShown(true);
|
setShown(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
async function onSubmit() {
|
async function onSubmit() {
|
||||||
if (branches.length === 0) {
|
if (!branch) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (branches.length === 1) {
|
savePrefix(branch.branchId, prefix);
|
||||||
await savePrefix(branches[0].branchId, prefix);
|
|
||||||
} else {
|
|
||||||
await savePrefixBatch(branches.map(b => b.branchId), prefix);
|
|
||||||
}
|
|
||||||
setShown(false);
|
setShown(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
const isSingleBranch = branches.length === 1;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
className="branch-prefix-dialog"
|
className="branch-prefix-dialog"
|
||||||
title={isSingleBranch ? t("branch_prefix.edit_branch_prefix") : t("branch_prefix.edit_branch_prefix_multiple", { count: branches.length })}
|
title={t("branch_prefix.edit_branch_prefix")}
|
||||||
size="lg"
|
size="lg"
|
||||||
onShown={() => branchInput.current?.focus()}
|
onShown={() => branchInput.current?.focus()}
|
||||||
onHidden={() => setShown(false)}
|
onHidden={() => setShown(false)}
|
||||||
@@ -102,27 +69,9 @@ export default function BranchPrefixDialog() {
|
|||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input class="branch-prefix-input form-control" value={prefix} ref={branchInput}
|
<input class="branch-prefix-input form-control" value={prefix} ref={branchInput}
|
||||||
onChange={(e) => setPrefix((e.target as HTMLInputElement).value)} />
|
onChange={(e) => setPrefix((e.target as HTMLInputElement).value)} />
|
||||||
{isSingleBranch && branches[0] && (
|
<div class="branch-prefix-note-title input-group-text"> - {branch && branch.getNoteFromCache().title}</div>
|
||||||
<div class="branch-prefix-note-title input-group-text"> - {branches[0].getNoteFromCache().title}</div>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
{!isSingleBranch && (
|
|
||||||
<div className="branch-prefix-notes-list">
|
|
||||||
<strong>{t("branch_prefix.affected_branches", { count: branches.length })}</strong>
|
|
||||||
<ul>
|
|
||||||
{branches.map((branch) => {
|
|
||||||
const note = branch.getNoteFromCache();
|
|
||||||
return (
|
|
||||||
<li key={branch.branchId}>
|
|
||||||
{branch.prefix && <span className="branch-prefix-current">{branch.prefix} - </span>}
|
|
||||||
{note.title}
|
|
||||||
</li>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -131,8 +80,3 @@ async function savePrefix(branchId: string, prefix: string) {
|
|||||||
await server.put(`branches/${branchId}/set-prefix`, { prefix: prefix });
|
await server.put(`branches/${branchId}/set-prefix`, { prefix: prefix });
|
||||||
toast.showMessage(t("branch_prefix.branch_prefix_saved"));
|
toast.showMessage(t("branch_prefix.branch_prefix_saved"));
|
||||||
}
|
}
|
||||||
|
|
||||||
async function savePrefixBatch(branchIds: string[], prefix: string) {
|
|
||||||
await server.put("branches/set-prefix-batch", { branchIds, prefix });
|
|
||||||
toast.showMessage(t("branch_prefix.branch_prefix_saved_multiple", { count: branchIds.length }));
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -79,8 +79,8 @@ export default function ExportDialog() {
|
|||||||
values={[
|
values={[
|
||||||
{ value: "html", label: t("export.format_html_zip") },
|
{ value: "html", label: t("export.format_html_zip") },
|
||||||
{ value: "markdown", label: t("export.format_markdown") },
|
{ value: "markdown", label: t("export.format_markdown") },
|
||||||
{ value: "share", label: t("export.share-format") },
|
{ value: "opml", label: t("export.format_opml") },
|
||||||
{ value: "opml", label: t("export.format_opml") }
|
{ value: "share", label: t("export.share-format") }
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@@ -57,19 +57,17 @@ const TPL = /*html*/`\
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="quick-edit-dialog-wrapper">
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
<div class="modal-dialog modal-lg" role="document">
|
<div class="modal-content">
|
||||||
<div class="modal-content">
|
<div class="modal-header">
|
||||||
<div class="modal-header">
|
<div class="modal-title">
|
||||||
<div class="modal-title">
|
<!-- This is where the first child will be injected -->
|
||||||
<!-- This is where the first child will be injected -->
|
|
||||||
</div>
|
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
||||||
</div>
|
</div>
|
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<!-- This is where all but the first child will be injected. -->
|
<!-- This is where all but the first child will be injected. -->
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -81,7 +79,6 @@ export default class PopupEditorDialog extends Container<BasicWidget> {
|
|||||||
private noteContext: NoteContext;
|
private noteContext: NoteContext;
|
||||||
private $modalHeader!: JQuery<HTMLElement>;
|
private $modalHeader!: JQuery<HTMLElement>;
|
||||||
private $modalBody!: JQuery<HTMLElement>;
|
private $modalBody!: JQuery<HTMLElement>;
|
||||||
private $wrapper!: JQuery<HTMLDivElement>;
|
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
@@ -96,7 +93,6 @@ export default class PopupEditorDialog extends Container<BasicWidget> {
|
|||||||
const $newWidget = $(TPL);
|
const $newWidget = $(TPL);
|
||||||
this.$modalHeader = $newWidget.find(".modal-title");
|
this.$modalHeader = $newWidget.find(".modal-title");
|
||||||
this.$modalBody = $newWidget.find(".modal-body");
|
this.$modalBody = $newWidget.find(".modal-body");
|
||||||
this.$wrapper = $newWidget.find(".quick-edit-dialog-wrapper");
|
|
||||||
|
|
||||||
const children = this.$widget.children();
|
const children = this.$widget.children();
|
||||||
this.$modalHeader.append(children[0]);
|
this.$modalHeader.append(children[0]);
|
||||||
@@ -116,21 +112,6 @@ export default class PopupEditorDialog extends Container<BasicWidget> {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const colorClass = this.noteContext.note?.getColorClass();
|
|
||||||
const wrapperElement = this.$wrapper.get(0)!;
|
|
||||||
|
|
||||||
if (colorClass) {
|
|
||||||
wrapperElement.className = "quick-edit-dialog-wrapper " + colorClass;
|
|
||||||
} else {
|
|
||||||
wrapperElement.className = "quick-edit-dialog-wrapper";
|
|
||||||
}
|
|
||||||
|
|
||||||
const customHue = getComputedStyle(wrapperElement).getPropertyValue("--custom-color-hue");
|
|
||||||
if (customHue) {
|
|
||||||
/* Apply the tinted-dialog class only if the custom color CSS class specifies a hue */
|
|
||||||
wrapperElement.classList.add("tinted-quick-edit-dialog");
|
|
||||||
}
|
|
||||||
|
|
||||||
const activeEl = document.activeElement;
|
const activeEl = document.activeElement;
|
||||||
if (activeEl && "blur" in activeEl) {
|
if (activeEl && "blur" in activeEl) {
|
||||||
(activeEl as HTMLElement).blur();
|
(activeEl as HTMLElement).blur();
|
||||||
|
|||||||
@@ -39,14 +39,12 @@ const TPL = /*html*/`
|
|||||||
<div class="note-detail">
|
<div class="note-detail">
|
||||||
<style>
|
<style>
|
||||||
.note-detail {
|
.note-detail {
|
||||||
max-width: var(--max-content-width); /* Inherited from .note-split */
|
|
||||||
font-family: var(--detail-font-family);
|
font-family: var(--detail-font-family);
|
||||||
font-size: var(--detail-font-size);
|
font-size: var(--detail-font-size);
|
||||||
}
|
}
|
||||||
|
|
||||||
body.prefers-centered-content .note-detail {
|
.note-detail.full-height {
|
||||||
/* Horizontally center the widget in its parent when the "Keep content centered" option is on */
|
height: 100%;
|
||||||
margin-inline: auto;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -173,6 +173,14 @@ interface ExpandedSubtreeResponse {
|
|||||||
branchIds: string[];
|
branchIds: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface Node extends Fancytree.NodeData {
|
||||||
|
noteId: string;
|
||||||
|
parentNoteId: string;
|
||||||
|
branchId: string;
|
||||||
|
isProtected: boolean;
|
||||||
|
noteType: NoteType;
|
||||||
|
}
|
||||||
|
|
||||||
interface RefreshContext {
|
interface RefreshContext {
|
||||||
noteIdsToUpdate: Set<string>;
|
noteIdsToUpdate: Set<string>;
|
||||||
noteIdsToReload: Set<string>;
|
noteIdsToReload: Set<string>;
|
||||||
@@ -761,7 +769,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
|
|||||||
prepareChildren(parentNote: FNote) {
|
prepareChildren(parentNote: FNote) {
|
||||||
utils.assertArguments(parentNote);
|
utils.assertArguments(parentNote);
|
||||||
|
|
||||||
const noteList: Fancytree.FancytreeNewNode[] = [];
|
const noteList: Node[] = [];
|
||||||
|
|
||||||
const hideArchivedNotes = this.hideArchivedNotes;
|
const hideArchivedNotes = this.hideArchivedNotes;
|
||||||
|
|
||||||
@@ -829,7 +837,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
|
|||||||
|
|
||||||
const isFolder = note.isFolder();
|
const isFolder = note.isFolder();
|
||||||
|
|
||||||
const node: Fancytree.FancytreeNewNode = {
|
const node: Node = {
|
||||||
noteId: note.noteId,
|
noteId: note.noteId,
|
||||||
parentNoteId: branch.parentNoteId,
|
parentNoteId: branch.parentNoteId,
|
||||||
branchId: branch.branchId,
|
branchId: branch.branchId,
|
||||||
@@ -841,7 +849,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
|
|||||||
refKey: note.noteId,
|
refKey: note.noteId,
|
||||||
lazy: true,
|
lazy: true,
|
||||||
folder: isFolder,
|
folder: isFolder,
|
||||||
expanded: !!branch.isExpanded && note.type !== "search",
|
expanded: branch.isExpanded && note.type !== "search",
|
||||||
key: utils.randomString(12) // this should prevent some "duplicate key" errors
|
key: utils.randomString(12) // this should prevent some "duplicate key" errors
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -903,6 +911,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
|
|||||||
return extraClasses.join(" ");
|
return extraClasses.join(" ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @returns {FancytreeNode[]} */
|
||||||
getSelectedNodes(stopOnParents = false) {
|
getSelectedNodes(stopOnParents = false) {
|
||||||
return this.tree.getSelectedNodes(stopOnParents);
|
return this.tree.getSelectedNodes(stopOnParents);
|
||||||
}
|
}
|
||||||
@@ -1523,7 +1532,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
|
|||||||
|
|
||||||
// Automatically expand the hoisted note by default
|
// Automatically expand the hoisted note by default
|
||||||
const node = this.getActiveNode();
|
const node = this.getActiveNode();
|
||||||
if (node && node.data.noteId === this.noteContext.hoistedNoteId){
|
if (node?.data.noteId === this.noteContext.hoistedNoteId){
|
||||||
this.setExpanded(node.data.branchId, true);
|
this.setExpanded(node.data.branchId, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1582,20 +1591,6 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
|
|||||||
this.clearSelectedNodes();
|
this.clearSelectedNodes();
|
||||||
}
|
}
|
||||||
|
|
||||||
async editBranchPrefixCommand({ node }: CommandListenerData<"editBranchPrefix">) {
|
|
||||||
const branchIds = this.getSelectedOrActiveBranchIds(node).filter((branchId) => !branchId.startsWith("virt-"));
|
|
||||||
|
|
||||||
if (!branchIds.length) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Trigger the event with the selected branch IDs
|
|
||||||
appContext.triggerEvent("editBranchPrefix", {
|
|
||||||
selectedOrActiveBranchIds: branchIds,
|
|
||||||
node: node
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
canBeMovedUpOrDown(node: Fancytree.FancytreeNode) {
|
canBeMovedUpOrDown(node: Fancytree.FancytreeNode) {
|
||||||
if (node.data.noteId === "root") {
|
if (node.data.noteId === "root") {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ export default class NoteWrapperWidget extends FlexContainer<BasicWidget> {
|
|||||||
|
|
||||||
const note = this.noteContext?.note;
|
const note = this.noteContext?.note;
|
||||||
if (!note) {
|
if (!note) {
|
||||||
this.$widget.addClass("bgfx");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,7 +61,7 @@ export default class NoteWrapperWidget extends FlexContainer<BasicWidget> {
|
|||||||
|
|
||||||
this.$widget.addClass(utils.getNoteTypeClass(note.type));
|
this.$widget.addClass(utils.getNoteTypeClass(note.type));
|
||||||
this.$widget.addClass(utils.getMimeTypeClass(note.mime));
|
this.$widget.addClass(utils.getMimeTypeClass(note.mime));
|
||||||
this.$widget.toggleClass(["bgfx", "options"], note.isOptions());
|
|
||||||
this.$widget.toggleClass("protected", note.isProtected);
|
this.$widget.toggleClass("protected", note.isProtected);
|
||||||
|
|
||||||
const noteLanguage = note?.getLabelValue("language");
|
const noteLanguage = note?.getLabelValue("language");
|
||||||
@@ -71,7 +70,7 @@ export default class NoteWrapperWidget extends FlexContainer<BasicWidget> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#isFullWidthNote(note: FNote) {
|
#isFullWidthNote(note: FNote) {
|
||||||
if (["code", "image", "mermaid", "book", "render", "canvas", "webView", "mindMap"].includes(note.type)) {
|
if (["image", "mermaid", "book", "render", "canvas", "webView", "mindMap"].includes(note.type)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
.info-bar {
|
|
||||||
--link-color: currentColor;
|
|
||||||
|
|
||||||
margin-top: 4px;
|
|
||||||
contain: unset !important;
|
|
||||||
padding: 8px 20px;
|
|
||||||
color: var(--read-only-note-info-bar-color);
|
|
||||||
font-size: .9em;
|
|
||||||
cursor: default;
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-bar-prominent {
|
|
||||||
background: var(--alert-bar-background, var(--accented-background-color));
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-bar-subtle {
|
|
||||||
color: var(--muted-text-color);
|
|
||||||
border-bottom: 1px solid var(--main-border-color);
|
|
||||||
margin-block: 0;
|
|
||||||
margin-inline: 10px;
|
|
||||||
padding-inline: 12px;
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
import "./InfoBar.css";
|
|
||||||
import { ComponentChildren, CSSProperties } from "preact";
|
|
||||||
|
|
||||||
export type InfoBarParams = {
|
|
||||||
type: "prominent" | "subtle",
|
|
||||||
className: string;
|
|
||||||
style: CSSProperties
|
|
||||||
children: ComponentChildren;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default function InfoBar(props: InfoBarParams) {
|
|
||||||
return <div className={`info-bar ${props.className} info-bar-${props.type}`} style={props.style}>
|
|
||||||
{props?.children}
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
|
|
||||||
InfoBar.defaultProps = {
|
|
||||||
type: "prominent"
|
|
||||||
} as InfoBarParams
|
|
||||||
@@ -1,26 +1,25 @@
|
|||||||
import { CSSProperties } from "preact/compat";
|
|
||||||
import { DragData } from "../note_tree";
|
|
||||||
import { FilterLabelsByType, KeyboardActionNames, OptionNames, RelationNames } from "@triliumnext/commons";
|
|
||||||
import { Inputs, MutableRef, useCallback, useContext, useDebugValue, useEffect, useLayoutEffect, useMemo, useRef, useState } from "preact/hooks";
|
import { Inputs, MutableRef, useCallback, useContext, useDebugValue, useEffect, useLayoutEffect, useMemo, useRef, useState } from "preact/hooks";
|
||||||
|
import { CommandListenerData, EventData, EventNames } from "../../components/app_context";
|
||||||
import { ParentComponent } from "./react_utils";
|
import { ParentComponent } from "./react_utils";
|
||||||
|
import SpacedUpdate from "../../services/spaced_update";
|
||||||
|
import { FilterLabelsByType, KeyboardActionNames, OptionNames, RelationNames } from "@triliumnext/commons";
|
||||||
|
import options, { type OptionValue } from "../../services/options";
|
||||||
|
import utils, { escapeRegExp, reloadFrontendApp } from "../../services/utils";
|
||||||
|
import NoteContext from "../../components/note_context";
|
||||||
|
import BasicWidget, { ReactWrappedWidget } from "../basic_widget";
|
||||||
|
import FNote from "../../entities/fnote";
|
||||||
|
import attributes from "../../services/attributes";
|
||||||
|
import FBlob from "../../entities/fblob";
|
||||||
|
import NoteContextAwareWidget from "../note_context_aware_widget";
|
||||||
import { RefObject, VNode } from "preact";
|
import { RefObject, VNode } from "preact";
|
||||||
import { Tooltip } from "bootstrap";
|
import { Tooltip } from "bootstrap";
|
||||||
import { ViewMode } from "../../services/link";
|
import { CSSProperties } from "preact/compat";
|
||||||
import appContext, { CommandListenerData, EventData, EventNames } from "../../components/app_context";
|
|
||||||
import attributes from "../../services/attributes";
|
|
||||||
import BasicWidget, { ReactWrappedWidget } from "../basic_widget";
|
|
||||||
import Component from "../../components/component";
|
|
||||||
import FBlob from "../../entities/fblob";
|
|
||||||
import FNote from "../../entities/fnote";
|
|
||||||
import keyboard_actions from "../../services/keyboard_actions";
|
import keyboard_actions from "../../services/keyboard_actions";
|
||||||
import Mark from "mark.js";
|
import Mark from "mark.js";
|
||||||
import NoteContext from "../../components/note_context";
|
import { DragData } from "../note_tree";
|
||||||
import NoteContextAwareWidget from "../note_context_aware_widget";
|
import Component from "../../components/component";
|
||||||
import options, { type OptionValue } from "../../services/options";
|
|
||||||
import protected_session_holder from "../../services/protected_session_holder";
|
|
||||||
import SpacedUpdate from "../../services/spaced_update";
|
|
||||||
import toast, { ToastOptions } from "../../services/toast";
|
import toast, { ToastOptions } from "../../services/toast";
|
||||||
import utils, { escapeRegExp, reloadFrontendApp } from "../../services/utils";
|
import { ViewMode } from "../../services/link";
|
||||||
|
|
||||||
export function useTriliumEvent<T extends EventNames>(eventName: T, handler: (data: EventData<T>) => void) {
|
export function useTriliumEvent<T extends EventNames>(eventName: T, handler: (data: EventData<T>) => void) {
|
||||||
const parentComponent = useContext(ParentComponent);
|
const parentComponent = useContext(ParentComponent);
|
||||||
@@ -199,7 +198,6 @@ export function useNoteContext() {
|
|||||||
const [ notePath, setNotePath ] = useState<string | null | undefined>();
|
const [ notePath, setNotePath ] = useState<string | null | undefined>();
|
||||||
const [ note, setNote ] = useState<FNote | null | undefined>();
|
const [ note, setNote ] = useState<FNote | null | undefined>();
|
||||||
const [ , setViewMode ] = useState<ViewMode>();
|
const [ , setViewMode ] = useState<ViewMode>();
|
||||||
const [ isReadOnlyTemporarilyDisabled, setIsReadOnlyTemporarilyDisabled ] = useState<boolean | null | undefined>(noteContext?.viewScope?.isReadOnly);
|
|
||||||
const [ refreshCounter, setRefreshCounter ] = useState(0);
|
const [ refreshCounter, setRefreshCounter ] = useState(0);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -219,11 +217,6 @@ export function useNoteContext() {
|
|||||||
setRefreshCounter(refreshCounter + 1);
|
setRefreshCounter(refreshCounter + 1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
useTriliumEvent("readOnlyTemporarilyDisabled", ({ noteContext: eventNoteContext }) => {
|
|
||||||
if (eventNoteContext.ntxId === noteContext?.ntxId) {
|
|
||||||
setIsReadOnlyTemporarilyDisabled(eventNoteContext?.viewScope?.readOnlyTemporarilyDisabled);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const parentComponent = useContext(ParentComponent) as ReactWrappedWidget;
|
const parentComponent = useContext(ParentComponent) as ReactWrappedWidget;
|
||||||
useDebugValue(() => `notePath=${notePath}, ntxId=${noteContext?.ntxId}`);
|
useDebugValue(() => `notePath=${notePath}, ntxId=${noteContext?.ntxId}`);
|
||||||
@@ -237,8 +230,7 @@ export function useNoteContext() {
|
|||||||
viewScope: noteContext?.viewScope,
|
viewScope: noteContext?.viewScope,
|
||||||
componentId: parentComponent.componentId,
|
componentId: parentComponent.componentId,
|
||||||
noteContext,
|
noteContext,
|
||||||
parentComponent,
|
parentComponent
|
||||||
isReadOnlyTemporarilyDisabled
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -709,51 +701,3 @@ export function useResizeObserver(ref: RefObject<HTMLElement>, callback: () => v
|
|||||||
return () => observer.disconnect();
|
return () => observer.disconnect();
|
||||||
}, [ callback, ref ]);
|
}, [ callback, ref ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Indicates that the current note is in read-only mode, while an editing mode is available,
|
|
||||||
* and provides a way to switch to editing mode.
|
|
||||||
*/
|
|
||||||
export function useIsNoteReadOnly(note: FNote | null | undefined, noteContext: NoteContext | undefined) {
|
|
||||||
const [isReadOnly, setIsReadOnly] = useState<boolean | undefined>(undefined);
|
|
||||||
|
|
||||||
const enableEditing = useCallback(() => {
|
|
||||||
if (noteContext?.viewScope) {
|
|
||||||
noteContext.viewScope.readOnlyTemporarilyDisabled = true;
|
|
||||||
appContext.triggerEvent("readOnlyTemporarilyDisabled", {noteContext});
|
|
||||||
}
|
|
||||||
}, [noteContext]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (note && noteContext) {
|
|
||||||
isNoteReadOnly(note, noteContext).then((readOnly) => {
|
|
||||||
setIsReadOnly(readOnly);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}, [note, noteContext]);
|
|
||||||
|
|
||||||
useTriliumEvent("readOnlyTemporarilyDisabled", ({noteContext: eventNoteContext}) => {
|
|
||||||
if (noteContext?.ntxId === eventNoteContext.ntxId) {
|
|
||||||
setIsReadOnly(false);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return {isReadOnly, enableEditing};
|
|
||||||
}
|
|
||||||
|
|
||||||
async function isNoteReadOnly(note: FNote, noteContext: NoteContext) {
|
|
||||||
|
|
||||||
if (note.isProtected && !protected_session_holder.isProtectedSessionAvailable()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (options.is("databaseReadonly")) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (noteContext.viewScope?.viewMode !== "default" || !await noteContext.isReadOnly()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ export default function EditedNotesTab({ note }: TabContext) {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!note) return;
|
if (!note) return;
|
||||||
server.get<EditedNotesResponse>(`edited-notes/${note.getLabelValue("dateNote")}`).then(async editedNotes => {
|
server.get<EditedNotesResponse>(`edited-notes/${note.getLabelValue("dateNote")}`).then(async editedNotes => {
|
||||||
editedNotes = editedNotes.filter((n) => n.noteId !== note.noteId);
|
editedNotes = editedNotes.filter((n) => n.noteId !== note.noteId);
|
||||||
const noteIds = editedNotes.flatMap((n) => n.noteId);
|
const noteIds = editedNotes.flatMap((n) => n.noteId);
|
||||||
await froca.getNotes(noteIds, true); // preload all at once
|
await froca.getNotes(noteIds, true); // preload all at once
|
||||||
setEditedNotes(editedNotes);
|
setEditedNotes(editedNotes);
|
||||||
});
|
});
|
||||||
@@ -41,11 +41,11 @@ export default function EditedNotesTab({ note }: TabContext) {
|
|||||||
)}
|
)}
|
||||||
</span>
|
</span>
|
||||||
)
|
)
|
||||||
}), " ")}
|
}))}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="no-edited-notes-found">{t("edited_notes.no_edited_notes_found")}</div>
|
<div className="no-edited-notes-found">{t("edited_notes.no_edited_notes_found")}</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,19 @@
|
|||||||
import { ConvertToAttachmentResponse } from "@triliumnext/commons";
|
import { ConvertToAttachmentResponse } from "@triliumnext/commons";
|
||||||
import { FormDropdownDivider, FormListItem } from "../react/FormList";
|
|
||||||
import { isElectron as getIsElectron, isMac as getIsMac } from "../../services/utils";
|
|
||||||
import { ParentComponent } from "../react/react_utils";
|
|
||||||
import { t } from "../../services/i18n"
|
|
||||||
import { useContext } from "preact/hooks";
|
|
||||||
import { useIsNoteReadOnly } from "../react/hooks";
|
|
||||||
import ActionButton from "../react/ActionButton"
|
|
||||||
import appContext, { CommandNames } from "../../components/app_context";
|
import appContext, { CommandNames } from "../../components/app_context";
|
||||||
import branches from "../../services/branches";
|
|
||||||
import dialog from "../../services/dialog";
|
|
||||||
import Dropdown from "../react/Dropdown";
|
|
||||||
import FNote from "../../entities/fnote"
|
import FNote from "../../entities/fnote"
|
||||||
import NoteContext from "../../components/note_context";
|
import dialog from "../../services/dialog";
|
||||||
|
import { t } from "../../services/i18n"
|
||||||
import server from "../../services/server";
|
import server from "../../services/server";
|
||||||
import toast from "../../services/toast";
|
import toast from "../../services/toast";
|
||||||
import ws from "../../services/ws";
|
import ws from "../../services/ws";
|
||||||
|
import ActionButton from "../react/ActionButton"
|
||||||
|
import Dropdown from "../react/Dropdown";
|
||||||
|
import { FormDropdownDivider, FormListItem } from "../react/FormList";
|
||||||
|
import { isElectron as getIsElectron, isMac as getIsMac } from "../../services/utils";
|
||||||
|
import { ParentComponent } from "../react/react_utils";
|
||||||
|
import { useContext } from "preact/hooks";
|
||||||
|
import NoteContext from "../../components/note_context";
|
||||||
|
import branches from "../../services/branches";
|
||||||
|
|
||||||
interface NoteActionsProps {
|
interface NoteActionsProps {
|
||||||
note?: FNote;
|
note?: FNote;
|
||||||
@@ -53,7 +52,6 @@ function NoteContextMenu({ note, noteContext }: { note: FNote, noteContext?: Not
|
|||||||
const isMac = getIsMac();
|
const isMac = getIsMac();
|
||||||
const hasSource = ["text", "code", "relationMap", "mermaid", "canvas", "mindMap"].includes(note.type);
|
const hasSource = ["text", "code", "relationMap", "mermaid", "canvas", "mindMap"].includes(note.type);
|
||||||
const isSearchOrBook = ["search", "book"].includes(note.type);
|
const isSearchOrBook = ["search", "book"].includes(note.type);
|
||||||
const {isReadOnly, enableEditing} = useIsNoteReadOnly(note, noteContext);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dropdown
|
<Dropdown
|
||||||
@@ -61,14 +59,8 @@ function NoteContextMenu({ note, noteContext }: { note: FNote, noteContext?: Not
|
|||||||
className="note-actions"
|
className="note-actions"
|
||||||
hideToggleArrow
|
hideToggleArrow
|
||||||
noSelectButtonStyle
|
noSelectButtonStyle
|
||||||
iconAction>
|
iconAction
|
||||||
|
>
|
||||||
{isReadOnly && <>
|
|
||||||
<CommandItem icon="bx bx-pencil" text={t("read-only-info.edit-note")}
|
|
||||||
command={() => enableEditing()} />
|
|
||||||
<FormDropdownDivider />
|
|
||||||
</>}
|
|
||||||
|
|
||||||
{canBeConvertedToAttachment && <ConvertToAttachment note={note} /> }
|
{canBeConvertedToAttachment && <ConvertToAttachment note={note} /> }
|
||||||
{note.type === "render" && <CommandItem command="renderActiveNote" icon="bx bx-extension" text={t("note_actions.re_render_note")} />}
|
{note.type === "render" && <CommandItem command="renderActiveNote" icon="bx bx-extension" text={t("note_actions.re_render_note")} />}
|
||||||
<CommandItem command="findInText" icon="bx bx-search" disabled={!isSearchable} text={t("note_actions.search_in_note")} />
|
<CommandItem command="findInText" icon="bx bx-search" disabled={!isSearchable} text={t("note_actions.search_in_note")} />
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "preact/hooks"
|
|||||||
import { useNoteContext, useNoteProperty, useStaticTooltipWithKeyboardShortcut, useTriliumEvents } from "../react/hooks";
|
import { useNoteContext, useNoteProperty, useStaticTooltipWithKeyboardShortcut, useTriliumEvents } from "../react/hooks";
|
||||||
import "./style.css";
|
import "./style.css";
|
||||||
|
|
||||||
import { Indexed, numberObjectsInPlace } from "../../services/utils";
|
import { numberObjectsInPlace } from "../../services/utils";
|
||||||
import { EventNames } from "../../components/app_context";
|
import { EventNames } from "../../components/app_context";
|
||||||
import NoteActions from "./NoteActions";
|
import NoteActions from "./NoteActions";
|
||||||
import { KeyboardActionNames } from "@triliumnext/commons";
|
import { KeyboardActionNames } from "@triliumnext/commons";
|
||||||
@@ -11,47 +11,30 @@ import { TabConfiguration, TitleContext } from "./ribbon-interface";
|
|||||||
|
|
||||||
const TAB_CONFIGURATION = numberObjectsInPlace<TabConfiguration>(RIBBON_TAB_DEFINITIONS);
|
const TAB_CONFIGURATION = numberObjectsInPlace<TabConfiguration>(RIBBON_TAB_DEFINITIONS);
|
||||||
|
|
||||||
interface ComputedTab extends Indexed<TabConfiguration> {
|
|
||||||
shouldShow: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function Ribbon() {
|
export default function Ribbon() {
|
||||||
const { note, ntxId, hoistedNoteId, notePath, noteContext, componentId, isReadOnlyTemporarilyDisabled } = useNoteContext();
|
const { note, ntxId, hoistedNoteId, notePath, noteContext, componentId } = useNoteContext();
|
||||||
const noteType = useNoteProperty(note, "type");
|
const noteType = useNoteProperty(note, "type");
|
||||||
|
const titleContext: TitleContext = { note };
|
||||||
const [ activeTabIndex, setActiveTabIndex ] = useState<number | undefined>();
|
const [ activeTabIndex, setActiveTabIndex ] = useState<number | undefined>();
|
||||||
const [ computedTabs, setComputedTabs ] = useState<ComputedTab[]>();
|
const computedTabs = useMemo(
|
||||||
const titleContext: TitleContext = useMemo(() => ({
|
() => TAB_CONFIGURATION.map(tab => {
|
||||||
note,
|
const shouldShow = typeof tab.show === "boolean" ? tab.show : tab.show?.(titleContext);
|
||||||
noteContext
|
return {
|
||||||
}), [ note, noteContext ]);
|
|
||||||
|
|
||||||
async function refresh() {
|
|
||||||
const computedTabs: ComputedTab[] = [];
|
|
||||||
for (const tab of TAB_CONFIGURATION) {
|
|
||||||
const shouldShow = await shouldShowTab(tab.show, titleContext);
|
|
||||||
computedTabs.push({
|
|
||||||
...tab,
|
...tab,
|
||||||
shouldShow: !!shouldShow
|
shouldShow
|
||||||
});
|
}
|
||||||
}
|
}),
|
||||||
setComputedTabs(computedTabs);
|
[ titleContext, note, noteType ]);
|
||||||
}
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
refresh();
|
|
||||||
}, [ note, noteType, isReadOnlyTemporarilyDisabled ]);
|
|
||||||
|
|
||||||
// Automatically activate the first ribbon tab that needs to be activated whenever a note changes.
|
// Automatically activate the first ribbon tab that needs to be activated whenever a note changes.
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!computedTabs) return;
|
|
||||||
const tabToActivate = computedTabs.find(tab => tab.shouldShow && (typeof tab.activate === "boolean" ? tab.activate : tab.activate?.(titleContext)));
|
const tabToActivate = computedTabs.find(tab => tab.shouldShow && (typeof tab.activate === "boolean" ? tab.activate : tab.activate?.(titleContext)));
|
||||||
setActiveTabIndex(tabToActivate?.index);
|
setActiveTabIndex(tabToActivate?.index);
|
||||||
}, [ computedTabs, note?.noteId ]);
|
}, [ note?.noteId ]);
|
||||||
|
|
||||||
// Register keyboard shortcuts.
|
// Register keyboard shortcuts.
|
||||||
const eventsToListenTo = useMemo(() => TAB_CONFIGURATION.filter(config => config.toggleCommand).map(config => config.toggleCommand) as EventNames[], []);
|
const eventsToListenTo = useMemo(() => TAB_CONFIGURATION.filter(config => config.toggleCommand).map(config => config.toggleCommand) as EventNames[], []);
|
||||||
useTriliumEvents(eventsToListenTo, useCallback((e, toggleCommand) => {
|
useTriliumEvents(eventsToListenTo, useCallback((e, toggleCommand) => {
|
||||||
if (!computedTabs) return;
|
|
||||||
const correspondingTab = computedTabs.find(tab => tab.toggleCommand === toggleCommand);
|
const correspondingTab = computedTabs.find(tab => tab.toggleCommand === toggleCommand);
|
||||||
if (correspondingTab) {
|
if (correspondingTab) {
|
||||||
if (activeTabIndex !== correspondingTab.index) {
|
if (activeTabIndex !== correspondingTab.index) {
|
||||||
@@ -68,7 +51,7 @@ export default function Ribbon() {
|
|||||||
<>
|
<>
|
||||||
<div className="ribbon-top-row">
|
<div className="ribbon-top-row">
|
||||||
<div className="ribbon-tab-container">
|
<div className="ribbon-tab-container">
|
||||||
{computedTabs && computedTabs.map(({ title, icon, index, toggleCommand, shouldShow }) => (
|
{computedTabs.map(({ title, icon, index, toggleCommand, shouldShow }) => (
|
||||||
shouldShow && <RibbonTab
|
shouldShow && <RibbonTab
|
||||||
icon={icon}
|
icon={icon}
|
||||||
title={typeof title === "string" ? title : title(titleContext)}
|
title={typeof title === "string" ? title : title(titleContext)}
|
||||||
@@ -91,7 +74,7 @@ export default function Ribbon() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="ribbon-body-container">
|
<div className="ribbon-body-container">
|
||||||
{computedTabs && computedTabs.map(tab => {
|
{computedTabs.map(tab => {
|
||||||
const isActive = tab.index === activeTabIndex;
|
const isActive = tab.index === activeTabIndex;
|
||||||
if (!isActive && !tab.stayInDom) {
|
if (!isActive && !tab.stayInDom) {
|
||||||
return;
|
return;
|
||||||
@@ -146,9 +129,3 @@ function RibbonTab({ icon, title, active, onClick, toggleCommand }: { icon: stri
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function shouldShowTab(showConfig: boolean | ((context: TitleContext) => Promise<boolean | null | undefined> | boolean | null | undefined), context: TitleContext) {
|
|
||||||
if (showConfig === null || showConfig === undefined) return true;
|
|
||||||
if (typeof showConfig === "boolean") return showConfig;
|
|
||||||
if ("then" in showConfig) return await showConfig(context);
|
|
||||||
return showConfig(context);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -21,9 +21,7 @@ export const RIBBON_TAB_DEFINITIONS: TabConfiguration[] = [
|
|||||||
{
|
{
|
||||||
title: t("classic_editor_toolbar.title"),
|
title: t("classic_editor_toolbar.title"),
|
||||||
icon: "bx bx-text",
|
icon: "bx bx-text",
|
||||||
show: async ({ note, noteContext }) => note?.type === "text"
|
show: ({ note }) => note?.type === "text" && options.get("textNoteEditorType") === "ckeditor-classic",
|
||||||
&& options.get("textNoteEditorType") === "ckeditor-classic"
|
|
||||||
&& !(await noteContext?.isReadOnly()),
|
|
||||||
toggleCommand: "toggleRibbonTabClassicEditor",
|
toggleCommand: "toggleRibbonTabClassicEditor",
|
||||||
content: FormattingToolbar,
|
content: FormattingToolbar,
|
||||||
activate: true,
|
activate: true,
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
import { ComponentChildren } from "preact";
|
import { ComponentChildren } from "preact";
|
||||||
import { useNoteContext } from "../../react/hooks";
|
import { useNoteContext } from "../../react/hooks";
|
||||||
import { TabContext } from "../ribbon-interface";
|
import { TabContext, TitleContext } from "../ribbon-interface";
|
||||||
import { useEffect, useMemo, useState } from "preact/hooks";
|
import { useEffect, useMemo, useState } from "preact/hooks";
|
||||||
import { RIBBON_TAB_DEFINITIONS } from "../RibbonDefinition";
|
import { RIBBON_TAB_DEFINITIONS } from "../RibbonDefinition";
|
||||||
import { shouldShowTab } from "../Ribbon";
|
|
||||||
|
|
||||||
interface StandaloneRibbonAdapterProps {
|
interface StandaloneRibbonAdapterProps {
|
||||||
component: (props: TabContext) => ComponentChildren;
|
component: (props: TabContext) => ComponentChildren;
|
||||||
@@ -17,11 +16,10 @@ export default function StandaloneRibbonAdapter({ component }: StandaloneRibbonA
|
|||||||
const Component = component;
|
const Component = component;
|
||||||
const { note, ntxId, hoistedNoteId, notePath, noteContext, componentId } = useNoteContext();
|
const { note, ntxId, hoistedNoteId, notePath, noteContext, componentId } = useNoteContext();
|
||||||
const definition = useMemo(() => RIBBON_TAB_DEFINITIONS.find(def => def.content === component), [ component ]);
|
const definition = useMemo(() => RIBBON_TAB_DEFINITIONS.find(def => def.content === component), [ component ]);
|
||||||
const [ shown, setShown ] = useState<boolean | null | undefined>(false);
|
const [ shown, setShown ] = useState(unwrapShown(definition?.show, { note }));
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!definition) return;
|
setShown(unwrapShown(definition?.show, { note }));
|
||||||
shouldShowTab(definition.show, { note, noteContext }).then(setShown);
|
|
||||||
}, [ note ]);
|
}, [ note ]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -37,3 +35,9 @@ export default function StandaloneRibbonAdapter({ component }: StandaloneRibbonA
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function unwrapShown(value: boolean | ((context: TitleContext) => boolean | null | undefined) | undefined, context: TitleContext) {
|
||||||
|
if (!value) return true;
|
||||||
|
if (typeof value === "boolean") return value;
|
||||||
|
return !!value(context);
|
||||||
|
}
|
||||||
|
|||||||
@@ -16,14 +16,13 @@ export interface TabContext {
|
|||||||
|
|
||||||
export interface TitleContext {
|
export interface TitleContext {
|
||||||
note: FNote | null | undefined;
|
note: FNote | null | undefined;
|
||||||
noteContext: NoteContext | undefined;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TabConfiguration {
|
export interface TabConfiguration {
|
||||||
title: string | ((context: TitleContext) => string);
|
title: string | ((context: TitleContext) => string);
|
||||||
icon: string;
|
icon: string;
|
||||||
content: (context: TabContext) => VNode | false;
|
content: (context: TabContext) => VNode | false;
|
||||||
show: boolean | ((context: TitleContext) => Promise<boolean | null | undefined> | boolean | null | undefined);
|
show: boolean | ((context: TitleContext) => boolean | null | undefined);
|
||||||
toggleCommand?: KeyboardActionNames;
|
toggleCommand?: KeyboardActionNames;
|
||||||
activate?: boolean | ((context: TitleContext) => boolean);
|
activate?: boolean | ((context: TitleContext) => boolean);
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
.shared-info-widget {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shared-info-widget button {
|
|
||||||
margin-inline-start: 8px;
|
|
||||||
}
|
|
||||||
@@ -1,12 +1,11 @@
|
|||||||
import "./shared_info.css";
|
|
||||||
import { t } from "../services/i18n";
|
|
||||||
import { useEffect, useState } from "preact/hooks";
|
import { useEffect, useState } from "preact/hooks";
|
||||||
|
import { t } from "../services/i18n";
|
||||||
|
import Alert from "./react/Alert";
|
||||||
import { useNoteContext, useTriliumEvent, useTriliumOption } from "./react/hooks";
|
import { useNoteContext, useTriliumEvent, useTriliumOption } from "./react/hooks";
|
||||||
import attributes from "../services/attributes";
|
|
||||||
import FNote from "../entities/fnote";
|
import FNote from "../entities/fnote";
|
||||||
import HelpButton from "./react/HelpButton";
|
import attributes from "../services/attributes";
|
||||||
import InfoBar from "./react/InfoBar";
|
|
||||||
import RawHtml from "./react/RawHtml";
|
import RawHtml from "./react/RawHtml";
|
||||||
|
import HelpButton from "./react/HelpButton";
|
||||||
|
|
||||||
export default function SharedInfo() {
|
export default function SharedInfo() {
|
||||||
const { note } = useNoteContext();
|
const { note } = useNoteContext();
|
||||||
@@ -36,7 +35,7 @@ export default function SharedInfo() {
|
|||||||
link = `${location.protocol}//${host}${location.pathname}share/${shareId}`;
|
link = `${location.protocol}//${host}${location.pathname}share/${shareId}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
setLink(`<a href="${link}" class="external tn-link">${link}</a>`);
|
setLink(`<a href="${link}" class="external">${link}</a>`);
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(refresh, [ note ]);
|
useEffect(refresh, [ note ]);
|
||||||
@@ -49,14 +48,20 @@ export default function SharedInfo() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<InfoBar className="shared-info-widget" type="subtle" style={{display: (!link) ? "none" : undefined}}>
|
<Alert className="shared-info-widget" type="warning" style={{
|
||||||
|
contain: "none",
|
||||||
|
margin: "10px",
|
||||||
|
padding: "10px",
|
||||||
|
fontWeight: "bold",
|
||||||
|
display: !link ? "none" : undefined
|
||||||
|
}}>
|
||||||
{link && (
|
{link && (
|
||||||
<RawHtml html={syncServerHost
|
<RawHtml html={syncServerHost
|
||||||
? t("shared_info.shared_publicly", { link })
|
? t("shared_info.shared_publicly", { link })
|
||||||
: t("shared_info.shared_locally", { link })} />
|
: t("shared_info.shared_locally", { link })} />
|
||||||
)}
|
)}
|
||||||
<HelpButton helpPage="R9pX4DGra2Vt" style={{ width: "24px", height: "24px" }} />
|
<HelpButton helpPage="R9pX4DGra2Vt" style={{ width: "24px", height: "24px" }} />
|
||||||
</InfoBar>
|
</Alert>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ import protected_session_holder from "../../services/protected_session_holder.js
|
|||||||
const TPL = /*html*/`
|
const TPL = /*html*/`
|
||||||
<div class="canvas-widget note-detail-canvas note-detail-printable note-detail">
|
<div class="canvas-widget note-detail-canvas note-detail-printable note-detail">
|
||||||
<style>
|
<style>
|
||||||
.canvas-widget {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.excalidraw .App-menu_top .buttonList {
|
.excalidraw .App-menu_top .buttonList {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -284,8 +284,7 @@ function SmoothScrollEnabledOption() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function MaxContentWidth() {
|
function MaxContentWidth() {
|
||||||
const [maxContentWidth, setMaxContentWidth] = useTriliumOption("maxContentWidth");
|
const [ maxContentWidth, setMaxContentWidth ] = useTriliumOption("maxContentWidth");
|
||||||
const [centerContent, setCenterContent] = useTriliumOptionBool("centerContent");
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<OptionsSection title={t("max_content_width.title")}>
|
<OptionsSection title={t("max_content_width.title")}>
|
||||||
@@ -301,9 +300,9 @@ function MaxContentWidth() {
|
|||||||
</FormGroup>
|
</FormGroup>
|
||||||
</Column>
|
</Column>
|
||||||
|
|
||||||
<FormCheckbox label={t("max_content_width.centerContent")}
|
<p>
|
||||||
currentValue={centerContent}
|
{t("max_content_width.apply_changes_description")} <Button text={t("max_content_width.reload_button")} size="micro" onClick={reloadFrontendApp} />
|
||||||
onChange={setCenterContent} />
|
</p>
|
||||||
</OptionsSection>
|
</OptionsSection>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import type { ComponentChildren } from "preact";
|
|||||||
import { CSSProperties } from "preact/compat";
|
import { CSSProperties } from "preact/compat";
|
||||||
|
|
||||||
interface OptionsSectionProps {
|
interface OptionsSectionProps {
|
||||||
title?: ComponentChildren;
|
title?: string;
|
||||||
children: ComponentChildren;
|
children: ComponentChildren;
|
||||||
noCard?: boolean;
|
noCard?: boolean;
|
||||||
style?: CSSProperties;
|
style?: CSSProperties;
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import dialog from "../../../services/dialog";
|
|||||||
import { formatDateTime } from "../../../utils/formatters";
|
import { formatDateTime } from "../../../utils/formatters";
|
||||||
import ActionButton from "../../react/ActionButton";
|
import ActionButton from "../../react/ActionButton";
|
||||||
import { useTriliumEvent } from "../../react/hooks";
|
import { useTriliumEvent } from "../../react/hooks";
|
||||||
import HelpButton from "../../react/HelpButton";
|
|
||||||
|
|
||||||
type RenameTokenCallback = (tokenId: string, oldName: string) => Promise<void>;
|
type RenameTokenCallback = (tokenId: string, oldName: string) => Promise<void>;
|
||||||
type DeleteTokenCallback = (tokenId: string, name: string ) => Promise<void>;
|
type DeleteTokenCallback = (tokenId: string, name: string ) => Promise<void>;
|
||||||
@@ -49,13 +48,19 @@ export default function EtapiSettings() {
|
|||||||
message: t("etapi.token_created_message"),
|
message: t("etapi.token_created_message"),
|
||||||
defaultValue: authToken
|
defaultValue: authToken
|
||||||
});
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<OptionsSection title={t("etapi.title")}>
|
<OptionsSection title={t("etapi.title")}>
|
||||||
<FormText>
|
<FormText>
|
||||||
{t("etapi.description")}
|
{t("etapi.description")}<br />
|
||||||
<HelpButton helpPage="pgxEVkzLl1OP" />
|
<RawHtml
|
||||||
|
html={t("etapi.see_more", {
|
||||||
|
link_to_wiki: `<a class="tn-link" href="https://triliumnext.github.io/Docs/Wiki/etapi.html">${t("etapi.wiki")}</a>`,
|
||||||
|
// TODO: We use window.open src/public/app/services/link.ts -> prevents regular click behavior on "a" element here because it's a relative path
|
||||||
|
link_to_openapi_spec: `<a class="tn-link" onclick="window.open('etapi/etapi.openapi.yaml')" href="etapi/etapi.openapi.yaml">${t("etapi.openapi_spec")}</a>`,
|
||||||
|
link_to_swagger_ui: `<a class="tn-link" href="#_help_f3xpgx6H01PW">${t("etapi.swagger_ui")}</a>`
|
||||||
|
})} />
|
||||||
</FormText>
|
</FormText>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
@@ -63,7 +68,6 @@ export default function EtapiSettings() {
|
|||||||
text={t("etapi.create_token")}
|
text={t("etapi.create_token")}
|
||||||
onClick={createTokenCallback}
|
onClick={createTokenCallback}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
<h5>{t("etapi.existing_tokens")}</h5>
|
<h5>{t("etapi.existing_tokens")}</h5>
|
||||||
@@ -97,7 +101,7 @@ function TokenList({ tokens }: { tokens: EtapiToken[] }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
tokens.length ? (
|
tokens.length ? (
|
||||||
<div style={{ overflow: "auto"}}>
|
<div style={{ overflow: "auto", height: "500px"}}>
|
||||||
<table className="table table-stripped">
|
<table className="table table-stripped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -119,7 +123,7 @@ function TokenList({ tokens }: { tokens: EtapiToken[] }) {
|
|||||||
text={t("etapi.rename_token")}
|
text={t("etapi.rename_token")}
|
||||||
onClick={() => renameCallback(etapiTokenId, name)}
|
onClick={() => renameCallback(etapiTokenId, name)}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ActionButton
|
<ActionButton
|
||||||
icon="bx bx-trash"
|
icon="bx bx-trash"
|
||||||
text={t("etapi.delete_token")}
|
text={t("etapi.delete_token")}
|
||||||
|
|||||||
@@ -72,8 +72,8 @@ function EditorFeatures() {
|
|||||||
return (
|
return (
|
||||||
<OptionsSection title={t("editorfeatures.title")}>
|
<OptionsSection title={t("editorfeatures.title")}>
|
||||||
<EditorFeature name="emoji-completion-enabled" optionName="textNoteEmojiCompletionEnabled" label={t("editorfeatures.emoji_completion_enabled")} description={t("editorfeatures.emoji_completion_description")} />
|
<EditorFeature name="emoji-completion-enabled" optionName="textNoteEmojiCompletionEnabled" label={t("editorfeatures.emoji_completion_enabled")} description={t("editorfeatures.emoji_completion_description")} />
|
||||||
<EditorFeature name="note-completion-enabled" optionName="textNoteCompletionEnabled" label={t("editorfeatures.note_completion_enabled")} description={t("editorfeatures.note_completion_description")} />
|
<EditorFeature name="note-completion-enabled" optionName="textNoteCompletionEnabled" label={t("editorfeatures.note_completion_enabled")} description={t("editorfeatures.emoji_completion_description")} />
|
||||||
<EditorFeature name="slash-commands-enabled" optionName="textNoteSlashCommandsEnabled" label={t("editorfeatures.slash_commands_enabled")} description={t("editorfeatures.slash_commands_description")} />
|
<EditorFeature name="slash-commands-enabled" optionName="textNoteSlashCommandsEnabled" label={t("editorfeatures.slash_commands_enabled")} description={t("editorfeatures.emoji_completion_description")} />
|
||||||
</OptionsSection>
|
</OptionsSection>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ const TPL = /*html*/`
|
|||||||
body.heading-style-underline .note-detail-readonly-text h6 { border-bottom: 1px solid var(--main-border-color); }
|
body.heading-style-underline .note-detail-readonly-text h6 { border-bottom: 1px solid var(--main-border-color); }
|
||||||
|
|
||||||
.note-detail-readonly-text {
|
.note-detail-readonly-text {
|
||||||
|
|
||||||
padding-inline-start: 24px;
|
padding-inline-start: 24px;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
font-family: var(--detail-font-family);
|
font-family: var(--detail-font-family);
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user