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);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.main-ui-view
|
||||
.main-ui-view{"ng-class" => "platform"}
|
||||
%lock-screen{"ng-if" => "needsUnlock", "on-success" => "onSuccessfulUnlock"}
|
||||
.app#app{"ng-if" => "!needsUnlock"}
|
||||
%tags-section{"save" => "tagsSave", "add-new" => "tagsAddNew", "will-select" => "tagsWillMakeSelection", "selection-made" => "tagsSelectionMade",
|
||||
|
||||
Reference in New Issue
Block a user