Skip to content

Commit

Permalink
Merge pull request #146 from MatteoGheza/feat_electron_improvements
Browse files Browse the repository at this point in the history
Electron improvements
  • Loading branch information
MatteoGheza authored Aug 5, 2021
2 parents 1b80dc4 + 3e3882d commit 96bf05a
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 3 deletions.
2 changes: 1 addition & 1 deletion UI/src/app/_components/home/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h3><i class="fas fa-mobile-alt"></i> Tally Web Clients</h3>
<div class="rounded bg-light p-3">
<h3><i class="fas fa-book-open"></i> Documentation</h3>
<p>View the documentation and usage instructions online if you need help along the way.</p>
<a class="btn btn-outline-primary" href="https://josephdadams.github.io/TallyArbiter/">Documentation Link</a>
<a class="btn btn-outline-primary" href="https://josephdadams.github.io/TallyArbiter/" target="_blank">Documentation Link</a>
</div>
<div class="rounded bg-light mt-5 p-3">
<h3><i class="fas fa-tasks"></i> Producer</h3>
Expand Down
24 changes: 22 additions & 2 deletions electron-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@
},
"publish": ["github"],
"extraResources": ["build/**"],
"files": [
"**/*",
"!**/node_modules/*/{Makefile,CHANGELOG.md,CONTRIBUTING.md,HISTORY.md,History.md,README.md,README,readme.md,readme,LICENSE,license}",
"!**/node_modules/*/{test,__tests__,tests,powered-test,example,examples}",
"!**/node_modules/*.d.ts",
"!**/node_modules/.bin",
"!**/*.{iml,o,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,xproj}",
"!.editorconfig",
"!**/.*",
"!**/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,.gitignore,.gitattributes}",
"!**/{__pycache__,thumbs.db,.flowconfig,.idea,.vs,.nyc_output}",
"!**/{appveyor.yml,.travis.yml,circle.yml}",
"!**/{npm-debug.log,yarn.lock,.yarn-integrity,.yarn-metadata.json}",
"!**/{UI,docs,.github,bin,release,release_old}",
"!**/Dockerfile",
"!**/Dockerfile.standalone",
"!**/Procfile"
],
"win": {
"target": [
"nsis"
Expand All @@ -13,11 +31,13 @@
"mac": {
"target": [
"dmg"
]
],
"category": "public.app-category.video"
},
"linux": {
"target": [
"AppImage"
]
],
"category": "AudioVideo"
}
}
16 changes: 16 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,20 @@ if (!gotTheLock) {
app.on('window-all-closed', function () {
if (process.platform !== 'darwin') app.quit();
});

// Listen for web contents being created
app.on('web-contents-created', (e, contents) => {
if (contents.getType() == 'window') {
// Listen for any new window events
contents.on('new-window', (e, url) => {
e.preventDefault();
const win = new BrowserWindow({ show: false });
win.maximize();
win.setMenu(null);
win.webContents.on('did-finish-load', function() {
win.show();
});
});
}
})
}

0 comments on commit 96bf05a

Please sign in to comment.