mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-18 17:31:53 +08:00
Merge branch 'develop' into tab-scroll
This commit is contained in:
commit
1c199938b6
14
README.md
14
README.md
@ -16,7 +16,7 @@ See [screenshots](https://triliumnext.github.io/Docs/Wiki/screenshot-tour) for q
|
||||
|
||||
### Migrating from Trilium?
|
||||
|
||||
There are no special migration steps to migrate from a zadam/Trilium instance to a TriliumNext/Notes instance. Just upgrade your Trilium instance to the latest version and [install TriliumNext/Notes as usual](#-installation)
|
||||
There are no special migration steps to migrate from a zadam/Trilium instance to a TriliumNext/Notes instance. Simply [install TriliumNext/Notes](#-installation) as usual and it will use your existing database.
|
||||
|
||||
Versions up to and including [v0.90.4](https://github.com/TriliumNext/Notes/releases/tag/v0.90.4) are compatible with the latest zadam/trilium version of [v0.63.7](https://github.com/zadam/trilium/releases/tag/v0.63.7). Any later versions of TriliumNext have their sync versions incremented.
|
||||
|
||||
@ -66,17 +66,7 @@ To use TriliumNext on your desktop machine (Linux, MacOS, and Windows) you have
|
||||
* Download the binary release for your platform from the [latest release page](https://github.com/TriliumNext/Notes/releases/latest), unzip the package and run the ```trilium``` executable.
|
||||
* Access TriliumNext via the web interface of a server installation (see below)
|
||||
* Currently only the latest versions of Chrome & Firefox are supported (and tested).
|
||||
* (Coming Soon) TriliumNext will also be provided as a Flatpak
|
||||
|
||||
#### MacOS
|
||||
Currently when running TriliumNext/Notes on MacOS, you may get the following error:
|
||||
> Apple could not verify "TriliumNext Notes" is free of malware and may harm your Mac or compromise your privacy.
|
||||
|
||||
You will need to run the command on your shell to resolve the error (documented [here](https://github.com/TriliumNext/Notes/issues/329#issuecomment-2287164137)):
|
||||
|
||||
```bash
|
||||
xattr -c "/path/to/Trilium Next.app"
|
||||
```
|
||||
* TriliumNext is also provided as a Flatpak, but not yet published on FlatHub.
|
||||
|
||||
### Mobile
|
||||
|
||||
|
@ -27,13 +27,6 @@ trustedReverseProxy=false
|
||||
|
||||
|
||||
[Session]
|
||||
# Use this setting to set a custom value for the "Path" Attribute value of the session cookie.
|
||||
# This can be useful, when you have several instances running on the same domain, under different paths (e.g. by using a reverse proxy).
|
||||
# It prevents your instances from overwriting each others' cookies, allowing you to stay logged in multiple instances simultanteously.
|
||||
# E.g. if you have instances running under https://your-domain.com/triliumNext/instanceA and https://your-domain.com/triliumNext/instanceB
|
||||
# you would want to set the cookiePath value to "/triliumNext/instanceA" for your first and "/triliumNext/instanceB" for your second instance
|
||||
cookiePath=/
|
||||
|
||||
# Use this setting to set a custom value for the "Max-Age" Attribute of the session cookie.
|
||||
# This controls how long your session will be valid, before it expires and you need to log in again, when you use the "Remember Me" option.
|
||||
# Value needs to be entered in Seconds.
|
||||
|
@ -11,6 +11,9 @@
|
||||
* Note tree not closing when selecting some of the menu actions.
|
||||
* [Most tree context menu on mobile are broken](https://github.com/TriliumNext/Notes/issues/671)
|
||||
* [Quick search launch bar item does nothing in vertical layout](https://github.com/TriliumNext/Notes/issues/1680)
|
||||
* [Note background is gray in 0.92.7 (light theme)](https://github.com/TriliumNext/Notes/issues/1689)
|
||||
* [config.Session.cookieMaxAge is ignored](https://github.com/TriliumNext/Notes/issues/1709) by @pano9000
|
||||
* [Return correct HTTP status code on failed login attempts instead of 200](https://github.com/TriliumNext/Notes/issues/1707) by @pano9000
|
||||
|
||||
## ✨ Improvements
|
||||
|
||||
@ -20,7 +23,7 @@
|
||||
* Preserve include note.
|
||||
* Handle note titles that contain inline code.
|
||||
* In-app help:
|
||||
* Document structure is now precalculated, so start-up time should be slightly increased.
|
||||
* Document structure is now precalculated, so start-up time should be slightly better.
|
||||
* Optimized the content in order to reduce the size on disk.
|
||||
* Mobile improvements:
|
||||
* The following dialogs are now accessible: bulk actions, branch prefix, include note, add link, sort child notes, note type selector, move/clone to, import/export, markdown import, note revisions, info dialog.
|
||||
|
@ -50,7 +50,7 @@ Trilium requires a directory on the host system to store its data. This director
|
||||
|
||||
#### Local Access Only
|
||||
|
||||
Run the container to make it accessible only from the localhost. This setup is suitable for testing or when using a prox ay server like Nginx or Apache.
|
||||
Run the container to make it accessible only from the localhost. This setup is suitable for testing or when using a proxy server like Nginx or Apache.
|
||||
|
||||
```
|
||||
sudo docker run -t -i -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/notes:[VERSION]
|
||||
|
104
package-lock.json
generated
104
package-lock.json
generated
@ -194,7 +194,7 @@
|
||||
"typedoc": "0.28.2",
|
||||
"typedoc-plugin-missing-exports": "4.0.0",
|
||||
"typescript": "5.8.3",
|
||||
"typescript-eslint": "8.29.1",
|
||||
"typescript-eslint": "8.30.1",
|
||||
"vanilla-js-wheel-zoom": "9.0.4",
|
||||
"vitest": "3.1.1",
|
||||
"webpack": "5.99.5",
|
||||
@ -5528,17 +5528,17 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||
"version": "8.29.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.29.1.tgz",
|
||||
"integrity": "sha512-ba0rr4Wfvg23vERs3eB+P3lfj2E+2g3lhWcCVukUuhtcdUx5lSIFZlGFEBHKr+3zizDa/TvZTptdNHVZWAkSBg==",
|
||||
"version": "8.30.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.30.1.tgz",
|
||||
"integrity": "sha512-v+VWphxMjn+1t48/jO4t950D6KR8JaJuNXzi33Ve6P8sEmPr5k6CEXjdGwT6+LodVnEa91EQCtwjWNUCPweo+Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/regexpp": "^4.10.0",
|
||||
"@typescript-eslint/scope-manager": "8.29.1",
|
||||
"@typescript-eslint/type-utils": "8.29.1",
|
||||
"@typescript-eslint/utils": "8.29.1",
|
||||
"@typescript-eslint/visitor-keys": "8.29.1",
|
||||
"@typescript-eslint/scope-manager": "8.30.1",
|
||||
"@typescript-eslint/type-utils": "8.30.1",
|
||||
"@typescript-eslint/utils": "8.30.1",
|
||||
"@typescript-eslint/visitor-keys": "8.30.1",
|
||||
"graphemer": "^1.4.0",
|
||||
"ignore": "^5.3.1",
|
||||
"natural-compare": "^1.4.0",
|
||||
@ -5558,16 +5558,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "8.29.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.29.1.tgz",
|
||||
"integrity": "sha512-zczrHVEqEaTwh12gWBIJWj8nx+ayDcCJs06yoNMY0kwjMWDM6+kppljY+BxWI06d2Ja+h4+WdufDcwMnnMEWmg==",
|
||||
"version": "8.30.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.30.1.tgz",
|
||||
"integrity": "sha512-H+vqmWwT5xoNrXqWs/fesmssOW70gxFlgcMlYcBaWNPIEWDgLa4W9nkSPmhuOgLnXq9QYgkZ31fhDyLhleCsAg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "8.29.1",
|
||||
"@typescript-eslint/types": "8.29.1",
|
||||
"@typescript-eslint/typescript-estree": "8.29.1",
|
||||
"@typescript-eslint/visitor-keys": "8.29.1",
|
||||
"@typescript-eslint/scope-manager": "8.30.1",
|
||||
"@typescript-eslint/types": "8.30.1",
|
||||
"@typescript-eslint/typescript-estree": "8.30.1",
|
||||
"@typescript-eslint/visitor-keys": "8.30.1",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
@ -5583,14 +5583,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "8.29.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.29.1.tgz",
|
||||
"integrity": "sha512-2nggXGX5F3YrsGN08pw4XpMLO1Rgtnn4AzTegC2MDesv6q3QaTU5yU7IbS1tf1IwCR0Hv/1EFygLn9ms6LIpDA==",
|
||||
"version": "8.30.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.30.1.tgz",
|
||||
"integrity": "sha512-+C0B6ChFXZkuaNDl73FJxRYT0G7ufVPOSQkqkpM/U198wUwUFOtgo1k/QzFh1KjpBitaK7R1tgjVz6o9HmsRPg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.29.1",
|
||||
"@typescript-eslint/visitor-keys": "8.29.1"
|
||||
"@typescript-eslint/types": "8.30.1",
|
||||
"@typescript-eslint/visitor-keys": "8.30.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@ -5601,14 +5601,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/type-utils": {
|
||||
"version": "8.29.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.29.1.tgz",
|
||||
"integrity": "sha512-DkDUSDwZVCYN71xA4wzySqqcZsHKic53A4BLqmrWFFpOpNSoxX233lwGu/2135ymTCR04PoKiEEEvN1gFYg4Tw==",
|
||||
"version": "8.30.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.30.1.tgz",
|
||||
"integrity": "sha512-64uBF76bfQiJyHgZISC7vcNz3adqQKIccVoKubyQcOnNcdJBvYOILV1v22Qhsw3tw3VQu5ll8ND6hycgAR5fEA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/typescript-estree": "8.29.1",
|
||||
"@typescript-eslint/utils": "8.29.1",
|
||||
"@typescript-eslint/typescript-estree": "8.30.1",
|
||||
"@typescript-eslint/utils": "8.30.1",
|
||||
"debug": "^4.3.4",
|
||||
"ts-api-utils": "^2.0.1"
|
||||
},
|
||||
@ -5625,9 +5625,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/types": {
|
||||
"version": "8.29.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.29.1.tgz",
|
||||
"integrity": "sha512-VT7T1PuJF1hpYC3AGm2rCgJBjHL3nc+A/bhOp9sGMKfi5v0WufsX/sHCFBfNTx2F+zA6qBc/PD0/kLRLjdt8mQ==",
|
||||
"version": "8.30.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.30.1.tgz",
|
||||
"integrity": "sha512-81KawPfkuulyWo5QdyG/LOKbspyyiW+p4vpn4bYO7DM/hZImlVnFwrpCTnmNMOt8CvLRr5ojI9nU1Ekpw4RcEw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@ -5639,14 +5639,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "8.29.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.29.1.tgz",
|
||||
"integrity": "sha512-l1enRoSaUkQxOQnbi0KPUtqeZkSiFlqrx9/3ns2rEDhGKfTa+88RmXqedC1zmVTOWrLc2e6DEJrTA51C9iLH5g==",
|
||||
"version": "8.30.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.30.1.tgz",
|
||||
"integrity": "sha512-kQQnxymiUy9tTb1F2uep9W6aBiYODgq5EMSk6Nxh4Z+BDUoYUSa029ISs5zTzKBFnexQEh71KqwjKnRz58lusQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.29.1",
|
||||
"@typescript-eslint/visitor-keys": "8.29.1",
|
||||
"@typescript-eslint/types": "8.30.1",
|
||||
"@typescript-eslint/visitor-keys": "8.30.1",
|
||||
"debug": "^4.3.4",
|
||||
"fast-glob": "^3.3.2",
|
||||
"is-glob": "^4.0.3",
|
||||
@ -5692,16 +5692,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/utils": {
|
||||
"version": "8.29.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.29.1.tgz",
|
||||
"integrity": "sha512-QAkFEbytSaB8wnmB+DflhUPz6CLbFWE2SnSCrRMEa+KnXIzDYbpsn++1HGvnfAsUY44doDXmvRkO5shlM/3UfA==",
|
||||
"version": "8.30.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.30.1.tgz",
|
||||
"integrity": "sha512-T/8q4R9En2tcEsWPQgB5BQ0XJVOtfARcUvOa8yJP3fh9M/mXraLxZrkCfGb6ChrO/V3W+Xbd04RacUEqk1CFEQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.4.0",
|
||||
"@typescript-eslint/scope-manager": "8.29.1",
|
||||
"@typescript-eslint/types": "8.29.1",
|
||||
"@typescript-eslint/typescript-estree": "8.29.1"
|
||||
"@typescript-eslint/scope-manager": "8.30.1",
|
||||
"@typescript-eslint/types": "8.30.1",
|
||||
"@typescript-eslint/typescript-estree": "8.30.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@ -5716,13 +5716,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "8.29.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.29.1.tgz",
|
||||
"integrity": "sha512-RGLh5CRaUEf02viP5c1Vh1cMGffQscyHe7HPAzGpfmfflFg1wUz2rYxd+OZqwpeypYvZ8UxSxuIpF++fmOzEcg==",
|
||||
"version": "8.30.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.30.1.tgz",
|
||||
"integrity": "sha512-aEhgas7aJ6vZnNFC7K4/vMGDGyOiqWcYZPpIWrTKuTAlsvDNKy2GFDqh9smL+iq069ZvR0YzEeq0B8NJlLzjFA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.29.1",
|
||||
"@typescript-eslint/types": "8.30.1",
|
||||
"eslint-visitor-keys": "^4.2.0"
|
||||
},
|
||||
"engines": {
|
||||
@ -20330,15 +20330,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/typescript-eslint": {
|
||||
"version": "8.29.1",
|
||||
"resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.29.1.tgz",
|
||||
"integrity": "sha512-f8cDkvndhbQMPcysk6CUSGBWV+g1utqdn71P5YKwMumVMOG/5k7cHq0KyG4O52nB0oKS4aN2Tp5+wB4APJGC+w==",
|
||||
"version": "8.30.1",
|
||||
"resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.30.1.tgz",
|
||||
"integrity": "sha512-D7lC0kcehVH7Mb26MRQi64LMyRJsj3dToJxM1+JVTl53DQSV5/7oUGWQLcKl1C1KnoVHxMMU2FNQMffr7F3Row==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "8.29.1",
|
||||
"@typescript-eslint/parser": "8.29.1",
|
||||
"@typescript-eslint/utils": "8.29.1"
|
||||
"@typescript-eslint/eslint-plugin": "8.30.1",
|
||||
"@typescript-eslint/parser": "8.30.1",
|
||||
"@typescript-eslint/utils": "8.30.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@ -20763,9 +20763,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "6.2.5",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-6.2.5.tgz",
|
||||
"integrity": "sha512-j023J/hCAa4pRIUH6J9HemwYfjB5llR2Ps0CWeikOtdR8+pAURAk0DoJC5/mm9kd+UgdnIy7d6HE4EAvlYhPhA==",
|
||||
"version": "6.2.6",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-6.2.6.tgz",
|
||||
"integrity": "sha512-9xpjNl3kR4rVDZgPNdTL0/c6ao4km69a/2ihNQbcANz8RuCOK3hQBmLSJf3bRKVQjVMda+YvizNE8AwvogcPbw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
@ -251,7 +251,7 @@
|
||||
"typedoc": "0.28.2",
|
||||
"typedoc-plugin-missing-exports": "4.0.0",
|
||||
"typescript": "5.8.3",
|
||||
"typescript-eslint": "8.29.1",
|
||||
"typescript-eslint": "8.30.1",
|
||||
"vanilla-js-wheel-zoom": "9.0.4",
|
||||
"vitest": "3.1.1",
|
||||
"webpack": "5.99.5",
|
||||
|
@ -122,6 +122,7 @@ export default class DesktopLayout {
|
||||
|
||||
const rootContainer = new RootContainer(true)
|
||||
.setParent(appContext)
|
||||
.class((launcherPaneIsHorizontal ? "horizontal" : "vertical") + "-layout")
|
||||
.optChild(
|
||||
fullWidthTabBar,
|
||||
new FlexContainer("row")
|
||||
|
@ -7,8 +7,6 @@ import ToggleSidebarButtonWidget from "../widgets/mobile_widgets/toggle_sidebar_
|
||||
import MobileDetailMenuWidget from "../widgets/mobile_widgets/mobile_detail_menu.js";
|
||||
import ScreenContainer from "../widgets/mobile_widgets/screen_container.js";
|
||||
import ScrollingContainer from "../widgets/containers/scrolling_container.js";
|
||||
import ProtectedSessionPasswordDialog from "../widgets/dialogs/protected_session_password.js";
|
||||
import ConfirmDialog from "../widgets/dialogs/confirm.js";
|
||||
import FilePropertiesWidget from "../widgets/ribbon_widgets/file_properties.js";
|
||||
import FloatingButtons from "../widgets/floating_buttons/floating_buttons.js";
|
||||
import EditButton from "../widgets/floating_buttons/edit_button.js";
|
||||
@ -118,6 +116,7 @@ export default class MobileLayout {
|
||||
getRootWidget(appContext: typeof AppContext) {
|
||||
const rootContainer = new RootContainer(true)
|
||||
.setParent(appContext)
|
||||
.class("horizontal-layout")
|
||||
.cssBlock(MOBILE_CSS)
|
||||
.child(new FlexContainer("column").id("mobile-sidebar-container"))
|
||||
.child(
|
||||
|
@ -19,7 +19,6 @@ export default class RootContainer extends FlexContainer<BasicWidget> {
|
||||
|
||||
this.id("root-widget");
|
||||
this.css("height", "100dvh");
|
||||
this.class((isHorizontalLayout ? "horizontal" : "vertical") + "-layout");
|
||||
this.originalViewportHeight = getViewportHeight();
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ export function buildConfig() {
|
||||
heading: {
|
||||
options: [
|
||||
{ model: "paragraph" as const, title: "Paragraph", class: "ck-heading_paragraph" },
|
||||
// // heading1 is not used since that should be a note's title
|
||||
// heading1 is not used since that should be a note's title
|
||||
{ model: "heading2" as const, view: "h2", title: "Heading 2", class: "ck-heading_heading2" },
|
||||
{ model: "heading3" as const, view: "h3", title: "Heading 3", class: "ck-heading_heading3" },
|
||||
{ model: "heading4" as const, view: "h4", title: "Heading 4", class: "ck-heading_heading4" },
|
||||
|
@ -92,11 +92,10 @@ function login(req: Request, res: Response) {
|
||||
const rememberMe = req.body.rememberMe;
|
||||
|
||||
req.session.regenerate(() => {
|
||||
if (rememberMe) {
|
||||
req.session.cookie.maxAge = 21 * 24 * 3600000; // 3 weeks
|
||||
} else {
|
||||
if (!rememberMe) {
|
||||
// unset default maxAge set by sessionParser
|
||||
// Cookie becomes non-persistent and expires after current browser session (e.g. when browser is closed)
|
||||
// Cookie becomes non-persistent and expires
|
||||
// after current browser session (e.g. when browser is closed)
|
||||
req.session.cookie.maxAge = undefined;
|
||||
}
|
||||
|
||||
@ -134,7 +133,7 @@ function sendLoginError(req: Request, res: Response, errorType: 'password' | 'to
|
||||
log.info(`WARNING: Wrong password from ${req.ip}, rejecting.`);
|
||||
}
|
||||
|
||||
res.render('login', {
|
||||
res.status(401).render('login', {
|
||||
wrongPassword: errorType === 'password',
|
||||
wrongTotp: errorType === 'totp',
|
||||
totpEnabled: totp.isTotpEnabled(),
|
||||
|
@ -401,6 +401,13 @@ function getWeekFirstDayNote(dateStr: string, rootNote: BNote | null = null) {
|
||||
return getDayNote(weekStartDate.format("YYYY-MM-DD"), rootNote);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the {@link BNote} corresponding to the given week. If there is no note associated yet to that week, it will be created and returned instead.
|
||||
*
|
||||
* @param weekStr the week for which to return the corresponding note, in the format `2024-W04`.
|
||||
* @param _rootNote a {@link BNote} representing the calendar root, or {@code null} or not specified to use the default root calendar note.
|
||||
* @returns a Promise that resolves to the {@link BNote} corresponding to the week note.
|
||||
*/
|
||||
async function getWeekNote(weekStr: string, _rootNote: BNote | null = null): Promise<BNote | null> {
|
||||
const rootNote = _rootNote || getRootCalendarNote();
|
||||
if (!rootNote.hasLabel("enableWeekNote")) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user