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