Compare commits

..

11 Commits

Author SHA1 Message Date
zadam
c8e4a5c9e7 release 0.33.4 2019-06-26 21:20:30 +02:00
zadam
a3951f1cce make sure autocomplete is closed when navigating to note 2019-06-26 21:08:54 +02:00
zadam
7c77ae758b fix frontend reload again 2019-06-26 20:49:17 +02:00
zadam
20d3d61cec release 0.33.3 2019-06-24 20:47:50 +02:00
zadam
1b831f94a9 fix orphan note autocomplete, closes #569 2019-06-24 20:45:35 +02:00
zadam
3f241553aa fix pngquant for linux-x64 2019-06-24 20:27:28 +02:00
zadam
8624c83108 use 127.0.0.1 instead of localhost, #577 2019-06-24 20:26:28 +02:00
zadam
d49cae9cea fix update of window title during note renaming 2019-06-24 20:12:04 +02:00
zadam
504b2e2c4a Merge pull request #574 from maurerit/master
Build failed without python for arm
2019-06-21 09:10:17 +02:00
Matt Maurer
2c5292222f Build failed without python for arm 2019-06-20 23:45:31 +00:00
zadam
989da8877b added link map 2019-06-20 10:20:44 +02:00
11 changed files with 53 additions and 27 deletions

View File

@@ -18,6 +18,7 @@ RUN set -x \
make \
nasm \
libpng-dev \
python \
&& npm install --production \
&& apk del .build-dependencies

View File

@@ -7,6 +7,9 @@ rm -r node_modules/sqlite3/lib/binding/*
cp -r bin/deps/linux-x64/sqlite/* node_modules/sqlite3/lib/binding/
# rebuild binaries for image operations (pngquant ...)
npm rebuild
./node_modules/.bin/electron-packager . --asar --out=dist --executable-name=trilium --platform=linux --arch=x64 --overwrite
mv "./dist/Trilium Notes-linux-x64" $BUILD_DIR

View File

@@ -59,7 +59,7 @@ async function createMainWindow() {
mainWindowState.manage(win);
win.setMenuBarVisibility(false);
win.loadURL('http://localhost:' + await port);
win.loadURL('http://127.0.0.1:' + await port);
win.on('closed', onClosed);
win.webContents.on('new-window', (e, url) => {
@@ -74,7 +74,7 @@ async function createMainWindow() {
const parsedUrl = url.parse(targetUrl);
// we still need to allow internal redirects from setup and migration pages
if (parsedUrl.hostname !== 'localhost' || (parsedUrl.path && parsedUrl.path !== '/')) {
if (!['localhost', '127.0.0.1'].includes(parsedUrl.hostname) || (parsedUrl.path && parsedUrl.path !== '/')) {
ev.preventDefault();
}
});

File diff suppressed because one or more lines are too long

8
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "trilium",
"version": "0.33.1-beta",
"version": "0.33.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -2820,9 +2820,9 @@
"integrity": "sha512-PcW2a0tyTuPHz3tWyYqtK6r1fZ3gp+3Sop8Ph+ZYN81Ob5rwmbHEzaqs10N3BEsaGTkh/ooniXK+WwszGlc2+Q=="
},
"electron": {
"version": "6.0.0-beta.9",
"resolved": "https://registry.npmjs.org/electron/-/electron-6.0.0-beta.9.tgz",
"integrity": "sha512-tbBpSamFzD1ayJhF+sUo56e7qD+djdMOPh8B0iA0C10pYbi0HUSEH1EOLtB+UMWU3wkc8QOCMWcgz7wze1w6QQ==",
"version": "6.0.0-beta.11",
"resolved": "https://registry.npmjs.org/electron/-/electron-6.0.0-beta.11.tgz",
"integrity": "sha512-B6zh9c5pJ0BKKNkOEbF6vKXnBCWgtvY8LaUYDNeR9ttnPP0CCm0oovIoqP9/nN5gL8rlCoCgKWsjmiHu0jg7mA==",
"dev": true,
"requires": {
"@types/node": "^10.12.18",

View File

@@ -2,7 +2,7 @@
"name": "trilium",
"productName": "Trilium Notes",
"description": "Trilium Notes",
"version": "0.33.2-beta",
"version": "0.33.4",
"license": "AGPL-3.0-only",
"main": "electron.js",
"bin": {
@@ -75,7 +75,7 @@
},
"devDependencies": {
"devtron": "1.4.0",
"electron": "6.0.0-beta.9",
"electron": "6.0.0-beta.11",
"electron-builder": "20.44.2",
"electron-compile": "6.4.4",
"electron-installer-debian": "2.0.0",

View File

@@ -88,10 +88,13 @@ setTimeout(() => {
console.log("Lost connection to server");
}
try {
ws.send(JSON.stringify({
type: 'ping',
lastSyncId: lastSyncId
}));
}
catch (e) {} // if the connection is closed then this produces a lot of messages
}, 1000);
}, 0);

View File

@@ -401,11 +401,14 @@ tabRow.addListener('activeTabChange', async ({ detail }) => {
tabRow.addListener('tabRemove', async ({ detail }) => {
const tabId = detail.tabEl.getAttribute('data-tab-id');
const tabContentToDelete = tabContexts.find(nc => nc.tabId === tabId);
const tabContextToDelete = tabContexts.find(nc => nc.tabId === tabId);
if (tabContentToDelete) {
await tabContentToDelete.saveNoteIfChanged();
tabContentToDelete.$tabContent.remove();
if (tabContextToDelete) {
// sometimes there are orphan autocompletes after closing the tab
tabContextToDelete.closeAutocomplete();
await tabContextToDelete.saveNoteIfChanged();
tabContextToDelete.$tabContent.remove();
}
tabContexts = tabContexts.filter(nc => nc.tabId !== tabId);

View File

@@ -67,12 +67,18 @@ class TabContext {
this.components = {};
this.$noteTitle.on('input', () => {
if (!this.note) {
return;
}
this.noteChanged();
const title = this.$noteTitle.val();
this.note.title = this.$noteTitle.val();
this.tabRow.updateTab(this.$tab[0], {title});
treeService.setNoteTitle(this.noteId, title);
this.tabRow.updateTab(this.$tab[0], {title: this.note.title});
treeService.setNoteTitle(this.noteId, this.note.title);
this.setTitleBar();
});
if (utils.isDesktop()) {
@@ -103,6 +109,8 @@ class TabContext {
this.setTitleBar();
this.closeAutocomplete(); // esp. on windows autocomplete is not getting closed automatically
setTimeout(async () => {
// we include the note into recent list only if the user stayed on the note at least 5 seconds
if (notePath && notePath === this.notePath) {
@@ -328,6 +336,10 @@ class TabContext {
}
}
}
closeAutocomplete() {
this.$tabContent.find('.aa-input').autocomplete('close');
}
}
export default TabContext;

View File

@@ -1 +1 @@
module.exports = { buildDate:"2019-06-20T09:39:11+02:00", buildRevision: "fead3cd7ade63620655376dc5e85b4308ec71bde" };
module.exports = { buildDate:"2019-06-26T21:20:30+02:00", buildRevision: "a3951f1cce978699d81f312c590d71f6ca4c6771" };

View File

@@ -36,9 +36,13 @@
</div>
</div>
<div style="display: inline-block;">
<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-left: 0;">
<span aria-hidden="true">&times;</span>
</button>
<button class="help-button" type="button" data-help-page="Link-map" title="Help on Link map">?</button>
</div>
</div>
<div class="modal-body" style="outline: none; overflow: hidden;">
<div id="link-map-container"></div>