mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2026-01-03 15:53:31 -08:00
feat: try use view.webContents.session.protocol.handle
This commit is contained in:
parent
ec5354babb
commit
98ded8d519
2 changed files with 16 additions and 9 deletions
|
|
@ -37,8 +37,11 @@ app.commandLine.appendSwitch('--disable-web-security');
|
|||
protocol.registerSchemesAsPrivileged([
|
||||
{ scheme: 'http', privileges: { standard: true, bypassCSP: true, allowServiceWorkers: true, supportFetchAPI: true, corsEnabled: true, stream: true } },
|
||||
{ scheme: 'https', privileges: { standard: true, bypassCSP: true, allowServiceWorkers: true, supportFetchAPI: true, corsEnabled: true, stream: true } },
|
||||
{ scheme: 'htmlString', privileges: { standard: true, bypassCSP: true, allowServiceWorkers: true, supportFetchAPI: true, corsEnabled: true, stream: true } },
|
||||
{ scheme: 'mailto', privileges: { standard: true } },
|
||||
]);
|
||||
// TODO: handle workspace name + tiddler name in uri https://www.electronjs.org/docs/latest/tutorial/launch-app-from-url-in-another-app
|
||||
app.setAsDefaultProtocolClient('tidgi');
|
||||
bindServiceAndProxy();
|
||||
const preferenceService = container.get<IPreferenceService>(serviceIdentifier.Preference);
|
||||
const updaterService = container.get<IUpdaterService>(serviceIdentifier.Updater);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue