Skip to content

Commit 7eae250

Browse files
Fix OSFMount link
1 parent 33db389 commit 7eae250

File tree

4 files changed

+28
-10
lines changed

4 files changed

+28
-10
lines changed

src/main/windows.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BrowserWindow } from "electron";
1+
import { BrowserWindow, shell } from "electron";
22

33
let mainWindow: BrowserWindow | null = null;
44

@@ -20,10 +20,24 @@ export function getOrCreateWindow(): BrowserWindow {
2020

2121
// mainWindow.webContents.toggleDevTools();
2222
mainWindow.loadFile("./dist/static/index.html");
23-
23+
24+
mainWindow.webContents.on("will-navigate", (event, url) =>
25+
handleNavigation(event, url)
26+
);
27+
mainWindow.webContents.on("new-window", (event, url) =>
28+
handleNavigation(event, url)
29+
);
30+
2431
mainWindow.on("closed", () => {
2532
mainWindow = null;
2633
});
2734

2835
return mainWindow;
2936
}
37+
38+
function handleNavigation(event: Electron.Event, url: string) {
39+
if (url.startsWith("http")) {
40+
event.preventDefault();
41+
shell.openExternal(url);
42+
}
43+
}

src/renderer/card-drive.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,14 @@ export class CardDrive extends React.Component<CardDriveProps, CardDriveState> {
5353
<p>
5454
Windows 10 cannot mount raw disk images (ironically, macOS and Linux
5555
can). However, tools exist that let you mount this drive, like the
56-
freeware tool <a href="https://google.com">OSFMount</a>. I am not
57-
affiliated with it, so please use it at your own risk.
56+
freeware tool{" "}
57+
<a
58+
target="_blank"
59+
href="https://www.osforensics.com/tools/mount-disk-images.html"
60+
>
61+
OSFMount
62+
</a>
63+
. I am not affiliated with it, so please use it at your own risk.
5864
</p>
5965
{this.renderMountButton("Windows Explorer")}
6066
</fieldset>

src/renderer/card-settings.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,11 @@ export class CardSettings extends React.Component<
7272
style={{ display: "none" }}
7373
/>
7474
<p>
75-
windows95 comes with a virtual CD drive. It can mount images in the "iso" format.
75+
windows95 comes with a virtual CD drive. It can mount images in the
76+
"iso" format.
7677
</p>
7778
<p id="floppy-path">
78-
{cdrom
79-
? `Inserted CD: ${cdrom.path}`
80-
: `No CD mounted`}
79+
{cdrom ? `Inserted CD: ${cdrom?.path}` : `No CD mounted`}
8180
</p>
8281
<button
8382
className="btn"
@@ -197,7 +196,7 @@ export class CardSettings extends React.Component<
197196
*
198197
* @param event
199198
*/
200-
private onChangeCdrom(event: React.ChangeEvent<HTMLInputElement>) {
199+
private onChangeCdrom(event: React.ChangeEvent<HTMLInputElement>) {
201200
const CdromFile =
202201
event.target.files && event.target.files.length > 0
203202
? event.target.files[0]

src/renderer/emulator.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,6 @@ export class Emulator extends React.Component<{}, EmulatorState> {
312312
console.log(`🚜 Starting emulator with options`, options);
313313

314314
window["emulator"] = new V86Starter(options);
315-
316315

317316
// New v86 instance
318317
this.setState({

0 commit comments

Comments
 (0)