diff --git a/res/app/control-panes/dashboard/apps/apps-controller.js b/res/app/control-panes/dashboard/apps/apps-controller.js index f8d5ca06cd..51a732f9a9 100644 --- a/res/app/control-panes/dashboard/apps/apps-controller.js +++ b/res/app/control-panes/dashboard/apps/apps-controller.js @@ -30,6 +30,41 @@ module.exports = function ShellCtrl($scope) { run('am start -a android.settings.WIFI_SETTINGS') } + // WANDERA CUSTOM - START + $scope.openSettingActivity = function(activity) { + openSetting(activity) + } + + $scope.openWandera = function() { + run('am start com.wandera.android') + } + + + $scope.openWanderaDev = function() { + run('am start com.wandera.android.dev') + } + + $scope.openWanderaDebug = function() { + run('am start com.wandera.android.debug') + } + + $scope.openGMail = function() { + run('am start com.google.android.gm') + } + + $scope.openChrome = function() { + run('am start -n com.android.chrome/com.google.android.apps.chrome.Main') + } + + $scope.openBeta = function() { + run('am start io.crash.air/.ui.MainActivity') + } + + $scope.openAgent = function() { + run('am start com.airwatch.androidagent/com.airwatch.agent.ui.activity.SplashActivity') + } + // WANDERA CUSTOM - END + $scope.openLocaleSettings = function() { openSetting('LocalePickerActivity') } diff --git a/res/app/control-panes/dashboard/apps/apps.pug b/res/app/control-panes/dashboard/apps/apps.pug index 211e8775ef..a7829d1e5c 100644 --- a/res/app/control-panes/dashboard/apps/apps.pug +++ b/res/app/control-panes/dashboard/apps/apps.pug @@ -3,6 +3,7 @@ stacked-icon(icon='fa-th-large', color='color-lila') span(translate) Apps + .widget-content.padded button.btn.btn-primary-outline.icon-app.pull-right(ng-click='openSettings()') i.fa.fa-gear.fa-lg.color-darkgray .icon-title {{"Settings" | translate}} @@ -11,7 +12,6 @@ i.fa.fa-shopping-cart.fa-lg.color-blue .icon-title {{"App Store" | translate}} - .widget-content.padded button.btn.btn-primary-outline.icon-app.pull-right(ng-click='openWiFiSettings()') i.fa.fa-wifi.fa-lg.color-skyblue .icon-title {{"WiFi" | translate}} @@ -24,4 +24,37 @@ i.fa.fa-sliders.fa-lg.color-darkgreen .icon-title {{"Developer" | translate}} + // WANDERA CUSTOM - START + button.btn.btn-primary-outline.icon-app.pull-right(ng-click='openBeta()') + i.fa.fa-gear.fa-lg.color-red + .icon-title {{"Beta" | translate}} + + button.btn.btn-primary-outline.icon-app.pull-right(ng-click='openAgent()') + i.fa.fa-shield.fa-lg.color-skyblue + .icon-title {{"Agent" | translate}} + + button.btn.btn-primary-outline.icon-app.pull-right(ng-click='openWandera()') + i.fa.fa-bug.fa-lg.color-skyblue + .icon-title {{"Wandera" | translate}} + + button.btn.btn-primary-outline.icon-app.pull-right(ng-click='openWanderaDev()') + i.fa.fa-bug.fa-lg.color-skyblue + .icon-title {{"Wandera Dev" | translate}} + + button.btn.btn-primary-outline.icon-app.pull-right(ng-click='openWanderaDebug()') + i.fa.fa-bug.fa-lg.color-skyblue + .icon-title {{"Wandera Debug" | translate}} + + button.btn.btn-primary-outline.icon-app.pull-right(ng-click='openGMail()') + i.fa.fa-envelope.fa-lg.color-red + .icon-title {{"Gmail" | translate}} + + button.btn.btn-primary-outline.icon-app.pull-right(ng-click='openChrome()') + i.fa.fa-chrome.fa-lg.color-red + .icon-title {{"Chrome" | translate}} + + button.btn.btn-primary-outline.icon-app.pull-right(ng-click='openSettingActivity("ApnSettingsActivity")') + i.fa.fa-gear.fa-lg.color-darkgray + .icon-title {{"APN Settings" | translate}} + // WANDERA CUSTOM - END .clearfix diff --git a/res/app/control-panes/dashboard/dashboard.css b/res/app/control-panes/dashboard/dashboard.css new file mode 100644 index 0000000000..6d4169c8c4 --- /dev/null +++ b/res/app/control-panes/dashboard/dashboard.css @@ -0,0 +1,3 @@ +.float { + float: left; +} diff --git a/res/app/control-panes/dashboard/dashboard.pug b/res/app/control-panes/dashboard/dashboard.pug index a28bea7d36..ab271f0860 100644 --- a/res/app/control-panes/dashboard/dashboard.pug +++ b/res/app/control-panes/dashboard/dashboard.pug @@ -1,16 +1,15 @@ -.row - .col-md-6 +.col-md-6 + .col-md-12 div(ng-include='"control-panes/dashboard/navigation/navigation.pug"') - .col-md-6 - div(ng-include='"control-panes/dashboard/clipboard/clipboard.pug"') - -.row - .col-md-6 - div(ng-include='"control-panes/dashboard/install/install.pug"') - .col-md-6(ng-if='$root.platform == "native"') - div(ng-include='"control-panes/dashboard/shell/shell.pug"') -.row - .col-md-6 + .col-md-12 div(ng-include='"control-panes/dashboard/apps/apps.pug"') - .col-md-6 + .col-md-12 + div(ng-include='"control-panes/dashboard/install/install.pug"') + +.col-md-6 + .col-md-12 + div(ng-include='"control-panes/dashboard/clipboard/clipboard.pug"') + .col-md-12 div(ng-include='"control-panes/advanced/remote-debug/remote-debug.pug"') + .col-md-12(ng-if='$root.platform == "native"') + div(ng-include='"control-panes/dashboard/shell/shell.pug"') diff --git a/res/app/control-panes/dashboard/shell/shell-controller.js b/res/app/control-panes/dashboard/shell/shell-controller.js index a529f182ff..38ec4b1843 100644 --- a/res/app/control-panes/dashboard/shell/shell-controller.js +++ b/res/app/control-panes/dashboard/shell/shell-controller.js @@ -57,39 +57,35 @@ module.exports = function ShellCtrl($scope) { } $scope.disableAnimations = function() { - $scope.control.shell('settings put global window_animation_scale 0').then(function(result) { - $scope.result = result - $scope.data = result.data.join('') - $scope.$digest() - return $scope.control.shell('settings put global transition_animation_scale 0') - }).then(function(result) { - $scope.result = result - $scope.data = result.data.join('') - $scope.$digest() - return $scope.control.shell('settings put global animator_duration_scale 0') - }).then(function(result) { - $scope.result = result - $scope.data = 'Animations disabled' - $scope.$digest() - }) + $scope.control.shell('settings put global window_animation_scale 0') + .then(result => $scope.control.shell('settings put global transition_animation_scale 0')) + .then(result => $scope.control.shell('settings put global animator_duration_scale 0')) + .progressed(function(result) { + $scope.result = result + $scope.data = result.data.join('') + $scope.$digest() + }) + .then(function(result) { + $scope.result = result + $scope.data = 'Animations disabled' + $scope.$digest() + }) } $scope.enableAnimations = function() { - $scope.control.shell('settings put global window_animation_scale 1').then(function(result) { - $scope.result = result - $scope.data = result.data.join('') - $scope.$digest() - return $scope.control.shell('settings put global transition_animation_scale 1') - }).then(function(result) { - $scope.result = result - $scope.data = result.data.join('') - $scope.$digest() - return $scope.control.shell('settings put global animator_duration_scale 1') - }).then(function(result) { - $scope.result = result - $scope.data = 'Animations enabled' - $scope.$digest() - }) + $scope.control.shell('settings put global window_animation_scale 1') + .then(result => $scope.control.shell('settings put global transition_animation_scale 1')) + .then(result => $scope.control.shell('settings put global animator_duration_scale 1')) + .progressed(function(result) { + $scope.result = result + $scope.data = result.data.join('') + $scope.$digest() + }) + .then(function(result) { + $scope.result = result + $scope.data = 'Animations enabled' + $scope.$digest() + }) } // WANDERA CUSTOM - END