Skip to content

Commit

Permalink
Merge pull request #476 from reseau-constellation/liens-profonds
Browse files Browse the repository at this point in the history
Liens profonds
  • Loading branch information
julienmalard authored Nov 22, 2024
2 parents f1ed271 + 845b53d commit 512dc25
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
"d3": "^7.9.0",
"deep-equal": "^2.2.3",
"direction": "^2.0.1",
"electron-app-universal-protocol-client": "^2.1.1",
"electron-updater": "6.3.9",
"ennikkai": "^2.3.2",
"events": "^3.3.0",
Expand Down
19 changes: 19 additions & 0 deletions packages/main/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {app} from 'electron';
import './security-restrictions';
import {gestionnaireFenêtres} from '/@/constellation';
import {restoreOrCreateWindow} from '/@/mainWindow';
import { electronAppUniversalProtocolClient } from 'electron-app-universal-protocol-client';

/**
* Prevent electron from running multiple instances.
Expand Down Expand Up @@ -47,6 +48,24 @@ app
.then(restoreOrCreateWindow)
.catch(e => console.error('Failed create window:', e));

app
.whenReady()
.then(async ()=>{
electronAppUniversalProtocolClient.on(
'request',
async (requestUrl) => {
// Handle the request

console.log(requestUrl);
},
);

await electronAppUniversalProtocolClient.initialize({
protocol: 'constl',
mode: import.meta.env.DEV ? 'development' : 'production',
});
});

/**
* Install Vue.js or any other extension in development mode only.
* Note: You must install `electron-devtools-installer` manually
Expand Down
13 changes: 13 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('Test fenêtre appli', function () {
});

afterAll(async () => {
await fermer();
await fermer?.();
});

test('Main window state', async context => {
Expand Down

0 comments on commit 512dc25

Please sign in to comment.