1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-06 03:50:04 +02:00

Show only Web/Native when controlling.

This commit is contained in:
Gunther Brunner 2014-06-03 19:35:02 +09:00
parent 79b0d7f2ab
commit bad0ca9cc7
2 changed files with 6 additions and 2 deletions

View file

@ -1,7 +1,11 @@
module.exports = function MenuCtrl($scope, $rootScope, SettingsService) {
module.exports = function MenuCtrl($scope, $rootScope, SettingsService, $location) {
$rootScope.platform = 'native'
SettingsService.bind($rootScope, {
key: 'platform',
storeName: 'Platform'
})
$scope.$on('$routeChangeSuccess', function () {
$scope.isControlRoute = $location.path().search('/control') !== -1
})
}

View file

@ -13,7 +13,7 @@
span.fa.fa-gears
| {{ !$root.basicMode ? "Settings" : '' | translate }}
ul.nav.stf-nav.stf-feedback.pull-right(ng-cloak)
li.stf-nav-web-native-button(ng-if='!$root.basicMode')
li.stf-nav-web-native-button(ng-if='!$root.basicMode && isControlRoute')
.btn-group
button(type='button', ng-model='$root.platform', btn-radio="'web'", translate).btn.btn-sm.btn-default-outline Web
button(type='button', ng-model='$root.platform', btn-radio="'native'", translate).btn.btn-sm.btn-default-outline Native