Skip to content

Commit 663f12d

Browse files
authored
Improve settings modal and build with script (#1645)
* Remove built with script for Pro users * Handle subscriptions better * Improve imports * Update settings modal usage * Update pro plan description
1 parent 99ac6fa commit 663f12d

File tree

38 files changed

+76
-36
lines changed

38 files changed

+76
-36
lines changed

apps/studio/electron/main/index.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,17 +148,22 @@ const setupAppEventListeners = () => {
148148
]);
149149
} catch (error) {
150150
console.error('Cleanup failed or timed out:', error);
151-
} finally {
152-
cleanupComplete = true;
153151
}
154152
}
155153

156154
app.on('before-quit', (event) => {
157155
if (!cleanupComplete) {
156+
cleanupComplete = false;
158157
event.preventDefault();
159-
cleanUp().then(() => {
160-
app.quit();
161-
});
158+
cleanUp()
159+
.catch((error) => {
160+
console.error('Cleanup failed:', error);
161+
app.quit();
162+
})
163+
.finally(() => {
164+
cleanupComplete = true;
165+
app.quit();
166+
});
162167
}
163168
});
164169

apps/studio/src/App.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ import { Toaster } from '@onlook/ui/toaster';
33
import { TooltipProvider } from '@onlook/ui/tooltip';
44
import { I18nextProvider } from 'react-i18next';
55
import { AppBar } from './components/AppBar';
6+
import { Modals } from './components/Modals';
67
import { ThemeProvider } from './components/ThemeProvider';
78
import i18n from './i18n';
89
import { Routes } from './routes';
9-
import { QuittingModal } from './routes/modals/Quitting';
10-
import { SettingsModal } from './routes/modals/Settings';
1110

1211
function App() {
1312
return (
@@ -16,8 +15,7 @@ function App() {
1615
<TooltipProvider>
1716
<AppBar />
1817
<Routes />
19-
<SettingsModal />
20-
<QuittingModal />
18+
<Modals />
2119
<Toaster />
2220
</TooltipProvider>
2321
</ThemeProvider>

0 commit comments

Comments
 (0)