Submodules

This commit is contained in:
Mo Bitar
2018-01-26 12:35:03 -06:00
parent 5a26b89e86
commit 457eb6f043
4 changed files with 20 additions and 4 deletions

View File

@@ -89,7 +89,7 @@ class ComponentView {
$scope.getUrl = function() {
var url = componentManager.urlForComponent($scope.component);
$scope.component.runningLocally = url !== ($scope.component.url || $scope.component.hosted_url);
$scope.component.runningLocally = (url !== $scope.component.url) && url !== ($scope.component.hosted_url);
return url;
}

View File

@@ -66,6 +66,20 @@ class EditorMenu {
$scope.defaultEditor = null;
}
$scope.shouldDisplayRunningLocallyLabel = function(component) {
if(!component.runningLocally) {
return false;
}
if(component == $scope.selectedEditor) {
return true;
} else if(component.area == "editor-stack") {
return $scope.stackComponentEnabled(component);
} else {
return false;
}
}
$scope.stackComponentEnabled = function(component) {
return component.active && !component.isExplicitlyDisabledForItem($scope.currentItem);
}