1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
diff --color --unified --recursive --text app/index.js app2/index.js
--- app/index.js 2024-05-22 23:54:07.628697134 +0200
+++ app2/index.js 2024-05-23 00:07:26.081797984 +0200
@@ -85,7 +85,7 @@
});
// not triggered by osx
- if (global.env.host.isWindows()) {
+ if (!global.env.host.isOSX()) {
window.on('maximize', () => {
window.webContents.send('main:window--action-callback', 'maximize');
});
diff --color --unified --recursive --text app/src/renderer/app-layout.js app2/src/renderer/app-layout.js
--- app/src/renderer/app-layout.js 2024-05-22 23:54:07.588697317 +0200
+++ app2/src/renderer/app-layout.js 2024-05-22 23:58:27.494185495 +0200
@@ -112,7 +112,7 @@
default:
break;
}
- } else if (remote.getGlobal('env').host.isWindows()) {
+ } else if (!remote.getGlobal('env').host.isOSX()) {
ipc.send('main:window--action', action);
// TODO: add multi monitor support to 'window-state-manager'
@@ -151,8 +151,8 @@
// set app title
document.querySelector(cssSelector.appTitle).textContent = `Teamwork Desktop v${packageJson.version}`;
- // ----- osx, unix ----- //
- if (remote.getGlobal('env').host.isOSX() || remote.getGlobal('env').host.isLinux()) {
+ // ----- osx ----- //
+ if (remote.getGlobal('env').host.isOSX()) {
// add unix specific title-bar alignment styles
document.body.classList.add('unix');
@@ -165,8 +165,8 @@
];
addActionEventListeners(validUnixActions);
- // ----- win32 ----- //
- } else if (remote.getGlobal('env').host.isWindows()) {
+ // ----- win32, Linux ----- //
+ } else if (remote.getGlobal('env').host.isWindows() || remote.getGlobal('env').host.isLinux()) {
// set up title bar action event listener
const validWin32Actions = [
'back',
|