Skip to content

Commit

Permalink
Fix documentation opening in the same window
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoGheza committed Aug 5, 2021
1 parent dcea4af commit 3e3882d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
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
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 3e3882d

Please sign in to comment.