Compare commits
36 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3f6e66b5f1 | |||
| 730a43c922 | |||
| 047b226426 | |||
| 795dec77cf | |||
| 4f69fd664c | |||
| d27e33c9f0 | |||
| 3318c9fec6 | |||
| 67a23f0bae | |||
| 6fab899898 | |||
| fd53d49937 | |||
| e255fb5a20 | |||
| ef5f5b35db | |||
| 3c60f181ff | |||
| 6aba099a29 | |||
| f86d9b11b1 | |||
| 31c46753de | |||
| ca2bb94200 | |||
| 94411cf418 | |||
| dadda026fb | |||
| c9c8ee5556 | |||
| 66c42f0524 | |||
| 1b35ba762f | |||
| 8344dcee85 | |||
| ed33b72f57 | |||
| 7c28b93477 | |||
| b49ea378cb | |||
| 4adaa4bd58 | |||
| 0559ebb48a | |||
| 98c4baeb6b | |||
| c7b368fa46 | |||
| 05b67fc486 | |||
| 44928093bb | |||
| 4da67443c4 | |||
| feb7ceacd8 | |||
| 5c31a0afeb | |||
| a2b6504d9d |
@@ -1,7 +1,6 @@
|
||||
name: Bug Report
|
||||
description: Report a bug
|
||||
title: "(Bug report) "
|
||||
labels: "Type: Bug"
|
||||
type: "Bug"
|
||||
body:
|
||||
- type: textarea
|
||||
attributes:
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
name: Feature Request
|
||||
description: Ask for a new feature to be added
|
||||
title: "(Feature request) "
|
||||
labels: "Type: Enhancement"
|
||||
type: "Feature"
|
||||
body:
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe feature
|
||||
description: A clear and concise description of what you want to be added..
|
||||
description: A clear and concise description of what you want to be added.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
name: Task
|
||||
description: Create a new Task
|
||||
type: "Task"
|
||||
body:
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe Task
|
||||
description: A clear and concise description of what the task is about.
|
||||
validations:
|
||||
required: true
|
||||
@@ -92,7 +92,16 @@ jobs:
|
||||
asset_content_type: application/zip # required by GitHub API
|
||||
nightly-server:
|
||||
name: Deploy server nightly
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
arch: [x64, arm64]
|
||||
include:
|
||||
- arch: x64
|
||||
runs-on: ubuntu-latest
|
||||
- arch: arm64
|
||||
runs-on: ubuntu-24.04-arm
|
||||
runs-on: ${{ matrix.runs-on }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up node & dependencies
|
||||
@@ -102,22 +111,21 @@ jobs:
|
||||
cache: "npm"
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Run Linux server build (x86_64)
|
||||
- name: Run Linux server build
|
||||
env:
|
||||
MATRIX_ARCH: ${{ matrix.arch }}
|
||||
run: |
|
||||
npm run update-build-info
|
||||
npm run ci-update-nightly-version
|
||||
./bin/build-server.sh
|
||||
- name: Prepare artifacts
|
||||
if: runner.os != 'windows'
|
||||
run: |
|
||||
mkdir -p upload
|
||||
file=$(find dist -name '*.tar.xz' -print -quit)
|
||||
cp "$file" "upload/TriliumNextNotes-linux-x64-${{ github.ref_name }}.tar.xz"
|
||||
cp "$file" "upload/TriliumNextNotes-linux-${{ matrix.arch }}-${{ github.ref_name }}.tar.xz"
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: TriliumNextNotes linux server x64
|
||||
path: upload/TriliumNextNotes-linux-x64-${{ github.ref_name }}.tar.xz
|
||||
overwrite: true
|
||||
name: TriliumNextNotes linux server ${{ matrix.arch }}
|
||||
path: upload/TriliumNextNotes-linux-${{ matrix.arch }}-${{ github.ref_name }}.tar.xz
|
||||
|
||||
- name: Deploy release
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
|
||||
@@ -66,8 +66,17 @@ jobs:
|
||||
fail_on_unmatched_files: true
|
||||
files: upload/*.*
|
||||
build_linux_server-x64:
|
||||
name: Build Linux Server x86_64
|
||||
runs-on: ubuntu-latest
|
||||
name: Build Linux Server
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
arch: [x64, arm64]
|
||||
include:
|
||||
- arch: x64
|
||||
runs-on: ubuntu-latest
|
||||
- arch: arm64
|
||||
runs-on: ubuntu-24.04-arm
|
||||
runs-on: ${{ matrix.runs-on }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up node & dependencies
|
||||
@@ -77,16 +86,17 @@ jobs:
|
||||
cache: "npm"
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Run Linux server build (x86_64)
|
||||
- name: Run Linux server build
|
||||
env:
|
||||
MATRIX_ARCH: ${{ matrix.arch }}
|
||||
run: |
|
||||
npm run update-build-info
|
||||
./bin/build-server.sh
|
||||
- name: Prepare artifacts
|
||||
if: runner.os != 'windows'
|
||||
run: |
|
||||
mkdir -p upload
|
||||
file=$(find dist -name '*.tar.xz' -print -quit)
|
||||
cp "$file" "upload/TriliumNextNotes-${{ github.ref_name }}-server-linux-x64.tar.xz"
|
||||
cp "$file" "upload/TriliumNextNotes-linux-${{ matrix.arch }}-${{ github.ref_name }}.tar.xz"
|
||||
- name: Publish release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
|
||||
@@ -89,7 +89,6 @@ const copy = async () => {
|
||||
"node_modules/jsplumb/dist/",
|
||||
"node_modules/vanilla-js-wheel-zoom/dist/",
|
||||
"node_modules/mark.js/dist/",
|
||||
"node_modules/knockout/build/output/",
|
||||
"node_modules/normalize.css/",
|
||||
"node_modules/jquery.fancytree/dist/",
|
||||
"node_modules/bootstrap/dist/",
|
||||
|
||||
Generated
+17
-17
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "trilium",
|
||||
"version": "0.91.4-beta",
|
||||
"version": "0.91.5",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "trilium",
|
||||
"version": "0.91.4-beta",
|
||||
"version": "0.91.5",
|
||||
"license": "AGPL-3.0-only",
|
||||
"dependencies": {
|
||||
"@braintree/sanitize-url": "7.1.1",
|
||||
@@ -86,7 +86,7 @@
|
||||
"sanitize-filename": "1.6.3",
|
||||
"sanitize-html": "2.14.0",
|
||||
"sax": "1.4.1",
|
||||
"semver": "7.6.3",
|
||||
"semver": "7.7.0",
|
||||
"serve-favicon": "2.5.0",
|
||||
"session-file-store": "1.5.0",
|
||||
"source-map-support": "0.5.21",
|
||||
@@ -135,7 +135,7 @@
|
||||
"@types/jsdom": "21.1.7",
|
||||
"@types/mime-types": "2.1.4",
|
||||
"@types/multer": "1.4.12",
|
||||
"@types/node": "22.10.10",
|
||||
"@types/node": "22.12.0",
|
||||
"@types/react": "18.3.18",
|
||||
"@types/safe-compare": "1.1.2",
|
||||
"@types/sanitize-html": "2.13.0",
|
||||
@@ -152,7 +152,7 @@
|
||||
"@types/yargs": "17.0.33",
|
||||
"@vitest/coverage-v8": "3.0.4",
|
||||
"cross-env": "7.0.3",
|
||||
"electron": "34.0.1",
|
||||
"electron": "34.0.2",
|
||||
"esm": "3.2.25",
|
||||
"jasmine": "5.5.0",
|
||||
"jsdoc": "4.0.4",
|
||||
@@ -3898,9 +3898,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "22.10.10",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.10.tgz",
|
||||
"integrity": "sha512-X47y/mPNzxviAGY5TcYPtYL8JsY3kAq2n8fMmKoRCxq/c4v4pyGNCzM2R6+M5/umG4ZfHuT+sgqDYqWc9rJ6ww==",
|
||||
"version": "22.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.12.0.tgz",
|
||||
"integrity": "sha512-Fll2FZ1riMjNmlmJOdAyY5pUbkftXslB5DgEzlIuNaiWhXd00FhWxVC/r4yV/4wBb9JfImTu+jiSvXTkJ7F/gA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"undici-types": "~6.20.0"
|
||||
@@ -7646,9 +7646,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/electron": {
|
||||
"version": "34.0.1",
|
||||
"resolved": "https://registry.npmjs.org/electron/-/electron-34.0.1.tgz",
|
||||
"integrity": "sha512-aArw5tAM80i3CKwEREnyZSM1SkARf5Jd1yBMTIdOL4pB1M+p/oDeyWSFI9Dl+vujyfJKiK4SS5+j19wna1onMw==",
|
||||
"version": "34.0.2",
|
||||
"resolved": "https://registry.npmjs.org/electron/-/electron-34.0.2.tgz",
|
||||
"integrity": "sha512-u3F+DSUlg9NaGS+9qnYmSRN8VjAnc3LJDDk1ye1uISJnh4gjG76y3681qLowsPMx4obvCP2eBINnmbLo0yT5WA==",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -8162,9 +8162,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/electron/node_modules/@types/node": {
|
||||
"version": "20.17.14",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.14.tgz",
|
||||
"integrity": "sha512-w6qdYetNL5KRBiSClK/KWai+2IMEJuAj+EujKCumalFOwXtvOXaEan9AuwcRID2IcOIAWSIfR495hBtgKlx2zg==",
|
||||
"version": "20.17.16",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.16.tgz",
|
||||
"integrity": "sha512-vOTpLduLkZXePLxHiHsBLp98mHGnl8RptV4YAO3HfKO5UHjDvySGbxKtpYfy8Sx5+WKcgc45qNreJJRVM3L6mw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"undici-types": "~6.19.2"
|
||||
@@ -14724,9 +14724,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "7.6.3",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
|
||||
"integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
|
||||
"version": "7.7.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.0.tgz",
|
||||
"integrity": "sha512-DrfFnPzblFmNrIZzg5RzHegbiRWg7KMR7btwi2yjHwx06zsUbO5g613sVwEV7FTwmzJu+Io0lJe2GJ3LxqpvBQ==",
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
|
||||
+5
-5
@@ -2,7 +2,7 @@
|
||||
"name": "trilium",
|
||||
"productName": "TriliumNext Notes",
|
||||
"description": "Build your personal knowledge base with TriliumNext Notes",
|
||||
"version": "0.91.4-beta",
|
||||
"version": "0.91.5",
|
||||
"license": "AGPL-3.0-only",
|
||||
"main": "./dist/electron-main.js",
|
||||
"author": {
|
||||
@@ -26,7 +26,7 @@
|
||||
"start-test-server": "npm run switch-server && rimraf ./data-test && cross-env TRILIUM_DATA_DIR=./data-test TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev TRILIUM_PORT=9999 nodemon src/main.ts",
|
||||
"qstart-server": "npm run switch-server && npm run start-server",
|
||||
"start-electron": "npm run prepare-dist && cross-env TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev electron ./dist/electron-main.js --inspect=5858 .",
|
||||
"start-electron-nix": "npm run prepare-dist && cross-env TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev nix-shell -p electron_33 --run \"electron ./dist/electron-main.js --inspect=5858 .\"",
|
||||
"start-electron-nix": "electron-rebuild --version 33.3.1 && npm run prepare-dist && cross-env TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev nix-shell -p electron_33 --run \"electron ./dist/electron-main.js --inspect=5858 .\"",
|
||||
"start-electron-no-dir": "npm run prepare-dist && cross-env TRILIUM_ENV=dev electron --inspect=5858 .",
|
||||
"start-electron-no-dir-nix": "electron-rebuild --version 33.3.1 && npm run prepare-dist && cross-env TRILIUM_ENV=dev nix-shell -p electron_33 --run \"electron ./dist/electron-main.js --inspect=5858 .\"",
|
||||
"qstart-electron": "npm run switch-electron && npm run start-electron",
|
||||
@@ -131,7 +131,7 @@
|
||||
"sanitize-filename": "1.6.3",
|
||||
"sanitize-html": "2.14.0",
|
||||
"sax": "1.4.1",
|
||||
"semver": "7.6.3",
|
||||
"semver": "7.7.0",
|
||||
"serve-favicon": "2.5.0",
|
||||
"session-file-store": "1.5.0",
|
||||
"source-map-support": "0.5.21",
|
||||
@@ -177,7 +177,7 @@
|
||||
"@types/jsdom": "21.1.7",
|
||||
"@types/mime-types": "2.1.4",
|
||||
"@types/multer": "1.4.12",
|
||||
"@types/node": "22.10.10",
|
||||
"@types/node": "22.12.0",
|
||||
"@types/react": "18.3.18",
|
||||
"@types/safe-compare": "1.1.2",
|
||||
"@types/sanitize-html": "2.13.0",
|
||||
@@ -194,7 +194,7 @@
|
||||
"@types/yargs": "17.0.33",
|
||||
"@vitest/coverage-v8": "3.0.4",
|
||||
"cross-env": "7.0.3",
|
||||
"electron": "34.0.1",
|
||||
"electron": "34.0.2",
|
||||
"esm": "3.2.25",
|
||||
"jasmine": "5.5.0",
|
||||
"jsdoc": "4.0.4",
|
||||
|
||||
+2
-2
@@ -35,7 +35,7 @@ app.use((req, res, next) => {
|
||||
return next();
|
||||
});
|
||||
|
||||
if (!utils.isElectron()) {
|
||||
if (!utils.isElectron) {
|
||||
app.use(compression()); // HTTP compression
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ await import("./services/scheduler.js");
|
||||
|
||||
startScheduledCleanup();
|
||||
|
||||
if (utils.isElectron()) {
|
||||
if (utils.isElectron) {
|
||||
(await import("@electron/remote/main/index.js")).initialize();
|
||||
}
|
||||
|
||||
|
||||
@@ -124,6 +124,10 @@ function escapeHtml(str: string) {
|
||||
return str.replace(/[&<>"'`=\/]/g, (s) => entityMap[s]);
|
||||
}
|
||||
|
||||
export function escapeQuotes(value: string) {
|
||||
return value.replaceAll("\"", """);
|
||||
}
|
||||
|
||||
function formatSize(size: number) {
|
||||
size = Math.max(Math.round(size / 1024), 1);
|
||||
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
import utils from "./services/utils.js";
|
||||
import macInit from "./services/mac_init.js";
|
||||
|
||||
macInit.init();
|
||||
|
||||
function SetupModel() {
|
||||
if (syncInProgress) {
|
||||
setInterval(checkOutstandingSyncs, 1000);
|
||||
}
|
||||
|
||||
const serverAddress = `${location.protocol}//${location.host}`;
|
||||
|
||||
$("#current-host").html(serverAddress);
|
||||
|
||||
this.step = ko.observable(syncInProgress ? "sync-in-progress" : "setup-type");
|
||||
this.setupType = ko.observable();
|
||||
|
||||
this.setupNewDocument = ko.observable(false);
|
||||
this.setupSyncFromDesktop = ko.observable(false);
|
||||
this.setupSyncFromServer = ko.observable(false);
|
||||
|
||||
this.syncServerHost = ko.observable();
|
||||
this.syncProxy = ko.observable();
|
||||
this.password = ko.observable();
|
||||
|
||||
this.setupTypeSelected = () => !!this.setupType();
|
||||
|
||||
this.selectSetupType = () => {
|
||||
if (this.setupType() === "new-document") {
|
||||
this.step("new-document-in-progress");
|
||||
|
||||
$.post("api/setup/new-document").then(() => {
|
||||
window.location.replace("./setup");
|
||||
});
|
||||
} else {
|
||||
this.step(this.setupType());
|
||||
}
|
||||
};
|
||||
|
||||
this.back = () => {
|
||||
this.step("setup-type");
|
||||
|
||||
this.setupType("");
|
||||
};
|
||||
|
||||
this.finish = async () => {
|
||||
const syncServerHost = this.syncServerHost();
|
||||
const syncProxy = this.syncProxy();
|
||||
const password = this.password();
|
||||
|
||||
if (!syncServerHost) {
|
||||
showAlert("Trilium server address can't be empty");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!password) {
|
||||
showAlert("Password can't be empty");
|
||||
return;
|
||||
}
|
||||
|
||||
// not using server.js because it loads too many dependencies
|
||||
const resp = await $.post("api/setup/sync-from-server", {
|
||||
syncServerHost: syncServerHost,
|
||||
syncProxy: syncProxy,
|
||||
password: password
|
||||
});
|
||||
|
||||
if (resp.result === "success") {
|
||||
this.step("sync-in-progress");
|
||||
|
||||
setInterval(checkOutstandingSyncs, 1000);
|
||||
|
||||
hideAlert();
|
||||
} else {
|
||||
showAlert(`Sync setup failed: ${resp.error}`);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
async function checkOutstandingSyncs() {
|
||||
const { outstandingPullCount, initialized } = await $.get("api/sync/stats");
|
||||
|
||||
if (initialized) {
|
||||
if (utils.isElectron()) {
|
||||
const remote = utils.dynamicRequire("@electron/remote");
|
||||
remote.app.relaunch();
|
||||
remote.app.exit(0);
|
||||
} else {
|
||||
utils.reloadFrontendApp();
|
||||
}
|
||||
} else {
|
||||
$("#outstanding-syncs").html(outstandingPullCount);
|
||||
}
|
||||
}
|
||||
|
||||
function showAlert(message) {
|
||||
$("#alert").html(message);
|
||||
$("#alert").show();
|
||||
}
|
||||
|
||||
function hideAlert() {
|
||||
$("#alert").hide();
|
||||
}
|
||||
|
||||
ko.applyBindings(new SetupModel(), document.getElementById("setup-dialog"));
|
||||
|
||||
$("#setup-dialog").show();
|
||||
@@ -0,0 +1,130 @@
|
||||
import utils from "./services/utils.js";
|
||||
import macInit from "./services/mac_init.js";
|
||||
import ko from "knockout";
|
||||
|
||||
macInit.init();
|
||||
|
||||
// TriliumNextTODO: properly make use of below types
|
||||
// type SetupModelSetupType = "new-document" | "sync-from-desktop" | "sync-from-server" | "";
|
||||
// type SetupModelStep = "sync-in-progress" | "setup-type" | "new-document-in-progress" | "sync-from-desktop";
|
||||
|
||||
class SetupModel {
|
||||
syncInProgress: boolean;
|
||||
step: ko.Observable<string>;
|
||||
setupType: ko.Observable<string>;
|
||||
setupNewDocument: ko.Observable<boolean>;
|
||||
setupSyncFromDesktop: ko.Observable<boolean>;
|
||||
setupSyncFromServer: ko.Observable<boolean>;
|
||||
syncServerHost: ko.Observable<string | undefined>;
|
||||
syncProxy: ko.Observable<string | undefined>;
|
||||
password: ko.Observable<string | undefined>;
|
||||
|
||||
constructor(syncInProgress: boolean) {
|
||||
this.syncInProgress = syncInProgress;
|
||||
this.step = ko.observable(syncInProgress ? "sync-in-progress" : "setup-type");
|
||||
this.setupType = ko.observable("");
|
||||
this.setupNewDocument = ko.observable(false);
|
||||
this.setupSyncFromDesktop = ko.observable(false);
|
||||
this.setupSyncFromServer = ko.observable(false);
|
||||
this.syncServerHost = ko.observable();
|
||||
this.syncProxy = ko.observable();
|
||||
this.password = ko.observable();
|
||||
|
||||
if (this.syncInProgress) {
|
||||
setInterval(checkOutstandingSyncs, 1000);
|
||||
}
|
||||
const serverAddress = `${location.protocol}//${location.host}`;
|
||||
$("#current-host").html(serverAddress);
|
||||
}
|
||||
|
||||
// this is called in setup.ejs
|
||||
setupTypeSelected() {
|
||||
return !!this.setupType();
|
||||
}
|
||||
|
||||
selectSetupType() {
|
||||
if (this.setupType() === "new-document") {
|
||||
this.step("new-document-in-progress");
|
||||
|
||||
$.post("api/setup/new-document").then(() => {
|
||||
window.location.replace("./setup");
|
||||
});
|
||||
} else {
|
||||
this.step(this.setupType());
|
||||
}
|
||||
}
|
||||
|
||||
back() {
|
||||
this.step("setup-type");
|
||||
this.setupType("");
|
||||
}
|
||||
|
||||
async finish() {
|
||||
const syncServerHost = this.syncServerHost();
|
||||
const syncProxy = this.syncProxy();
|
||||
const password = this.password();
|
||||
|
||||
if (!syncServerHost) {
|
||||
showAlert("Trilium server address can't be empty");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!password) {
|
||||
showAlert("Password can't be empty");
|
||||
return;
|
||||
}
|
||||
|
||||
// not using server.js because it loads too many dependencies
|
||||
const resp = await $.post("api/setup/sync-from-server", {
|
||||
syncServerHost: syncServerHost,
|
||||
syncProxy: syncProxy,
|
||||
password: password
|
||||
});
|
||||
|
||||
if (resp.result === "success") {
|
||||
this.step("sync-in-progress");
|
||||
|
||||
setInterval(checkOutstandingSyncs, 1000);
|
||||
|
||||
hideAlert();
|
||||
} else {
|
||||
showAlert(`Sync setup failed: ${resp.error}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function checkOutstandingSyncs() {
|
||||
const { outstandingPullCount, initialized } = await $.get("api/sync/stats");
|
||||
|
||||
if (initialized) {
|
||||
if (utils.isElectron()) {
|
||||
const remote = utils.dynamicRequire("@electron/remote");
|
||||
remote.app.relaunch();
|
||||
remote.app.exit(0);
|
||||
} else {
|
||||
utils.reloadFrontendApp();
|
||||
}
|
||||
} else {
|
||||
$("#outstanding-syncs").html(outstandingPullCount);
|
||||
}
|
||||
}
|
||||
|
||||
function showAlert(message: string) {
|
||||
$("#alert").text(message);
|
||||
$("#alert").show();
|
||||
}
|
||||
|
||||
function hideAlert() {
|
||||
$("#alert").hide();
|
||||
}
|
||||
|
||||
function getSyncInProgress() {
|
||||
const el = document.getElementById("syncInProgress");
|
||||
if (!el || !(el instanceof HTMLMetaElement)) return false;
|
||||
return !!parseInt(el.content);
|
||||
}
|
||||
|
||||
addEventListener("DOMContentLoaded", (event) => {
|
||||
ko.applyBindings(new SetupModel(getSyncInProgress()), document.getElementById("setup-dialog"));
|
||||
$("#setup-dialog").show();
|
||||
});
|
||||
@@ -14,6 +14,7 @@ import type AttributeDetailWidget from "./attribute_detail.js";
|
||||
import type { CommandData, EventData, EventListener, FilteredCommandNames } from "../../components/app_context.js";
|
||||
import type { default as FAttribute, AttributeType } from "../../entities/fattribute.js";
|
||||
import type FNote from "../../entities/fnote.js";
|
||||
import { escapeQuotes } from "../../services/utils.js";
|
||||
|
||||
const HELP_TEXT = `
|
||||
<p>${t("attribute_editor.help_text_body1")}</p>
|
||||
@@ -76,8 +77,8 @@ const TPL = `
|
||||
|
||||
<div class="attribute-list-editor" tabindex="200"></div>
|
||||
|
||||
<div class="bx bx-save save-attributes-button" title="${t("attribute_editor.save_attributes")}"></div>
|
||||
<div class="bx bx-plus add-new-attribute-button" title="${t("attribute_editor.add_a_new_attribute")}"></div>
|
||||
<div class="bx bx-save save-attributes-button" title="${escapeQuotes(t("attribute_editor.save_attributes"))}"></div>
|
||||
<div class="bx bx-plus add-new-attribute-button" title="${escapeQuotes(t("attribute_editor.add_a_new_attribute"))}"></div>
|
||||
|
||||
<div class="attribute-errors" style="display: none;"></div>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import utils from "../../services/utils.js";
|
||||
import utils, { escapeQuotes } from "../../services/utils.js";
|
||||
import treeService from "../../services/tree.js";
|
||||
import importService from "../../services/import.js";
|
||||
import options from "../../services/options.js";
|
||||
@@ -27,21 +27,21 @@ const TPL = `
|
||||
<strong>${t("import.options")}:</strong>
|
||||
|
||||
<div class="checkbox">
|
||||
<label data-bs-toggle="tooltip" title="${t("import.safeImportTooltip")}">
|
||||
<label data-bs-toggle="tooltip" title="${escapeQuotes(t("import.safeImportTooltip"))}">
|
||||
<input class="safe-import-checkbox" value="1" type="checkbox" checked>
|
||||
<span>${t("import.safeImport")}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="checkbox">
|
||||
<label data-bs-toggle="tooltip" title="${t("import.explodeArchivesTooltip")}">
|
||||
<label data-bs-toggle="tooltip" title="${escapeQuotes(t("import.explodeArchivesTooltip"))}">
|
||||
<input class="explode-archives-checkbox" value="1" type="checkbox" checked>
|
||||
<span>${t("import.explodeArchives")}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="checkbox">
|
||||
<label data-bs-toggle="tooltip" title="${t("import.shrinkImagesTooltip")}">
|
||||
<label data-bs-toggle="tooltip" title="${escapeQuotes(t("import.shrinkImagesTooltip"))}">
|
||||
<input class="shrink-images-checkbox" value="1" type="checkbox" checked> <span>${t("import.shrinkImages")}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { t } from "../../services/i18n.js";
|
||||
import utils from "../../services/utils.js";
|
||||
import utils, { escapeQuotes } from "../../services/utils.js";
|
||||
import treeService from "../../services/tree.js";
|
||||
import importService from "../../services/import.js";
|
||||
import options from "../../services/options.js";
|
||||
@@ -24,7 +24,7 @@ const TPL = `
|
||||
<div class="form-group">
|
||||
<strong>${t("upload_attachments.options")}:</strong>
|
||||
<div class="checkbox">
|
||||
<label data-bs-toggle="tooltip" title="${t("upload_attachments.tooltip")}">
|
||||
<label data-bs-toggle="tooltip" title="${escapeQuotes(t("upload_attachments.tooltip"))}">
|
||||
<input class="shrink-images-checkbox form-check-input" value="1" type="checkbox" checked> <span>${t("upload_attachments.shrink_images")}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@@ -147,11 +147,14 @@ export default class NoteDetailWidget extends NoteContextAwareWidget {
|
||||
*/
|
||||
checkFullHeight() {
|
||||
// https://github.com/zadam/trilium/issues/2522
|
||||
this.$widget.toggleClass(
|
||||
"full-height",
|
||||
(!this.noteContext.hasNoteList() && ["canvas", "webView", "noteMap", "mindMap", "geoMap"].includes(this.type) && this.mime !== "text/x-sqlite;schema=trilium") ||
|
||||
this.noteContext.viewScope.viewMode === "attachments"
|
||||
);
|
||||
const isBackendNote = this.noteContext?.noteId === "_backendLog";
|
||||
const isSqlNote = this.mime === "text/x-sqlite;schema=trilium";
|
||||
const isFullHeightNoteType = ["canvas", "webView", "noteMap", "mindMap", "geoMap"].includes(this.type);
|
||||
const isFullHeight = (!this.noteContext.hasNoteList() && isFullHeightNoteType && !isSqlNote)
|
||||
|| this.noteContext.viewScope.viewMode === "attachments"
|
||||
|| isBackendNote;
|
||||
|
||||
this.$widget.toggleClass("full-height", isFullHeight);
|
||||
}
|
||||
|
||||
getTypeWidget() {
|
||||
|
||||
@@ -119,10 +119,8 @@ export default class ClassicEditorToolbar extends NoteContextAwareWidget {
|
||||
#adjustPosition() {
|
||||
let bottom = window.innerHeight - (window.visualViewport?.height || 0);
|
||||
|
||||
if (bottom === 0) {
|
||||
// The keyboard is not visible, align it to the launcher bar instead.
|
||||
bottom = document.getElementById("mobile-bottom-bar")?.offsetHeight || 0;
|
||||
}
|
||||
// When the keyboard is not visible, align it to the launcher bar instead.
|
||||
bottom = Math.max(bottom, document.getElementById("mobile-bottom-bar")?.offsetHeight || 0);
|
||||
|
||||
this.$widget.css("bottom", `${bottom}px`);
|
||||
}
|
||||
|
||||
@@ -3,12 +3,12 @@ import NoteContextAwareWidget from "./note_context_aware_widget.js";
|
||||
|
||||
const TPL = `
|
||||
<div class="switch-widget">
|
||||
<style>
|
||||
<style>
|
||||
.switch-widget {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
/* The switch - the box around the slider */
|
||||
.switch-widget .switch {
|
||||
position: relative;
|
||||
@@ -17,11 +17,11 @@ const TPL = `
|
||||
height: 24px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
.switch-on, .switch-off {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
|
||||
/* The slider */
|
||||
.switch-widget .slider {
|
||||
border-radius: 24px;
|
||||
@@ -34,7 +34,7 @@ const TPL = `
|
||||
background-color: var(--more-accented-background-color);
|
||||
transition: .4s;
|
||||
}
|
||||
|
||||
|
||||
.switch-widget .slider:before {
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
@@ -47,20 +47,20 @@ const TPL = `
|
||||
-webkit-transition: .4s;
|
||||
transition: .4s;
|
||||
}
|
||||
|
||||
|
||||
.switch-widget .slider.checked {
|
||||
background-color: var(--main-text-color);
|
||||
}
|
||||
|
||||
|
||||
.switch-widget .slider.checked:before {
|
||||
transform: translateX(26px);
|
||||
}
|
||||
|
||||
|
||||
.switch-widget .switch-disabled {
|
||||
opacity: 70%;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
||||
.switch-widget .switch-help-button {
|
||||
font-weight: 900;
|
||||
border: 0;
|
||||
@@ -72,9 +72,9 @@ const TPL = `
|
||||
|
||||
<div class="switch-on">
|
||||
<span class="switch-on-name"></span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="switch-on-button">
|
||||
<label class="switch">
|
||||
<span class="slider"></span>
|
||||
@@ -82,19 +82,28 @@ const TPL = `
|
||||
</div>
|
||||
<div class="switch-off">
|
||||
<span class="switch-off-name"></span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="switch-off-button">
|
||||
<label class="switch">
|
||||
<span class="slider checked"></span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
<button class="switch-help-button" type="button" data-help-page="" title="${t("open-help-page")}" style="display: none;">?</button>
|
||||
</div>`;
|
||||
|
||||
export default class SwitchWidget extends NoteContextAwareWidget {
|
||||
|
||||
protected $switchOn!: JQuery<HTMLElement>;
|
||||
protected $switchOnName!: JQuery<HTMLElement>;
|
||||
protected $switchOnButton!: JQuery<HTMLElement>;
|
||||
protected $switchOff!: JQuery<HTMLElement>;
|
||||
protected $switchOffName!: JQuery<HTMLElement>;
|
||||
protected $switchOffButton!: JQuery<HTMLElement>;
|
||||
protected $helpButton!: JQuery<HTMLElement>;
|
||||
|
||||
doRender() {
|
||||
this.$widget = $(TPL);
|
||||
|
||||
@@ -113,7 +122,7 @@ export default class SwitchWidget extends NoteContextAwareWidget {
|
||||
this.$helpButton = this.$widget.find(".switch-help-button");
|
||||
}
|
||||
|
||||
toggle(state) {
|
||||
toggle(state: boolean) {
|
||||
if (state) {
|
||||
this.switchOn();
|
||||
} else {
|
||||
@@ -3,35 +3,36 @@ import BasicWidget from "./basic_widget.js";
|
||||
import ws from "../services/ws.js";
|
||||
import options from "../services/options.js";
|
||||
import syncService from "../services/sync.js";
|
||||
import { escapeQuotes } from "../services/utils.js";
|
||||
|
||||
const TPL = `
|
||||
<div class="sync-status-widget launcher-button">
|
||||
<style>
|
||||
.sync-status-widget {
|
||||
}
|
||||
|
||||
|
||||
.sync-status {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
.sync-status .sync-status-icon {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
top: -5px;
|
||||
font-size: 110%;
|
||||
}
|
||||
|
||||
|
||||
.sync-status .sync-status-sub-icon {
|
||||
font-size: 40%;
|
||||
position: absolute;
|
||||
font-size: 40%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 16px;
|
||||
}
|
||||
|
||||
|
||||
.sync-status .sync-status-icon span {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
|
||||
.sync-status-icon:not(.sync-status-in-progress):hover {
|
||||
background-color: var(--hover-item-background-color);
|
||||
cursor: pointer;
|
||||
@@ -39,31 +40,31 @@ const TPL = `
|
||||
</style>
|
||||
|
||||
<div class="sync-status">
|
||||
<span class="sync-status-icon sync-status-unknown bx bx-time"
|
||||
data-bs-toggle="tooltip"
|
||||
title="${t("sync_status.unknown")}">
|
||||
<span class="sync-status-icon sync-status-unknown bx bx-time"
|
||||
data-bs-toggle="tooltip"
|
||||
title="${escapeQuotes(t("sync_status.unknown"))}">
|
||||
</span>
|
||||
<span class="sync-status-icon sync-status-connected-with-changes bx bx-wifi"
|
||||
data-bs-toggle="tooltip"
|
||||
title="${t("sync_status.connected_with_changes")}">
|
||||
data-bs-toggle="tooltip"
|
||||
title="${escapeQuotes(t("sync_status.connected_with_changes"))}">
|
||||
<span class="bx bxs-star sync-status-sub-icon"></span>
|
||||
</span>
|
||||
<span class="sync-status-icon sync-status-connected-no-changes bx bx-wifi"
|
||||
data-bs-toggle="tooltip"
|
||||
title="${t("sync_status.connected_no_changes")}">
|
||||
<span class="sync-status-icon sync-status-connected-no-changes bx bx-wifi"
|
||||
data-bs-toggle="tooltip"
|
||||
title="${escapeQuotes(t("sync_status.connected_no_changes"))}">
|
||||
</span>
|
||||
<span class="sync-status-icon sync-status-disconnected-with-changes bx bx-wifi-off"
|
||||
data-bs-toggle="tooltip"
|
||||
title="${t("sync_status.disconnected_with_changes")}">
|
||||
data-bs-toggle="tooltip"
|
||||
title="${escapeQuotes(t("sync_status.disconnected_with_changes"))}">
|
||||
<span class="bx bxs-star sync-status-sub-icon"></span>
|
||||
</span>
|
||||
<span class="sync-status-icon sync-status-disconnected-no-changes bx bx-wifi-off"
|
||||
<span class="sync-status-icon sync-status-disconnected-no-changes bx bx-wifi-off"
|
||||
data-bs-toggle="tooltip"
|
||||
title="${t("sync_status.disconnected_no_changes")}">
|
||||
title="${escapeQuotes(t("sync_status.disconnected_no_changes"))}">
|
||||
</span>
|
||||
<span class="sync-status-icon sync-status-in-progress bx bx-analyse bx-spin"
|
||||
<span class="sync-status-icon sync-status-in-progress bx bx-analyse bx-spin"
|
||||
data-bs-toggle="tooltip"
|
||||
title="${t("sync_status.in_progress")}">
|
||||
title="${escapeQuotes(t("sync_status.in_progress"))}">
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+13
-5
@@ -1,13 +1,15 @@
|
||||
import SwitchWidget from "./switch.js";
|
||||
import attributeService from "../services/attributes.js";
|
||||
import { t } from "../services/i18n.js";
|
||||
import type FNote from "../entities/fnote.js";
|
||||
import type { EventData } from "../components/app_context.js";
|
||||
|
||||
/**
|
||||
* Switch for the basic properties widget which allows the user to select whether the note is a template or not, which toggles the `#template` attribute.
|
||||
*/
|
||||
export default class TemplateSwitchWidget extends SwitchWidget {
|
||||
isEnabled() {
|
||||
return super.isEnabled() && !this.noteId.startsWith("_options");
|
||||
return super.isEnabled() && !this.noteId?.startsWith("_options");
|
||||
}
|
||||
|
||||
doRender() {
|
||||
@@ -16,29 +18,35 @@ export default class TemplateSwitchWidget extends SwitchWidget {
|
||||
this.$switchOnName.text(t("template_switch.template"));
|
||||
this.$switchOnButton.attr("title", t("template_switch.toggle-on-hint"));
|
||||
|
||||
this.$switchOffName.text("Template");
|
||||
this.$switchOffName.text(t("template_switch.template"));
|
||||
this.$switchOffButton.attr("title", t("template_switch.toggle-off-hint"));
|
||||
|
||||
this.$helpButton.attr("data-help-page", "template.html").show();
|
||||
}
|
||||
|
||||
async switchOn() {
|
||||
await attributeService.setLabel(this.noteId, "template");
|
||||
if (this.noteId) {
|
||||
await attributeService.setLabel(this.noteId, "template");
|
||||
}
|
||||
}
|
||||
|
||||
async switchOff() {
|
||||
if (!this.note || !this.noteId) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (const templateAttr of this.note.getOwnedLabels("template")) {
|
||||
await attributeService.removeAttributeById(this.noteId, templateAttr.attributeId);
|
||||
}
|
||||
}
|
||||
|
||||
async refreshWithNote(note) {
|
||||
async refreshWithNote(note: FNote) {
|
||||
const isTemplate = note.hasLabel("template");
|
||||
this.$switchOn.toggle(!isTemplate);
|
||||
this.$switchOff.toggle(!!isTemplate);
|
||||
}
|
||||
|
||||
entitiesReloadedEvent({ loadResults }) {
|
||||
entitiesReloadedEvent({ loadResults }: EventData<"entitiesReloaded">) {
|
||||
if (loadResults.getAttributeRows().find((attr) => attr.type === "label" && attr.name === "template" && attr.noteId === this.noteId)) {
|
||||
this.refresh();
|
||||
}
|
||||
@@ -26,6 +26,11 @@
|
||||
border-radius: 2pt !important;
|
||||
}
|
||||
|
||||
span[style] {
|
||||
print-color-adjust: exact;
|
||||
-webkit-print-color-adjust: exact;
|
||||
}
|
||||
|
||||
/* Fix visibility of checkbox checkmarks
|
||||
see https://github.com/TriliumNext/Notes/issues/901 */
|
||||
.ck-editor__editable.ck-content .todo-list .todo-list__label > span[contenteditable="false"] > input[checked]::after {
|
||||
|
||||
@@ -1353,7 +1353,7 @@ body .calendar-dropdown-widget .calendar-body a:hover {
|
||||
}
|
||||
|
||||
/* Item title for deleted notes */
|
||||
.recent-changes-content ul li.deleted-note .note-title {
|
||||
.recent-changes-content ul li.deleted-note .note-title > .note-title {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
|
||||
@@ -195,7 +195,7 @@ function processContent(images: Image[], note: BNote, content: string) {
|
||||
}
|
||||
|
||||
function openNote(req: Request) {
|
||||
if (utils.isElectron()) {
|
||||
if (utils.isElectron) {
|
||||
ws.sendMessageToAllClients({
|
||||
type: "openNote",
|
||||
noteId: req.params.noteId
|
||||
|
||||
@@ -181,7 +181,7 @@ function saveToTmpDir(fileName: string, content: string | Buffer, entityType: st
|
||||
|
||||
log.info(`Saved temporary file ${tmpObj.name}`);
|
||||
|
||||
if (utils.isElectron()) {
|
||||
if (utils.isElectron) {
|
||||
chokidar.watch(tmpObj.name).on("change", (path, stats) => {
|
||||
ws.sendMessageToAllClients({
|
||||
type: "openedFileUpdated",
|
||||
|
||||
@@ -2,11 +2,11 @@ import assetPath from "../services/asset_path.js";
|
||||
import path from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import express from "express";
|
||||
import env from "../services/env.js";
|
||||
import { isDev } from "../services/utils.js";
|
||||
import type serveStatic from "serve-static";
|
||||
|
||||
const persistentCacheStatic = (root: string, options?: serveStatic.ServeStaticOptions<express.Response<any, Record<string, any>>>) => {
|
||||
if (!env.isDev()) {
|
||||
if (!isDev) {
|
||||
options = {
|
||||
maxAge: "1y",
|
||||
...options
|
||||
@@ -17,7 +17,7 @@ const persistentCacheStatic = (root: string, options?: serveStatic.ServeStaticOp
|
||||
|
||||
async function register(app: express.Application) {
|
||||
const srcRoot = path.join(path.dirname(fileURLToPath(import.meta.url)), "..");
|
||||
if (env.isDev()) {
|
||||
if (isDev) {
|
||||
const webpack = (await import("webpack")).default;
|
||||
const webpackMiddleware = (await import("webpack-dev-middleware")).default;
|
||||
const productionConfig = (await import("../../webpack.config.js")).default;
|
||||
@@ -88,8 +88,6 @@ async function register(app: express.Application) {
|
||||
// Deprecated, https://www.npmjs.com/package/autocomplete.js?activeTab=readme
|
||||
app.use(`/${assetPath}/node_modules/autocomplete.js/dist/`, persistentCacheStatic(path.join(srcRoot, "..", "node_modules/autocomplete.js/dist/")));
|
||||
|
||||
app.use(`/${assetPath}/node_modules/knockout/build/output/`, persistentCacheStatic(path.join(srcRoot, "..", "node_modules/knockout/build/output/")));
|
||||
|
||||
app.use(`/${assetPath}/node_modules/normalize.css/`, persistentCacheStatic(path.join(srcRoot, "..", "node_modules/normalize.css/")));
|
||||
|
||||
app.use(`/${assetPath}/node_modules/jquery.fancytree/dist/`, persistentCacheStatic(path.join(srcRoot, "..", "node_modules/jquery.fancytree/dist/")));
|
||||
|
||||
@@ -8,7 +8,7 @@ const doubleCsrfUtilities = doubleCsrf({
|
||||
path: "", // empty, so cookie is valid only for the current path
|
||||
secure: false,
|
||||
sameSite: "strict",
|
||||
httpOnly: !isElectron() // set to false for Electron, see https://github.com/TriliumNext/Notes/pull/966
|
||||
httpOnly: !isElectron // set to false for Electron, see https://github.com/TriliumNext/Notes/pull/966
|
||||
},
|
||||
cookieName: "_csrf"
|
||||
});
|
||||
|
||||
+3
-5
@@ -5,8 +5,7 @@ import attributeService from "../services/attributes.js";
|
||||
import config from "../services/config.js";
|
||||
import optionService from "../services/options.js";
|
||||
import log from "../services/log.js";
|
||||
import env from "../services/env.js";
|
||||
import utils from "../services/utils.js";
|
||||
import { isDev, isElectron } from "../services/utils.js";
|
||||
import protectedSessionService from "../services/protected_session.js";
|
||||
import packageJson from "../../package.json" with { type: "json" };
|
||||
import assetPath from "../services/asset_path.js";
|
||||
@@ -19,7 +18,7 @@ import type BNote from "../becca/entities/bnote.js";
|
||||
function index(req: Request, res: Response) {
|
||||
const options = optionService.getOptionMap();
|
||||
|
||||
const view = !utils.isElectron() && req.cookies["trilium-device"] === "mobile" ? "mobile" : "desktop";
|
||||
const view = !isElectron && req.cookies["trilium-device"] === "mobile" ? "mobile" : "desktop";
|
||||
|
||||
//'overwrite' set to false (default) => the existing token will be re-used and validated
|
||||
//'validateOnReuse' set to false => if validation fails, generate a new token instead of throwing an error
|
||||
@@ -34,7 +33,6 @@ function index(req: Request, res: Response) {
|
||||
const theme = options.theme;
|
||||
const themeNote = attributeService.getNoteWithLabel("appTheme", theme);
|
||||
|
||||
const isElectron = utils.isElectron();
|
||||
res.render(view, {
|
||||
device: view,
|
||||
csrfToken: csrfToken,
|
||||
@@ -53,7 +51,7 @@ function index(req: Request, res: Response) {
|
||||
maxEntityChangeSyncIdAtLoad: sql.getValue("SELECT COALESCE(MAX(id), 0) FROM entity_changes WHERE isSynced = 1"),
|
||||
instanceName: config.General ? config.General.instanceName : null,
|
||||
appCssNoteIds: getAppCssNoteIds(),
|
||||
isDev: env.isDev(),
|
||||
isDev,
|
||||
isMainWindow: view === "mobile" ? true : !req.query.extraWindow,
|
||||
isProtectedSessionAvailable: protectedSessionService.isProtectedSessionAvailable(),
|
||||
maxContentWidth: Math.max(640, parseInt(options.maxContentWidth)),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
import utils from "../services/utils.js";
|
||||
import { isElectron } from "../services/utils.js";
|
||||
import multer from "multer";
|
||||
import log from "../services/log.js";
|
||||
import express from "express";
|
||||
@@ -280,7 +280,7 @@ function register(app: express.Application) {
|
||||
apiRoute(DEL, "/api/etapi-tokens/:etapiTokenId", etapiTokensApiRoutes.deleteToken);
|
||||
|
||||
// in case of local electron, local calls are allowed unauthenticated, for server they need auth
|
||||
const clipperMiddleware = utils.isElectron() ? [] : [auth.checkEtapiToken];
|
||||
const clipperMiddleware = isElectron ? [] : [auth.checkEtapiToken];
|
||||
|
||||
route(GET, "/api/clipper/handshake", clipperMiddleware, clipperRoute.handshake, apiResultHandler);
|
||||
route(PST, "/api/clipper/clippings", clipperMiddleware, clipperRoute.addClipping, apiResultHandler);
|
||||
|
||||
+2
-2
@@ -2,14 +2,14 @@
|
||||
|
||||
import sqlInit from "../services/sql_init.js";
|
||||
import setupService from "../services/setup.js";
|
||||
import utils from "../services/utils.js";
|
||||
import { isElectron } from "../services/utils.js";
|
||||
import assetPath from "../services/asset_path.js";
|
||||
import appPath from "../services/app_path.js";
|
||||
import type { Request, Response } from "express";
|
||||
|
||||
function setupPage(req: Request, res: Response) {
|
||||
if (sqlInit.isDbInitialized()) {
|
||||
if (utils.isElectron()) {
|
||||
if (isElectron) {
|
||||
handleElectronRedirect();
|
||||
} else {
|
||||
res.redirect(".");
|
||||
|
||||
@@ -23,7 +23,7 @@ Terminal=false
|
||||
* We overwrite this file during every run as it might have been updated.
|
||||
*/
|
||||
function installLocalAppIcon() {
|
||||
if (!isElectron() || ["win32", "darwin"].includes(os.platform()) || (config.General && config.General.noDesktopIcon)) {
|
||||
if (!isElectron || ["win32", "darwin"].includes(os.platform()) || (config.General && config.General.noDesktopIcon)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import assetPath from "./asset_path.js";
|
||||
import env from "./env.js";
|
||||
import { isDev } from "./utils.js";
|
||||
|
||||
export default env.isDev() ? assetPath + "/app" : assetPath + "/app-dist";
|
||||
export default isDev ? assetPath + "/app" : assetPath + "/app-dist";
|
||||
@@ -14,7 +14,7 @@ const noAuthentication = config.General && config.General.noAuthentication === t
|
||||
function checkAuth(req: Request, res: Response, next: NextFunction) {
|
||||
if (!sqlInit.isDbInitialized()) {
|
||||
res.redirect("setup");
|
||||
} else if (!req.session.loggedIn && !isElectron() && !noAuthentication) {
|
||||
} else if (!req.session.loggedIn && !isElectron && !noAuthentication) {
|
||||
res.redirect("login");
|
||||
} else {
|
||||
next();
|
||||
@@ -24,7 +24,7 @@ function checkAuth(req: Request, res: Response, next: NextFunction) {
|
||||
// for electron things which need network stuff
|
||||
// currently, we're doing that for file upload because handling form data seems to be difficult
|
||||
function checkApiAuthOrElectron(req: Request, res: Response, next: NextFunction) {
|
||||
if (!req.session.loggedIn && !isElectron() && !noAuthentication) {
|
||||
if (!req.session.loggedIn && !isElectron && !noAuthentication) {
|
||||
reject(req, res, "Logged in session not found");
|
||||
} else {
|
||||
next();
|
||||
@@ -48,7 +48,7 @@ function checkAppInitialized(req: Request, res: Response, next: NextFunction) {
|
||||
}
|
||||
|
||||
function checkPasswordSet(req: Request, res: Response, next: NextFunction) {
|
||||
if (!isElectron() && !passwordService.isPasswordSet()) {
|
||||
if (!isElectron && !passwordService.isPasswordSet()) {
|
||||
res.redirect("set-password");
|
||||
} else {
|
||||
next();
|
||||
@@ -56,7 +56,7 @@ function checkPasswordSet(req: Request, res: Response, next: NextFunction) {
|
||||
}
|
||||
|
||||
function checkPasswordNotSet(req: Request, res: Response, next: NextFunction) {
|
||||
if (!isElectron() && passwordService.isPasswordSet()) {
|
||||
if (!isElectron && passwordService.isPasswordSet()) {
|
||||
res.redirect("login");
|
||||
} else {
|
||||
next();
|
||||
|
||||
@@ -8,8 +8,7 @@ import fs from "fs";
|
||||
import themeNames from "./code_block_theme_names.json" with { type: "json" };
|
||||
import { t } from "i18next";
|
||||
import { join } from "path";
|
||||
import { isElectron, getResourceDir } from "./utils.js";
|
||||
import env from "./env.js";
|
||||
import { isDev, isElectron, getResourceDir } from "./utils.js";
|
||||
|
||||
/**
|
||||
* Represents a color scheme for the code block syntax highlight.
|
||||
@@ -46,7 +45,7 @@ export function listSyntaxHighlightingThemes() {
|
||||
}
|
||||
|
||||
function getStylesDirectory() {
|
||||
if (isElectron() && !env.isDev()) {
|
||||
if (isElectron && !isDev) {
|
||||
return "styles";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
function isDev() {
|
||||
return !!(process.env.TRILIUM_ENV && process.env.TRILIUM_ENV === "dev");
|
||||
}
|
||||
|
||||
export default {
|
||||
isDev
|
||||
};
|
||||
@@ -2,13 +2,10 @@
|
||||
|
||||
import optionService from "./options.js";
|
||||
import log from "./log.js";
|
||||
import { isElectron as getIsElectron, isMac as getIsMac } from "./utils.js";
|
||||
import { isElectron, isMac } from "./utils.js";
|
||||
import type { KeyboardShortcut } from "./keyboard_actions_interface.js";
|
||||
import { t } from "i18next";
|
||||
|
||||
const isMac = getIsMac();
|
||||
const isElectron = getIsElectron();
|
||||
|
||||
function getDefaultKeyboardActions() {
|
||||
if (!t("keyboard_actions.note-navigation")) {
|
||||
throw new Error("Keyboard actions loaded before translations.");
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ const MINUTE = 60 * SECOND;
|
||||
const HOUR = 60 * MINUTE;
|
||||
const DAY = 24 * HOUR;
|
||||
|
||||
const NEW_LINE = isWindows() ? "\r\n" : "\n";
|
||||
const NEW_LINE = isWindows ? "\r\n" : "\n";
|
||||
|
||||
let todaysMidnight!: Date;
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ const defaultOptions: DefaultOption[] = [
|
||||
{ name: "revisionSnapshotTimeInterval", value: "600", isSynced: true },
|
||||
{ name: "revisionSnapshotNumberLimit", value: "-1", isSynced: true },
|
||||
{ name: "protectedSessionTimeout", value: "600", isSynced: true },
|
||||
{ name: "zoomFactor", value: isWindows() ? "0.9" : "1.0", isSynced: false },
|
||||
{ name: "zoomFactor", value: isWindows ? "0.9" : "1.0", isSynced: false },
|
||||
{ name: "overrideThemeFonts", value: "false", isSynced: false },
|
||||
{ name: "mainFontFamily", value: "theme", isSynced: false },
|
||||
{ name: "mainFontSize", value: "100", isSynced: false },
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import config from "./config.js";
|
||||
import { isElectron } from "./utils.js";
|
||||
import env from "./env.js";
|
||||
import { isDev, isElectron } from "./utils.js";
|
||||
import dataDir from "./data_dir.js";
|
||||
|
||||
function parseAndValidate(portStr: string, source: string) {
|
||||
@@ -18,8 +17,8 @@ let port: number;
|
||||
|
||||
if (process.env.TRILIUM_PORT) {
|
||||
port = parseAndValidate(process.env.TRILIUM_PORT, "environment variable TRILIUM_PORT");
|
||||
} else if (isElectron()) {
|
||||
port = env.isDev() ? 37740 : 37840;
|
||||
} else if (isElectron) {
|
||||
port = isDev ? 37740 : 37840;
|
||||
} else {
|
||||
port = parseAndValidate(config["Network"]["port"] || "3000", `Network.port in ${dataDir.CONFIG_INI_PATH}`);
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ async function getProxyAgent(opts: ClientOpts) {
|
||||
async function getClient(opts: ClientOpts): Promise<Client> {
|
||||
// it's not clear how to explicitly configure proxy (as opposed to system proxy),
|
||||
// so in that case, we always use node's modules
|
||||
if (isElectron() && !opts.proxy) {
|
||||
if (isElectron && !opts.proxy) {
|
||||
return (await import("electron")).net as Client;
|
||||
} else {
|
||||
const { protocol } = url.parse(opts.url);
|
||||
|
||||
@@ -37,7 +37,7 @@ function isDbInitialized() {
|
||||
|
||||
async function initDbConnection() {
|
||||
if (!isDbInitialized()) {
|
||||
log.info(`DB not initialized, please visit setup page` + (isElectron() ? "" : ` - http://[your-server-host]:${port} to see instructions on how to initialize Trilium.`));
|
||||
log.info(`DB not initialized, please visit setup page` + (isElectron ? "" : ` - http://[your-server-host]:${port} to see instructions on how to initialize Trilium.`));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
+10
-15
@@ -8,11 +8,18 @@ import sanitize from "sanitize-filename";
|
||||
import mimeTypes from "mime-types";
|
||||
import path from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import env from "./env.js";
|
||||
import { dirname, join } from "path";
|
||||
|
||||
const randtoken = generator({ source: "crypto" });
|
||||
|
||||
export const isMac = process.platform === "darwin";
|
||||
|
||||
export const isWindows = process.platform === "win32";
|
||||
|
||||
export const isElectron = !!process.versions["electron"];
|
||||
|
||||
export const isDev = !!(process.env.TRILIUM_ENV && process.env.TRILIUM_ENV === "dev");
|
||||
|
||||
export function newEntityId() {
|
||||
return randomString(12);
|
||||
}
|
||||
@@ -58,10 +65,6 @@ export function hmac(secret: any, value: any) {
|
||||
return hmac.digest("base64");
|
||||
}
|
||||
|
||||
export function isElectron() {
|
||||
return !!process.versions["electron"];
|
||||
}
|
||||
|
||||
export function hash(text: string) {
|
||||
text = text.normalize();
|
||||
|
||||
@@ -128,7 +131,7 @@ export function escapeRegExp(str: string) {
|
||||
}
|
||||
|
||||
export async function crash() {
|
||||
if (isElectron()) {
|
||||
if (isElectron) {
|
||||
(await import("electron")).app.exit(1);
|
||||
} else {
|
||||
process.exit(1);
|
||||
@@ -314,21 +317,13 @@ export function envToBoolean(val: string | undefined) {
|
||||
* @returns the resource dir.
|
||||
*/
|
||||
export function getResourceDir() {
|
||||
if (isElectron() && !env.isDev()) {
|
||||
if (isElectron && !isDev) {
|
||||
return process.resourcesPath;
|
||||
} else {
|
||||
return join(dirname(fileURLToPath(import.meta.url)), "..", "..");
|
||||
}
|
||||
}
|
||||
|
||||
export function isMac() {
|
||||
return process.platform === "darwin";
|
||||
}
|
||||
|
||||
export function isWindows() {
|
||||
return process.platform === "win32";
|
||||
}
|
||||
|
||||
export default {
|
||||
randomSecureToken,
|
||||
randomString,
|
||||
|
||||
@@ -2,7 +2,6 @@ import path from "path";
|
||||
import url from "url";
|
||||
import port from "./port.js";
|
||||
import optionService from "./options.js";
|
||||
import env from "./env.js";
|
||||
import log from "./log.js";
|
||||
import sqlInit from "./sql_init.js";
|
||||
import cls from "./cls.js";
|
||||
@@ -10,7 +9,7 @@ import keyboardActionsService from "./keyboard_actions.js";
|
||||
import remoteMain from "@electron/remote/main/index.js";
|
||||
import type { App, BrowserWindow, BrowserWindowConstructorOptions, WebContents } from "electron";
|
||||
import { ipcMain } from "electron";
|
||||
import { isMac, isWindows } from "./utils.js";
|
||||
import { isDev, isMac, isWindows } from "./utils.js";
|
||||
|
||||
import { fileURLToPath } from "url";
|
||||
import { dirname } from "path";
|
||||
@@ -116,10 +115,10 @@ function getWindowExtraOpts() {
|
||||
const extraOpts: Partial<BrowserWindowConstructorOptions> = {};
|
||||
|
||||
if (!optionService.getOptionBool("nativeTitleBarVisible")) {
|
||||
if (isMac()) {
|
||||
if (isMac) {
|
||||
extraOpts.titleBarStyle = "hiddenInset";
|
||||
extraOpts.titleBarOverlay = true;
|
||||
} else if (isWindows()) {
|
||||
} else if (isWindows) {
|
||||
extraOpts.titleBarStyle = "hidden";
|
||||
extraOpts.titleBarOverlay = true;
|
||||
} else {
|
||||
@@ -129,7 +128,7 @@ function getWindowExtraOpts() {
|
||||
}
|
||||
|
||||
// Window effects (Mica)
|
||||
if (optionService.getOptionBool("backgroundEffects") && isWindows()) {
|
||||
if (optionService.getOptionBool("backgroundEffects") && isWindows) {
|
||||
extraOpts.backgroundMaterial = "auto";
|
||||
}
|
||||
|
||||
@@ -169,7 +168,7 @@ function configureWebContents(webContents: WebContents, spellcheckEnabled: boole
|
||||
}
|
||||
|
||||
function getIcon() {
|
||||
return path.join(dirname(fileURLToPath(import.meta.url)), "../../images/app-icons/png/256x256" + (env.isDev() ? "-dev" : "") + ".png");
|
||||
return path.join(dirname(fileURLToPath(import.meta.url)), "../../images/app-icons/png/256x256" + (isDev ? "-dev" : "") + ".png");
|
||||
}
|
||||
|
||||
async function createSetupWindow() {
|
||||
|
||||
+4
-5
@@ -1,5 +1,5 @@
|
||||
import { WebSocketServer as WebSocketServer, WebSocket } from "ws";
|
||||
import { isElectron, randomString } from "./utils.js";
|
||||
import { isDev, isElectron, randomString } from "./utils.js";
|
||||
import log from "./log.js";
|
||||
import sql from "./sql.js";
|
||||
import cls from "./cls.js";
|
||||
@@ -9,16 +9,15 @@ import protectedSessionService from "./protected_session.js";
|
||||
import becca from "../becca/becca.js";
|
||||
import AbstractBeccaEntity from "../becca/entities/abstract_becca_entity.js";
|
||||
|
||||
import env from "./env.js";
|
||||
import type { IncomingMessage, Server as HttpServer } from "http";
|
||||
import type { EntityChange } from "./entity_changes_interface.js";
|
||||
|
||||
if (env.isDev()) {
|
||||
if (isDev) {
|
||||
const chokidar = (await import("chokidar")).default;
|
||||
const debounce = (await import("debounce")).default;
|
||||
const debouncedReloadFrontend = debounce(() => reloadFrontend("source code change"), 200);
|
||||
chokidar
|
||||
.watch(isElectron() ? "dist/src/public" : "src/public")
|
||||
.watch(isElectron ? "dist/src/public" : "src/public")
|
||||
.on("add", debouncedReloadFrontend)
|
||||
.on("change", debouncedReloadFrontend)
|
||||
.on("unlink", debouncedReloadFrontend);
|
||||
@@ -62,7 +61,7 @@ function init(httpServer: HttpServer, sessionParser: SessionParser) {
|
||||
webSocketServer = new WebSocketServer({
|
||||
verifyClient: (info, done) => {
|
||||
sessionParser(info.req, {}, () => {
|
||||
const allowed = isElectron() || (info.req as any).session.loggedIn || (config.General && config.General.noAuthentication);
|
||||
const allowed = isElectron || (info.req as any).session.loggedIn || (config.General && config.General.noAuthentication);
|
||||
|
||||
if (!allowed) {
|
||||
log.error("WebSocket connection not allowed because session is neither electron nor logged in.");
|
||||
|
||||
@@ -4,6 +4,7 @@ import assetPath from "../services/asset_path.js";
|
||||
import shareRoot from "./share_root.js";
|
||||
import escapeHtml from "escape-html";
|
||||
import type SNote from "./shaca/entities/snote.js";
|
||||
import { t } from "i18next";
|
||||
|
||||
/**
|
||||
* Represents the output of the content renderer.
|
||||
@@ -43,7 +44,7 @@ function getContent(note: SNote) {
|
||||
} else if (note.type === "book") {
|
||||
result.isEmpty = true;
|
||||
} else {
|
||||
result.content = "<p>This note type cannot be displayed.</p>";
|
||||
result.content = `<p>${t("content_renderer.note-cannot-be-displayed")}</p>`;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
+21
-19
@@ -3,6 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta id="syncInProgress" content="<%= syncInProgress ? 1 : 0 %>" />
|
||||
<title><%= t("setup.title") %></title>
|
||||
|
||||
<style>
|
||||
@@ -53,20 +54,23 @@
|
||||
</div>
|
||||
|
||||
<div id="setup-type" data-bind="visible: step() == 'setup-type'" style="margin-top: 20px;">
|
||||
<div class="radio" style="margin-bottom: 15px;">
|
||||
<label><input type="radio" name="setup-type" value="new-document" data-bind="checked: setupType">
|
||||
<%= t("setup.new-document") %></label>
|
||||
</div>
|
||||
<div class="radio" style="margin-bottom: 15px;">
|
||||
<label><input type="radio" name="setup-type" value="sync-from-desktop" data-bind="checked: setupType">
|
||||
<%= t("setup.sync-from-desktop") %></label>
|
||||
</div>
|
||||
<div class="radio" style="margin-bottom: 15px;">
|
||||
<label><input type="radio" name="setup-type" value="sync-from-server" data-bind="checked: setupType">
|
||||
<%= t("setup.sync-from-server") %></label>
|
||||
</div>
|
||||
<form data-bind="submit: selectSetupType">
|
||||
|
||||
<button type="button" data-bind="disable: !setupTypeSelected(), click: selectSetupType" class="btn btn-primary"><%= t("setup.next") %></button>
|
||||
<div class="radio" style="margin-bottom: 15px;">
|
||||
<label><input type="radio" name="setup-type" value="new-document" data-bind="checked: setupType"">
|
||||
<%= t("setup.new-document") %></label>
|
||||
</div>
|
||||
<div class="radio" style="margin-bottom: 15px;">
|
||||
<label><input type="radio" name="setup-type" value="sync-from-desktop" data-bind="checked: setupType">
|
||||
<%= t("setup.sync-from-desktop") %></label>
|
||||
</div>
|
||||
<div class="radio" style="margin-bottom: 15px;">
|
||||
<label><input type="radio" name="setup-type" value="sync-from-server" data-bind="checked: setupType"">
|
||||
<%= t("setup.sync-from-server") %></label>
|
||||
</div>
|
||||
|
||||
<button type="submit" data-bind="disable: !setupTypeSelected()" class="btn btn-primary"><%= t("setup.next") %></button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div data-bind="visible: step() == 'new-document-in-progress'">
|
||||
@@ -104,6 +108,8 @@
|
||||
</div>
|
||||
|
||||
<div data-bind="visible: step() == 'sync-from-server'">
|
||||
<form data-bind="submit: finish">
|
||||
|
||||
<h2><%= t("setup_sync-from-server.heading") %></h2>
|
||||
|
||||
<p><%= t("setup_sync-from-server.instructions") %></p>
|
||||
@@ -125,9 +131,9 @@
|
||||
|
||||
<button type="button" data-bind="click: back" class="btn btn-secondary"><%= t("setup_sync-from-server.back") %></button>
|
||||
|
||||
|
||||
<button type="submit" class="btn btn-primary"><%= t("setup_sync-from-server.finish-setup") %></button>
|
||||
</form>
|
||||
|
||||
<button type="button" data-bind="click: finish" class="btn btn-primary"><%= t("setup_sync-from-server.finish-setup") %></button>
|
||||
</div>
|
||||
|
||||
<div data-bind="visible: step() == 'sync-in-progress'">
|
||||
@@ -146,8 +152,6 @@
|
||||
window.glob = {
|
||||
componentId: ''
|
||||
};
|
||||
|
||||
window.syncInProgress = <%= syncInProgress ? 'true' : 'false' %>;
|
||||
</script>
|
||||
|
||||
<!-- Required for correct loading of scripts in Electron -->
|
||||
@@ -159,8 +163,6 @@
|
||||
<link href="<%= assetPath %>/node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<script src="<%= assetPath %>/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
<script src="<%= assetPath %>/node_modules/knockout/build/output/knockout-latest.js"></script>
|
||||
|
||||
<script src="<%= appPath %>/setup.js" crossorigin type="module"></script>
|
||||
<link href="<%= assetPath %>/stylesheets/theme-light.css" rel="stylesheet" />
|
||||
<link href="<%= assetPath %>/stylesheets/theme-next.css" rel="stylesheet" />
|
||||
|
||||
+3
-3
@@ -53,7 +53,7 @@ async function startTrilium() {
|
||||
* its startup is slower than focusing the existing process/window. So in the end, it works out without having
|
||||
* to do a complex evaluation.
|
||||
*/
|
||||
if (utils.isElectron()) {
|
||||
if (utils.isElectron) {
|
||||
(await import("electron")).app.requestSingleInstanceLock();
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ async function startTrilium() {
|
||||
|
||||
ws.init(httpServer, sessionParser as any); // TODO: Not sure why session parser is incompatible.
|
||||
|
||||
if (utils.isElectron()) {
|
||||
if (utils.isElectron) {
|
||||
const electronRouting = await import("./routes/electron.js");
|
||||
electronRouting.default(app);
|
||||
}
|
||||
@@ -146,7 +146,7 @@ function startHttpServer() {
|
||||
}
|
||||
}
|
||||
|
||||
if (utils.isElectron()) {
|
||||
if (utils.isElectron) {
|
||||
import("electron").then(({ app, dialog }) => {
|
||||
// Not all situations require showing an error dialog. When Trilium is already open,
|
||||
// clicking the shortcut, the software icon, or the taskbar icon, or when creating a new window,
|
||||
|
||||
@@ -250,5 +250,8 @@
|
||||
"backend_log": {
|
||||
"log-does-not-exist": "The backend log file '{{ fileName }}' does not exist (yet).",
|
||||
"reading-log-failed": "Reading the backend log file '{{ fileName }}' failed."
|
||||
},
|
||||
"content_renderer": {
|
||||
"note-cannot-be-displayed": "This note type cannot be displayed."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,5 +251,8 @@
|
||||
},
|
||||
"geo-map": {
|
||||
"create-child-note-instruction": "Clic pe hartă pentru a crea o nouă notiță la acea poziție sau apăsați Escape pentru a renunța."
|
||||
},
|
||||
"content_renderer": {
|
||||
"note-cannot-be-displayed": "Acest tip de notiță nu poate fi afișat."
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user