diff --git a/.bowerrc b/.bowerrc deleted file mode 100644 index e28246d45..000000000 --- a/.bowerrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "directory": "www/lib" -} diff --git a/.gitignore b/.gitignore index e626e9a48..6801f890d 100644 --- a/.gitignore +++ b/.gitignore @@ -14,9 +14,5 @@ app-settings.json *.app.zip *.ipa www/dist/ -www/js/control/collect-settings.js -www/templates/control/main-collect-settings.html -www/js/control/sync-settings.js -www/templates/control/main-sync-settings.html config.xml package.json diff --git a/bin/download_settings_controls.js b/bin/download_settings_controls.js deleted file mode 100755 index fce3fb675..000000000 --- a/bin/download_settings_controls.js +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env node - -var https = require('https'); -var fs = require('fs'); - -var download = function(url, dest, cb) { - var file = fs.createWriteStream(dest); - var request = https.get(url, function(response) { - response.pipe(file); - file.on('finish', function() { - file.close(cb); // close() is async, call cb after close completes. - }); - }).on('error', function(err) { // Handle errors - fs.unlink(dest); // Delete the file async. (But we don't check the result) - if (cb) cb(err.message); - }); -}; - -download("https://raw.githubusercontent.com/e-mission/e-mission-data-collection/master/www/ui/ionic/js/collect-settings.js", "www/js/control/collect-settings.js", function(message) { - console.log("Data collection settings javascript updated"); -}); - -download("https://raw.githubusercontent.com/e-mission/e-mission-data-collection/master/www/ui/ionic/templates/main-collect-settings.html", "www/templates/control/main-collect-settings.html", function(message) { - console.log("Data collection settings template updated"); -}); - -download("https://raw.githubusercontent.com/e-mission/cordova-server-sync/master/www/ui/ionic/js/sync-settings.js", "www/js/control/sync-settings.js", function(message) { - console.log("Sync collection settings javascript updated"); -}); - -download("https://raw.githubusercontent.com/e-mission/cordova-server-sync/master/www/ui/ionic/templates/main-sync-settings.html", "www/templates/control/main-sync-settings.html", function(message) { - console.log("Sync collection settings template updated"); -}); diff --git a/package.cordovabuild.json b/package.cordovabuild.json index 25145b5ed..12da8b81a 100644 --- a/package.cordovabuild.json +++ b/package.cordovabuild.json @@ -8,7 +8,6 @@ "url": "git+https://github.com/e-mission/e-mission-phone.git" }, "scripts": { - "setup-native": "./bin/download_settings_controls.js", "build": "npx webpack --config webpack.prod.js && npx cordova build", "build-dev": "npx webpack --config webpack.dev.js && npx cordova build", "build-dev-android": "npx webpack --config webpack.dev.js && npx cordova build android", diff --git a/package.serve.json b/package.serve.json index a4e3194f3..1a2ef6cb0 100644 --- a/package.serve.json +++ b/package.serve.json @@ -8,7 +8,7 @@ "url": "git+https://github.com/e-mission/e-mission-phone.git" }, "scripts": { - "setup-serve": "./bin/download_settings_controls.js && ./bin/setup_autodeploy.js", + "setup-serve": "./bin/setup_autodeploy.js", "serve": "webpack --config webpack.dev.js && concurrently -k \"phonegap --verbose serve\" \"webpack --config webpack.dev.js --watch\"", "serve-prod": "webpack --config webpack.prod.js && concurrently -k \"phonegap --verbose serve\" \"webpack --config webpack.prod.js --watch\"", "serve-only": "phonegap --verbose serve", diff --git a/resources/android/ic_mood_question.png b/resources/android/ic_mood_question.png deleted file mode 100644 index 8c7790f2e..000000000 Binary files a/resources/android/ic_mood_question.png and /dev/null differ diff --git a/resources/android/ic_mood_question/drawable-hdpi-v11/ic_mood_question.png b/resources/android/ic_mood_question/drawable-hdpi-v11/ic_mood_question.png deleted file mode 100644 index 964fcf139..000000000 Binary files a/resources/android/ic_mood_question/drawable-hdpi-v11/ic_mood_question.png and /dev/null differ diff --git a/resources/android/ic_mood_question/drawable-hdpi-v9/ic_mood_question.png b/resources/android/ic_mood_question/drawable-hdpi-v9/ic_mood_question.png deleted file mode 100644 index c1fd404eb..000000000 Binary files a/resources/android/ic_mood_question/drawable-hdpi-v9/ic_mood_question.png and /dev/null differ diff --git a/resources/android/ic_mood_question/drawable-hdpi/ic_mood_question.png b/resources/android/ic_mood_question/drawable-hdpi/ic_mood_question.png deleted file mode 100644 index ac05d2e2d..000000000 Binary files a/resources/android/ic_mood_question/drawable-hdpi/ic_mood_question.png and /dev/null differ diff --git a/resources/android/ic_mood_question/drawable-mdpi-v11/ic_mood_question.png b/resources/android/ic_mood_question/drawable-mdpi-v11/ic_mood_question.png deleted file mode 100644 index 07348588b..000000000 Binary files a/resources/android/ic_mood_question/drawable-mdpi-v11/ic_mood_question.png and /dev/null differ diff --git a/resources/android/ic_mood_question/drawable-mdpi-v9/ic_mood_question.png b/resources/android/ic_mood_question/drawable-mdpi-v9/ic_mood_question.png deleted file mode 100644 index ecbbe1b3a..000000000 Binary files a/resources/android/ic_mood_question/drawable-mdpi-v9/ic_mood_question.png and /dev/null differ diff --git a/resources/android/ic_mood_question/drawable-mdpi/ic_mood_question.png b/resources/android/ic_mood_question/drawable-mdpi/ic_mood_question.png deleted file mode 100644 index 5030bedfc..000000000 Binary files a/resources/android/ic_mood_question/drawable-mdpi/ic_mood_question.png and /dev/null differ diff --git a/resources/android/ic_mood_question/drawable-xhdpi-v11/ic_mood_question.png b/resources/android/ic_mood_question/drawable-xhdpi-v11/ic_mood_question.png deleted file mode 100644 index 78f2f2538..000000000 Binary files a/resources/android/ic_mood_question/drawable-xhdpi-v11/ic_mood_question.png and /dev/null differ diff --git a/resources/android/ic_mood_question/drawable-xhdpi-v9/ic_mood_question.png b/resources/android/ic_mood_question/drawable-xhdpi-v9/ic_mood_question.png deleted file mode 100644 index e3e393f1e..000000000 Binary files a/resources/android/ic_mood_question/drawable-xhdpi-v9/ic_mood_question.png and /dev/null differ diff --git a/resources/android/ic_mood_question/drawable-xhdpi/ic_mood_question.png b/resources/android/ic_mood_question/drawable-xhdpi/ic_mood_question.png deleted file mode 100644 index ec9c4faf6..000000000 Binary files a/resources/android/ic_mood_question/drawable-xhdpi/ic_mood_question.png and /dev/null differ diff --git a/resources/android/ic_mood_question/drawable-xxhdpi-v11/ic_mood_question.png b/resources/android/ic_mood_question/drawable-xxhdpi-v11/ic_mood_question.png deleted file mode 100644 index 913025e64..000000000 Binary files a/resources/android/ic_mood_question/drawable-xxhdpi-v11/ic_mood_question.png and /dev/null differ diff --git a/resources/android/ic_mood_question/drawable-xxhdpi-v9/ic_mood_question.png b/resources/android/ic_mood_question/drawable-xxhdpi-v9/ic_mood_question.png deleted file mode 100644 index a1d1c94d7..000000000 Binary files a/resources/android/ic_mood_question/drawable-xxhdpi-v9/ic_mood_question.png and /dev/null differ diff --git a/resources/android/ic_mood_question/drawable-xxhdpi/ic_mood_question.png b/resources/android/ic_mood_question/drawable-xxhdpi/ic_mood_question.png deleted file mode 100644 index cd2b16140..000000000 Binary files a/resources/android/ic_mood_question/drawable-xxhdpi/ic_mood_question.png and /dev/null differ diff --git a/resources/android/ic_question_answer/drawable-hdpi-v11/ic_question_answer.png b/resources/android/ic_question_answer/drawable-hdpi-v11/ic_question_answer.png deleted file mode 100644 index 3ae9173bd..000000000 Binary files a/resources/android/ic_question_answer/drawable-hdpi-v11/ic_question_answer.png and /dev/null differ diff --git a/resources/android/ic_question_answer/drawable-hdpi-v9/ic_question_answer.png b/resources/android/ic_question_answer/drawable-hdpi-v9/ic_question_answer.png deleted file mode 100644 index 3d580d05f..000000000 Binary files a/resources/android/ic_question_answer/drawable-hdpi-v9/ic_question_answer.png and /dev/null differ diff --git a/resources/android/ic_question_answer/drawable-hdpi/ic_question_answer.png b/resources/android/ic_question_answer/drawable-hdpi/ic_question_answer.png deleted file mode 100644 index 4ddd1ed8b..000000000 Binary files a/resources/android/ic_question_answer/drawable-hdpi/ic_question_answer.png and /dev/null differ diff --git a/resources/android/ic_question_answer/drawable-mdpi-v11/ic_question_answer.png b/resources/android/ic_question_answer/drawable-mdpi-v11/ic_question_answer.png deleted file mode 100644 index f21a94577..000000000 Binary files a/resources/android/ic_question_answer/drawable-mdpi-v11/ic_question_answer.png and /dev/null differ diff --git a/resources/android/ic_question_answer/drawable-mdpi-v9/ic_question_answer.png b/resources/android/ic_question_answer/drawable-mdpi-v9/ic_question_answer.png deleted file mode 100644 index ccc3c7f0a..000000000 Binary files a/resources/android/ic_question_answer/drawable-mdpi-v9/ic_question_answer.png and /dev/null differ diff --git a/resources/android/ic_question_answer/drawable-mdpi/ic_question_answer.png b/resources/android/ic_question_answer/drawable-mdpi/ic_question_answer.png deleted file mode 100644 index a5943266e..000000000 Binary files a/resources/android/ic_question_answer/drawable-mdpi/ic_question_answer.png and /dev/null differ diff --git a/resources/android/ic_question_answer/drawable-xhdpi-v11/ic_question_answer.png b/resources/android/ic_question_answer/drawable-xhdpi-v11/ic_question_answer.png deleted file mode 100644 index f4a92b43f..000000000 Binary files a/resources/android/ic_question_answer/drawable-xhdpi-v11/ic_question_answer.png and /dev/null differ diff --git a/resources/android/ic_question_answer/drawable-xhdpi-v9/ic_question_answer.png b/resources/android/ic_question_answer/drawable-xhdpi-v9/ic_question_answer.png deleted file mode 100644 index 1013050b6..000000000 Binary files a/resources/android/ic_question_answer/drawable-xhdpi-v9/ic_question_answer.png and /dev/null differ diff --git a/resources/android/ic_question_answer/drawable-xhdpi/ic_question_answer.png b/resources/android/ic_question_answer/drawable-xhdpi/ic_question_answer.png deleted file mode 100644 index c2b8a6368..000000000 Binary files a/resources/android/ic_question_answer/drawable-xhdpi/ic_question_answer.png and /dev/null differ diff --git a/resources/android/ic_question_answer/drawable-xxhdpi-v11/ic_question_answer.png b/resources/android/ic_question_answer/drawable-xxhdpi-v11/ic_question_answer.png deleted file mode 100644 index 2586cd25d..000000000 Binary files a/resources/android/ic_question_answer/drawable-xxhdpi-v11/ic_question_answer.png and /dev/null differ diff --git a/resources/android/ic_question_answer/drawable-xxhdpi-v9/ic_question_answer.png b/resources/android/ic_question_answer/drawable-xxhdpi-v9/ic_question_answer.png deleted file mode 100644 index e80a4e042..000000000 Binary files a/resources/android/ic_question_answer/drawable-xxhdpi-v9/ic_question_answer.png and /dev/null differ diff --git a/resources/android/ic_question_answer/drawable-xxhdpi/ic_question_answer.png b/resources/android/ic_question_answer/drawable-xxhdpi/ic_question_answer.png deleted file mode 100644 index 799f0e8ba..000000000 Binary files a/resources/android/ic_question_answer/drawable-xxhdpi/ic_question_answer.png and /dev/null differ diff --git a/resources/minus.gif b/resources/minus.gif deleted file mode 100644 index 0115810b9..000000000 Binary files a/resources/minus.gif and /dev/null differ diff --git a/resources/plus.gif b/resources/plus.gif deleted file mode 100644 index 6879c8743..000000000 Binary files a/resources/plus.gif and /dev/null differ diff --git a/scss/ionic.app.scss b/scss/ionic.app.scss deleted file mode 100644 index 9eb2f7820..000000000 --- a/scss/ionic.app.scss +++ /dev/null @@ -1,23 +0,0 @@ -/* -To customize the look and feel of Ionic, you can override the variables -in ionic's _variables.scss file. - -For example, you might change some of the default colors: - -$light: #fff !default; -$stable: #f8f8f8 !default; -$positive: #387ef5 !default; -$calm: #11c1f3 !default; -$balanced: #33cd5f !default; -$energized: #ffc900 !default; -$assertive: #ef473a !default; -$royal: #886aea !default; -$dark: #444 !default; -*/ - -// The path for our ionicons font files, relative to the built CSS in www/css -$ionicons-font-path: "../lib/ionic/fonts" !default; - -// Include all of Ionic -@import "www/lib/ionic/scss/ionic"; - diff --git a/setup/setup_shared_native.sh b/setup/setup_shared_native.sh index 1ce5c64b3..00c72a375 100644 --- a/setup/setup_shared_native.sh +++ b/setup/setup_shared_native.sh @@ -10,8 +10,6 @@ cp setup/google-services.fake.for_ci.json google-services.json echo "Setting up all npm packages" npm install -npm run setup-native - # By default, node doesn't fail if any of the steps fail. This makes it hard to # use in a CI environment, and leads to people reporting the node error rather # than the underlying error. One solution is to pass in a command line argument to node diff --git a/webpack.config.js b/webpack.config.js index d6e36fb18..1e504ac5f 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -50,6 +50,7 @@ module.exports = { { test: /\.(jpg|png|woff|woff2|eot|ttf|svg)$/, include: [path.resolve(__dirname, 'www'), + path.resolve(__dirname, 'resources'), path.resolve(__dirname, 'node_modules/react-native-vector-icons')], type: 'asset/resource', }, diff --git a/www/css/appstatus.css b/www/css/appstatus.css deleted file mode 100644 index b5aa0cc41..000000000 --- a/www/css/appstatus.css +++ /dev/null @@ -1,12 +0,0 @@ -.status-red { - background-color: #ED2D3A; - color: white; -} -.status-yellow { - background-color: #FFC108; - color: white; -} -.status-green { - background-color: #30A64A; - color: white; -} diff --git a/www/css/intro.css b/www/css/intro.css deleted file mode 100644 index b636a38d6..000000000 --- a/www/css/intro.css +++ /dev/null @@ -1,87 +0,0 @@ -.slider { - height: 100%; -} - -.slider-slide { - padding-top: 80px; - color: #000; - background-color: #fff; - text-align: center; - font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; - font-weight: 300; -} - -.scroll { - min-width: 100%; -} -.nav-placeholder { - height: 30px; -} -.wide-as-needed { - overflow-y: scroll; - white-space: nowrap; -} -.intro-view { - /*background-color: #eeeeee;*/ -} - -.intro-title { - padding-top: 10%; - padding-right: 8%; - padding-left: 8%; - font-size: 18px; -} -.intro-text { - padding-top: 5%; - padding-right: 8%; - padding-left: 8%; - font-size: 15px; - line-height: 1.5; - text-align: left; -} -.intro-space { - height: 15px; -} -#intro-footer { - padding: 15px; - height: 90px; -} -.consent-title { - padding-top: 10%; - padding-right: 8%; - padding-left: 8%; - font-size: 18px; -} -.consent-text { - padding-top: 5%; - padding-right: 8%; - padding-left: 8%; - font-size: 15px; - line-height: 1.5; - text-align: left; -} -.consent-space { - height: 15px; -} -#consent-footer { - padding: 15px; - height: 90px; - position: absolute; -} -#consent-button { - height: 35px; -} -.refuse-popup { - font-size: 13px; - line-height: 1.5; - text-align: left; - font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; -} -.refuse-popup .popup-buttons { - margin-left: 15%; - width: 70% !important; -} -.refuse-popup .popup-body { - padding-left: 8%; - padding-right: 8%; -} diff --git a/www/css/main.recent.css b/www/css/main.recent.css deleted file mode 100644 index da75745bc..000000000 --- a/www/css/main.recent.css +++ /dev/null @@ -1,12 +0,0 @@ -/* Empty. Add your own CSS if you like */ - -.timestamp { - background: whitesmoke; - font-size: small; - font-family: monospace; -} - -.detail { - font-size: x-small; - font-family: monospace; -} diff --git a/www/css/style.css b/www/css/style.css index 8910b2258..dea003e7b 100644 --- a/www/css/style.css +++ b/www/css/style.css @@ -44,11 +44,6 @@ label-tab > div { --accent-dark: hsl(200 100% 30%); } -body.platform-ios { - padding-top: calc(env(safe-area-inset-top) / 2); - margin: 0 10px 0 0; -} - .view-container.tab-content { height: auto !important; bottom: 50px !important; diff --git a/www/i18n/en.json b/www/i18n/en.json index fe0df617a..e47fdd62d 100644 --- a/www/i18n/en.json +++ b/www/i18n/en.json @@ -12,7 +12,7 @@ }, "control":{ - "profile": "Profile", + "profile-tab": "Profile", "edit-demographics": "Edit Demographics", "tracking": "Tracking", "app-status": "App Status", @@ -73,6 +73,7 @@ }, "metrics":{ + "dashboard-tab": "Dashboard", "cancel": "Cancel", "confirm": "Confirm", "get": "Get", @@ -112,6 +113,7 @@ }, "diary": { + "label-tab": "Label", "distance-in-time": "{{distance}} {{distsuffix}} in {{time}}", "distance": "Distance", "time": "Time", @@ -145,7 +147,6 @@ }, "main-metrics":{ - "dashboard": "Dashboard", "summary": "My Summary", "chart": "Chart", "change-data": "Change dates:", @@ -183,10 +184,6 @@ "footprint-label": "Footprint (kg CO₂)" }, - "main-inf-scroll" : { - "tab": "Label" - }, - "details":{ "speed": "Speed", "time": "Time" @@ -227,6 +224,7 @@ }, "intro": { + "proceed": "Proceed", "appstatus": { "fix": "Fix", "refresh":"Refresh", @@ -286,10 +284,7 @@ }, "ignorebatteryopt": { "name": "Ignore battery optimizations", - "description": { - "android-disable": "On the optimization page, go to all apps, search for this app and turn off optimizations.", - "ios": "Please allow." - } + "description": "Please allow." } }, "permissions": { @@ -332,22 +327,23 @@ "enketo-timestamps-invalid": "The times you entered are invalid. Please ensure that the start time is before the end time." }, "join": { - "welcome-to-nrel-openpath": "Welcome to NREL OpenPATH", - "proceed-further": "To proceed further, you need to enter a valid OPcode (token)", - "what-is-opcode": "The OPcode is a long string starting with 'nrelop' that has been provided by your program admin through a website, email, text or printout.", - "or": "or", - "scan-button": "Scan the QR code ", - "scan-details": "The OPcode will be written at the top of the image", - "paste-button": "Paste the OPcode", - "paste-details": "We suggest copy-pasting instead of typing since the OPcode is long and jumbled", + "welcome-to-app": "Welcome to {{appName}}!", + "app-name": "NREL OpenPATH", + "to-proceed-further": "To proceed further, please scan or paste an access code that has been provided by your program administrator through a website, email, text message, or printout.", + "code-hint": "The code begins with ‘nrelop’ and may be in barcode or text format.", + "scan-code": "Scan code", + "paste-code": "Paste code", + "scan-hint": "Scan the barcode with your phone camera", + "paste-hint": "Or, paste the code as text", + "about-app-title": "About {{appName}}", "about-app-para-1": "The National Renewable Energy Laboratory’s Open Platform for Agile Trip Heuristics (NREL OpenPATH) enables people to track their travel modes—car, bus, bike, walking, etc.—and measure their associated energy use and carbon footprint.", "about-app-para-2": "The app empowers communities to understand their travel mode choices and patterns, experiment with options to make them more sustainable, and evaluate the results. Such results can inform effective transportation policy and planning and be used to build more sustainable and accessible cities.", "about-app-para-3": "It does so by building an automatic diary of all your trips, across all transportation modes. It reads multiple sensors, including location, in the background, and turns GPS tracking on and off automatically for minimal power consumption. The choice of the travel pattern information and the carbon footprint display style are study-specific.", + "tips-title": "Tip(s) for correct operation:", "all-green-status": "Make sure that all status checks are green", "dont-force-kill": "Do not force kill the app", "background-restrictions": "On Samsung and Huwaei phones, make sure that background restrictions are turned off", - "close": "Close", - "tips-title": "Tip(s) for correct operation:" + "close": "Close" }, "config": { "unable-read-saved-config": "Unable to read saved config", @@ -363,6 +359,8 @@ "survey-missing-formpath": "Error while fetching resources in config: survey_info.surveys has a survey without a formPath" }, "errors": { + "registration-check-token": "User registration error. Please check your token and try again.", + "not-registered-cant-contact": "User is not registered, so the server cannot be contacted.", "while-populating-composite": "Error while populating composite trips", "while-loading-another-week": "Error while loading travel of {{when}} week", "while-loading-specific-week": "Error while loading travel for the week of {{day}}", diff --git a/www/templates/survey/enketo/enketo_bare_150x56.png b/www/img/enketo_bare_150x56.png similarity index 100% rename from www/templates/survey/enketo/enketo_bare_150x56.png rename to www/img/enketo_bare_150x56.png diff --git a/www/index.html b/www/index.html index d5d3266ad..451c3047f 100644 --- a/www/index.html +++ b/www/index.html @@ -11,19 +11,8 @@
- -