mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-02 12:22:40 +02:00
switch to on-demand permission requests and improve suggestion UX
This commit is contained in:
parent
aeb3f13f91
commit
c5aa869adb
12 changed files with 195 additions and 89 deletions
|
|
@ -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');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue