setup electron multi-window architecture (#102)

* prototype with two windows

* use deps in separate window render process

* enhance autoplay into desktop overlay

* fix: autoplay window not applying tailwind styles
This commit was merged in pull request #102.
This commit is contained in:
Arjun Patel
2026-03-31 15:05:59 -07:00
committed by GitHub
parent 7f490b4596
commit 3de3ca7cef
21 changed files with 428 additions and 133 deletions
+14 -1
View File
@@ -1,5 +1,5 @@
import { useEffect } from "react";
import { HashRouter, Routes, Route } from "react-router-dom";
import { HashRouter, Routes, Route, useNavigate } from "react-router-dom";
import { TooltipProvider } from "@/components/ui/tooltip";
import { useAuthStore } from "@/stores/auth-store";
import { LoginPage } from "@/features/auth/login-page";
@@ -42,9 +42,22 @@ const App = () => {
return <AuthenticatedApp />;
};
function AutoplayNavigationListener() {
const navigate = useNavigate();
useEffect(() => {
return window.electronAutoplay.onNavigate((data) => {
navigate(`/${data.networkId}/${data.streamId}`);
});
}, [navigate]);
return null;
}
function AuthenticatedApp() {
return (
<HashRouter>
<AutoplayNavigationListener />
<Routes>
<Route path="settings" element={<SettingsPage />} />