Add platform class to main-ui-view
This commit is contained in:
@@ -4,6 +4,22 @@ angular.module('app')
|
||||
|
||||
storageManager.initialize(passcodeManager.hasPasscode(), authManager.isEphemeralSession());
|
||||
|
||||
try {
|
||||
$scope.platform = function() {
|
||||
var platform = navigator.platform.toLowerCase();
|
||||
var trimmed = "";
|
||||
if(platform.indexOf("mac") !== -1) {
|
||||
trimmed = "mac";
|
||||
} else if(platform.indexOf("win") !== -1) {
|
||||
trimmed = "windows";
|
||||
} if(platform.indexOf("linux") !== -1) {
|
||||
trimmed = "linux";
|
||||
}
|
||||
|
||||
return trimmed + (isDesktopApplication() ? "-desktop" : "-web");
|
||||
}();
|
||||
} catch (e) {}
|
||||
|
||||
$scope.onUpdateAvailable = function(version) {
|
||||
$rootScope.$broadcast('new-update-available', version);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user