mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-29 19:35:20 +02:00
refactor(deep-links, quick-ask, window): replace localhost references with dynamic server origin retrieval
This commit is contained in:
parent
a2847664c8
commit
fe797e65d6
4 changed files with 16 additions and 11 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { app } from 'electron';
|
||||
import path from 'path';
|
||||
import { getMainWindow } from './window';
|
||||
import { getServerPort } from './server';
|
||||
import { getServerOrigin } from './server';
|
||||
import { trackEvent } from './analytics';
|
||||
|
||||
const PROTOCOL = 'surfsense';
|
||||
|
|
@ -23,7 +23,7 @@ function handleDeepLink(url: string) {
|
|||
});
|
||||
if (parsed.hostname === 'auth' && parsed.pathname === '/callback') {
|
||||
const params = parsed.searchParams.toString();
|
||||
win.loadURL(`http://localhost:${getServerPort()}/auth/callback?${params}`);
|
||||
win.loadURL(`${getServerOrigin()}/auth/callback?${params}`);
|
||||
}
|
||||
|
||||
win.show();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue