Skip to content

Commit

Permalink
Merge pull request #1 from Tom-abc/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Tom-abc authored Mar 12, 2022
2 parents 09e6b63 + 22087a3 commit ab28909
Show file tree
Hide file tree
Showing 4 changed files with 641 additions and 437 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,4 @@ dist
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
.pnp.*
12 changes: 10 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const {app,BrowserWindow,ipcMain,Menu}=require("electron");
const path=require("path");
const got=require("got");
function window(){
let win=new BrowserWindow({
show:false,
webPreferences:{
nodeIntegration:true,
contextIsolation:false
Expand All @@ -13,11 +13,14 @@ function window(){
win.setIcon("icon.ico");
break;
case "linux":
win.setIcon("icons/256x256.png");
win.setIcon(`${__dirname}/icons/256x256.png`);
break;
default:break;
}
win.loadFile("index.html");
win.once("ready-to-show",()=>{
win.show();
});
}
function ready(){
let menu=Menu.buildFromTemplate([
Expand All @@ -28,6 +31,11 @@ function ready(){
label:"New Window",
click:window,
accelerator:"Ctrl+N"
},
{
label:"Exit",
click:()=>{app.quit();},
accelerator:"Ctrl+Q"
}
]
}
Expand Down
Loading

0 comments on commit ab28909

Please sign in to comment.