Skip to content

Commit a9ec375

Browse files
authored
Merge pull request #1132 from jijojosephk/electron_29
Electron upgrade to 29
2 parents c5b6295 + 1e2ef17 commit a9ec375

File tree

4 files changed

+86
-59
lines changed

4 files changed

+86
-59
lines changed

app/index.js

-4
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,6 @@ if (config.disableGpu) {
8787
logger.info('Disabling GPU support...');
8888
app.commandLine.appendSwitch('disable-gpu');
8989
app.commandLine.appendSwitch('disable-software-rasterizer');
90-
// app.commandLine.appendSwitch('disable-gpu-compositing');
91-
// app.commandLine.appendSwitch('disable-gpu-rasterization');
92-
// app.commandLine.appendSwitch('disable-gpu-sandbox');
93-
// app.disableHardwareAcceleration();
9490
}
9591

9692
if (!gotTheLock) {

app/mainAppWindow/index.js

+34-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
require('@electron/remote/main').initialize();
2-
const { shell, BrowserWindow, ipcMain, app, session, nativeTheme, powerSaveBlocker, dialog, webFrameMain } = require('electron');
2+
const { shell, BrowserWindow, ipcMain, app, session, nativeTheme, powerSaveBlocker, dialog, webFrameMain, Notification } = require('electron');
33
const isDarkMode = nativeTheme.shouldUseDarkColors;
44
const windowStateKeeper = require('electron-window-state');
55
const path = require('path');
@@ -15,6 +15,7 @@ const TrayIconChooser = require('../browser/tools/trayIconChooser');
1515
// eslint-disable-next-line no-unused-vars
1616
const { AppConfiguration } = require('../appConfiguration');
1717
const connMgr = require('../connectionManager');
18+
const fs = require('fs');
1819

1920
/**
2021
* @type {TrayIconChooser}
@@ -29,6 +30,8 @@ let isControlPressed = false;
2930

3031
let incomingCallCommandProcess = null;
3132

33+
let lastNotifyTime = null;
34+
3235
/**
3336
* @type {URL}
3437
*/
@@ -230,7 +233,8 @@ function onBeforeRequestHandler(details, callback) {
230233
} else {
231234
// Open the request externally
232235
logger.debug('DEBUG - webRequest to ' + details.url + ' intercepted!');
233-
shell.openExternal(details.url);
236+
//shell.openExternal(details.url);
237+
writeUrlBlockLog(details.url);
234238
// decrement the counter
235239
aboutBlankRequestCount -= 1;
236240
callback({ cancel: true });
@@ -304,6 +308,34 @@ function onNewWindow(details) {
304308
return secureOpenLink(details);
305309
}
306310

311+
/**
312+
* @param {string} url
313+
*/
314+
async function writeUrlBlockLog(url) {
315+
const curBlockTime = new Date();
316+
const logfile = path.join(appConfig.configPath, 'teams-for-linux-blocked.log');
317+
const lstream = fs.createWriteStream(logfile, { flags: 'a' }).on('error', onLogStreamError);
318+
lstream.write(`[${new Date().toLocaleString()}]: Blocked '${url}'\n`, onLogStreamError);
319+
lstream.end();
320+
const notifDuration = lastNotifyTime == null ? 60 : (curBlockTime.getTime() - lastNotifyTime.getTime()) / 1000;
321+
if (notifDuration >= 60) {
322+
new Notification({
323+
title: 'Teams for Linux',
324+
body: 'One or more web requests have been blocked. Please check the log for more details.'
325+
}).show();
326+
lastNotifyTime = curBlockTime;
327+
}
328+
}
329+
330+
/**
331+
* @param {Error} e
332+
*/
333+
function onLogStreamError(e) {
334+
if (e) {
335+
logger.error(e.message);
336+
}
337+
}
338+
307339
function onPageTitleUpdated(event, title) {
308340
window.webContents.send('page-title', title);
309341
}

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "teams-for-linux",
3-
"version": "1.4.12",
3+
"version": "1.4.13",
44
"main": "app/index.js",
55
"description": "Unofficial client for Microsoft Teams for Linux",
66
"homepage": "https://github.com/IsmaelMartinez/teams-for-linux",
@@ -49,9 +49,9 @@
4949
},
5050
"devDependencies": {
5151
"@electron/fuses": "^1.7.0",
52-
"electron": "28.2.1",
53-
"electron-builder": "24.9.1",
54-
"eslint": "8.56.0",
52+
"electron": "29.0.1",
53+
"electron-builder": "24.12.0",
54+
"eslint": "8.57.0",
5555
"yarn": "1.22.21"
5656
},
5757
"build": {

yarn.lock

+48-49
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,12 @@
119119
minimatch "^3.1.2"
120120
strip-json-comments "^3.1.1"
121121

122-
"@eslint/js@8.56.0":
123-
version "8.56.0"
124-
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.56.0.tgz#ef20350fec605a7f7035a01764731b2de0f3782b"
125-
integrity sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==
122+
"@eslint/js@8.57.0":
123+
version "8.57.0"
124+
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f"
125+
integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==
126126

127-
"@humanwhocodes/config-array@^0.11.13":
127+
"@humanwhocodes/config-array@^0.11.14":
128128
version "0.11.14"
129129
resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b"
130130
integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==
@@ -263,10 +263,10 @@
263263
dependencies:
264264
undici-types "~5.26.4"
265265

266-
"@types/node@^18.11.18":
267-
version "18.19.14"
268-
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.14.tgz#1880ff1b3ac913f3877f711588e5ed227da01886"
269-
integrity sha512-EnQ4Us2rmOS64nHDWr0XqAD8DsO6f3XR6lf9UIIrZQpUzPVdN/oPuEzfDWNHSyXLvoGgjuEm/sPwFGSSs35Wtg==
266+
"@types/node@^20.9.0":
267+
version "20.11.20"
268+
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.20.tgz#f0a2aee575215149a62784210ad88b3a34843659"
269+
integrity sha512-7/rR21OS+fq8IyHTgtLkDK949uzsa6n8BkziAKtPVpugIkO6D+/ooXMvzXxDnZrmtXVfjb1bKQafYpb8s89LOg==
270270
dependencies:
271271
undici-types "~5.26.4"
272272

@@ -383,12 +383,11 @@ [email protected]:
383383
resolved "https://registry.yarnpkg.com/app-builder-bin/-/app-builder-bin-4.0.0.tgz#1df8e654bd1395e4a319d82545c98667d7eed2f0"
384384
integrity sha512-xwdG0FJPQMe0M0UA4Tz0zEB8rBJTRA5a476ZawAqiBkMv16GRK5xpXThOjMaEOFnZ6zabejjG4J3da0SXG63KA==
385385

386-
app-builder-lib@24.9.1:
387-
version "24.9.1"
388-
resolved "https://registry.yarnpkg.com/app-builder-lib/-/app-builder-lib-24.9.1.tgz#bf3568529298b4de8595ed1acbb351fe27db5ba4"
389-
integrity sha512-Q1nYxZcio4r+W72cnIRVYofEAyjBd3mG47o+zms8HlD51zWtA/YxJb01Jei5F+jkWhge/PTQK+uldsPh6d0/4g==
386+
app-builder-lib@24.12.0:
387+
version "24.12.0"
388+
resolved "https://registry.yarnpkg.com/app-builder-lib/-/app-builder-lib-24.12.0.tgz#2e985968c341d28fc887be3ecee658e6a240e147"
389+
integrity sha512-t/xinVrMbsEhwljLDoFOtGkiZlaxY1aceZbHERGAS02EkUHJp9lgs/+L8okXLlYCaDSqYdB05Yb8Co+krvguXA==
390390
dependencies:
391-
"7zip-bin" "~5.2.0"
392391
"@develar/schema-utils" "~2.6.5"
393392
"@electron/notarize" "2.1.0"
394393
"@electron/osx-sign" "1.0.5"
@@ -397,12 +396,12 @@ [email protected]:
397396
"@types/fs-extra" "9.0.13"
398397
async-exit-hook "^2.0.1"
399398
bluebird-lst "^1.0.9"
400-
builder-util "24.8.1"
399+
builder-util "24.9.4"
401400
builder-util-runtime "9.2.3"
402401
chromium-pickle-js "^0.2.0"
403402
debug "^4.3.4"
404403
ejs "^3.1.8"
405-
electron-publish "24.8.1"
404+
electron-publish "24.9.4"
406405
form-data "^4.0.0"
407406
fs-extra "^10.1.0"
408407
hosted-git-info "^4.1.0"
@@ -530,10 +529,10 @@ [email protected]:
530529
debug "^4.3.4"
531530
sax "^1.2.4"
532531

533-
builder-util@24.8.1:
534-
version "24.8.1"
535-
resolved "https://registry.yarnpkg.com/builder-util/-/builder-util-24.8.1.tgz#594d45b0c86d1d17f5c7bebbb77405080b2571c2"
536-
integrity sha512-ibmQ4BnnqCnJTNrdmdNlnhF48kfqhNzSeqFMXHLIl+o9/yhn6QfOaVrloZ9YUu3m0k3rexvlT5wcki6LWpjTZw==
532+
builder-util@24.9.4:
533+
version "24.9.4"
534+
resolved "https://registry.yarnpkg.com/builder-util/-/builder-util-24.9.4.tgz#8cde880e7c719285e9cb30e6850ddd5bf475ac04"
535+
integrity sha512-YNon3rYjPSm4XDDho9wD6jq7vLRJZUy9FR+yFZnHoWvvdVCnZakL4BctTlPABP41MvIH5yk2cTZ2YfkOhGistQ==
537536
dependencies:
538537
"7zip-bin" "~5.2.0"
539538
"@types/debug" "^4.1.6"
@@ -768,13 +767,13 @@ dir-compare@^3.0.0:
768767
buffer-equal "^1.0.0"
769768
minimatch "^3.0.4"
770769

771-
dmg-builder@24.9.1:
772-
version "24.9.1"
773-
resolved "https://registry.yarnpkg.com/dmg-builder/-/dmg-builder-24.9.1.tgz#04bf6c0dcd235f6214511f2358a78ed2b9379421"
774-
integrity sha512-huC+O6hvHd24Ubj3cy2GMiGLe2xGFKN3klqVMLAdcbB6SWMd1yPSdZvV8W1O01ICzCCRlZDHiv4VrNUgnPUfbQ==
770+
dmg-builder@24.12.0:
771+
version "24.12.0"
772+
resolved "https://registry.yarnpkg.com/dmg-builder/-/dmg-builder-24.12.0.tgz#62a08162f2b3160a286d03ebb6db65c36a3711c7"
773+
integrity sha512-nS22OyHUIYcK40UnILOtqC5Qffd1SN1Ljqy/6e+QR2H1wM3iNBrKJoEbDRfEmYYaALKNFRkKPqSbZKRsGUBdPw==
775774
dependencies:
776-
app-builder-lib "24.9.1"
777-
builder-util "24.8.1"
775+
app-builder-lib "24.12.0"
776+
builder-util "24.9.4"
778777
builder-util-runtime "9.2.3"
779778
fs-extra "^10.1.0"
780779
iconv-lite "^0.6.2"
@@ -832,16 +831,16 @@ ejs@^3.1.8:
832831
dependencies:
833832
jake "^10.8.5"
834833

835-
electron-builder@24.9.1:
836-
version "24.9.1"
837-
resolved "https://registry.yarnpkg.com/electron-builder/-/electron-builder-24.9.1.tgz#4aee03947963b829a7f48a850fe02c219311ef63"
838-
integrity sha512-v7BuakDuY6sKMUYM8mfQGrwyjBpZ/ObaqnenU0H+igEL10nc6ht049rsCw2HghRBdEwJxGIBuzs3jbEhNaMDmg==
834+
electron-builder@24.12.0:
835+
version "24.12.0"
836+
resolved "https://registry.yarnpkg.com/electron-builder/-/electron-builder-24.12.0.tgz#95c41d14b3b1cc177db62715e42ef9fd27344491"
837+
integrity sha512-dH4O9zkxFxFbBVFobIR5FA71yJ1TZSCvjZ2maCskpg7CWjBF+SNRSQAThlDyUfRuB+jBTMwEMzwARywmap0CSw==
839838
dependencies:
840-
app-builder-lib "24.9.1"
841-
builder-util "24.8.1"
839+
app-builder-lib "24.12.0"
840+
builder-util "24.9.4"
842841
builder-util-runtime "9.2.3"
843842
chalk "^4.1.2"
844-
dmg-builder "24.9.1"
843+
dmg-builder "24.12.0"
845844
fs-extra "^10.1.0"
846845
is-ci "^3.0.0"
847846
lazy-val "^1.0.5"
@@ -854,13 +853,13 @@ [email protected]:
854853
resolved "https://registry.yarnpkg.com/electron-is-dev/-/electron-is-dev-2.0.0.tgz#833487a069b8dad21425c67a19847d9064ab19bd"
855854
integrity sha512-3X99K852Yoqu9AcW50qz3ibYBWY79/pBhlMCab8ToEWS48R0T9tyxRiQhwylE7zQdXrMnx2JKqUJyMPmt5FBqA==
856855

857-
electron-publish@24.8.1:
858-
version "24.8.1"
859-
resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-24.8.1.tgz#4216740372bf4297a429543402a1a15ce8c3560b"
860-
integrity sha512-IFNXkdxMVzUdweoLJNXSupXkqnvgbrn3J4vognuOY06LaS/m0xvfFYIf+o1CM8if6DuWYWoQFKPcWZt/FUjZPw==
856+
electron-publish@24.9.4:
857+
version "24.9.4"
858+
resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-24.9.4.tgz#70db542763a78e4980e4e6409c203aef320d0d05"
859+
integrity sha512-FghbeVMfxHneHjsG2xUSC0NMZYWOOWhBxfZKPTbibcJ0CjPH0Ph8yb5CUO62nqywXfA5u1Otq6K8eOdOixxmNg==
861860
dependencies:
862861
"@types/fs-extra" "^9.0.11"
863-
builder-util "24.8.1"
862+
builder-util "24.9.4"
864863
builder-util-runtime "9.2.3"
865864
chalk "^4.1.2"
866865
fs-extra "^10.1.0"
@@ -883,13 +882,13 @@ [email protected]:
883882
jsonfile "^4.0.0"
884883
mkdirp "^0.5.1"
885884

886-
electron@28.2.1:
887-
version "28.2.1"
888-
resolved "https://registry.yarnpkg.com/electron/-/electron-28.2.1.tgz#8edf2be24d97160b7eb52b7ce9a2424cf14c0791"
889-
integrity sha512-wlzXf+OvOiVlBf9dcSeMMf7Q+N6DG+wtgFbMK0sA/JpIJcdosRbLMQwLg/LTwNVKIbmayqFLDp4FmmFkEMhbYA==
885+
electron@29.0.1:
886+
version "29.0.1"
887+
resolved "https://registry.yarnpkg.com/electron/-/electron-29.0.1.tgz#936c0623a1bbf272dea423305f074de6ac016967"
888+
integrity sha512-hsQr9clm8NCAMv4uhHlXThHn52UAgrHgyz3ubBAxZIPuUcpKVDtg4HPmx4hbmHIbYICI5OyLN3Ztp7rS+Dn4Lw==
890889
dependencies:
891890
"@electron/get" "^2.0.0"
892-
"@types/node" "^18.11.18"
891+
"@types/node" "^20.9.0"
893892
extract-zip "^2.0.1"
894893

895894
emoji-regex@^8.0.0:
@@ -947,16 +946,16 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4
947946
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800"
948947
integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==
949948

950-
eslint@8.56.0:
951-
version "8.56.0"
952-
resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.56.0.tgz#4957ce8da409dc0809f99ab07a1b94832ab74b15"
953-
integrity sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==
949+
eslint@8.57.0:
950+
version "8.57.0"
951+
resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668"
952+
integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==
954953
dependencies:
955954
"@eslint-community/eslint-utils" "^4.2.0"
956955
"@eslint-community/regexpp" "^4.6.1"
957956
"@eslint/eslintrc" "^2.1.4"
958-
"@eslint/js" "8.56.0"
959-
"@humanwhocodes/config-array" "^0.11.13"
957+
"@eslint/js" "8.57.0"
958+
"@humanwhocodes/config-array" "^0.11.14"
960959
"@humanwhocodes/module-importer" "^1.0.1"
961960
"@nodelib/fs.walk" "^1.2.8"
962961
"@ungap/structured-clone" "^1.2.0"

0 commit comments

Comments
 (0)