Former-commit-id: 6b97a6b53b66defdcbf826562a701b5bf8bf8c65
This commit is contained in:
troyeguo
2020-09-10 16:44:20 +08:00
parent f52ab3c382
commit ac4224768d
3 changed files with 1801 additions and 1665 deletions

22
main.ts
View File

@@ -10,17 +10,6 @@ const isDev = require("electron-is-dev");
const path = require("path");
const fontList = require("font-list");
ipcMain.on("fonts-ready", (event, arg) => {
fontList
.getFonts()
.then((fonts) => {
event.returnValue = fonts;
})
.catch((err) => {
console.log(err);
});
});
let mainWindow;
app.on("ready", () => {
@@ -38,4 +27,15 @@ app.on("ready", () => {
? "http://localhost:3000/"
: `file://${path.join(__dirname, "./build/index.html")}`;
mainWindow.loadURL(urlLocation);
ipcMain.on("fonts-ready", (event, arg) => {
fontList
.getFonts()
.then((fonts) => {
event.returnValue = fonts;
})
.catch((err) => {
console.log(err);
});
});
});

View File

@@ -126,7 +126,6 @@
"node-sass": "^4.13.0",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-fontawesome": "^1.7.1",
"react-redux": "^7.2.0",
"react-scripts": "3.4.0",
"react-simplemde-editor": "^4.1.0",

3443
yarn.lock
View File

File diff suppressed because it is too large Load Diff