From 190efc1397d231eba32deca63e6896aaa0c21d59 Mon Sep 17 00:00:00 2001 From: IsmaelMartinez Date: Tue, 2 Jul 2024 11:17:58 +0100 Subject: [PATCH] Feature/feat 1307 reload config on file change (#1325) * changing the config error and adding a config warning message. refactoring the event names to all be kebab-case, instead of a mix of camelCase and kebab-case. adding watchConfigFile option to watch the config file and restart the app if it changes, and other small refactoring * intune refactoring to be allways inTune (internal code) * adding release notes * merge with main --- README.md | 2 + app/assets/icons/alert-diamond.256x256.png | Bin 0 -> 9162 bytes app/assets/icons/setting-error.256x256.png | Bin 0 -> 16078 bytes app/browser/index.js | 2 +- app/browser/notifications/activityManager.js | 2 +- app/browser/tools/customBackgrounds.js | 2 +- app/browser/tools/zoom.js | 4 +- app/config/README.md | 1 + app/config/index.js | 48 +++++++++++------- app/index.js | 46 +++++++++++------ app/intune/index.js | 25 +++++---- app/mainAppWindow/index.js | 2 +- app/streamSelector/browser.js | 2 +- ...IsmaelMartinez.teams_for_linux.appdata.xml | 11 ++++ package.json | 2 +- 15 files changed, 94 insertions(+), 55 deletions(-) create mode 100644 app/assets/icons/alert-diamond.256x256.png create mode 100644 app/assets/icons/setting-error.256x256.png diff --git a/README.md b/README.md index 75fa60f..7ac227d 100644 --- a/README.md +++ b/README.md @@ -80,4 +80,6 @@ Read about the history of this project in the [`HISTORY.md`](HISTORY.md) file. ## License +Some icons are from (Icon Duck)[https://iconduck.com/sets/hugeicons-essential-free-icons] under the `CC BY 4.0` license. + License: [`GPLv3`](LICENSE.md) diff --git a/app/assets/icons/alert-diamond.256x256.png b/app/assets/icons/alert-diamond.256x256.png new file mode 100644 index 0000000000000000000000000000000000000000..364a1c160562c28d504bd9e25c9fc3d4935b4374 GIT binary patch literal 9162 zcmZ{Kby!qS^!H_1Sh`zcr8`9>B&1UW=@dyp8fjQSxx*tP%w@eBZu(;_vzL@TPAX2gR%n(>uMgIAr9__Qw~XXEO~>+mkuTeb-oRU6pCb@f21efU@c z=`@-kL8+2itiYSTV~-id5s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@#*j+#cE1t*?4rE{G=v@x6H{-&4sB>>cLI z!bFFtt1gdT9Gz5~{Ip$391Qdi&lO#AeFlez3t8}fz%is!$RpQq{47!1fZjBEylOVR zTO!&DKN7JSjoZ<9R&=!+8=MI3uf&NJy&}<{lm#zxV;>2)z#T^6()9-Mwj4u2CtjCX zhO7IZkVVNXt%tkMVd~5zA6B&y{NCce{NV;K2xypjD8|m zLUm)Z{Ou;%IJBanpEzMMvGi8<( zgRx=~k85br#!w+JbD#$2uythHKcFg^$vP%23Mrh4*-y=F3Y{U0uic2BFjt&StBn1{ zl{uim1IzSjNKx-e&pf*xe2yCA98W)4NX>Tp*J~9|7_iHKNef+6?Z#D#P@nG=F6ZS< zd8^1?l;ZQvTfKrl%==^!hpc4`IEMf6t0Lfyc`MIe6qKIF0OnoY^ON#7&2c*oiu5bN zxEfw=HpHI%pguLiFFT`q+CFo#$|EzR5kIswcYl21FeNRb^1RP#aDwiz&y~n|9Z%Vp zt>@ZUtv}L>^?r-{-MpN0KxVN|SRNso?2l=-8(+s9-YC`$2XVCAtgg}3QI-7+6|k<< z+orpG$&oP1jXoaIk#*yd=*@)+I)Lg#W~IQFMUcGk&^xaq^n!u!-W>+rOWQ3!3zKK) z11@YH3I-lluRW~A-?&+$3qV*f_M?8Xp;(~&BuDMqKL*bpX bmA#G6|E}Q2%Q16*hDJp}Q@-@MMacgFJ%2{( literal 0 HcmV?d00001 diff --git a/app/assets/icons/setting-error.256x256.png b/app/assets/icons/setting-error.256x256.png new file mode 100644 index 0000000000000000000000000000000000000000..203891817c2917d31e7d7cb39c3d1567f0d45991 GIT binary patch literal 16078 zcmZ{LXH*m47cEEtL)8#^m(Y6$=|xCDTEIvZ2u(sq=_n8dBq$vbkfuSzgc6V<2#64R zQ6LcMf{N0M6sa%2|9T(ZmzOnbO)_(5a_`K!_nf`YJ}K6grpydH3{+H9%rK}ioQjH? z@|BwEG96{-9QxLqvIF=SSQt=I5z-k?-DxSmg*>2e3o5E;F)FI~$5d3ult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lxd X|9^q>lK0tvb>y%cmd4eFZs`95iaoQ_ literal 0 HcmV?d00001 diff --git a/app/browser/index.js b/app/browser/index.js index 68ca860..10b96af 100644 --- a/app/browser/index.js +++ b/app/browser/index.js @@ -3,7 +3,7 @@ const ActivityManager = require('./notifications/activityManager'); let config; - ipcRenderer.invoke('getConfig').then(mainConfig => { + ipcRenderer.invoke('get-config').then(mainConfig => { config = mainConfig; initializeModules(config, ipcRenderer); diff --git a/app/browser/notifications/activityManager.js b/app/browser/notifications/activityManager.js index a6a5a0e..f4202c4 100644 --- a/app/browser/notifications/activityManager.js +++ b/app/browser/notifications/activityManager.js @@ -18,7 +18,7 @@ class ActivityManager { watchSystemIdleState() { const self = this; - self.ipcRenderer.invoke('getSystemIdleState').then((state) => { + self.ipcRenderer.invoke('get-system-idle-state').then((state) => { activityHub.setMachineState(state.system === 'active' ? 1 : 2); const timeOut = (state.system === 'active' ? self.config.appIdleTimeoutCheckInterval : self.config.appActiveCheckInterval) * 1000; diff --git a/app/browser/tools/customBackgrounds.js b/app/browser/tools/customBackgrounds.js index c04c166..d55cc03 100644 --- a/app/browser/tools/customBackgrounds.js +++ b/app/browser/tools/customBackgrounds.js @@ -23,7 +23,7 @@ async function overrideMSMethod(inst) { async function customBGProvider(...args) { const ms_response = config.customBGServiceIgnoreMSDefaults ? [] : await bgMSMethod.apply(bgMSService, [...args]); - const customList = await ipRenderer.invoke('getCustomBGList'); + const customList = await ipRenderer.invoke('get-custom-bg-list'); ms_response.push(...customList); return ms_response; } diff --git a/app/browser/tools/zoom.js b/app/browser/tools/zoom.js index 3b25d64..06000ec 100644 --- a/app/browser/tools/zoom.js +++ b/app/browser/tools/zoom.js @@ -56,7 +56,7 @@ class Zoom { } function restoreZoomLevelInternal(config) { - ipcRenderer.invoke('getZoomLevel', config.partition).then(zoomLevel => { + ipcRenderer.invoke('get-zoom-level', config.partition).then(zoomLevel => { webFrame.setZoomLevel(zoomLevel); }); } @@ -72,7 +72,7 @@ function setNextZoomLevel(keyName, config) { zoomLevel = zoomOffset === 0 ? 0 : zoomLevel + zoomOffset * zoomFactor; if (zoomLevel < zoomMin || zoomLevel > zoomMax) return; webFrame.setZoomLevel(zoomLevel); - ipcRenderer.invoke('saveZoomLevel', { + ipcRenderer.invoke('save-zoom-level', { partition: config.partition, zoomLevel: webFrame.getZoomLevel() }); diff --git a/app/config/README.md b/app/config/README.md index a130073..14d8e3b 100644 --- a/app/config/README.md +++ b/app/config/README.md @@ -65,6 +65,7 @@ Here is the list of available arguments and its usage: | url | Microsoft Teams URL (string) | https://teams.microsoft.com/ | | useMutationTitleLogic | Use MutationObserver to update counter from title | true | | version | Show the version number | false | +| watchConfigFile | Watch for changes in the config file and restarts the app | false | | webDebug | Enable web debugging | false | diff --git a/app/config/index.js b/app/config/index.js index 6ac146b..56c4f07 100644 --- a/app/config/index.js +++ b/app/config/index.js @@ -2,7 +2,7 @@ const yargs = require('yargs'); const fs = require('fs'); const path = require('path'); const { LucidLog } = require('lucid-log'); -const {type}=require('os'); +const { ipcMain } = require('electron'); let logger; @@ -19,22 +19,28 @@ function getConfigFile(configPath) { } function argv(configPath, appVersion) { - let configFile = null; - let configError = null; + const configObject = { + configFile: {}, + configError: null, + configWarning: null, + isConfigFile: false + } if (checkConfigFileExistance(configPath)) { try { - configFile = getConfigFile(configPath); + configObject.configFile = getConfigFile(configPath); + configObject.isConfigFile = true; } catch (e) { - configError = e.message; + configObject.configError = e.message; + console.warn('Error in config file, using default values:\n' + configObject.configError); } + } else { + console.warn('No config file found, using default values'); } - const missingConfig = configFile == null; - configFile = configFile || {}; let config = yargs .env(true) - .config(configFile) + .config(configObject.configFile) .version(appVersion) .options({ appActiveCheckInterval: { @@ -313,6 +319,11 @@ function argv(configPath, appVersion) { describe: 'Use MutationObserver to update counter from title', type: 'boolean' }, + watchConfigFile: { + default: false, + describe: 'Watch for changes in the config file and reload the app', + type: 'boolean' + }, webDebug: { default: false, describe: 'Enable debug at start', @@ -321,22 +332,23 @@ function argv(configPath, appVersion) { }) .parse(process.argv.slice(1)); - if (configError) { - config['error'] = configError; + if (configObject.configError) { + config['error'] = configObject.configError; } + + if (configObject.isConfigFile && config.watchConfigFile) { + fs.watch(getConfigFilePath(configPath), (event, filename) => { + logger.info(`Config file ${filename} changed ${event}. Relaunching app...`); + ipcMain.emit('config-file-changed'); + }); + } + logger = new LucidLog({ levels: config.appLogLevels.split(',') }); logger.debug('configPath:', configPath); - if (missingConfig) { - if (configError) { - logger.warn('Error in config file, using default values:\n' + configError); - } else { - logger.warn('No config file found, using default values'); - } - } - logger.debug('configFile:', configFile); + logger.debug('configFile:', configObject.configFile); return config; } diff --git a/app/index.js b/app/index.js index c701396..b26c2dc 100644 --- a/app/index.js +++ b/app/index.js @@ -71,19 +71,25 @@ if (!gotTheLock) { app.on('certificate-error', handleCertificateError); app.on('browser-window-focus', handleGlobalShortcutDisabled); app.on('browser-window-blur', handleGlobalShortcutDisabledRevert); - ipcMain.handle('getConfig', handleGetConfig); - ipcMain.handle('getSystemIdleTime', handleGetSystemIdleTime); - ipcMain.handle('getSystemIdleState', handleGetSystemIdleState); - ipcMain.handle('getZoomLevel', handleGetZoomLevel); - ipcMain.handle('saveZoomLevel', handleSaveZoomLevel); - ipcMain.handle('desktopCapturerGetSources', (event, opts) => desktopCapturer.getSources(opts)); - ipcMain.handle('getCustomBGList', handleGetCustomBGList); + ipcMain.on('config-file-changed', restartApp); + ipcMain.handle('get-config', async () => { return config } ); + ipcMain.handle('get-system-idle-state', handleGetSystemIdleState); + ipcMain.handle('get-zoom-level', handleGetZoomLevel); + ipcMain.handle('save-zoom-level', handleSaveZoomLevel); + ipcMain.handle('desktop-capturer-get-sources', (event, opts) => desktopCapturer.getSources(opts)); + ipcMain.handle('get-custom-bg-list', handleGetCustomBGList); ipcMain.handle('play-notification-sound', playNotificationSound); ipcMain.handle('show-notification', showNotification); ipcMain.handle('user-status-changed', userStatusChangedHandler); ipcMain.handle('set-badge-count', setBadgeCountHandler); } +function restartApp() { + console.log('Restarting app...'); + app.relaunch(); + app.exit(); +} + function addCommandLineSwitchesBeforeConfigLoad() { // Custom user data directory if (app.commandLine.hasSwitch('customUserDir')) { @@ -214,7 +220,23 @@ function onAppTerminated(signal) { function handleAppReady() { // check for configuration errors if (config.error) { - dialog.showErrorBox('Configuration error', config.error); + dialog.showMessageBox( + { + title: 'Configuration error', + icon: nativeImage.createFromPath(path.join(config.appPath, 'assets/icons/setting-error.256x256.png')), + message: `Error in config file ${config.error}.\n Loading default configuration` + } + ); + } + if (config.warning) { + // check for configuration warnings + dialog.showMessageBox( + { + title: 'Configuration Warning', + icon: nativeImage.createFromPath(path.join(config.appPath, 'assets/icons/alert-diamond.256x256.png')), + message: config.warning + } + ); } if (config.isCustomBackgroundEnabled) { @@ -228,14 +250,6 @@ function handleAppReady() { mainAppWindow.onAppReady(appConfig); } -async function handleGetConfig() { - return config; -} - -async function handleGetSystemIdleTime() { - return powerMonitor.getSystemIdleTime(); -} - async function handleGetSystemIdleState() { const systemIdleState = powerMonitor.getSystemIdleState(config.appIdleTimeout); logger.debug(`GetSystemIdleState => IdleTimeout: ${config.appIdleTimeout}s, IdleTimeoutPollInterval: ${config.appIdleTimeoutCheckInterval}s, ActiveCheckPollInterval: ${config.appActiveCheckInterval}s, IdleTime: ${powerMonitor.getSystemIdleTime()}s, IdleState: '${systemIdleState}'`); diff --git a/app/intune/index.js b/app/intune/index.js index 16708e7..2b750e1 100644 --- a/app/intune/index.js +++ b/app/intune/index.js @@ -1,7 +1,6 @@ const dbus = require('@homebridge/dbus-native'); -const { LucidLog } = require('lucid-log'); -let intuneAccount = null; +let inTuneAccount = null; const brokerService = dbus.sessionBus().getService('com.microsoft.identity.broker1'); function processInTuneAccounts(logger, resp, ssoInTuneAuthUser) { @@ -12,18 +11,18 @@ function processInTuneAccounts(logger, resp, ssoInTuneAuthUser) { }; if (ssoInTuneAuthUser == '') { - intuneAccount = response.accounts[0]; - logger.debug('Using first available InTune account (' + intuneAccount.username + ')'); + inTuneAccount = response.accounts[0]; + logger.debug('Using first available InTune account (' + inTuneAccount.username + ')'); } else { for (const account in response.accounts) { - if (account.username == ssoIntuneAuthUser) { - intuneAccount = account; - logger.debug('Found matching InTune account (' + intuneAccount.username + ')'); + if (account.username == ssoInTuneAuthUser) { + inTuneAccount = account; + logger.debug('Found matching InTune account (' + inTuneAccount.username + ')'); break; } } - if (intuneAccount == null) { - logger.warn('Failed to find matching InTune account for ' + ssoIntuneAuthUser + '.'); + if (inTuneAccount == null) { + logger.warn('Failed to find matching InTune account for ' + ssoInTuneAuthUser + '.'); } } } @@ -52,11 +51,11 @@ exports.setupUrlFilter = function setupUrlFilter(filter) { } exports.isSsoUrl = function isSsoUrl(url) { - return intuneAccount != null && url.startsWith('https://login.microsoftonline.com/'); + return inTuneAccount != null && url.startsWith('https://login.microsoftonline.com/'); } function processPrtResponse(logger, resp, detail) { - response = JSON.parse(resp); + const response = JSON.parse(resp); if ('error' in response) { logger.warn('Failed to retrieve Intune SSO cookie: ' + response.error.context); } else { @@ -67,7 +66,7 @@ function processPrtResponse(logger, resp, detail) { exports.addSsoCookie = function addIntuneSsoCookie(logger, detail, callback) { logger.debug('Retrieving InTune SSO cookie'); - if (intuneAccount == null) { + if (inTuneAccount == null) { logger.info("InTune SSO not active"); callback({ requestHeaders: detail.requestHeaders @@ -77,7 +76,7 @@ exports.addSsoCookie = function addIntuneSsoCookie(logger, detail, callback) { brokerService.getInterface( '/com/microsoft/identity/broker1', 'com.microsoft.identity.Broker1', function(err, broker) { - broker.acquirePrtSsoCookie('0.0', '', JSON.stringify({'ssoUrl':detail.url, 'account':intuneAccount, 'authParameters':{'authority':'https://login.microsoftonline.com/common/'}}), function(err, resp) { + broker.acquirePrtSsoCookie('0.0', '', JSON.stringify({'ssoUrl':detail.url, 'account':inTuneAccount, 'authParameters':{'authority':'https://login.microsoftonline.com/common/'}}), function(err, resp) { processPrtResponse(logger, resp, detail); callback({ requestHeaders: detail.requestHeaders diff --git a/app/mainAppWindow/index.js b/app/mainAppWindow/index.js index 7ea2b4d..cc3e1e8 100644 --- a/app/mainAppWindow/index.js +++ b/app/mainAppWindow/index.js @@ -39,7 +39,7 @@ exports.onAppReady = async function onAppReady(configGroup) { } if (config.trayIconEnabled) { - iconChooser = new TrayIconChooser(configGroup.startupConfig); + iconChooser = new TrayIconChooser(config); } const browserWindowManager = new BrowserWindowManager({ diff --git a/app/streamSelector/browser.js b/app/streamSelector/browser.js index 25a718f..1c170d3 100644 --- a/app/streamSelector/browser.js +++ b/app/streamSelector/browser.js @@ -14,7 +14,7 @@ function createPreviewScreen(screens) { let windowsIndex = 0; const sscontainer = document.getElementById('screen-size'); createEventHandlers({ screens, sscontainer }); - ipcRenderer.invoke('desktopCapturerGetSources', { types: ['window', 'screen'] }).then(async (sources) => { + ipcRenderer.invoke('desktop-capturer-get-sources', { types: ['window', 'screen'] }).then(async (sources) => { const rowElement = document.querySelector('.container-fluid .row'); for (const source of sources) { await createPreview({ diff --git a/com.github.IsmaelMartinez.teams_for_linux.appdata.xml b/com.github.IsmaelMartinez.teams_for_linux.appdata.xml index d1d503b..3095c77 100644 --- a/com.github.IsmaelMartinez.teams_for_linux.appdata.xml +++ b/com.github.IsmaelMartinez.teams_for_linux.appdata.xml @@ -14,6 +14,17 @@ https://github.com/IsmaelMartinez/teams-for-linux/issues com.github.IsmaelMartinez.teams_for_linux.desktop + + +
    +
  • Add watchConfigFile option to restart the app if the configuration changes
  • +
  • Modify configError message to have an icon and adding the ability to provide warning dialogs (for config deprecations)
  • +
  • Changing app description to be more flathub compliat
  • +
  • Refactoring around inTune and the config file handling
  • +
  • Refactoring events to all be kebab-case instead of a mix of kebab-case and camelCase
  • +
+
+
    diff --git a/package.json b/package.json index ca779dc..0d21ef6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "teams-for-linux", - "version": "1.7.4", + "version": "1.7.5", "main": "app/index.js", "description": "Unofficial client for Microsoft Teams for Linux", "homepage": "https://github.com/IsmaelMartinez/teams-for-linux",