mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Merge branch 'master' of github.com:laurent22/joplin
This commit is contained in:
commit
ec50808ba1
@ -526,22 +526,22 @@ class AppGui {
|
||||
return;
|
||||
}
|
||||
|
||||
let note = this.widget('noteList').currentItem;
|
||||
let folder = this.widget('folderList').currentItem;
|
||||
let args = splitCommandString(cmd);
|
||||
try {
|
||||
let note = this.widget('noteList').currentItem;
|
||||
let folder = this.widget('folderList').currentItem;
|
||||
let args = splitCommandString(cmd);
|
||||
|
||||
for (let i = 0; i < args.length; i++) {
|
||||
if (args[i] == '$n') {
|
||||
args[i] = note ? note.id : '';
|
||||
} else if (args[i] == '$b') {
|
||||
args[i] = folder ? folder.id : '';
|
||||
} else if (args[i] == '$c') {
|
||||
const item = this.activeListItem();
|
||||
args[i] = item ? item.id : '';
|
||||
for (let i = 0; i < args.length; i++) {
|
||||
if (args[i] == '$n') {
|
||||
args[i] = note ? note.id : '';
|
||||
} else if (args[i] == '$b') {
|
||||
args[i] = folder ? folder.id : '';
|
||||
} else if (args[i] == '$c') {
|
||||
const item = this.activeListItem();
|
||||
args[i] = item ? item.id : '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
await this.app().execCommand(args);
|
||||
} catch (error) {
|
||||
this.stdout(error.message);
|
||||
|
@ -659,6 +659,15 @@ msgid ""
|
||||
"synchronisation again may fix the problem."
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Could not synchronize with OneDrive.\n"
|
||||
"\n"
|
||||
"This error often happens when using OneDrive for Business, which "
|
||||
"unfortunately cannot be supported.\n"
|
||||
"\n"
|
||||
"Please consider using a regular OneDrive account."
|
||||
msgstr ""
|
||||
|
||||
#, javascript-format
|
||||
msgid "Cannot access %s"
|
||||
msgstr ""
|
||||
|
@ -708,6 +708,15 @@ msgid ""
|
||||
"synchronisation again may fix the problem."
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Could not synchronize with OneDrive.\n"
|
||||
"\n"
|
||||
"This error often happens when using OneDrive for Business, which "
|
||||
"unfortunately cannot be supported.\n"
|
||||
"\n"
|
||||
"Please consider using a regular OneDrive account."
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, javascript-format
|
||||
msgid "Cannot access %s"
|
||||
msgstr "No se puede acceder a %s"
|
||||
|
@ -715,6 +715,15 @@ msgstr ""
|
||||
"Impossible de rafraîchir la connexion à OneDrive. Démarrez la "
|
||||
"synchronisation à nouveau pour corriger le problème."
|
||||
|
||||
msgid ""
|
||||
"Could not synchronize with OneDrive.\n"
|
||||
"\n"
|
||||
"This error often happens when using OneDrive for Business, which "
|
||||
"unfortunately cannot be supported.\n"
|
||||
"\n"
|
||||
"Please consider using a regular OneDrive account."
|
||||
msgstr ""
|
||||
|
||||
#, javascript-format
|
||||
msgid "Cannot access %s"
|
||||
msgstr "Impossible d'accéder à %s"
|
||||
|
@ -659,6 +659,15 @@ msgid ""
|
||||
"synchronisation again may fix the problem."
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Could not synchronize with OneDrive.\n"
|
||||
"\n"
|
||||
"This error often happens when using OneDrive for Business, which "
|
||||
"unfortunately cannot be supported.\n"
|
||||
"\n"
|
||||
"Please consider using a regular OneDrive account."
|
||||
msgstr ""
|
||||
|
||||
#, javascript-format
|
||||
msgid "Cannot access %s"
|
||||
msgstr ""
|
||||
|
2
CliClient/package-lock.json
generated
2
CliClient/package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "joplin",
|
||||
"version": "0.10.74",
|
||||
"version": "0.10.75",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -18,7 +18,7 @@
|
||||
],
|
||||
"owner": "Laurent Cozic"
|
||||
},
|
||||
"version": "0.10.74",
|
||||
"version": "0.10.75",
|
||||
"bin": {
|
||||
"joplin": "./main.js"
|
||||
},
|
||||
|
@ -325,6 +325,8 @@ class Application extends BaseApplication {
|
||||
AlarmService.setDriver(new AlarmServiceDriverNode({ appName: packageInfo.build.appId }));
|
||||
AlarmService.setLogger(reg.logger());
|
||||
|
||||
reg.setShowErrorMessageBoxHandler((message) => { bridge().showErrorMessageBox(message) });
|
||||
|
||||
if (Setting.value('openDevTools')) {
|
||||
bridge().window().webContents.openDevTools();
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -312,15 +312,19 @@ class MdToHtml {
|
||||
font-family: sans-serif;
|
||||
padding-bottom: ` + options.paddingBottom + `;
|
||||
}
|
||||
p, h1, h2, h3, h4, ul, table {
|
||||
p, h1, h2, h3, h4, h5, h6, ul, table {
|
||||
margin-top: 0;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
h1 {
|
||||
font-size: 1.2em;
|
||||
font-size: 1.5em;
|
||||
font-weight: bold;
|
||||
}
|
||||
h2 {
|
||||
font-size: 1.2em;
|
||||
font-weight: bold;
|
||||
}
|
||||
h3, h4, h5, h6 {
|
||||
font-size: 1em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
@ -21,6 +21,15 @@ reg.setLogger = (l) => {
|
||||
reg.logger_ = l;
|
||||
}
|
||||
|
||||
reg.setShowErrorMessageBoxHandler = (v) => {
|
||||
reg.showErrorMessageBoxHandler_ = v;
|
||||
}
|
||||
|
||||
reg.showErrorMessageBox = (message) => {
|
||||
if (!reg.showErrorMessageBoxHandler_) return;
|
||||
reg.showErrorMessageBoxHandler_(message);
|
||||
}
|
||||
|
||||
reg.syncTarget = (syncTargetId = null) => {
|
||||
if (syncTargetId === null) syncTargetId = Setting.value('sync.target');
|
||||
if (reg.syncTargets_[syncTargetId]) return reg.syncTargets_[syncTargetId];
|
||||
@ -84,8 +93,22 @@ reg.scheduleSync = async (delay = null) => {
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
reg.logger().info('Could not run background sync: ');
|
||||
reg.logger().info('Could not run background sync:');
|
||||
reg.logger().info(error);
|
||||
|
||||
// Special case to display OneDrive Business error. This is the full error that's received when trying to use a OneDrive Business account:
|
||||
//
|
||||
// {"error":"invalid_client","error_description":"AADSTS50011: The reply address 'http://localhost:1917' does not match the reply addresses configured for
|
||||
// the application: 'cbabb902-d276-4ea4-aa88-062a5889d6dc'. More details: not specified\r\nTrace ID: 6e63dac6-8b37-47e2-bd1b-4768f8713400\r\nCorrelation
|
||||
// ID: acfd6503-8d97-4349-ae2e-e7a19dd7b6bc\r\nTimestamp: 2017-12-01 13:35:55Z","error_codes":[50011],"timestamp":"2017-12-01 13:35:55Z","trace_id":
|
||||
// "6e63dac6-8b37-47e2-bd1b-4768f8713400","correlation_id":"acfd6503-8d97-4349-ae2e-e7a19dd7b6bc"}: TOKEN: null Error: {"error":"invalid_client",
|
||||
// "error_description":"AADSTS50011: The reply address 'http://localhost:1917' does not match the reply addresses configured for the application:
|
||||
// 'cbabb902-d276-4ea4-aa88-062a5889d6dc'. More details: not specified\r\nTrace ID: 6e63dac6-8b37-47e2-bd1b-4768f8713400\r\nCorrelation ID
|
||||
// acfd6503-8d97-4349-ae2e-e7a19dd7b6bc\r\nTimestamp: 2017-12-01 13:35:55Z","error_codes":[50011],"timestamp":"2017-12-01 13:35:55Z","trace_id":
|
||||
// "6e63dac6-8b37-47e2-bd1b-4768f8713400","correlation_id":"acfd6503-8d97-4349-ae2e-e7a19dd7b6bc"}
|
||||
if (error && error.message && error.message.indexOf('"invalid_client"') >= 0) {
|
||||
reg.showErrorMessageBox(_('Could not synchronize with OneDrive.\n\nThis error often happens when using OneDrive for Business, which unfortunately cannot be supported.\n\nPlease consider using a regular OneDrive account.'));
|
||||
}
|
||||
}
|
||||
|
||||
reg.setupRecurrentSync();
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -274,6 +274,7 @@ async function initialize(dispatch, backButtonHandler) {
|
||||
mainLogger.setLevel(Logger.LEVEL_DEBUG);
|
||||
|
||||
reg.setLogger(mainLogger);
|
||||
reg.setShowErrorMessageBoxHandler((message) => { alert(message) });
|
||||
|
||||
reg.logger().info('====================================');
|
||||
reg.logger().info('Starting application ' + Setting.value('appId') + ' (' + Setting.value('env') + ')');
|
||||
@ -310,7 +311,7 @@ async function initialize(dispatch, backButtonHandler) {
|
||||
if (Setting.value('env') == 'prod') {
|
||||
await db.open({ name: 'joplin.sqlite' })
|
||||
} else {
|
||||
await db.open({ name: 'joplin-67.sqlite' })
|
||||
await db.open({ name: 'joplin-68.sqlite' })
|
||||
//await db.open({ name: 'joplin-67.sqlite' })
|
||||
|
||||
// await db.exec('DELETE FROM notes');
|
||||
|
Loading…
Reference in New Issue
Block a user