mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a0de7312c | ||
|
|
b4b22d9353 | ||
|
|
d3eb640aa2 | ||
|
|
8ccc48c25d | ||
|
|
9a1a76605a |
@@ -2,7 +2,7 @@
|
||||
"name": "trilium",
|
||||
"productName": "Trilium Notes",
|
||||
"description": "Trilium Notes",
|
||||
"version": "0.40.6",
|
||||
"version": "0.40.7",
|
||||
"license": "AGPL-3.0-only",
|
||||
"main": "electron.js",
|
||||
"bin": {
|
||||
|
||||
@@ -9,9 +9,16 @@ import utils from "./services/utils.js";
|
||||
import treeUtils from "./services/tree_utils.js";
|
||||
import linkService from "./services/link.js";
|
||||
import noteContentRenderer from "./services/note_content_renderer.js";
|
||||
import server from "./services/server.js";
|
||||
|
||||
window.glob.isDesktop = utils.isDesktop;
|
||||
window.glob.isMobile = utils.isMobile;
|
||||
|
||||
// required for CKEditor image upload plugin
|
||||
window.glob.getActiveNode = treeService.getActiveNode;
|
||||
window.glob.getHeaders = server.getHeaders;
|
||||
window.glob.noteChanged = noteDetailService.noteChanged;
|
||||
window.glob.refreshTree = treeService.reload;
|
||||
window.glob.showAddLinkDialog = () => import('./dialogs/add_link.js').then(d => d.showDialog());
|
||||
window.glob.showIncludeNoteDialog = cb => import('./dialogs/include_note.js').then(d => d.showDialog(cb));
|
||||
window.glob.loadIncludedNote = async (noteId, el) => {
|
||||
|
||||
@@ -20,7 +20,9 @@ async function getRenderedContent(note) {
|
||||
$rendered = $("<pre>").text(fullNote.content);
|
||||
}
|
||||
else if (type === 'image') {
|
||||
$rendered = $("<img>").attr("src", `api/images/${note.noteId}/${note.title}`);
|
||||
$rendered = $("<img>")
|
||||
.attr("src", `api/images/${note.noteId}/${note.title}`)
|
||||
.css("max-width", "100%");
|
||||
}
|
||||
else if (type === 'file') {
|
||||
function getFileUrl() {
|
||||
|
||||
@@ -115,4 +115,5 @@ span.fancytree-expander {
|
||||
/* large left padding is necessary for ckeditor gutter in detail-only (smartphone) layout */
|
||||
padding-left: 35px;
|
||||
padding-top: 10px;
|
||||
min-height: 150px !important;
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
module.exports = { buildDate:"2020-03-15T11:21:43+01:00", buildRevision: "f5e27278ab2a38484019ee2510781099b60ec2b6" };
|
||||
module.exports = { buildDate:"2020-03-28T20:58:20+01:00", buildRevision: "b4b22d9353bdc6ad4d3bab7cdb33bd0b844cc36d" };
|
||||
|
||||
@@ -16,7 +16,7 @@ async function exportToOpml(taskContext, branch, version, res) {
|
||||
const branch = await repository.getBranch(branchId);
|
||||
const note = await branch.getNote();
|
||||
|
||||
if (!note.isStringNote() || await note.hasOwnedLabel('excludeFromExport')) {
|
||||
if (await note.hasOwnedLabel('excludeFromExport')) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -24,13 +24,13 @@ async function exportToOpml(taskContext, branch, version, res) {
|
||||
|
||||
if (opmlVersion === 1) {
|
||||
const preparedTitle = escapeXmlAttribute(title);
|
||||
const preparedContent = prepareText(await note.getContent());
|
||||
const preparedContent = note.isStringNote() ? prepareText(await note.getContent()) : '';
|
||||
|
||||
res.write(`<outline title="${preparedTitle}" text="${preparedContent}">\n`);
|
||||
}
|
||||
else if (opmlVersion === 2) {
|
||||
const preparedTitle = escapeXmlAttribute(title);
|
||||
const preparedContent = escapeXmlAttribute(await note.getContent());
|
||||
const preparedContent = note.isStringNote() ? escapeXmlAttribute(await note.getContent()) : '';
|
||||
|
||||
res.write(`<outline text="${preparedTitle}" _note="${preparedContent}">\n`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user