mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-11-25 02:10:32 -06:00
9991690a7e
1. Implemented new title bar style for Windows 2. Updated design 3. Updated design and added some safety checks 4. Added title bar double click event 5. Added API to update DOM element 6. Updated style as per the design spec 7. Refactored code and handled full screen scenario 8. Added borders to window 9. Added z-index to make sure border is always on top 10. Updated logic to check Windows 10 version 11. Setting frame property as true for pop-out windows 12. Optimized the code to initiate Windows title bar only after injecting CSS 13. Removed API to update content height 14. Added a global config field to enable or disable custom title bar 15. Reading `isCustomTitleBar` before creating main window 16. Fixed shortcut suggestion in menu items 17. Added two more missing shortcut suggestion in menu items 18. Updated menu template to dynamically assign accelerators 19. Changed the func name closeButtonClick to closeWindow 20. Converted all HEX color code to rgba
24 lines
600 B
JavaScript
24 lines
600 B
JavaScript
'use strict';
|
|
const os = require('os');
|
|
|
|
const isDevEnv = process.env.ELECTRON_DEV ?
|
|
process.env.ELECTRON_DEV.trim().toLowerCase() === 'true' : false;
|
|
|
|
const isMac = (process.platform === 'darwin');
|
|
const isWindowsOS = (process.platform === 'win32');
|
|
|
|
const isNodeEnv = !!process.env.NODE_ENV;
|
|
|
|
function isWindows10() {
|
|
const [ major ] = os.release().split('.').map((part) => parseInt(part, 10));
|
|
return isWindowsOS && major >= 10;
|
|
}
|
|
|
|
module.exports = {
|
|
isDevEnv: isDevEnv,
|
|
isMac: isMac,
|
|
isWindowsOS: isWindowsOS,
|
|
isNodeEnv: isNodeEnv,
|
|
isWindows10: isWindows10
|
|
};
|