Skip to content

Commit

Permalink
Merge pull request #2 from WanderaOrg/customise
Browse files Browse the repository at this point in the history
Additional Wandera customisations
  • Loading branch information
coufalja authored Feb 19, 2019
2 parents 7a49db4 + b64063f commit 33c43cb
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 44 deletions.
35 changes: 35 additions & 0 deletions res/app/control-panes/dashboard/apps/apps-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}
Expand Down
35 changes: 34 additions & 1 deletion res/app/control-panes/dashboard/apps/apps.pug
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand All @@ -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}}
Expand All @@ -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
3 changes: 3 additions & 0 deletions res/app/control-panes/dashboard/dashboard.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.float {
float: left;
}
25 changes: 12 additions & 13 deletions res/app/control-panes/dashboard/dashboard.pug
Original file line number Diff line number Diff line change
@@ -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"')
56 changes: 26 additions & 30 deletions res/app/control-panes/dashboard/shell/shell-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 33c43cb

Please sign in to comment.