diff --git a/main.js b/main.js index 3275103..ace58ed 100644 --- a/main.js +++ b/main.js @@ -1,4 +1,4 @@ -const { app, BrowserWindow } = require('electron') +const { app, BrowserWindow, protocol } = require('electron') var win; @@ -14,10 +14,19 @@ function createWindow() }); } +app.setAsDefaultProtocolClient("eau"); app.on("ready", () => { createWindow(); - scanForGames(); + + protocol.registerFileProtocol("eau", (request, callback) => + { + console.log(request.url); + console.log("callback: " + callback.name); + }, (error) => + { + console.log(error.name); + }); }); app.on("window-all-closed", () => @@ -30,10 +39,4 @@ app.on("activate", () => { if (win === null) createWindow(); -}); - - -function scanForGames() -{ - -} \ No newline at end of file +}); \ No newline at end of file diff --git a/src/ts/index.ts b/src/ts/index.ts index fa4115d..b1fb0c6 100644 --- a/src/ts/index.ts +++ b/src/ts/index.ts @@ -32,29 +32,14 @@ function openSettings() { $("#content").load("dist/html/settings.html", () => { - // document.getElementById("steamLogBtn").onclick = () => { steamLogIn(); }; + document.getElementById("steamLogBtn").onclick = (event) => + { + event.preventDefault(); + require("electron").shell.openExternal("eau.raccoon-sdg.fr"); + }; }); document.getElementById("title").innerHTML = " Settings"; } -//Log In (not necesary, only need to use public methods for now) -// import Oidc, { UserManagerSettings, OidcClientSettings } from "oidc-client"; - -// var OidcSettings: OidcClientSettings = -// { -// authority: "https://steamcommunity.com/openid", -// redirect_uri: "localhost:5500", -// response_type: "token", -// scope: "openid" -// }; - -// function steamLogIn() -// { -// Oidc.Log.logger = console; -// console.log("Logging into steam"); -// var client = new Oidc.OidcClient(OidcSettings); -// client.createSigninRequest(); -// } - require("./Library"); require("./Carousel"); \ No newline at end of file