mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: handle login from deeplink
This commit is contained in:
parent
55c214eae6
commit
32566e5dfc
17 changed files with 243 additions and 62 deletions
|
@ -128,7 +128,21 @@ contextBridge.exposeInMainWorld("electron", {
|
|||
restartAndInstallUpdate: () => ipcRenderer.invoke("restartAndInstallUpdate"),
|
||||
|
||||
/* Profile */
|
||||
getUserProfile: (username: string) =>
|
||||
ipcRenderer.invoke("getUserProfile", username),
|
||||
getMe: () => ipcRenderer.invoke("getMe"),
|
||||
|
||||
/* User */
|
||||
getUser: (username: string) => ipcRenderer.invoke("getUser", username),
|
||||
|
||||
/* Auth */
|
||||
signout: () => ipcRenderer.invoke("signout"),
|
||||
onSignIn: (cb: () => void) => {
|
||||
const listener = (_event: Electron.IpcRendererEvent) => cb();
|
||||
ipcRenderer.on("on-signin", listener);
|
||||
return () => ipcRenderer.removeListener("on-signin", listener);
|
||||
},
|
||||
onSignOut: (cb: () => void) => {
|
||||
const listener = (_event: Electron.IpcRendererEvent) => cb();
|
||||
ipcRenderer.on("on-signout", listener);
|
||||
return () => ipcRenderer.removeListener("on-signout", listener);
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue