diff --git a/res/app/components/stf/common-ui/modals/fatal-message/fatal-message.jade b/res/app/components/stf/common-ui/modals/fatal-message/fatal-message.jade index ef3a0e77..34561590 100644 --- a/res/app/components/stf/common-ui/modals/fatal-message/fatal-message.jade +++ b/res/app/components/stf/common-ui/modals/fatal-message/fatal-message.jade @@ -8,6 +8,8 @@ .modal-body .text-danger(translate) You are no longer controlling the device. br + h3(translate) {{ device.likelyLeaveReason | likelyLeaveReason }} + br h4(translate).pull-right {{ device.enhancedName }} current status: br br diff --git a/res/app/components/stf/device/device-info-filter/index.js b/res/app/components/stf/device/device-info-filter/index.js index f5cee448..d1c5c566 100644 --- a/res/app/components/stf/device/device-info-filter/index.js +++ b/res/app/components/stf/device/device-info-filter/index.js @@ -29,6 +29,17 @@ module.exports = angular.module('stf.device-status', []) }[text] || gettext('Unknown') } }) + .filter('likelyLeaveReason', function (gettext) { + return function (text) { + return { + 'ungroup_request': gettext('You (or someone else) kicked the device.'), + 'owner_change': gettext('Someone stole your device.'), + 'automatic_timeout': gettext('Device was kicked by automatic timeout. '), + 'device_absent': gettext('Device is not present anymore for some reason.'), + 'status_change': gettext('Device is present but offline.') + }[text] || gettext('Unknown reason.') + } + }) .filter('batteryHealth', function (gettext) { return function (text) { return {