added isMac isWindows isLinux & isDesktopApp to platformInfo

This commit is contained in:
Sebastiaan Pasma 2018-06-27 16:50:55 +02:00
commit 5f4eb9747e

View file

@ -66,5 +66,11 @@ angular.module('copayApp.services').factory('platformInfo', function($window) {
ret.versionIntelTEE = getVersionIntelTee();
ret.supportsIntelTEE = ret.versionIntelTEE.length > 0;
ret.isMac = typeof process !== 'undefined'?process.platform === 'darwin':false;
ret.isWindows = typeof process !== 'undefined'?process.platform === 'win32':false;
ret.isLinux = typeof process !== 'undefined'?process.platform === 'linux':false;
ret.isDesktopApp = ret.isNW && (ret.isMac || ret.isWindows || ret.isLinux);
return ret;
});