diff --git a/webapp/www/img/emTripLog-icon-96x96.png b/webapp/www/img/emTripLog-icon-96x96.png new file mode 100644 index 000000000..4eead146a Binary files /dev/null and b/webapp/www/img/emTripLog-icon-96x96.png differ diff --git a/webapp/www/img/emission-icon-96x96.png b/webapp/www/img/emission-icon-96x96.png new file mode 100644 index 000000000..fc37689f2 Binary files /dev/null and b/webapp/www/img/emission-icon-96x96.png differ diff --git a/webapp/www/js/app.js b/webapp/www/js/app.js index bf4b51fda..3231b0aed 100644 --- a/webapp/www/js/app.js +++ b/webapp/www/js/app.js @@ -65,7 +65,7 @@ angular.module('starter', ['ionic', 'starter.controllers', 'starter.services', controller: 'SetupCtrl' }) .state('client_setup', { - url: '/client_setup?new_client&clear_local_storage&clear_usercache', + url: '/client_setup?base_app&new_client&clear_local_storage&clear_usercache', templateUrl: 'templates/client_setup.html', controller: 'ClientSetupCtrl' }); diff --git a/webapp/www/js/controllers.js b/webapp/www/js/controllers.js index 855d8149e..bc36af0ea 100644 --- a/webapp/www/js/controllers.js +++ b/webapp/www/js/controllers.js @@ -92,6 +92,32 @@ angular.module('starter.controllers', ['starter.heatmap', 'starter.metrics']) .controller('ClientSetupCtrl', function($scope, $stateParams) { console.log("in client setup, routeParams = "+JSON.stringify($stateParams)); + var BASE_APP_URL = { + "emTripLog": { + "android": "https://play.google.com/store/apps/details?id=edu.berkeley.eecs.embase", + "ios": "https://itunes.apple.com/us/app/emtriplog/id1362434685" + }, + "emission": { + "android": "https://play.google.com/store/apps/details?id=edu.berkeley.eecs.emission", + "ios": "https://itunes.apple.com/us/app/emission/id1084198445" + } + } + if (angular.isDefined($stateParams.base_app)) { + if (angular.isDefined(BASE_APP_URL[$stateParams.base_app])) { + $scope.base_app = $stateParams.base_app; + console.log("base_app defined in paramters, setting to "+$scope.base_app); + } else { + // emTripLog is the default + $scope.base_app = "emTripLog" + console.log("invalid base_app "+$stateParams.base_app+" defined, defaulting to emTripLog"); + } + } else { + // emTripLog is the default + $scope.base_app = "emTripLog" + console.log("base_app not defined in paramters, defaulting to emTripLog"); + } + $scope.android_base_app = BASE_APP_URL[$scope.base_app]["android"] + $scope.ios_base_app = BASE_APP_URL[$scope.base_app]["ios"] $scope.client_label = $stateParams.new_client; $scope.clear_local_storage_flag = $stateParams.clear_local_storage; $scope.clear_usercache_flag = $stateParams.clear_usercache; diff --git a/webapp/www/templates/client_setup.html b/webapp/www/templates/client_setup.html index be8ae465d..b071de5ed 100644 --- a/webapp/www/templates/client_setup.html +++ b/webapp/www/templates/client_setup.html @@ -2,7 +2,7 @@
- +

Thank you for participating - only two steps left!

@@ -11,7 +11,7 @@

Thank you for participating - only two steps left!

- + Created with Sketch. @@ -26,20 +26,20 @@

Thank you for participating - only two steps left!

-

Install the e-mission app

+

Install the {{base_app}} app

- Get it on Google Play - + Get it on Google Play +
- - + Get it on the iOS app store +
- + Created with Sketch. @@ -63,7 +63,7 @@

Join this study

- +