Adds main process bridge for GitHub Device Flow auth
Enables GitHub Device Flow authentication through the main process to bypass CORS issues by introducing IPC bridge handlers and updating the adapter to use them when available. Improves error handling and logging for easier debugging. Wraps settings in a toast provider to support user notifications.
This commit is contained in:
@@ -2,6 +2,7 @@ import { init as initGhostty } from 'ghostty-web';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
import App from './App';
|
||||
import SettingsPage from './components/SettingsPage';
|
||||
import { ToastProvider } from './components/ui/toast';
|
||||
|
||||
// Pre-load Ghostty WASM immediately on app start for faster terminal open
|
||||
initGhostty().catch((err) => {
|
||||
@@ -27,7 +28,11 @@ const root = ReactDOM.createRoot(rootElement);
|
||||
const renderApp = () => {
|
||||
const route = getRoute();
|
||||
if (route === 'settings') {
|
||||
root.render(<SettingsPage />);
|
||||
root.render(
|
||||
<ToastProvider>
|
||||
<SettingsPage />
|
||||
</ToastProvider>
|
||||
);
|
||||
} else {
|
||||
root.render(<App />);
|
||||
}
|
||||
@@ -37,4 +42,4 @@ const renderApp = () => {
|
||||
renderApp();
|
||||
|
||||
// Listen for hash changes
|
||||
window.addEventListener('hashchange', renderApp);
|
||||
window.addEventListener('hashchange', renderApp);
|
||||
|
||||
Reference in New Issue
Block a user