mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-24 08:12:24 +02:00
Testing auto update
This commit is contained in:
parent
cfa4da39e5
commit
01d3bf8a11
@ -30,7 +30,7 @@ const appDefaultState = Object.assign({}, defaultState, {
|
||||
fileToImport: null,
|
||||
windowCommand: null,
|
||||
noteVisiblePanes: ['editor', 'viewer'],
|
||||
});
|
||||
});
|
||||
|
||||
class Application extends BaseApplication {
|
||||
|
||||
@ -234,6 +234,11 @@ class Application extends BaseApplication {
|
||||
label: _('Documentation'),
|
||||
accelerator: 'F1',
|
||||
click () { bridge().openExternal('http://joplin.cozic.net') }
|
||||
}, {
|
||||
label: _('Check for updates'),
|
||||
click () {
|
||||
bridge().checkForUpdatesAndNotify()
|
||||
}
|
||||
}, {
|
||||
label: _('About Joplin'),
|
||||
click: () => {
|
||||
|
@ -1,5 +1,7 @@
|
||||
const { _ } = require('lib/locale.js');
|
||||
|
||||
const autoUpdater = require("electron-updater").autoUpdater;
|
||||
|
||||
class Bridge {
|
||||
|
||||
constructor(electronWrapper) {
|
||||
@ -66,6 +68,13 @@ class Bridge {
|
||||
return require('electron').shell.openItem(fullPath)
|
||||
}
|
||||
|
||||
checkForUpdatesAndNotify() {
|
||||
autoUpdater.logger = require("electron-log")
|
||||
autoUpdater.logger.info('Hello, log');
|
||||
autoUpdater.logger.transports.file.level = "info"
|
||||
return autoUpdater.checkForUpdatesAndNotify();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
let bridge_ = null;
|
||||
|
@ -107,8 +107,6 @@ class NoteTextComponent extends React.Component {
|
||||
}
|
||||
|
||||
async reloadNote(props) {
|
||||
console.info('Reload note...');
|
||||
|
||||
this.mdToHtml_ = null;
|
||||
|
||||
const noteId = props.noteId;
|
||||
|
2
ElectronClient/app/gui/NoteText.min.js
vendored
2
ElectronClient/app/gui/NoteText.min.js
vendored
@ -107,8 +107,6 @@ class NoteTextComponent extends React.Component {
|
||||
}
|
||||
|
||||
async reloadNote(props) {
|
||||
console.info('Reload note...');
|
||||
|
||||
this.mdToHtml_ = null;
|
||||
|
||||
const noteId = props.noteId;
|
||||
|
@ -313,7 +313,7 @@ class BaseApplication {
|
||||
this.dbLogger_.setLevel(initArgs.logLevel);
|
||||
|
||||
if (Setting.value('env') === 'dev') {
|
||||
this.dbLogger_.setLevel(Logger.LEVEL_WARN);
|
||||
this.dbLogger_.setLevel(Logger.LEVEL_DEBUG);
|
||||
}
|
||||
|
||||
// const packageJson = require('./package.json');
|
||||
|
75
ElectronClient/app/package-lock.json
generated
75
ElectronClient/app/package-lock.json
generated
@ -599,14 +599,12 @@
|
||||
"bluebird": {
|
||||
"version": "3.5.1",
|
||||
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz",
|
||||
"integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA=="
|
||||
},
|
||||
"bluebird-lst": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/bluebird-lst/-/bluebird-lst-1.0.5.tgz",
|
||||
"integrity": "sha512-Ey0bDNys5qpYPhZ/oQ9vOEvD0TYQDTILMXWP2iGfvMg7rSDde+oV4aQQgqRH+CvBFNz2BSDQnPGMUl6LKBUUQA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bluebird": "3.5.1"
|
||||
}
|
||||
@ -1487,6 +1485,11 @@
|
||||
"resolved": "https://registry.npmjs.org/electron-is-dev/-/electron-is-dev-0.1.2.tgz",
|
||||
"integrity": "sha1-ihBD4ys6HaHD9VPc4oznZCRhZ+M="
|
||||
},
|
||||
"electron-log": {
|
||||
"version": "2.2.11",
|
||||
"resolved": "https://registry.npmjs.org/electron-log/-/electron-log-2.2.11.tgz",
|
||||
"integrity": "sha512-e+DHJkLJoaawDxyy9i2SMIViG/GV12DUE3T9a6yMdFp695c2u/kWYUZbUy31RzgX9uC/JuewXrO54tXdANgRRQ=="
|
||||
},
|
||||
"electron-osx-sign": {
|
||||
"version": "0.4.7",
|
||||
"resolved": "https://registry.npmjs.org/electron-osx-sign/-/electron-osx-sign-0.4.7.tgz",
|
||||
@ -1554,6 +1557,61 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"electron-updater": {
|
||||
"version": "2.16.1",
|
||||
"resolved": "https://registry.npmjs.org/electron-updater/-/electron-updater-2.16.1.tgz",
|
||||
"integrity": "sha512-QBsCxYocnZcoDhTGEBO4NtNMC0daZ6UghB8BauuotaZFD5l0MRDsyBuGILAL03CvNmxJ3kOViCxCvCKU7V5mgg==",
|
||||
"requires": {
|
||||
"bluebird-lst": "1.0.5",
|
||||
"builder-util-runtime": "3.1.0",
|
||||
"electron-is-dev": "0.3.0",
|
||||
"fs-extra-p": "4.4.4",
|
||||
"js-yaml": "3.10.0",
|
||||
"lazy-val": "1.0.2",
|
||||
"lodash.isequal": "4.5.0",
|
||||
"semver": "5.4.1",
|
||||
"source-map-support": "0.5.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"builder-util-runtime": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-3.1.0.tgz",
|
||||
"integrity": "sha512-O1CkL1lF8xv5TWclrfefx+QZSE47/MXOUOLgNQKTcL8fOGsna4501ehQPSHJWs/MuErUXInQbkaTnjxGC3fxRA==",
|
||||
"requires": {
|
||||
"bluebird-lst": "1.0.5",
|
||||
"debug": "3.1.0",
|
||||
"fs-extra-p": "4.4.4",
|
||||
"sax": "1.2.4"
|
||||
}
|
||||
},
|
||||
"debug": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
|
||||
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
|
||||
"requires": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"electron-is-dev": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/electron-is-dev/-/electron-is-dev-0.3.0.tgz",
|
||||
"integrity": "sha1-FOb9pcaOnk7L7/nM8DfL18BcWv4="
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
|
||||
},
|
||||
"source-map-support": {
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.0.tgz",
|
||||
"integrity": "sha512-vUoN3I7fHQe0R/SJLKRdKYuEdRGogsviXFkHHo17AWaTGv17VLnxw+CFXvqy+y4ORZ3doWLQcxRYfwKrsd/H7Q==",
|
||||
"requires": {
|
||||
"source-map": "0.6.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"encoding": {
|
||||
"version": "0.1.12",
|
||||
"resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz",
|
||||
@ -1614,8 +1672,7 @@
|
||||
"esprima": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz",
|
||||
"integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==",
|
||||
"dev": true
|
||||
"integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw=="
|
||||
},
|
||||
"esutils": {
|
||||
"version": "2.0.2",
|
||||
@ -1868,7 +1925,6 @@
|
||||
"version": "4.4.4",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra-p/-/fs-extra-p-4.4.4.tgz",
|
||||
"integrity": "sha512-zHsMNJWhXD184QfHKEIFSQSgAFNV7v9J+Nt2XpaLZp2nTz6WxZNV+R4G2uYeGeLTMaKvUZiqGKrH/4iFCupcUA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bluebird-lst": "1.0.5",
|
||||
"fs-extra": "4.0.2"
|
||||
@ -2463,7 +2519,6 @@
|
||||
"version": "3.10.0",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz",
|
||||
"integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"argparse": "1.0.9",
|
||||
"esprima": "4.0.0"
|
||||
@ -2561,8 +2616,7 @@
|
||||
"lazy-val": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/lazy-val/-/lazy-val-1.0.2.tgz",
|
||||
"integrity": "sha512-2BaSu6qVnicKdWQPysrffZVFAKcPcZQ/q2YyeSjAxWaJlvCvKSrkcvsSHlleeIfA//fW2goTcYDTy2cBLN7+PQ==",
|
||||
"dev": true
|
||||
"integrity": "sha512-2BaSu6qVnicKdWQPysrffZVFAKcPcZQ/q2YyeSjAxWaJlvCvKSrkcvsSHlleeIfA//fW2goTcYDTy2cBLN7+PQ=="
|
||||
},
|
||||
"lcid": {
|
||||
"version": "1.0.0",
|
||||
@ -3724,8 +3778,7 @@
|
||||
"sax": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
|
||||
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
|
||||
"dev": true
|
||||
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
|
||||
},
|
||||
"semver": {
|
||||
"version": "5.4.1",
|
||||
|
@ -6,7 +6,8 @@
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"pack": "node_modules/.bin/electron-builder --dir",
|
||||
"dist": "node_modules/.bin/electron-builder"
|
||||
"dist": "node_modules/.bin/electron-builder",
|
||||
"publish": "build -p always"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -20,7 +21,10 @@
|
||||
"build": {
|
||||
"appId": "net.cozic.joplin-desktop",
|
||||
"win": {
|
||||
"icon": "../../Assets/Joplin.ico"
|
||||
"icon": "../../Assets/Joplin.ico",
|
||||
"publish": [
|
||||
"github"
|
||||
]
|
||||
}
|
||||
},
|
||||
"homepage": "https://github.com/laurent22/joplin#readme",
|
||||
@ -37,6 +41,8 @@
|
||||
"dependencies": {
|
||||
"app-module-path": "^2.2.0",
|
||||
"electron-context-menu": "^0.9.1",
|
||||
"electron-log": "^2.2.11",
|
||||
"electron-updater": "^2.16.1",
|
||||
"follow-redirects": "^1.2.5",
|
||||
"form-data": "^2.3.1",
|
||||
"fs-extra": "^4.0.2",
|
||||
|
@ -313,7 +313,7 @@ class BaseApplication {
|
||||
this.dbLogger_.setLevel(initArgs.logLevel);
|
||||
|
||||
if (Setting.value('env') === 'dev') {
|
||||
this.dbLogger_.setLevel(Logger.LEVEL_WARN);
|
||||
this.dbLogger_.setLevel(Logger.LEVEL_DEBUG);
|
||||
}
|
||||
|
||||
// const packageJson = require('./package.json');
|
||||
|
Loading…
Reference in New Issue
Block a user