feat(ui): bring back quick launcher (#5144)
Signed-off-by: Abhijay007 <Abhijay007j@gmail.com> Co-authored-by: Alex Hancock <alexhancock@block.xyz>
This commit is contained in:
+18
-13
@@ -8,20 +8,25 @@ import { client } from './api/client.gen';
|
||||
const App = lazy(() => import('./App'));
|
||||
|
||||
(async () => {
|
||||
console.log('window created, getting goosed connection info');
|
||||
const baseUrl = await window.electron.getGoosedHostPort();
|
||||
if (baseUrl === null) {
|
||||
window.alert('failed to start goose backend process');
|
||||
return;
|
||||
// Check if we're in the launcher view (doesn't need goosed connection)
|
||||
const isLauncher = window.location.hash === '#/launcher';
|
||||
|
||||
if (!isLauncher) {
|
||||
console.log('window created, getting goosed connection info');
|
||||
const baseUrl = await window.electron.getGoosedHostPort();
|
||||
if (baseUrl === null) {
|
||||
window.alert('failed to start goose backend process');
|
||||
return;
|
||||
}
|
||||
console.log('connecting at', baseUrl);
|
||||
client.setConfig({
|
||||
baseUrl,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-Secret-Key': await window.electron.getSecretKey(),
|
||||
},
|
||||
});
|
||||
}
|
||||
console.log('connecting at', baseUrl);
|
||||
client.setConfig({
|
||||
baseUrl,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-Secret-Key': await window.electron.getSecretKey(),
|
||||
},
|
||||
});
|
||||
|
||||
ReactDOM.createRoot(document.getElementById('root')!).render(
|
||||
<React.StrictMode>
|
||||
|
||||
Reference in New Issue
Block a user