From 0ecb0b2661302bd801a695a47cf1b6a5d50f0335 Mon Sep 17 00:00:00 2001 From: "jakub.coufal" Date: Tue, 19 Feb 2019 13:01:16 +0100 Subject: [PATCH 1/4] Dashboard customizations --- res/app/control-panes/dashboard/dashboard.css | 3 +++ res/app/control-panes/dashboard/dashboard.pug | 25 +++++++++---------- 2 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 res/app/control-panes/dashboard/dashboard.css diff --git a/res/app/control-panes/dashboard/dashboard.css b/res/app/control-panes/dashboard/dashboard.css new file mode 100644 index 000000000..6d4169c8c --- /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 a28bea7d3..ab271f086 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"') From 7cbf603e93611f6dc6f356387afe20f897bb9156 Mon Sep 17 00:00:00 2001 From: "jakub.coufal" Date: Tue, 19 Feb 2019 13:01:29 +0100 Subject: [PATCH 2/4] Apps customisation --- .../dashboard/apps/apps-controller.js | 35 +++++++++++++++++++ res/app/control-panes/dashboard/apps/apps.pug | 33 ++++++++++++++++- 2 files changed, 67 insertions(+), 1 deletion(-) diff --git a/res/app/control-panes/dashboard/apps/apps-controller.js b/res/app/control-panes/dashboard/apps/apps-controller.js index f8d5ca06c..51a732f9a 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 211e8775e..153d648b9 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,35 @@ i.fa.fa-sliders.fa-lg.color-darkgreen .icon-title {{"Developer" | translate}} + 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}} .clearfix From 4c6de47ec33fd1997c0565163bd26cb34f1cbd1e Mon Sep 17 00:00:00 2001 From: "jakub.coufal" Date: Tue, 19 Feb 2019 13:01:48 +0100 Subject: [PATCH 3/4] Shell controller simplification --- .../dashboard/shell/shell-controller.js | 56 +++++++++---------- 1 file changed, 26 insertions(+), 30 deletions(-) diff --git a/res/app/control-panes/dashboard/shell/shell-controller.js b/res/app/control-panes/dashboard/shell/shell-controller.js index a529f182f..38ec4b184 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 From b64063ff4050751d930a9b39981ab39fc7ce57d5 Mon Sep 17 00:00:00 2001 From: "jakub.coufal" Date: Tue, 19 Feb 2019 14:03:30 +0100 Subject: [PATCH 4/4] Apps customisation - notice --- res/app/control-panes/dashboard/apps/apps.pug | 2 ++ 1 file changed, 2 insertions(+) diff --git a/res/app/control-panes/dashboard/apps/apps.pug b/res/app/control-panes/dashboard/apps/apps.pug index 153d648b9..a7829d1e5 100644 --- a/res/app/control-panes/dashboard/apps/apps.pug +++ b/res/app/control-panes/dashboard/apps/apps.pug @@ -24,6 +24,7 @@ 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}} @@ -55,4 +56,5 @@ 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