mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2024-10-30 01:08:47 +00:00
(@fuse/service/platform) Added comments to the service file
This commit is contained in:
parent
ea9efc3dc2
commit
1bf4c48cdc
|
@ -13,36 +13,43 @@ export class FusePlatformService
|
|||
*/
|
||||
constructor(private _platform: Platform)
|
||||
{
|
||||
// If the platform is not a browser, return immediately
|
||||
if ( !this._platform.isBrowser )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Windows
|
||||
if ( navigator.userAgent.includes('Win') )
|
||||
{
|
||||
this.osName = 'os-windows';
|
||||
}
|
||||
|
||||
// Mac OS
|
||||
if ( navigator.userAgent.includes('Mac') )
|
||||
{
|
||||
this.osName = 'os-mac';
|
||||
}
|
||||
|
||||
// Unix
|
||||
if ( navigator.userAgent.includes('X11') )
|
||||
{
|
||||
this.osName = 'os-unix';
|
||||
}
|
||||
|
||||
// Linux
|
||||
if ( navigator.userAgent.includes('Linux') )
|
||||
{
|
||||
this.osName = 'os-linux';
|
||||
}
|
||||
|
||||
// iOS
|
||||
if ( this._platform.IOS )
|
||||
{
|
||||
this.osName = 'os-ios';
|
||||
}
|
||||
|
||||
// Android
|
||||
if ( this._platform.ANDROID )
|
||||
{
|
||||
this.osName = 'os-android';
|
||||
|
|
Loading…
Reference in New Issue
Block a user