Skip to content

Commit 3e3882d

Browse files
committed
Fix documentation opening in the same window
1 parent dcea4af commit 3e3882d

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

UI/src/app/_components/home/home.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h3><i class="fas fa-mobile-alt"></i> Tally Web Clients</h3>
2525
<div class="rounded bg-light p-3">
2626
<h3><i class="fas fa-book-open"></i> Documentation</h3>
2727
<p>View the documentation and usage instructions online if you need help along the way.</p>
28-
<a class="btn btn-outline-primary" href="https://josephdadams.github.io/TallyArbiter/">Documentation Link</a>
28+
<a class="btn btn-outline-primary" href="https://josephdadams.github.io/TallyArbiter/" target="_blank">Documentation Link</a>
2929
</div>
3030
<div class="rounded bg-light mt-5 p-3">
3131
<h3><i class="fas fa-tasks"></i> Producer</h3>

main.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,20 @@ if (!gotTheLock) {
130130
app.on('window-all-closed', function () {
131131
if (process.platform !== 'darwin') app.quit();
132132
});
133+
134+
// Listen for web contents being created
135+
app.on('web-contents-created', (e, contents) => {
136+
if (contents.getType() == 'window') {
137+
// Listen for any new window events
138+
contents.on('new-window', (e, url) => {
139+
e.preventDefault();
140+
const win = new BrowserWindow({ show: false });
141+
win.maximize();
142+
win.setMenu(null);
143+
win.webContents.on('did-finish-load', function() {
144+
win.show();
145+
});
146+
});
147+
}
148+
})
133149
}

0 commit comments

Comments
 (0)