mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
Compare commits
7 Commits
v0.27.2-be
...
v0.27.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b8d7b8fba | ||
|
|
9fca7f09a5 | ||
|
|
fd39d6b3a9 | ||
|
|
a103886ea5 | ||
|
|
373408e401 | ||
|
|
db44c1d8e6 | ||
|
|
95a34c9e2d |
@@ -18,6 +18,7 @@ Trilium Notes is a hierarchical note taking application with focus on building l
|
|||||||
* [Relation maps](https://github.com/zadam/trilium/wiki/Relation-map) for visualizing notes and their relations
|
* [Relation maps](https://github.com/zadam/trilium/wiki/Relation-map) for visualizing notes and their relations
|
||||||
* [Scripting](https://github.com/zadam/trilium/wiki/Scripts) - see [Advanced showcases](https://github.com/zadam/trilium/wiki/Advanced-showcases)
|
* [Scripting](https://github.com/zadam/trilium/wiki/Scripts) - see [Advanced showcases](https://github.com/zadam/trilium/wiki/Advanced-showcases)
|
||||||
* Scales well in both usability and performance upwards of 100 000 notes
|
* Scales well in both usability and performance upwards of 100 000 notes
|
||||||
|
* Touch optimized [mobile frontend](https://github.com/zadam/trilium/wiki/Mobile-frontend) for smartphones and tablets
|
||||||
* [Night theme](https://github.com/zadam/trilium/wiki/Themes)
|
* [Night theme](https://github.com/zadam/trilium/wiki/Themes)
|
||||||
* [Evernote](https://github.com/zadam/trilium/wiki/Evernote-import) and [Markdown import & export](https://github.com/zadam/trilium/wiki/Markdown)
|
* [Evernote](https://github.com/zadam/trilium/wiki/Evernote-import) and [Markdown import & export](https://github.com/zadam/trilium/wiki/Markdown)
|
||||||
|
|
||||||
|
|||||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "trilium",
|
"name": "trilium",
|
||||||
"version": "0.27.1-beta",
|
"version": "0.27.2-beta",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "trilium",
|
"name": "trilium",
|
||||||
"productName": "Trilium Notes",
|
"productName": "Trilium Notes",
|
||||||
"description": "Trilium Notes",
|
"description": "Trilium Notes",
|
||||||
"version": "0.27.2-beta",
|
"version": "0.27.3",
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
"main": "electron.js",
|
"main": "electron.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|||||||
@@ -158,7 +158,11 @@ class TreeCache {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
treeCache.childParentToBranch[childNoteId + '-' + newParentNoteId] = treeCache.childParentToBranch[childNoteId + '-' + oldParentNoteId];
|
const branchId = treeCache.childParentToBranch[childNoteId + '-' + oldParentNoteId];
|
||||||
|
const branch = await this.getBranch(branchId);
|
||||||
|
branch.parentNoteId = newParentNoteId;
|
||||||
|
|
||||||
|
treeCache.childParentToBranch[childNoteId + '-' + newParentNoteId] = branchId;
|
||||||
delete treeCache.childParentToBranch[childNoteId + '-' + oldParentNoteId]; // this is correct because we know that oldParentId isn't same as newParentId
|
delete treeCache.childParentToBranch[childNoteId + '-' + oldParentNoteId]; // this is correct because we know that oldParentId isn't same as newParentId
|
||||||
|
|
||||||
// remove old associations
|
// remove old associations
|
||||||
|
|||||||
@@ -45,14 +45,23 @@
|
|||||||
#header button {
|
#header button {
|
||||||
padding: 1px 5px 1px 5px;
|
padding: 1px 5px 1px 5px;
|
||||||
font-size: small;
|
font-size: small;
|
||||||
|
margin-bottom: 2px;
|
||||||
|
margin-top: 2px;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#history-navigation {
|
||||||
|
margin: 0 15px 0 5px;
|
||||||
|
position: relative;
|
||||||
|
top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#global-buttons {
|
#global-buttons {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
padding: 10px 0 10px 0;
|
padding: 10px 0 10px 0;
|
||||||
margin: 0 10px 0 16px;
|
margin: 0 20px 0 10px;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ddd;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -155,17 +155,6 @@ span.fancytree-active:not(.fancytree-focused) .fancytree-title {
|
|||||||
color: #337ab7 !important;
|
color: #337ab7 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#header-title {
|
|
||||||
padding: 5px 20px 5px 10px;
|
|
||||||
font-size: large;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header .btn-sm {
|
|
||||||
margin-bottom: 2px;
|
|
||||||
margin-right: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.ui-tooltip {
|
div.ui-tooltip {
|
||||||
max-width: 600px;
|
max-width: 600px;
|
||||||
max-height: 600px;
|
max-height: 600px;
|
||||||
@@ -377,13 +366,8 @@ div.ui-tooltip {
|
|||||||
height: 150px;
|
height: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#history-navigation {
|
|
||||||
margin: 0 20px 0 5px;
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn:not(.btn-primary):not(.btn-danger) {
|
.btn:not(.btn-primary):not(.btn-danger) {
|
||||||
border-color: #bbb;
|
border-color: #ddd;
|
||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -544,7 +528,8 @@ table.promoted-attributes-in-tooltip td, table.promoted-attributes-in-tooltip th
|
|||||||
max-height: 300px;
|
max-height: 300px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
color: black;
|
color: black;
|
||||||
border: 1px solid #aaa;
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 5px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
module.exports = { buildDate:"2019-01-04T23:33:32+01:00", buildRevision: "5d74dcd2564ff1341550ade1250aa9d790abc056" };
|
module.exports = { buildDate:"2019-01-05T22:48:11+01:00", buildRevision: "9fca7f09a564c719c834d38d76c3b595c8579b2a" };
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
const sql = require('./sql');
|
const sql = require('./sql');
|
||||||
|
const sqlInit = require('./sql_init');
|
||||||
const optionService = require('./options');
|
const optionService = require('./options');
|
||||||
const dateUtils = require('./date_utils');
|
const dateUtils = require('./date_utils');
|
||||||
const syncTableService = require('./sync_table');
|
const syncTableService = require('./sync_table');
|
||||||
@@ -408,10 +409,12 @@ async function cleanupDeletedNotes() {
|
|||||||
await sql.execute("UPDATE note_revisions SET content = NULL WHERE note_revisions.content IS NOT NULL AND noteId IN (SELECT noteId FROM notes WHERE isDeleted = 1 AND notes.dateModified <= ?)", [dateUtils.dateStr(cutoffDate)]);
|
await sql.execute("UPDATE note_revisions SET content = NULL WHERE note_revisions.content IS NOT NULL AND noteId IN (SELECT noteId FROM notes WHERE isDeleted = 1 AND notes.dateModified <= ?)", [dateUtils.dateStr(cutoffDate)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// first cleanup kickoff 5 minutes after startup
|
sqlInit.dbReady.then(() => {
|
||||||
setTimeout(cls.wrap(cleanupDeletedNotes), 5 * 60 * 1000);
|
// first cleanup kickoff 5 minutes after startup
|
||||||
|
setTimeout(cls.wrap(cleanupDeletedNotes), 5 * 60 * 1000);
|
||||||
|
|
||||||
setInterval(cls.wrap(cleanupDeletedNotes), 4 * 3600 * 1000);
|
setInterval(cls.wrap(cleanupDeletedNotes), 4 * 3600 * 1000);
|
||||||
|
});
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
createNewNote,
|
createNewNote,
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<div id="history-navigation" style="display: none;">
|
<div id="history-navigation" style="display: none;">
|
||||||
<a id="history-back-button" title="Go to previous note." class="icon-action jam jam-arrow-square-left"></a>
|
<a id="history-back-button" title="Go to previous note." class="icon-action jam jam-arrow-square-left"></a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a id="history-forward-button" title="Go to next note." class="icon-action jam jam-arrow-square-right"></a>
|
<a id="history-forward-button" title="Go to next note." class="icon-action jam jam-arrow-square-right"></a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<div id="confirm-dialog-custom"></div>
|
<div id="confirm-dialog-custom"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button class="btn btn-default btn-sm" id="confirm-dialog-cancel-button">Cancel</button>
|
<button class="btn btn-secondary btn-sm" id="confirm-dialog-cancel-button">Cancel</button>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -108,7 +108,7 @@
|
|||||||
<div style="display: flex; justify-content: space-between;">
|
<div style="display: flex; justify-content: space-between;">
|
||||||
<button class="btn btn-primary">Save</button>
|
<button class="btn btn-primary">Save</button>
|
||||||
|
|
||||||
<button class="btn btn-default" type="button" data-help-page="Protected-notes">Help</button>
|
<button class="btn btn-secondary" type="button" data-help-page="Protected-notes">Help</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -125,7 +125,7 @@
|
|||||||
<div style="display: flex; justify-content: space-between;">
|
<div style="display: flex; justify-content: space-between;">
|
||||||
<button class="btn btn-primary">Save</button>
|
<button class="btn btn-primary">Save</button>
|
||||||
|
|
||||||
<button class="btn btn-default" type="button" data-help-page="Note-revisions">Help</button>
|
<button class="btn btn-secondary" type="button" data-help-page="Note-revisions">Help</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -154,7 +154,7 @@
|
|||||||
<div style="display: flex; justify-content: space-between;">
|
<div style="display: flex; justify-content: space-between;">
|
||||||
<button class="btn btn-primary">Save</button>
|
<button class="btn btn-primary">Save</button>
|
||||||
|
|
||||||
<button class="btn btn-default" type="button" data-help-page="Synchronization">Help</button>
|
<button class="btn btn-secondary" type="button" data-help-page="Synchronization">Help</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
@@ -164,24 +164,24 @@
|
|||||||
|
|
||||||
<p>This will test connection and handshake to the sync server. If sync server isn't initialized, this will set it up to sync with local document.</p>
|
<p>This will test connection and handshake to the sync server. If sync server isn't initialized, this will set it up to sync with local document.</p>
|
||||||
|
|
||||||
<button id="test-sync-button" class="btn btn-default">Test sync</button>
|
<button id="test-sync-button" class="btn btn-secondary">Test sync</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="advanced" class="tab-pane">
|
<div id="advanced" class="tab-pane">
|
||||||
<h4 style="margin-top: 0px;">Sync</h4>
|
<h4 style="margin-top: 0px;">Sync</h4>
|
||||||
<button id="force-full-sync-button" class="btn btn-default">Force full sync</button>
|
<button id="force-full-sync-button" class="btn btn-secondary">Force full sync</button>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
<button id="fill-sync-rows-button" class="btn btn-default">Fill sync rows</button>
|
<button id="fill-sync-rows-button" class="btn btn-secondary">Fill sync rows</button>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
<h4>Debugging</h4>
|
<h4>Debugging</h4>
|
||||||
|
|
||||||
<button id="anonymize-button" class="btn btn-default">Save anonymized database</button><br/><br/>
|
<button id="anonymize-button" class="btn btn-secondary">Save anonymized database</button><br/><br/>
|
||||||
|
|
||||||
<p>This action will create a new copy of the database and anonymise it (remove all note content and leave only structure and metadata)
|
<p>This action will create a new copy of the database and anonymise it (remove all note content and leave only structure and metadata)
|
||||||
for sharing online for debugging purposes without fear of leaking your personal data.</p>
|
for sharing online for debugging purposes without fear of leaking your personal data.</p>
|
||||||
@@ -190,7 +190,7 @@
|
|||||||
|
|
||||||
<p>This will rebuild database which will typically result in smaller database file. No data will be actually changed.</p>
|
<p>This will rebuild database which will typically result in smaller database file. No data will be actually changed.</p>
|
||||||
|
|
||||||
<button id="vacuum-database-button" class="btn btn-default">Vacuum database</button>
|
<button id="vacuum-database-button" class="btn btn-secondary">Vacuum database</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="about" class="tab-pane">
|
<div id="about" class="tab-pane">
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="col-md-5 offset-md-3" style="padding-top: 25px;">
|
<div class="col-xs-12 col-sm-10 col-md-6 col-lg-4 col-xl-4 mx-auto" style="padding-top: 25px;">
|
||||||
<h1>Trilium login</h1>
|
<h1>Trilium login</h1>
|
||||||
|
|
||||||
<% if (failedAuth) { %>
|
<% if (failedAuth) { %>
|
||||||
@@ -60,6 +60,8 @@
|
|||||||
device = /Mobi/.test(navigator.userAgent) ? "mobile" : "desktop";
|
device = /Mobi/.test(navigator.userAgent) ? "mobile" : "desktop";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log("Setting device cookie to:", device);
|
||||||
|
|
||||||
setCookie("trilium-device", device);
|
setCookie("trilium-device", device);
|
||||||
|
|
||||||
function setCookie(name, value) {
|
function setCookie(name, value) {
|
||||||
|
|||||||
@@ -2,10 +2,12 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||||
<title>Setup</title>
|
<title>Setup</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="setup-dialog" style="width: 700px; margin: auto; padding-top: 50px; display:none; font-size: larger;">
|
<div class="container">
|
||||||
|
<div id="setup-dialog" class="col-md-12 col-lg-8 col-xl-6 mx-auto" style="padding-top: 25px;">
|
||||||
<h1>Trilium Notes setup</h1>
|
<h1>Trilium Notes setup</h1>
|
||||||
|
|
||||||
<div class="alert alert-warning" id="alert" style="display: none;">
|
<div class="alert alert-warning" id="alert" style="display: none;">
|
||||||
@@ -47,7 +49,7 @@
|
|||||||
<input type="password" class="form-control" data-bind="value: password2" placeholder="Password">
|
<input type="password" class="form-control" data-bind="value: password2" placeholder="Password">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="button" data-bind="click: back" class="btn btn-default">Back</button>
|
<button type="button" data-bind="click: back" class="btn btn-secondary">Back</button>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -68,7 +70,7 @@
|
|||||||
<li>once you've done all this, click <a href="/">here</a></li>
|
<li>once you've done all this, click <a href="/">here</a></li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<button type="button" data-bind="click: back" class="btn btn-default">Back</button>
|
<button type="button" data-bind="click: back" class="btn btn-secondary">Back</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div data-bind="visible: step() == 'sync-from-server'">
|
<div data-bind="visible: step() == 'sync-from-server'">
|
||||||
@@ -95,7 +97,7 @@
|
|||||||
<input type="password" id="password1" class="form-control" data-bind="value: password1" placeholder="Password">
|
<input type="password" id="password1" class="form-control" data-bind="value: password1" placeholder="Password">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="button" data-bind="click: back" class="btn btn-default">Back</button>
|
<button type="button" data-bind="click: back" class="btn btn-secondary">Back</button>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -111,6 +113,7 @@
|
|||||||
Outstanding sync items: <strong id="outstanding-syncs">N/A</strong>
|
Outstanding sync items: <strong id="outstanding-syncs">N/A</strong>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|||||||
Reference in New Issue
Block a user