This repository has been archived by the owner on Dec 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 974
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds rounded borders to the top corners for Windows 7.
- Introduces a platformUtil helper - Top level element uses this helper to add classes for platform and release (Windows only) - removed OS detection logic in WindowCaptionButtons component - reworked styles in navigationBar.less Fixes #4216 Auditors: @bbondy @bridiver
- Loading branch information
Showing
5 changed files
with
446 additions
and
314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
'use strict' | ||
|
||
const os = require('os') | ||
|
||
/** | ||
* Get list of styles which should be applied to root window div | ||
* return array of strings (each being a class name) | ||
*/ | ||
module.exports.getPlatformStyles = () => { | ||
const platform = os.platform() | ||
const styleList = ['platform--' + platform] | ||
|
||
switch (platform) { | ||
case 'win32': | ||
if (/6.1./.test(os.release())) { | ||
styleList.push('win7') | ||
} else { | ||
styleList.push('win10') | ||
} | ||
} | ||
|
||
return styleList | ||
} | ||
|
||
module.exports.isDarwin = () => { | ||
return os.platform() === 'darwin' | ||
} | ||
|
||
module.exports.isWindows = () => { | ||
return os.platform() === 'win32' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.