Skip to content

Commit

Permalink
Fix OSFMount link
Browse files Browse the repository at this point in the history
  • Loading branch information
felixrieseberg committed Jun 26, 2022
1 parent 33db389 commit 7eae250
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 10 deletions.
18 changes: 16 additions & 2 deletions src/main/windows.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BrowserWindow } from "electron";
import { BrowserWindow, shell } from "electron";

let mainWindow: BrowserWindow | null = null;

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

// mainWindow.webContents.toggleDevTools();
mainWindow.loadFile("./dist/static/index.html");


mainWindow.webContents.on("will-navigate", (event, url) =>
handleNavigation(event, url)
);
mainWindow.webContents.on("new-window", (event, url) =>
handleNavigation(event, url)
);

mainWindow.on("closed", () => {
mainWindow = null;
});

return mainWindow;
}

function handleNavigation(event: Electron.Event, url: string) {
if (url.startsWith("http")) {
event.preventDefault();
shell.openExternal(url);
}
}
10 changes: 8 additions & 2 deletions src/renderer/card-drive.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,14 @@ export class CardDrive extends React.Component<CardDriveProps, CardDriveState> {
<p>
Windows 10 cannot mount raw disk images (ironically, macOS and Linux
can). However, tools exist that let you mount this drive, like the
freeware tool <a href="https://google.com">OSFMount</a>. I am not
affiliated with it, so please use it at your own risk.
freeware tool{" "}
<a
target="_blank"
href="https://www.osforensics.com/tools/mount-disk-images.html"
>
OSFMount
</a>
. I am not affiliated with it, so please use it at your own risk.
</p>
{this.renderMountButton("Windows Explorer")}
</fieldset>
Expand Down
9 changes: 4 additions & 5 deletions src/renderer/card-settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,11 @@ export class CardSettings extends React.Component<
style={{ display: "none" }}
/>
<p>
windows95 comes with a virtual CD drive. It can mount images in the "iso" format.
windows95 comes with a virtual CD drive. It can mount images in the
"iso" format.
</p>
<p id="floppy-path">
{cdrom
? `Inserted CD: ${cdrom.path}`
: `No CD mounted`}
{cdrom ? `Inserted CD: ${cdrom?.path}` : `No CD mounted`}
</p>
<button
className="btn"
Expand Down Expand Up @@ -197,7 +196,7 @@ export class CardSettings extends React.Component<
*
* @param event
*/
private onChangeCdrom(event: React.ChangeEvent<HTMLInputElement>) {
private onChangeCdrom(event: React.ChangeEvent<HTMLInputElement>) {
const CdromFile =
event.target.files && event.target.files.length > 0
? event.target.files[0]
Expand Down
1 change: 0 additions & 1 deletion src/renderer/emulator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,6 @@ export class Emulator extends React.Component<{}, EmulatorState> {
console.log(`🚜 Starting emulator with options`, options);

window["emulator"] = new V86Starter(options);


// New v86 instance
this.setState({
Expand Down

0 comments on commit 7eae250

Please sign in to comment.