Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding frame config option and removing electron remote library #1471

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Here is the list of available arguments and its usage:
| electronCLIFlags | Electron CLI flags to be added when the app starts | [] |
| emulateWinChromiumPlatform| Use windows platform information in chromium. This is helpful if MFA app does not support Linux.| false |
| followSystemTheme | Boolean to determine if to follow system theme | false |
| frame | Specify false to create a Frameless Window. Default is true | false |
| incomingCallCommand | Command to execute on an incoming call. (string) | |
| incomingCallCommandArgs | Arguments for the incomming call command. | [] |
| isCustomBackgroundEnabled | A boolean flag to enable/disable custom background images | false |
Expand Down
25 changes: 15 additions & 10 deletions app/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,6 @@ function extractYargConfig(configObject, appVersion) {
describe: 'custom CSS styles file location',
type: 'string'
},
emulateWinChromiumPlatform: {
default: false,
describe: 'Use windows platform information in chromium. This is helpful if MFA app does not support Linux.'
},
followSystemTheme: {
default: false,
describe: 'Follow system theme',
type: 'boolean'
},
contextIsolation: {
default: false,
describe: 'Use contextIsolation on the main BrowserWindow (WIP - Disabling this will break most functionality)',
Expand Down Expand Up @@ -215,9 +206,23 @@ function extractYargConfig(configObject, appVersion) {
},
electronCLIFlags: {
default: [],
describe: "Electron CLI flags",
describe: 'Electron CLI flags',
type: 'array'
},
emulateWinChromiumPlatform: {
default: false,
describe: 'Use windows platform information in chromium. This is helpful if MFA app does not support Linux.'
},
followSystemTheme: {
default: false,
describe: 'Follow system theme',
type: 'boolean'
},
frame: {
default: false,
describe: 'Specify false to create a Frameless Window. Default is true',
type: 'string'
},
incomingCallCommand: {
default: null,
describe: 'Command to execute on an incoming call.',
Expand Down
2 changes: 0 additions & 2 deletions app/login/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ exports.loginService = function loginService(parentWindow, callback) {
nodeIntegration: true
}
});
require('@electron/remote/main').enable(win.webContents);

win.once('ready-to-show', () => {
win.show();
});
Expand Down
2 changes: 1 addition & 1 deletion app/mainAppWindow/browserWindowManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class BrowserWindowManager {

// Create the window
this.window = this.createNewBrowserWindow(windowState);
require('@electron/remote/main').enable(this.window.webContents);
this.assignEventHandlers();

windowState.manage(this.window);
Expand All @@ -54,6 +53,7 @@ class BrowserWindowManager {
show: false,
autoHideMenuBar: this.config.menubar == 'auto',
icon: this.iconChooser ? this.iconChooser.getFile() : undefined,
frame: config.frame,

webPreferences: {
partition: this.config.partition,
Expand Down
4 changes: 1 addition & 3 deletions app/mainAppWindow/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require('@electron/remote/main').initialize();
const { shell, app, nativeTheme, dialog, webFrameMain, Notification } = require('electron');
const path = require('path');
const login = require('../login');
Expand All @@ -7,8 +6,7 @@ const Menus = require('../menus');
const { SpellCheckProvider } = require('../spellCheckProvider');
const { execFile } = require('child_process');
const TrayIconChooser = require('../browser/tools/trayIconChooser');
// eslint-disable-next-line no-unused-vars
const { AppConfiguration } = require('../appConfiguration');
require('../appConfiguration');
const connMgr = require('../connectionManager');
const fs = require('fs');
const BrowserWindowManager = require('../mainAppWindow/browserWindowManager');
Expand Down
8 changes: 8 additions & 0 deletions com.github.IsmaelMartinez.teams_for_linux.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@
<url type="bugtracker">https://github.com/IsmaelMartinez/teams-for-linux/issues</url>
<launchable type="desktop-id">com.github.IsmaelMartinez.teams_for_linux.desktop</launchable>
<releases>
<release version="1.11.4" date="2024-11-09">
<description>
<ul>
<li>Allow frameless window by using the config 'frame' option</li>
<li>Remove unused electron remote package</li>
</ul>
</description>
</release>
<release version="1.11.3" date="2024-10-27">
<description>
<ul>
Expand Down
Loading
Loading