1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-06 09:19:22 +02:00

Various clean up and tweaks for Electron app

This commit is contained in:
Laurent Cozic
2017-11-04 13:23:15 +00:00
parent b10b5566f7
commit 056c0dbab7
11 changed files with 154 additions and 27 deletions

View File

@@ -312,9 +312,7 @@ class Application extends BaseApplication {
}
}
} else { // Otherwise open the GUI
this.store_ = createStore(reducer, applyMiddleware(this.generalMiddleware()));
BaseModel.dispatch = this.store().dispatch;
FoldersScreenUtils.dispatch = this.store().dispatch;
this.initRedux();
const AppGui = require('./app-gui.js');
this.gui_ = new AppGui(this, this.store());

View File

@@ -1,20 +0,0 @@
const fs = require('fs-extra');
class FsDriverNode {
appendFileSync(path, string) {
return fs.appendFileSync(path, string);
}
writeBinaryFile(path, content) {
let buffer = new Buffer(content);
return fs.writeFile(path, buffer);
}
readFile(path) {
return fs.readFile(path);
}
}
module.exports.FsDriverNode = FsDriverNode;

View File

@@ -14,7 +14,7 @@ const { Tag } = require('lib/models/tag.js');
const { NoteTag } = require('lib/models/note-tag.js');
const { Setting } = require('lib/models/setting.js');
const { Logger } = require('lib/logger.js');
const { FsDriverNode } = require('./fs-driver-node.js');
const { FsDriverNode } = require('lib/fs-driver-node.js');
const { shimInit } = require('lib/shim-init-node.js');
const { _ } = require('lib/locale.js');