switch to on-demand permission requests and improve suggestion UX

This commit is contained in:
CREDO23 2026-04-03 19:57:48 +02:00
parent aeb3f13f91
commit c5aa869adb
12 changed files with 195 additions and 89 deletions

View file

@ -8,7 +8,6 @@ import { setupMenu } from './modules/menu';
import { registerQuickAsk, unregisterQuickAsk } from './modules/quick-ask';
import { registerAutocomplete, unregisterAutocomplete } from './modules/autocomplete';
import { registerIpcHandlers } from './ipc/handlers';
import { allPermissionsGranted } from './modules/permissions';
registerGlobalErrorHandlers();
@ -18,14 +17,6 @@ if (!setupDeepLinks()) {
registerIpcHandlers();
function getInitialPath(): string {
const granted = allPermissionsGranted();
if (process.platform === 'darwin' && !granted) {
return '/desktop/permissions';
}
return '/dashboard';
}
app.whenReady().then(async () => {
setupMenu();
try {
@ -36,8 +27,7 @@ app.whenReady().then(async () => {
return;
}
const initialPath = getInitialPath();
createMainWindow(initialPath);
createMainWindow('/dashboard');
registerQuickAsk();
registerAutocomplete();
setupAutoUpdater();
@ -46,7 +36,7 @@ app.whenReady().then(async () => {
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createMainWindow(getInitialPath());
createMainWindow('/dashboard');
}
});
});