diff --git a/res/app/components/stf/screen/index.js b/res/app/components/stf/screen/index.js index 6da3d1f1..49c69c8b 100644 --- a/res/app/components/stf/screen/index.js +++ b/res/app/components/stf/screen/index.js @@ -1,8 +1,11 @@ +require('./screen.css') + module.exports = angular.module('stf/screen', [ require('stf/screen/scaling').name , require('stf/util/vendor').name , require('stf/page-visibility').name , require('stf/browser-info').name +, require('stf/common-ui/nothing-to-show').name ]) .directive('deviceScreen', require('./screen-directive')) .controller('DeviceScreenCtrl', require('./screen-controller')) diff --git a/res/app/components/stf/screen/screen-directive.js b/res/app/components/stf/screen/screen-directive.js index d4c27dcf..9d373ecb 100644 --- a/res/app/components/stf/screen/screen-directive.js +++ b/res/app/components/stf/screen/screen-directive.js @@ -249,7 +249,6 @@ module.exports = function DeviceScreenDirective($document, ScalingService, Vendo } else { scope.fps = null imageRender.clear() - } }) diff --git a/res/app/components/stf/screen/screen.css b/res/app/components/stf/screen/screen.css new file mode 100644 index 00000000..7cd3cdc8 --- /dev/null +++ b/res/app/components/stf/screen/screen.css @@ -0,0 +1,13 @@ +.screen-error { + width: 100%; + background: rgba(0, 0, 0, 0.6); + position: relative; + top: 50%; + transform: translateY(-50%); + z-index: 100; + pointer-events: none; /* MUST HAVE */ +} + +.screen-error .nothing-to-show { + color: #eee; +} diff --git a/res/app/components/stf/screen/screen.jade b/res/app/components/stf/screen/screen.jade index 2cf0ce07..2372d888 100644 --- a/res/app/components/stf/screen/screen.jade +++ b/res/app/components/stf/screen/screen.jade @@ -1,4 +1,5 @@ canvas(ng-show='device') -div(ng-if='displayError') Screen error +div(ng-if='displayError').screen-error + nothing-to-show(message='{{"No device screen"|translate}}', icon='fa-eye-slash', ng-show='true') textarea(tabindex='-1') span.finger