diff --git a/app/assets/javascripts/app/directives/views/componentView.js b/app/assets/javascripts/app/directives/views/componentView.js index ff84d847d..6fa025dbb 100644 --- a/app/assets/javascripts/app/directives/views/componentView.js +++ b/app/assets/javascripts/app/directives/views/componentView.js @@ -73,10 +73,9 @@ class ComponentView { return; } - $scope.loading = true; - let iframe = componentManager.iframeForComponent(component); if(iframe) { + $scope.loading = true; // begin loading error handler. If onload isn't called in x seconds, display an error if($scope.loadTimeout) { $timeout.cancel($scope.loadTimeout);} $scope.loadTimeout = $timeout(() => { @@ -152,12 +151,10 @@ class ComponentView { $scope.reloading = true; let previouslyValid = $scope.componentValid; - var offlineRestricted, urlError; + let offlineRestricted = component.offlineOnly && !isDesktopApplication(); - offlineRestricted = component.offlineOnly && !isDesktopApplication(); - - urlError = - (!isDesktopApplication() && (!component.hasValidHostedUrl())) + let urlError = + (!isDesktopApplication() && !component.hasValidHostedUrl()) || (isDesktopApplication() && (!component.local_url && !component.hasValidHostedUrl())) diff --git a/app/assets/templates/directives/component-view.html.haml b/app/assets/templates/directives/component-view.html.haml index 87f036520..5fe8ecec3 100644 --- a/app/assets/templates/directives/component-view.html.haml +++ b/app/assets/templates/directives/component-view.html.haml @@ -37,15 +37,16 @@ .sk-panel.static .sk-panel-content .sk-panel-section.stretch - .sk-panel-section-title You have restricted this extension to be used offline only. - %p Offline extensions are not available in the Web app. + .sk-panel-column + .sk-h1.sk-bold You have restricted this extension to be used offline only. + .sk-subtitle Offline extensions are not available in the Web app. + .sk-panel-row .sk-panel-row .sk-panel-column - %p You can either: - %p - %ul - %li Enable the Hosted option for this extension by opening the 'Extensions' menu and toggling 'Use hosted when local is unavailable' under this extension's options. Then press Reload below. - %li Use the Desktop application. + .sk-p You can either: + %ul + %li.sk-p Enable the Hosted option for this extension by opening the 'Extensions' menu and toggling 'Use hosted when local is unavailable' under this extension's options. Then press Reload below. + %li.sk-p Use the Desktop application. .sk-panel-row .sk-button.info{"ng-if" => "!reloading", "ng-click" => "reloadStatus()"} .sk-label Reload