1
1
import { app , BrowserWindow , nativeTheme , dialog , ipcMain } from "electron" ;
2
- //import deeplink currently did not work in our WSL2 computers - commented out line 3 fixed our issue to be able to run in dev mode
3
- // import { Deeplink } from "electron-deeplink";
4
2
import isDev from "electron-is-dev" ;
5
3
import path from "path" ;
6
4
import os from "os" ;
@@ -27,19 +25,6 @@ let mainWindow;
27
25
let authCode ;
28
26
const protocol = isDev ? "overvuedev" : "overvue" ;
29
27
30
- // Used to console log for main process in production mode
31
- // ** Only works on production level application; throws errors if you run quasar dev
32
- // if (process.env.PROD) {
33
- // const deeplink = new Deeplink({
34
- // app,
35
- // mainWindow,
36
- // protocol,
37
- // isDev,
38
- // debugLogging: true,
39
- // // electronPath: '/node_modules/electron/dist/Electron.app'
40
- // });
41
- // }
42
-
43
28
// Handle dialogs for ExportProjectComponent
44
29
ipcMain . handle ( "exportProject" , async ( event , arg ) => {
45
30
const result = await dialog . showSaveDialog ( arg ) ;
@@ -152,17 +137,6 @@ function getSlackUser(token, userId) {
152
137
request . end ( ) ;
153
138
}
154
139
155
- function setOauthListener ( ) {
156
-
157
- // if (process.env.PROD) {
158
- // return deeplink.on("received", (link) => {
159
- // // Extracts Slack authorization code from deep link
160
- // authCode = link.split("=")[1];
161
- // sendTokenRequest();
162
- // });
163
- // }
164
- }
165
-
166
140
function createWindow ( ) {
167
141
/**
168
142
* Initial window options
203
177
. whenReady ( )
204
178
. then ( ( ) => {
205
179
createWindow ( ) ;
206
- setOauthListener ( ) ;
207
180
} )
208
181
. catch ( ( err ) => {
209
182
console . log ( err ) ;
@@ -218,6 +191,5 @@ app.on("window-all-closed", () => {
218
191
app . on ( "activate" , ( ) => {
219
192
if ( mainWindow === null ) {
220
193
createWindow ( ) ;
221
- setOauthListener ( ) ;
222
194
}
223
195
} ) ;
0 commit comments