updated render note help

This commit is contained in:
zadam 2021-04-05 22:37:12 +02:00
parent 9c436cb61f
commit 4d110aa143
2 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,7 @@ const TPL = `
<div class="note-detail-render-help alert alert-warning" style="margin: 50px; padding: 20px;">
<p><strong>This help note is shown because this note of type Render HTML doesn't have required relation to function properly.</strong></p>
<p>Render HTML note type is used for <a href="https://github.com/zadam/trilium/wiki/Scripts">scripting</a>. In short, you have a HTML code note (optionally with some JavaScript) and this note will render it. To make it work, you need to define a relation (in <a class="show-attributes-button">Attributes dialog</a>) called "renderNote" pointing to the HTML note to render. Once that's defined you can click on the "play" button to render.</p>
<p>Render HTML note type is used for <a class="external" href="https://github.com/zadam/trilium/wiki/Scripts">scripting</a>. In short, you have a HTML code note (optionally with some JavaScript) and this note will render it. To make it work, you need to define a <a class="external" href="https://github.com/zadam/trilium/wiki/Attributes">relation</a> called "renderNote" pointing to the HTML note to render.</p>
</div>
<div class="note-detail-render-content" style="height: 100%; overflow: auto;"></div>

View File

@ -26,7 +26,7 @@ function checkAuth(req, res, next) {
// currently we're doing that for file upload because handling form data seems to be difficult
function checkApiAuthOrElectron(req, res, next) {
if (!req.session.loggedIn && !utils.isElectron() && !noAuthentication) {
reject(req, res, "Not authorized");
reject(req, res, "Logged in session not found");
}
else {
next();
@ -35,7 +35,7 @@ function checkApiAuthOrElectron(req, res, next) {
function checkApiAuth(req, res, next) {
if (!req.session.loggedIn && !noAuthentication) {
reject(req, res, "Not authorized");
reject(req, res, "Logged in session not found");
}
else {
next();
@ -64,7 +64,7 @@ function checkToken(req, res, next) {
const token = req.headers.authorization;
if (sql.getValue("SELECT COUNT(*) FROM api_tokens WHERE isDeleted = 0 AND token = ?", [token]) === 0) {
reject(req, res, "Not authorized");
reject(req, res, "Token not found");
}
else {
next();