mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-11 18:24:43 +02:00
Various tweaks to get prod version to work
This commit is contained in:
parent
395804ec0d
commit
48061457ac
@ -519,9 +519,15 @@ msgid ""
|
|||||||
"New notebook \"%s\" will be created and file \"%s\" will be imported into it"
|
"New notebook \"%s\" will be created and file \"%s\" will be imported into it"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Please create a notebook first."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Note title:"
|
msgid "Note title:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Please create a notebook first"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "To-do title:"
|
msgid "To-do title:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -572,10 +572,18 @@ msgstr ""
|
|||||||
"Un nouveau carnet \"%s\" va être créé et le fichier \"%s\" va être importé "
|
"Un nouveau carnet \"%s\" va être créé et le fichier \"%s\" va être importé "
|
||||||
"dedans. Continuer ?"
|
"dedans. Continuer ?"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid "Please create a notebook first."
|
||||||
|
msgstr "Veuillez d'abord sélectionner un carnet."
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid "Note title:"
|
msgid "Note title:"
|
||||||
msgstr "cat <titre>"
|
msgstr "cat <titre>"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid "Please create a notebook first"
|
||||||
|
msgstr "Veuillez d'abord sélectionner un carnet."
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid "To-do title:"
|
msgid "To-do title:"
|
||||||
msgstr "cat <titre>"
|
msgstr "cat <titre>"
|
||||||
|
@ -519,9 +519,15 @@ msgid ""
|
|||||||
"New notebook \"%s\" will be created and file \"%s\" will be imported into it"
|
"New notebook \"%s\" will be created and file \"%s\" will be imported into it"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Please create a notebook first."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Note title:"
|
msgid "Note title:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Please create a notebook first"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "To-do title:"
|
msgid "To-do title:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
2
CliClient/package-lock.json
generated
2
CliClient/package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "joplin",
|
"name": "joplin",
|
||||||
"version": "0.10.66",
|
"version": "0.10.68",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
],
|
],
|
||||||
"owner": "Laurent Cozic"
|
"owner": "Laurent Cozic"
|
||||||
},
|
},
|
||||||
"version": "0.10.66",
|
"version": "0.10.68",
|
||||||
"bin": {
|
"bin": {
|
||||||
"joplin": "./main.js"
|
"joplin": "./main.js"
|
||||||
},
|
},
|
||||||
|
@ -6,8 +6,9 @@ const urlUtils = require('lib/urlUtils.js');
|
|||||||
|
|
||||||
class ElectronAppWrapper {
|
class ElectronAppWrapper {
|
||||||
|
|
||||||
constructor(electronApp) {
|
constructor(electronApp, env) {
|
||||||
this.electronApp_ = electronApp;
|
this.electronApp_ = electronApp;
|
||||||
|
this.env_ = env;
|
||||||
this.win_ = null;
|
this.win_ = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,7 +37,7 @@ class ElectronAppWrapper {
|
|||||||
slashes: true
|
slashes: true
|
||||||
}))
|
}))
|
||||||
|
|
||||||
this.win_.webContents.openDevTools()
|
if (this.env_ === 'dev') this.win_.webContents.openDevTools();
|
||||||
|
|
||||||
this.win_.on('closed', () => {
|
this.win_.on('closed', () => {
|
||||||
this.win_ = null
|
this.win_ = null
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const { Note } = require('lib/models/note.js');
|
const { Note } = require('lib/models/note.js');
|
||||||
|
const { Setting } = require('lib/models/setting.js');
|
||||||
const { IconButton } = require('./IconButton.min.js');
|
const { IconButton } = require('./IconButton.min.js');
|
||||||
const { connect } = require('react-redux');
|
const { connect } = require('react-redux');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale.js');
|
||||||
@ -46,7 +47,6 @@ class NoteTextComponent extends React.Component {
|
|||||||
// https://github.com/ajaxorg/ace/issues/2046
|
// https://github.com/ajaxorg/ace/issues/2046
|
||||||
this.editorMaxScrollTop_ = 0;
|
this.editorMaxScrollTop_ = 0;
|
||||||
this.onAfterEditorRender_ = () => {
|
this.onAfterEditorRender_ = () => {
|
||||||
console.info('ENDER done');
|
|
||||||
const r = this.editor_.editor.renderer;
|
const r = this.editor_.editor.renderer;
|
||||||
this.editorMaxScrollTop_ = Math.max(0, r.layerConfig.maxHeight - r.$size.scrollerHeight);
|
this.editorMaxScrollTop_ = Math.max(0, r.layerConfig.maxHeight - r.$size.scrollerHeight);
|
||||||
|
|
||||||
@ -243,7 +243,7 @@ class NoteTextComponent extends React.Component {
|
|||||||
webviewReady: true,
|
webviewReady: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
this.webview_.openDevTools();
|
// if (Setting.value('env') === 'dev') this.webview_.openDevTools();
|
||||||
}
|
}
|
||||||
|
|
||||||
webview_ref(element) {
|
webview_ref(element) {
|
||||||
|
4
ElectronClient/app/gui/NoteText.min.js
vendored
4
ElectronClient/app/gui/NoteText.min.js
vendored
@ -1,5 +1,6 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const { Note } = require('lib/models/note.js');
|
const { Note } = require('lib/models/note.js');
|
||||||
|
const { Setting } = require('lib/models/setting.js');
|
||||||
const { IconButton } = require('./IconButton.min.js');
|
const { IconButton } = require('./IconButton.min.js');
|
||||||
const { connect } = require('react-redux');
|
const { connect } = require('react-redux');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale.js');
|
||||||
@ -46,7 +47,6 @@ class NoteTextComponent extends React.Component {
|
|||||||
// https://github.com/ajaxorg/ace/issues/2046
|
// https://github.com/ajaxorg/ace/issues/2046
|
||||||
this.editorMaxScrollTop_ = 0;
|
this.editorMaxScrollTop_ = 0;
|
||||||
this.onAfterEditorRender_ = () => {
|
this.onAfterEditorRender_ = () => {
|
||||||
console.info('ENDER done');
|
|
||||||
const r = this.editor_.editor.renderer;
|
const r = this.editor_.editor.renderer;
|
||||||
this.editorMaxScrollTop_ = Math.max(0, r.layerConfig.maxHeight - r.$size.scrollerHeight);
|
this.editorMaxScrollTop_ = Math.max(0, r.layerConfig.maxHeight - r.$size.scrollerHeight);
|
||||||
|
|
||||||
@ -243,7 +243,7 @@ class NoteTextComponent extends React.Component {
|
|||||||
webviewReady: true
|
webviewReady: true
|
||||||
});
|
});
|
||||||
|
|
||||||
this.webview_.openDevTools();
|
// if (Setting.value('env') === 'dev') this.webview_.openDevTools();
|
||||||
}
|
}
|
||||||
|
|
||||||
webview_ref(element) {
|
webview_ref(element) {
|
||||||
|
@ -347,17 +347,12 @@ class MdToHtml {
|
|||||||
width: auto;
|
width: auto;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
pre, code {
|
|
||||||
white-space: pre;
|
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const styleHtml = '<style>' + normalizeCss + "\n" + css + '</style>';
|
const styleHtml = '<style>' + normalizeCss + "\n" + css + '</style>';
|
||||||
|
|
||||||
const output = styleHtml + renderedBody;
|
const output = styleHtml + renderedBody;
|
||||||
|
|
||||||
console.info(renderedBody);
|
|
||||||
|
|
||||||
this.cachedContent_ = output;
|
this.cachedContent_ = output;
|
||||||
this.cachedContentKey_ = cacheKey;
|
this.cachedContentKey_ = cacheKey;
|
||||||
return this.cachedContent_;
|
return this.cachedContent_;
|
||||||
|
@ -283,7 +283,6 @@ function localeStrings(canonicalName) {
|
|||||||
function setLocale(canonicalName) {
|
function setLocale(canonicalName) {
|
||||||
if (currentLocale_ == canonicalName) return;
|
if (currentLocale_ == canonicalName) return;
|
||||||
currentLocale_ = closestSupportedLocale(canonicalName);
|
currentLocale_ = closestSupportedLocale(canonicalName);
|
||||||
console.info('Set locale to ' + currentLocale_);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function languageCode() {
|
function languageCode() {
|
||||||
|
@ -12,7 +12,19 @@ process.on('unhandledRejection', (reason, p) => {
|
|||||||
process.exit(1);
|
process.exit(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
const wrapper = new ElectronAppWrapper(electronApp);
|
// Flags are parsed properly in BaseApplication, however it's better to have
|
||||||
|
// the env as early as possible to enable debugging capabilities.
|
||||||
|
function envFromArgs(args) {
|
||||||
|
if (!args) return 'prod';
|
||||||
|
const envIndex = args.indexOf('--env');
|
||||||
|
const devIndex = args.indexOf('dev');
|
||||||
|
if (envIndex === devIndex - 1) return 'dev';
|
||||||
|
return 'prod';
|
||||||
|
}
|
||||||
|
|
||||||
|
const env = envFromArgs(process.argv);
|
||||||
|
|
||||||
|
const wrapper = new ElectronAppWrapper(electronApp, env);
|
||||||
|
|
||||||
initBridge(wrapper);
|
initBridge(wrapper);
|
||||||
|
|
||||||
|
@ -353,8 +353,6 @@ class MdToHtml {
|
|||||||
|
|
||||||
const output = styleHtml + renderedBody;
|
const output = styleHtml + renderedBody;
|
||||||
|
|
||||||
console.info(renderedBody);
|
|
||||||
|
|
||||||
this.cachedContent_ = output;
|
this.cachedContent_ = output;
|
||||||
this.cachedContentKey_ = cacheKey;
|
this.cachedContentKey_ = cacheKey;
|
||||||
return this.cachedContent_;
|
return this.cachedContent_;
|
||||||
|
@ -283,7 +283,6 @@ function localeStrings(canonicalName) {
|
|||||||
function setLocale(canonicalName) {
|
function setLocale(canonicalName) {
|
||||||
if (currentLocale_ == canonicalName) return;
|
if (currentLocale_ == canonicalName) return;
|
||||||
currentLocale_ = closestSupportedLocale(canonicalName);
|
currentLocale_ = closestSupportedLocale(canonicalName);
|
||||||
console.info('Set locale to ' + currentLocale_);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function languageCode() {
|
function languageCode() {
|
||||||
|
Loading…
Reference in New Issue
Block a user