Skip to content

Commit

Permalink
Merge pull request #237 from FaultyFunctions/various-bug-fixes
Browse files Browse the repository at this point in the history
Various bug fixes & improvements
  • Loading branch information
blurymind authored Feb 7, 2021
2 parents a33441d + df59f64 commit 8086682
Show file tree
Hide file tree
Showing 18 changed files with 529 additions and 317 deletions.
Binary file added electron/build/icon.ico
Binary file not shown.
3 changes: 2 additions & 1 deletion electron/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ function createWindow() {
autoHideMenuBar: true,
webPreferences: {
nodeIntegration: true
}
},
icon: __dirname + '/icon.ico'
});
mainWindow.setMenu(null);
// and load the index.html of the app.
Expand Down
2 changes: 1 addition & 1 deletion electron/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@
]
},
"build": {
"productName": "Yarn Editor"
"productName": "Yarn Editor",
"fileAssociations": {
"ext": "yarn",
"name": "Yarn File",
"role": "editor"
},
"win": {
"target": "msi",
"icon": "build/icon.ico"
}
}
}
16 changes: 9 additions & 7 deletions electron/yarn-main.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
// This file serves as e middle layer to communicate between the web app and electron's native features
const electron = require("electron");
const electron = require('electron');
const ipcRenderer = electron.ipcRenderer;
const fs = require("fs");
const path = require('path');
const fs = require('fs');
const yarnWindow = electron.remote.getCurrentWindow();
let yarn = null;

const editorFrameEl = document.getElementById("yarn-frame");
window.addEventListener("yarnReady", e => {
const editorFrameEl = document.getElementById('yarn-frame');
window.addEventListener('yarnReady', (e) => {
//give the yarn webb app the fs module, so we can ctrl+s in electron without pop ups
yarn = e;
yarn.app.fs = fs;
yarn.app.electron = electron;
ipcRenderer.send("yarn-ready");
yarn.app.path = path;
ipcRenderer.send('yarn-ready');
});
editorFrameEl.src = "app/index.html";
editorFrameEl.src = 'app/index.html';

// Called on load yarn data.
window.addEventListener("yarnLoadedData", e => {
window.addEventListener('yarnLoadedData', (e) => {
// yarnWindow.setTitle(e.data.editingPath());
});
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 39 additions & 39 deletions src/index.html

Large diffs are not rendered by default.

Loading

0 comments on commit 8086682

Please sign in to comment.