mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: adding auth window
This commit is contained in:
parent
884ba47b9b
commit
71d79a4a15
9 changed files with 51 additions and 10 deletions
|
@ -113,7 +113,7 @@ export function App() {
|
|||
return () => {
|
||||
listeners.forEach((unsubscribe) => unsubscribe());
|
||||
};
|
||||
}, [fetchUserDetails, updateUserDetails, clearUserDetails]);
|
||||
}, [fetchUserDetails, updateUserDetails, updateLibrary, clearUserDetails]);
|
||||
|
||||
const handleSearch = useCallback(
|
||||
(query: string) => {
|
||||
|
|
|
@ -12,7 +12,7 @@ export function SidebarProfile() {
|
|||
|
||||
const handleButtonClick = () => {
|
||||
if (userDetails === null) {
|
||||
window.electron.openExternal("https://auth.hydra.losbroxas.org");
|
||||
window.electron.openAuthWindow();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
1
src/renderer/src/declaration.d.ts
vendored
1
src/renderer/src/declaration.d.ts
vendored
|
@ -115,6 +115,7 @@ declare global {
|
|||
|
||||
/* Auth */
|
||||
signOut: () => Promise<void>;
|
||||
openAuthWindow: () => Promise<void>;
|
||||
onSignIn: (cb: () => void) => () => Electron.IpcRenderer;
|
||||
onSignOut: (cb: () => void) => () => Electron.IpcRenderer;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue