Merge branch 'stable'

This commit is contained in:
azivner 2017-11-20 23:37:27 -05:00
commit 51ad89ce63
7 changed files with 16 additions and 10 deletions

View File

@ -16,9 +16,6 @@ const https = require('https');
const config = require('../services/config');
const log = require('../services/log');
/**
* Get port from environment and store in Express.
*/
const port = normalizePort(config['Network']['port'] || '3000');
app.set('port', port);

View File

@ -1,6 +1,7 @@
'use strict';
const electron = require('electron');
const path = require('path');
const config = require('./services/config');
const app = electron.app;
@ -23,8 +24,10 @@ function createMainWindow() {
icon: path.join(__dirname, 'public/images/app-icons/png/256x256.png')
});
const port = config['Network']['port'] || '3000';
win.setMenu(null);
win.loadURL('http://localhost:3000');
win.loadURL('http://localhost:' + port);
win.on('closed', onClosed);
win.webContents.on('new-window', (e, url) => {

View File

@ -24,14 +24,20 @@ $(document).bind('keydown', 'alt+t', () => {
});
$(document).bind('keydown', 'f5', () => {
location.reload();
window.location.reload(true);
return false;
});
$(document).bind('keydown', 'ctrl+r', () => {
window.location.reload(true);
return false;
});
$(document).bind('keydown', 'ctrl+shift+i', () => {
if (isElectron()) {
require('remote').getCurrentWindow().toggleDevTools();
require('electron').remote.getCurrentWindow().toggleDevTools();
return false;
}

View File

@ -20,7 +20,7 @@ async function regularBackup() {
async function backupNow() {
const now = utils.nowTimestamp();
const date_str = new Date().toISOString().substr(0, 19);
const date_str = new Date().toISOString().substr(0, 19).replace(/:/g, '');
const backupFile = dataDir.BACKUP_DIR + "/" + "backup-" + date_str + ".db";

View File

@ -1 +1 @@
module.exports = { build_date:"2017-11-17T00:09:29-05:00", build_revision: "a6bf04f8d4dc92445e6b4decd7dbbaa2f3e3ebaa" };
module.exports = { build_date:"2017-11-20T08:43:54-05:00", build_revision: "2f2969b2a1fa080a7555f2dfb7ec8b933f0421fe" };

View File

@ -189,7 +189,7 @@ async function updateNote(noteId, newNote, ctx) {
await sql.remove("links", noteId);
for (const link in newNote.links) {
await sql.insert("links", link);
//await sql.insert("links", link);
}
await sync_table.addNoteTreeSync(noteId);

View File

@ -19,7 +19,7 @@ async function updateNote(entity, links, sourceId) {
for (const link of links) {
delete link['lnk_id'];
await sql.insert('link', link);
//await sql.insert('link', link);
}
await sync_table.addNoteSync(entity.note_id, sourceId);