diff --git a/bin/electron-forge/desktop.ejs b/bin/electron-forge/desktop.ejs index f803f37b2..32430cd2a 100644 --- a/bin/electron-forge/desktop.ejs +++ b/bin/electron-forge/desktop.ejs @@ -1,12 +1,17 @@ [Desktop Entry] -<% if (productName) { %>Name=<%= productName %> -<% } %><% if (description) { %>Comment=<%= description %> -<% } %><% if (genericName) { %>GenericName=<%= genericName %> -<% } %><% if (name) { %>Exec=<%= name %> %U -Icon=<%= name %> -<% } %>Type=Application -StartupNotify=true -<% if (productName) { %>StartupWMClass=<%= productName %> -<% } if (categories && categories.length) { %>Categories=<%= categories.join(';') %>; -<% } %><% if (mimeType && mimeType.length) { %>MimeType=<%= mimeType.join(';') %>; -<% } %> \ No newline at end of file +<%= +Object.entries({ + "Name": productName, + "Comment": description, + "GenericName": genericName, + "Exec": name ? `${name} %U` : undefined, + "Icon": name, + "Type": "Application", + "StartupNotify": "true", + "StartupWMClass": productName, + "Categories": categories?.length ? `${categories.join(";")};` : undefined, + "MimeType": mimeType?.length ? `${mimeType.join(";")};` : undefined +}) +.map(line => line[1] ? line.join("=") : undefined) +.filter(line => !!line) +.join("\n")%> \ No newline at end of file diff --git a/electron.ts b/electron.ts index 154ec38d4..dc93e6688 100644 --- a/electron.ts +++ b/electron.ts @@ -26,6 +26,8 @@ electronDl({ saveAs: true }); // needed for excalidraw export https://github.com/zadam/trilium/issues/4271 electron.app.commandLine.appendSwitch("enable-experimental-web-platform-features"); +electron.app.userAgentFallback = `${electron.app.getName()} ${electron.app.getVersion()}`; + // Quit when all windows are closed, except on macOS. There, it's common // for applications and their menu bar to stay active until the user quits // explicitly with Cmd + Q. diff --git a/package-lock.json b/package-lock.json index 49e028734..bd31ed854 100644 --- a/package-lock.json +++ b/package-lock.json @@ -69,6 +69,7 @@ "katex": "0.16.21", "knockout": "3.5.1", "leaflet": "1.9.4", + "leaflet-gpx": "2.1.2", "mark.js": "8.11.1", "marked": "15.0.6", "mermaid": "11.4.1", @@ -85,7 +86,6 @@ "sanitize-filename": "1.6.3", "sanitize-html": "2.14.0", "sax": "1.4.1", - "semver": "7.7.0", "serve-favicon": "2.5.0", "session-file-store": "1.5.0", "source-map-support": "0.5.21", @@ -112,7 +112,7 @@ "@electron-forge/maker-zip": "7.6.1", "@electron-forge/plugin-auto-unpack-natives": "7.6.1", "@electron/rebuild": "3.7.1", - "@playwright/test": "1.50.0", + "@playwright/test": "1.50.1", "@types/archiver": "6.0.3", "@types/better-sqlite3": "7.6.12", "@types/bootstrap": "5.2.10", @@ -132,14 +132,14 @@ "@types/jasmine": "5.1.5", "@types/jquery": "3.5.32", "@types/jsdom": "21.1.7", + "@types/leaflet-gpx": "1.3.7", "@types/mime-types": "2.1.4", "@types/multer": "1.4.12", - "@types/node": "22.12.0", + "@types/node": "22.13.1", "@types/react": "18.3.18", "@types/safe-compare": "1.1.2", "@types/sanitize-html": "2.13.0", "@types/sax": "1.2.7", - "@types/semver": "7.5.8", "@types/serve-favicon": "2.5.7", "@types/session-file-store": "1.2.5", "@types/source-map-support": "0.5.10", @@ -149,7 +149,7 @@ "@types/ws": "8.5.14", "@types/xml2js": "0.4.14", "@types/yargs": "17.0.33", - "@vitest/coverage-v8": "3.0.4", + "@vitest/coverage-v8": "3.0.5", "cross-env": "7.0.3", "electron": "34.0.2", "esm": "3.2.25", @@ -164,7 +164,7 @@ "tsx": "4.19.2", "typedoc": "0.27.6", "typescript": "5.7.3", - "vitest": "3.0.4", + "vitest": "3.0.5", "webpack": "5.97.1", "webpack-cli": "6.0.1", "webpack-dev-middleware": "7.4.2" @@ -2878,13 +2878,13 @@ } }, "node_modules/@playwright/test": { - "version": "1.50.0", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.50.0.tgz", - "integrity": "sha512-ZGNXbt+d65EGjBORQHuYKj+XhCewlwpnSd/EDuLPZGSiEWmgOJB5RmMCCYGy5aMfTs9wx61RivfDKi8H/hcMvw==", + "version": "1.50.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.50.1.tgz", + "integrity": "sha512-Jii3aBg+CEDpgnuDxEp/h7BimHcUTDlpEtce89xEumlJ5ef2hqepZ+PWp1DDpYC/VO9fmWVI1IlEaoI5fK9FXQ==", "dev": true, "license": "Apache-2.0", "dependencies": { - "playwright": "1.50.0" + "playwright": "1.50.1" }, "bin": { "playwright": "cli.js" @@ -3839,6 +3839,16 @@ "@types/geojson": "*" } }, + "node_modules/@types/leaflet-gpx": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/@types/leaflet-gpx/-/leaflet-gpx-1.3.7.tgz", + "integrity": "sha512-IDshIOLZ7dUUjRiCE3DuJcAGavgUCw0xQ93dc/3YvsA6jrFc+nx8eXr0tqZIf2SaWMgqiDj/n7N24WWNh/898g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/leaflet": "*" + } + }, "node_modules/@types/linkify-it": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz", @@ -3897,9 +3907,9 @@ } }, "node_modules/@types/node": { - "version": "22.12.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.12.0.tgz", - "integrity": "sha512-Fll2FZ1riMjNmlmJOdAyY5pUbkftXslB5DgEzlIuNaiWhXd00FhWxVC/r4yV/4wBb9JfImTu+jiSvXTkJ7F/gA==", + "version": "22.13.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.1.tgz", + "integrity": "sha512-jK8uzQlrvXqEU91UxiK5J7pKHyzgnI1Qnl0QDHIgVGuolJhRb9EEl28Cj9b3rGR8B2lhFCtvIm5os8lFnO/1Ew==", "license": "MIT", "dependencies": { "undici-types": "~6.20.0" @@ -3990,13 +4000,6 @@ "@types/node": "*" } }, - "node_modules/@types/semver": { - "version": "7.5.8", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", - "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/send": { "version": "0.17.4", "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", @@ -4151,9 +4154,9 @@ } }, "node_modules/@vitest/coverage-v8": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-3.0.4.tgz", - "integrity": "sha512-f0twgRCHgbs24Dp8cLWagzcObXMcuKtAwgxjJV/nnysPAJJk1JiKu/W0gIehZLmkljhJXU/E0/dmuQzsA/4jhA==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-3.0.5.tgz", + "integrity": "sha512-zOOWIsj5fHh3jjGwQg+P+J1FW3s4jBu1Zqga0qW60yutsBtqEqNEJKWYh7cYn1yGD+1bdPsPdC/eL4eVK56xMg==", "dev": true, "license": "MIT", "dependencies": { @@ -4174,8 +4177,8 @@ "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "@vitest/browser": "3.0.4", - "vitest": "3.0.4" + "@vitest/browser": "3.0.5", + "vitest": "3.0.5" }, "peerDependenciesMeta": { "@vitest/browser": { @@ -4184,14 +4187,14 @@ } }, "node_modules/@vitest/expect": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.0.4.tgz", - "integrity": "sha512-Nm5kJmYw6P2BxhJPkO3eKKhGYKRsnqJqf+r0yOGRKpEP+bSCBDsjXgiu1/5QFrnPMEgzfC38ZEjvCFgaNBC0Eg==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.0.5.tgz", + "integrity": "sha512-nNIOqupgZ4v5jWuQx2DSlHLEs7Q4Oh/7AYwNyE+k0UQzG7tSmjPXShUikn1mpNGzYEN2jJbTvLejwShMitovBA==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "3.0.4", - "@vitest/utils": "3.0.4", + "@vitest/spy": "3.0.5", + "@vitest/utils": "3.0.5", "chai": "^5.1.2", "tinyrainbow": "^2.0.0" }, @@ -4200,13 +4203,13 @@ } }, "node_modules/@vitest/mocker": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.0.4.tgz", - "integrity": "sha512-gEef35vKafJlfQbnyOXZ0Gcr9IBUsMTyTLXsEQwuyYAerpHqvXhzdBnDFuHLpFqth3F7b6BaFr4qV/Cs1ULx5A==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.0.5.tgz", + "integrity": "sha512-CLPNBFBIE7x6aEGbIjaQAX03ZZlBMaWwAjBdMkIf/cAn6xzLTiM3zYqO/WAbieEjsAZir6tO71mzeHZoodThvw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "3.0.4", + "@vitest/spy": "3.0.5", "estree-walker": "^3.0.3", "magic-string": "^0.30.17" }, @@ -4227,9 +4230,9 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.0.4.tgz", - "integrity": "sha512-ts0fba+dEhK2aC9PFuZ9LTpULHpY/nd6jhAQ5IMU7Gaj7crPCTdCFfgvXxruRBLFS+MLraicCuFXxISEq8C93g==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.0.5.tgz", + "integrity": "sha512-CjUtdmpOcm4RVtB+up8r2vVDLR16Mgm/bYdkGFe3Yj/scRfCpbSi2W/BDSDcFK7ohw8UXvjMbOp9H4fByd/cOA==", "dev": true, "license": "MIT", "dependencies": { @@ -4240,13 +4243,13 @@ } }, "node_modules/@vitest/runner": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.0.4.tgz", - "integrity": "sha512-dKHzTQ7n9sExAcWH/0sh1elVgwc7OJ2lMOBrAm73J7AH6Pf9T12Zh3lNE1TETZaqrWFXtLlx3NVrLRb5hCK+iw==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.0.5.tgz", + "integrity": "sha512-BAiZFityFexZQi2yN4OX3OkJC6scwRo8EhRB0Z5HIGGgd2q+Nq29LgHU/+ovCtd0fOfXj5ZI6pwdlUmC5bpi8A==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "3.0.4", + "@vitest/utils": "3.0.5", "pathe": "^2.0.2" }, "funding": { @@ -4261,13 +4264,13 @@ "license": "MIT" }, "node_modules/@vitest/snapshot": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.0.4.tgz", - "integrity": "sha512-+p5knMLwIk7lTQkM3NonZ9zBewzVp9EVkVpvNta0/PlFWpiqLaRcF4+33L1it3uRUCh0BGLOaXPPGEjNKfWb4w==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.0.5.tgz", + "integrity": "sha512-GJPZYcd7v8QNUJ7vRvLDmRwl+a1fGg4T/54lZXe+UOGy47F9yUfE18hRCtXL5aHN/AONu29NGzIXSVFh9K0feA==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "3.0.4", + "@vitest/pretty-format": "3.0.5", "magic-string": "^0.30.17", "pathe": "^2.0.2" }, @@ -4283,9 +4286,9 @@ "license": "MIT" }, "node_modules/@vitest/spy": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.0.4.tgz", - "integrity": "sha512-sXIMF0oauYyUy2hN49VFTYodzEAu744MmGcPR3ZBsPM20G+1/cSW/n1U+3Yu/zHxX2bIDe1oJASOkml+osTU6Q==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.0.5.tgz", + "integrity": "sha512-5fOzHj0WbUNqPK6blI/8VzZdkBlQLnT25knX0r4dbZI9qoZDf3qAdjoMmDcLG5A83W6oUUFJgUd0EYBc2P5xqg==", "dev": true, "license": "MIT", "dependencies": { @@ -4296,13 +4299,13 @@ } }, "node_modules/@vitest/utils": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.0.4.tgz", - "integrity": "sha512-8BqC1ksYsHtbWH+DfpOAKrFw3jl3Uf9J7yeFh85Pz52IWuh1hBBtyfEbRNNZNjl8H8A5yMLH9/t+k7HIKzQcZQ==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.0.5.tgz", + "integrity": "sha512-N9AX0NUoUtVwKwy21JtwzaqR5L5R5A99GAbrHfCCXK1lp593i/3AZAXhSP43wRQuxYsflrdzEfXZFo1reR1Nkg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "3.0.4", + "@vitest/pretty-format": "3.0.5", "loupe": "^3.1.2", "tinyrainbow": "^2.0.0" }, @@ -11431,6 +11434,12 @@ "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==", "license": "BSD-2-Clause" }, + "node_modules/leaflet-gpx": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/leaflet-gpx/-/leaflet-gpx-2.1.2.tgz", + "integrity": "sha512-lKoEPlAWel9KXn9keg6Dmyt7gmj5IYyD8CKuxivN+77GpZr2bpKliwFvZJxLUHmNu4fICmCySyxhm5qjZuvvQg==", + "license": "BSD-2-Clause" + }, "node_modules/limiter": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/limiter/-/limiter-1.1.5.tgz", @@ -13302,13 +13311,13 @@ } }, "node_modules/playwright": { - "version": "1.50.0", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.50.0.tgz", - "integrity": "sha512-+GinGfGTrd2IfX1TA4N2gNmeIksSb+IAe589ZH+FlmpV3MYTx6+buChGIuDLQwrGNCw2lWibqV50fU510N7S+w==", + "version": "1.50.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.50.1.tgz", + "integrity": "sha512-G8rwsOQJ63XG6BbKj2w5rHeavFjy5zynBA9zsJMMtBoe/Uf757oG12NXz6e6OirF7RCrTVAKFXbLmn1RbL7Qaw==", "dev": true, "license": "Apache-2.0", "dependencies": { - "playwright-core": "1.50.0" + "playwright-core": "1.50.1" }, "bin": { "playwright": "cli.js" @@ -13321,9 +13330,9 @@ } }, "node_modules/playwright-core": { - "version": "1.50.0", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.50.0.tgz", - "integrity": "sha512-CXkSSlr4JaZs2tZHI40DsZUN/NIwgaUPsyLuOAaIZp2CyF2sN5MM5NJsyB188lFSSozFxQ5fPT4qM+f0tH/6wQ==", + "version": "1.50.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.50.1.tgz", + "integrity": "sha512-ra9fsNWayuYumt+NiM069M6OkcRb1FZSK8bgi66AtpFoWkg2+y0bJSNmkFrWhMbEBbVKC/EruAHH3g0zmtwGmQ==", "dev": true, "license": "Apache-2.0", "bin": { @@ -14703,9 +14712,9 @@ } }, "node_modules/semver": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.0.tgz", - "integrity": "sha512-DrfFnPzblFmNrIZzg5RzHegbiRWg7KMR7btwi2yjHwx06zsUbO5g613sVwEV7FTwmzJu+Io0lJe2GJ3LxqpvBQ==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -16838,9 +16847,9 @@ } }, "node_modules/vite-node": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.0.4.tgz", - "integrity": "sha512-7JZKEzcYV2Nx3u6rlvN8qdo3QV7Fxyt6hx+CCKz9fbWxdX5IvUOmTWEAxMrWxaiSf7CKGLJQ5rFu8prb/jBjOA==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.0.5.tgz", + "integrity": "sha512-02JEJl7SbtwSDJdYS537nU6l+ktdvcREfLksk/NDAqtdKWGqHl+joXzEubHROmS3E6pip+Xgu2tFezMu75jH7A==", "dev": true, "license": "MIT", "dependencies": { @@ -17332,19 +17341,19 @@ } }, "node_modules/vitest": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.0.4.tgz", - "integrity": "sha512-6XG8oTKy2gnJIFTHP6LD7ExFeNLxiTkK3CfMvT7IfR8IN+BYICCf0lXUQmX7i7JoxUP8QmeP4mTnWXgflu4yjw==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.0.5.tgz", + "integrity": "sha512-4dof+HvqONw9bvsYxtkfUp2uHsTN9bV2CZIi1pWgoFpL1Lld8LA1ka9q/ONSsoScAKG7NVGf2stJTI7XRkXb2Q==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/expect": "3.0.4", - "@vitest/mocker": "3.0.4", - "@vitest/pretty-format": "^3.0.4", - "@vitest/runner": "3.0.4", - "@vitest/snapshot": "3.0.4", - "@vitest/spy": "3.0.4", - "@vitest/utils": "3.0.4", + "@vitest/expect": "3.0.5", + "@vitest/mocker": "3.0.5", + "@vitest/pretty-format": "^3.0.5", + "@vitest/runner": "3.0.5", + "@vitest/snapshot": "3.0.5", + "@vitest/spy": "3.0.5", + "@vitest/utils": "3.0.5", "chai": "^5.1.2", "debug": "^4.4.0", "expect-type": "^1.1.0", @@ -17356,7 +17365,7 @@ "tinypool": "^1.0.2", "tinyrainbow": "^2.0.0", "vite": "^5.0.0 || ^6.0.0", - "vite-node": "3.0.4", + "vite-node": "3.0.5", "why-is-node-running": "^2.3.0" }, "bin": { @@ -17372,8 +17381,8 @@ "@edge-runtime/vm": "*", "@types/debug": "^4.1.12", "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", - "@vitest/browser": "3.0.4", - "@vitest/ui": "3.0.4", + "@vitest/browser": "3.0.5", + "@vitest/ui": "3.0.5", "happy-dom": "*", "jsdom": "*" }, diff --git a/package.json b/package.json index 4216a3d26..de2300213 100644 --- a/package.json +++ b/package.json @@ -114,6 +114,7 @@ "katex": "0.16.21", "knockout": "3.5.1", "leaflet": "1.9.4", + "leaflet-gpx": "2.1.2", "mark.js": "8.11.1", "marked": "15.0.6", "mermaid": "11.4.1", @@ -130,7 +131,6 @@ "sanitize-filename": "1.6.3", "sanitize-html": "2.14.0", "sax": "1.4.1", - "semver": "7.7.0", "serve-favicon": "2.5.0", "session-file-store": "1.5.0", "source-map-support": "0.5.21", @@ -154,7 +154,7 @@ "@electron-forge/maker-zip": "7.6.1", "@electron-forge/plugin-auto-unpack-natives": "7.6.1", "@electron/rebuild": "3.7.1", - "@playwright/test": "1.50.0", + "@playwright/test": "1.50.1", "@types/archiver": "6.0.3", "@types/better-sqlite3": "7.6.12", "@types/bootstrap": "5.2.10", @@ -174,14 +174,14 @@ "@types/jasmine": "5.1.5", "@types/jquery": "3.5.32", "@types/jsdom": "21.1.7", + "@types/leaflet-gpx": "1.3.7", "@types/mime-types": "2.1.4", "@types/multer": "1.4.12", - "@types/node": "22.12.0", + "@types/node": "22.13.1", "@types/react": "18.3.18", "@types/safe-compare": "1.1.2", "@types/sanitize-html": "2.13.0", "@types/sax": "1.2.7", - "@types/semver": "7.5.8", "@types/serve-favicon": "2.5.7", "@types/session-file-store": "1.2.5", "@types/source-map-support": "0.5.10", @@ -191,7 +191,7 @@ "@types/ws": "8.5.14", "@types/xml2js": "0.4.14", "@types/yargs": "17.0.33", - "@vitest/coverage-v8": "3.0.4", + "@vitest/coverage-v8": "3.0.5", "cross-env": "7.0.3", "electron": "34.0.2", "esm": "3.2.25", @@ -206,7 +206,7 @@ "tsx": "4.19.2", "typedoc": "0.27.6", "typescript": "5.7.3", - "vitest": "3.0.4", + "vitest": "3.0.5", "webpack": "5.97.1", "webpack-cli": "6.0.1", "webpack-dev-middleware": "7.4.2" diff --git a/src/public/app/components/app_context.ts b/src/public/app/components/app_context.ts index dbfe78cd0..2be0d986b 100644 --- a/src/public/app/components/app_context.ts +++ b/src/public/app/components/app_context.ts @@ -83,7 +83,7 @@ export type CommandMappings = { }; showExportDialog: CommandData & { notePath: string; - defaultType: "single"; + defaultType: "single" | "subtree"; }; showDeleteNotesDialog: CommandData & { branchIdsToDelete: string[]; diff --git a/src/public/app/desktop.ts b/src/public/app/desktop.ts index 4e9930d34..b78074126 100644 --- a/src/public/app/desktop.ts +++ b/src/public/app/desktop.ts @@ -4,7 +4,6 @@ import noteTooltipService from "./services/note_tooltip.js"; import bundleService from "./services/bundle.js"; import toastService from "./services/toast.js"; import noteAutocompleteService from "./services/note_autocomplete.js"; -import macInit from "./services/mac_init.js"; import electronContextMenu from "./menus/electron_context_menu.js"; import glob from "./services/glob.js"; import { t } from "./services/i18n.js"; @@ -35,8 +34,6 @@ if (utils.isElectron()) { initOnElectron(); } -macInit.init(); - noteTooltipService.setupGlobalTooltip(); noteAutocompleteService.init(); diff --git a/src/public/app/services/mac_init.ts b/src/public/app/services/mac_init.ts deleted file mode 100644 index c864b3cad..000000000 --- a/src/public/app/services/mac_init.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Mac specific initialization - */ -import utils from "./utils.js"; -import shortcutService from "./shortcuts.js"; - -function init() { - if (utils.isElectron() && utils.isMac()) { - shortcutService.bindGlobalShortcut("meta+c", () => exec("copy")); - shortcutService.bindGlobalShortcut("meta+v", () => exec("paste")); - shortcutService.bindGlobalShortcut("meta+x", () => exec("cut")); - shortcutService.bindGlobalShortcut("meta+a", () => exec("selectAll")); - shortcutService.bindGlobalShortcut("meta+z", () => exec("undo")); - shortcutService.bindGlobalShortcut("meta+y", () => exec("redo")); - } -} - -function exec(cmd: string) { - document.execCommand(cmd); - - return false; -} - -export default { - init -}; diff --git a/src/public/app/setup.ts b/src/public/app/setup.ts index ec389c793..1970c110a 100644 --- a/src/public/app/setup.ts +++ b/src/public/app/setup.ts @@ -1,9 +1,6 @@ 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"; diff --git a/src/public/app/types.d.ts b/src/public/app/types.d.ts index b1750afb4..2af1e098d 100644 --- a/src/public/app/types.d.ts +++ b/src/public/app/types.d.ts @@ -39,6 +39,7 @@ interface CustomGlobals { maxEntityChangeIdAtLoad: number; maxEntityChangeSyncIdAtLoad: number; assetPath: string; + appPath: string; instanceName: string; appCssNoteIds: string[]; triliumVersion: string; diff --git a/src/public/app/widgets/attribute_widgets/attribute_detail.ts b/src/public/app/widgets/attribute_widgets/attribute_detail.ts index 7ea7061a9..c5c56102e 100644 --- a/src/public/app/widgets/attribute_widgets/attribute_detail.ts +++ b/src/public/app/widgets/attribute_widgets/attribute_detail.ts @@ -67,6 +67,10 @@ const TPL = ` .attr-detail input[readonly] { background-color: var(--accented-background-color) !important; } + + .attr-edit-table td { + padding: 4px 0; + }