mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-11 18:24:43 +02:00
Electron: Fixed vertical scrollbar, and added option to display dev tool in prod
This commit is contained in:
parent
4bb9be8f78
commit
43bc7b5619
@ -46,6 +46,4 @@ script:
|
||||
cd ElectronClient/app
|
||||
rsync -aP ../../ReactNativeClient/lib/ lib/
|
||||
npm install
|
||||
ls -la .
|
||||
ls -la lib
|
||||
yarn dist
|
||||
|
@ -50,7 +50,7 @@ class ElectronAppWrapper {
|
||||
slashes: true
|
||||
}))
|
||||
|
||||
if (this.env_ === 'dev') this.win_.webContents.openDevTools();
|
||||
//if (this.env_ === 'dev') this.win_.webContents.openDevTools();
|
||||
|
||||
this.win_.on('closed', () => {
|
||||
this.win_ = null
|
||||
|
@ -276,6 +276,10 @@ class Application extends BaseApplication {
|
||||
async start(argv) {
|
||||
argv = await super.start(argv);
|
||||
|
||||
if (Setting.value('openDevTools')) {
|
||||
bridge().window().webContents.openDevTools();
|
||||
}
|
||||
|
||||
this.updateMenu('Main');
|
||||
|
||||
this.initRedux();
|
||||
|
@ -33,8 +33,6 @@ class NavigatorComponent extends Component {
|
||||
height: this.props.style.height,
|
||||
};
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<div style={this.props.style}>
|
||||
<Screen style={screenStyle} {...screenProps}/>
|
||||
|
@ -31,6 +31,15 @@ async function initialize(dispatch) {
|
||||
}, 10);
|
||||
});
|
||||
|
||||
// Need to dispatch this to make sure the components are
|
||||
// displayed at the right size. The windowContentSize is
|
||||
// also set in the store default state, but at that point
|
||||
// the window might not be at its final size.
|
||||
store.dispatch({
|
||||
type: 'WINDOW_CONTENT_SIZE_SET',
|
||||
size: bridge().windowContentSize(),
|
||||
});
|
||||
|
||||
store.dispatch({
|
||||
type: 'NOTE_VISIBLE_PANES_SET',
|
||||
panes: Setting.value('noteVisiblePanes'),
|
||||
|
@ -3,4 +3,4 @@ ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
cd "$ROOT_DIR"
|
||||
./build.sh || exit 1
|
||||
cd "$ROOT_DIR/app"
|
||||
./node_modules/.bin/electron . --env dev --log-level debug "$@"
|
||||
./node_modules/.bin/electron . --env dev --log-level debug --open-dev-tools "$@"
|
@ -93,6 +93,12 @@ class BaseApplication {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (arg == '--open-dev-tools') {
|
||||
Setting.setConstant('openDevTools', true);
|
||||
argv.splice(0, 1);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (arg == '--update-geolocation-disabled') {
|
||||
Note.updateGeolocationEnabled_ = false;
|
||||
argv.splice(0, 1);
|
||||
@ -338,8 +344,6 @@ class BaseApplication {
|
||||
this.dbLogger_.setLevel(Logger.LEVEL_DEBUG);
|
||||
}
|
||||
|
||||
// const packageJson = require('./package.json');
|
||||
// this.logger_.info(sprintf('Starting %s %s (%s)...', packageJson.name, packageJson.version, Setting.value('env')));
|
||||
this.logger_.info('Profile directory: ' + profileDir);
|
||||
|
||||
this.database_ = new JoplinDatabase(new DatabaseDriverNode());
|
||||
|
@ -400,6 +400,7 @@ Setting.constants_ = {
|
||||
resourceDir: '',
|
||||
profileDir: '',
|
||||
tempDir: '',
|
||||
openDevTools: false,
|
||||
}
|
||||
|
||||
module.exports = { Setting };
|
@ -18,11 +18,10 @@
|
||||
"*.min.js",
|
||||
"ElectronClient/app/gui/note-viewer/highlight/*.pack.js",
|
||||
"ElectronClient/app/css/font-awesome.min.css",
|
||||
"_mydocs/mdtest/vendor/bin/html-to-markdown",
|
||||
],
|
||||
"folder_exclude_patterns":
|
||||
[
|
||||
"_mydocs/mdtest/Pages/Countries",
|
||||
"_mydocs/mdtest",
|
||||
"_vieux",
|
||||
"ElectronClient/app/fonts",
|
||||
"CliClient/app/lib",
|
||||
@ -39,6 +38,7 @@
|
||||
"ElectronClient/build",
|
||||
"ElectronClient/app/lib",
|
||||
"ElectronClient/app/locale",
|
||||
"ElectronClient/app/dist",
|
||||
"node_modules",
|
||||
"ReactNativeClient/android/.gradle",
|
||||
"ReactNativeClient/android/.idea",
|
||||
|
Loading…
Reference in New Issue
Block a user