Initial open-source release

This commit is contained in:
Will Chen
2025-04-11 09:37:05 -07:00
commit 43f67e0739
208 changed files with 45476 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
import type { IpcMainInvokeEvent } from "electron";
import { shell } from "electron";
export async function handleShellOpenExternal(
_event: IpcMainInvokeEvent,
url: string
): Promise<void> {
// Basic validation to ensure it's likely a URL
if (url && (url.startsWith("http://") || url.startsWith("https://"))) {
await shell.openExternal(url);
} else {
console.error(`Invalid URL attempt blocked: ${url}`);
// Optionally, you could throw an error back to the renderer
// throw new Error("Invalid or insecure URL provided.");
}
}