mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 20:06:08 +01:00
Compare commits
18 Commits
v0.54.1-be
...
v0.54.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6547b66228 | ||
|
|
e9090b9154 | ||
|
|
5b73fe949e | ||
|
|
35fab7a23c | ||
|
|
df351a8d09 | ||
|
|
8abcf571e8 | ||
|
|
78bca2477d | ||
|
|
28f620d51d | ||
|
|
aebdbdf8be | ||
|
|
201ef7fcd5 | ||
|
|
6dee1f38f7 | ||
|
|
87e2f50c6d | ||
|
|
2335e40262 | ||
|
|
3a07c5fcc0 | ||
|
|
0681ec9057 | ||
|
|
912f79f1af | ||
|
|
b6f1611218 | ||
|
|
869c910801 |
34
bin/release-flatpack.sh
Executable file
34
bin/release-flatpack.sh
Executable file
@@ -0,0 +1,34 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [[ $# -eq 0 ]] ; then
|
||||||
|
echo "Missing argument of new version"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
VERSION=$1
|
||||||
|
|
||||||
|
if ! [[ ${VERSION} =~ ^[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}(-.+)?$ ]] ;
|
||||||
|
then
|
||||||
|
echo "Version ${VERSION} isn't in format X.Y.Z"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
VERSION_DATE=$(git log -1 --format=%aI v${VERSION} | cut -c -10)
|
||||||
|
VERSION_COMMIT=$(git rev-list -n 1 v${VERSION})
|
||||||
|
|
||||||
|
echo "Updating files with version ${VERSION}, date ${VERSION_DATE} and commit ${VERSION_COMMIT}"
|
||||||
|
|
||||||
|
# expecting the directory at a specific path
|
||||||
|
cd ~/trilium-flathub
|
||||||
|
|
||||||
|
if ! git diff-index --quiet HEAD --; then
|
||||||
|
echo "There are uncommitted changes"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
xmlstarlet ed --inplace --update "/component/releases/release/@version" --value "${VERSION}" --update "/component/releases/release/@date" --value "${VERSION_DATE}" ./trilium-flathub/com.github.zadam.trilium.metainfo.xml
|
||||||
|
|
||||||
|
yq --inplace "(.modules[0].sources[0].tag = \"v${VERSION}\") | (.modules[0].sources[0].commit = \"${VERSION_COMMIT}\")" ./trilium-flathub/com.github.zadam.trilium.yml
|
||||||
|
|
||||||
|
git commit -m "release $VERSION"
|
||||||
|
git push
|
||||||
@@ -2,4 +2,4 @@ SET DIR=%~dp0
|
|||||||
SET TRILIUM_SAFE_MODE=1
|
SET TRILIUM_SAFE_MODE=1
|
||||||
cd %DIR%
|
cd %DIR%
|
||||||
WHERE powershell.exe
|
WHERE powershell.exe
|
||||||
IF %ERRORLEVEL% NEQ 0 (start trilium.exe) ELSE (powershell.exe ./trilium-safe-mode.ps1)
|
IF %ERRORLEVEL% NEQ 0 (start trilium.exe --disable-gpu) ELSE (powershell.exe ./trilium-safe-mode.ps1)
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
Set-Item -Path Env:TRILIUM_SAFE_MODE -Value 1
|
Set-Item -Path Env:TRILIUM_SAFE_MODE -Value 1
|
||||||
./trilium.exe
|
./trilium.exe --disable-gpu
|
||||||
|
|||||||
@@ -3,5 +3,5 @@
|
|||||||
DIR=`dirname "$0"`
|
DIR=`dirname "$0"`
|
||||||
export TRILIUM_SAFE_MODE=1
|
export TRILIUM_SAFE_MODE=1
|
||||||
|
|
||||||
"$DIR/trilium"
|
"$DIR/trilium" --disable-gpu
|
||||||
|
|
||||||
|
|||||||
@@ -21,3 +21,9 @@ https=false
|
|||||||
# path to certificate (run "bash bin/generate-cert.sh" to generate self-signed certificate). Relevant only if https=true
|
# path to certificate (run "bash bin/generate-cert.sh" to generate self-signed certificate). Relevant only if https=true
|
||||||
certPath=
|
certPath=
|
||||||
keyPath=
|
keyPath=
|
||||||
|
# setting to give trust to reverse proxies, a comma-separated list of trusted rev. proxy IPs can be specified (CIDR notation is permitted),
|
||||||
|
# alternatively 'true' will make use of the leftmost IP in X-Forwarded-For, ultimately an integer can be used to tell about the number of hops between
|
||||||
|
# Trilium (which is hop 0) and the first trusted rev. proxy.
|
||||||
|
# once set, expressjs will use the X-Forwarded-For header set by the rev. proxy to determinate the real IPs of clients.
|
||||||
|
# expressjs shortcuts are supported: loopback(127.0.0.1/8, ::1/128), linklocal(169.254.0.0/16, fe80::/10), uniquelocal(10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, fc00::/7)
|
||||||
|
trustedReverseProxy=false
|
||||||
|
|||||||
BIN
db/demo.zip
BIN
db/demo.zip
Binary file not shown.
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "trilium",
|
"name": "trilium",
|
||||||
"version": "0.54.0-beta",
|
"version": "0.54.2",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "trilium",
|
"name": "trilium",
|
||||||
"version": "0.54.0-beta",
|
"version": "0.54.2",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "trilium",
|
"name": "trilium",
|
||||||
"productName": "Trilium Notes",
|
"productName": "Trilium Notes",
|
||||||
"description": "Trilium Notes",
|
"description": "Trilium Notes",
|
||||||
"version": "0.54.1-beta",
|
"version": "0.54.3",
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
"main": "electron.js",
|
"main": "electron.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|||||||
@@ -105,9 +105,9 @@ class Branch extends AbstractEntity {
|
|||||||
return this.childNote;
|
return this.childNote;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @returns {Note} */
|
/** @returns {Note|undefined} - root branch will have undefined parent, all other branches have to have a parent note */
|
||||||
get parentNote() {
|
get parentNote() {
|
||||||
if (!(this.parentNoteId in this.becca.notes)) {
|
if (!(this.parentNoteId in this.becca.notes) && this.parentNoteId !== 'none') {
|
||||||
// entities can come out of order in sync/import, create skeleton which will be filled later
|
// entities can come out of order in sync/import, create skeleton which will be filled later
|
||||||
this.becca.addNote(this.parentNoteId, new Note({noteId: this.parentNoteId}));
|
this.becca.addNote(this.parentNoteId, new Note({noteId: this.parentNoteId}));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -699,9 +699,11 @@ class Note extends AbstractEntity {
|
|||||||
sortParents() {
|
sortParents() {
|
||||||
this.parentBranches.sort((a, b) =>
|
this.parentBranches.sort((a, b) =>
|
||||||
a.branchId.startsWith('virt-')
|
a.branchId.startsWith('virt-')
|
||||||
|| a.parentNote.hasInheritableOwnedArchivedLabel() ? 1 : -1);
|
|| a.parentNote?.hasInheritableOwnedArchivedLabel() ? 1 : -1);
|
||||||
|
|
||||||
this.parents = this.parentBranches.map(branch => branch.parentNote);
|
this.parents = this.parentBranches
|
||||||
|
.map(branch => branch.parentNote)
|
||||||
|
.filter(note => !!note);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -281,7 +281,7 @@ async function findSimilarNotes(noteId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function gatherAncestorRewards(note) {
|
function gatherAncestorRewards(note) {
|
||||||
if (ancestorNoteIds.has(note.noteId)) {
|
if (!note || ancestorNoteIds.has(note.noteId)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import noteCreateService from './note_create.js';
|
|||||||
import treeService from './tree.js';
|
import treeService from './tree.js';
|
||||||
import froca from "./froca.js";
|
import froca from "./froca.js";
|
||||||
|
|
||||||
// this key needs to have this value so it's hit by the tooltip
|
// this key needs to have this value, so it's hit by the tooltip
|
||||||
const SELECTED_NOTE_PATH_KEY = "data-note-path";
|
const SELECTED_NOTE_PATH_KEY = "data-note-path";
|
||||||
|
|
||||||
const SELECTED_EXTERNAL_LINK_KEY = "data-external-link";
|
const SELECTED_EXTERNAL_LINK_KEY = "data-external-link";
|
||||||
@@ -89,6 +89,11 @@ function showRecentNotes($el) {
|
|||||||
$el.setSelectedNotePath("");
|
$el.setSelectedNotePath("");
|
||||||
$el.autocomplete("val", "");
|
$el.autocomplete("val", "");
|
||||||
$el.trigger('focus');
|
$el.trigger('focus');
|
||||||
|
|
||||||
|
// simulate pressing down arrow to trigger autocomplete
|
||||||
|
const e = $.Event('keydown');
|
||||||
|
e.which = 40; // arrow down
|
||||||
|
$el.trigger(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
function initNoteAutocomplete($el, options) {
|
function initNoteAutocomplete($el, options) {
|
||||||
|
|||||||
@@ -297,6 +297,12 @@ export default class AttributeEditorWidget extends NoteContextAwareWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async save() {
|
async save() {
|
||||||
|
if (this.lastUpdatedNoteId !== this.noteId) {
|
||||||
|
// https://github.com/zadam/trilium/issues/3090
|
||||||
|
console.warn("Ignoring blur event because a different note is loaded.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const attributes = this.parseAttributes();
|
const attributes = this.parseAttributes();
|
||||||
|
|
||||||
if (attributes) {
|
if (attributes) {
|
||||||
@@ -354,6 +360,8 @@ export default class AttributeEditorWidget extends NoteContextAwareWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dataChanged() {
|
dataChanged() {
|
||||||
|
this.lastUpdatedNoteId = this.noteId;
|
||||||
|
|
||||||
if (this.lastSavedContent === this.textEditor.getData()) {
|
if (this.lastSavedContent === this.textEditor.getData()) {
|
||||||
this.$saveAttributesButton.fadeOut();
|
this.$saveAttributesButton.fadeOut();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export default class Container extends BasicWidget {
|
|||||||
super.child(...components);
|
super.child(...components);
|
||||||
|
|
||||||
for (const component of components) {
|
for (const component of components) {
|
||||||
if (!component.position) {
|
if (component.position === undefined) {
|
||||||
component.position = this.positionCounter;
|
component.position = this.positionCounter;
|
||||||
this.positionCounter += 10;
|
this.positionCounter += 10;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ const TPL = `
|
|||||||
<div class="modal-dialog modal-xl" role="document">
|
<div class="modal-dialog modal-xl" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title mr-auto">Bulk assign attributes</h5>
|
<h5 class="modal-title mr-auto">Bulk actions</h5>
|
||||||
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-left: 0 !important;">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-left: 0 !important;">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ const TPL = `
|
|||||||
right: 10px;
|
right: 10px;
|
||||||
width: 400px;
|
width: 400px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background-color: var(--more-accented-background-color);
|
background-color: var(--accented-background-color);
|
||||||
color: var(--main-text-color);
|
color: var(--main-text-color);
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|||||||
@@ -63,8 +63,6 @@ export default class EmptyTypeWidget extends TypeWidget {
|
|||||||
appContext.tabManager.getActiveContext().setNote(suggestion.notePath);
|
appContext.tabManager.getActiveContext().setNote(suggestion.notePath);
|
||||||
});
|
});
|
||||||
|
|
||||||
noteAutocompleteService.showRecentNotes(this.$autoComplete);
|
|
||||||
|
|
||||||
this.$workspaceNotes = this.$widget.find('.workspace-notes');
|
this.$workspaceNotes = this.$widget.find('.workspace-notes');
|
||||||
|
|
||||||
super.doRender();
|
super.doRender();
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ const utils = require('../../services/utils');
|
|||||||
const log = require('../../services/log');
|
const log = require('../../services/log');
|
||||||
const TaskContext = require('../../services/task_context');
|
const TaskContext = require('../../services/task_context');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const noteRevisionService = require("../../services/note_revisions");
|
|
||||||
const becca = require("../../becca/becca");
|
const becca = require("../../becca/becca");
|
||||||
|
|
||||||
function getNote(req) {
|
function getNote(req) {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ function getNotesAndBranchesAndAttributes(noteIds) {
|
|||||||
const collectedBranchIds = new Set();
|
const collectedBranchIds = new Set();
|
||||||
|
|
||||||
function collectEntityIds(note) {
|
function collectEntityIds(note) {
|
||||||
if (collectedNoteIds.has(note.noteId)) {
|
if (!note || collectedNoteIds.has(note.noteId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,6 +97,11 @@ function getNotesAndBranchesAndAttributes(noteIds) {
|
|||||||
for (const attributeId of collectedAttributeIds) {
|
for (const attributeId of collectedAttributeIds) {
|
||||||
const attribute = becca.attributes[attributeId];
|
const attribute = becca.attributes[attributeId];
|
||||||
|
|
||||||
|
if (!attribute) {
|
||||||
|
log.error(`Could not find attribute for attributeId=${attributeId}`);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
attributes.push({
|
attributes.push({
|
||||||
attributeId: attribute.attributeId,
|
attributeId: attribute.attributeId,
|
||||||
noteId: attribute.noteId,
|
noteId: attribute.noteId,
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
module.exports = { buildDate:"2022-08-02T21:56:34+02:00", buildRevision: "12af3d05f04b9406af55ac301c0069eb385957c8" };
|
module.exports = { buildDate:"2022-08-26T22:16:49+02:00", buildRevision: "e9090b9154f8578fa85f02113bbf4f1050638eb3" };
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<link rel="shortcut icon" href="favicon.ico">
|
<link rel="shortcut icon" href="favicon.ico">
|
||||||
|
<link rel="manifest" href="manifest.webmanifest">
|
||||||
<title>Trilium Notes</title>
|
<title>Trilium Notes</title>
|
||||||
</head>
|
</head>
|
||||||
<body class="desktop heading-style-<%= headingStyle %>">
|
<body class="desktop heading-style-<%= headingStyle %>">
|
||||||
|
|||||||
8
src/www
8
src/www
@@ -44,6 +44,14 @@ async function startTrilium() {
|
|||||||
app.set('port', usedPort);
|
app.set('port', usedPort);
|
||||||
app.set('host', usedHost);
|
app.set('host', usedHost);
|
||||||
|
|
||||||
|
// Check from config whether to trust reverse proxies to supply user IPs, hostnames and protocols
|
||||||
|
if (config['Network']['trustedReverseProxy']) {
|
||||||
|
if (config['Network']['trustedReverseProxy'] === true || config['Network']['trustedReverseProxy'].trim().length) {
|
||||||
|
app.set('trust proxy', config['Network']['trustedReverseProxy'])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
log.info('Trusted reverse proxy: ' + app.get('trust proxy'))
|
||||||
|
|
||||||
if (config['Network']['https']) {
|
if (config['Network']['https']) {
|
||||||
if (!config['Network']['keyPath'] || !config['Network']['keyPath'].trim().length) {
|
if (!config['Network']['keyPath'] || !config['Network']['keyPath'].trim().length) {
|
||||||
throw new Error("keyPath in config.ini is required when https=true, but it's empty");
|
throw new Error("keyPath in config.ini is required when https=true, but it's empty");
|
||||||
|
|||||||
Reference in New Issue
Block a user