Skip to content

Commit

Permalink
add popup for if app not installed and "join" button does not work
Browse files Browse the repository at this point in the history
If the app is installed and the join button is clicked, the user will be taken directly to the app before they see this alert. If they do not have the app installed, they will see this alert prompting them to follow the instructions above

tested on Android and iOS with app installed and not installed
  • Loading branch information
JGreenlee committed Oct 17, 2024
1 parent bcb1bf9 commit 16b0263
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions frontend/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"joinAutogenOpcodeDesc": "When you join the study, you will be randomly assigned an OPcode, which is a long string beginning with <code>nrelop_</code>. You will be asked to save your OPcode in case you lose or change phones. If you lose your token, NREL cannot retrieve it for you since we do not have the ability to match a token to an individual user.",
"joinAssignedQrDesc": "After you have installed the NREL OpenPATH app on your phone, join the program by scanning the QR code or copy-pasting the OPcode provided by your program admin. The OPcode is a long string beginning with <code>nrelop_</code>.",
"joinAssignedOpcodeDesc": "The OPcode is a randomly generated token. Keep your OPcode in a safe place in case you lose or change phones. If you lose your OPcode, please contact your program admin for assistance. NREL cannot retrieve it for you since we do not have the ability to match a token to an individual user.",
"joinEnsureAppInstalled": "If the app does not automatically launch, please ensure it is installed (instructions above) and try again.",
"dataPrivacy":"Data Privacy and Security",
"dP1":"The system",
"dP2":" will not ",
Expand Down
1 change: 1 addition & 0 deletions frontend/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"joinAutogenOpcodeDesc": "Cuando se una al estudio, se le asignará aleatoriamente un OPcode, que es una cadena larga que comienza con <code>nrelop_</code>. Se le pedirá que guarde su OPcode en caso de que pierda o cambie de teléfono. Si pierde su token, NREL no puede recuperarlo para usted ya que no tenemos la capacidad de hacer coincidir un token con un usuario individual.",
"joinAssignedQrDesc": "Después de haber instalado la aplicación NREL OpenPATH en su teléfono, únase al programa escaneando el código QR o copiando y pegando el OPcode proporcionado por el administrador de su programa. El OPcode es una cadena larga que comienza con <code>nrelop_</code>.",
"joinAssignedOpcodeDesc": "El OPcode es un token generado aleatoriamente. Guarde su OPcode en un lugar seguro en caso de que pierda o cambie de teléfono. Si pierde su OPcode, comuníquese con el administrador de su programa para obtener ayuda. NREL no puede recuperarlo porque no tenemos la capacidad de hacer coincidir un token para un usuario individual.",
"joinEnsureAppInstalled": "Si la aplicación no se inicia automáticamente, asegúrese de que esté instalada (instrucciones arriba) e inténtelo de nuevo.",
"dataPrivacy":"Privacidad y seguridad de los datos",
"dP1":"El sistema",
"dP2":" no ",
Expand Down
1 change: 1 addition & 0 deletions frontend/i18n/lo.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"joinAutogenOpcodeDesc": "ເມື່ອທ່ານເຂົ້າຮ່ວມການສຶກສາ, ທ່ານຈະຖືກສຸ່ມໃສ່ລະຫັດ OPcode, ເຊິ່ງເປັນສາຍຍາວທີ່ເລີ່ມຕົ້ນດ້ວຍ <code>nrelop_</code>. ທ່ານຈະຖືກຖາມໃຫ້ບັນທຶກ OPcode ຂອງທ່ານໃນກໍລະນີທີ່ທ່ານເສຍ ຫຼືປ່ຽນໂທລະສັບ. ຖ້າທ່ານເສຍ token ຂອງເຈົ້າ, NREL ບໍ່ສາມາດດຶງມັນມາໃຫ້ທ່ານໄດ້ເນື່ອງຈາກພວກເຮົາບໍ່ມີຄວາມສາມາດໃນການຈັບຄູ່ token ກັບຜູ້ໃຊ້ແຕ່ລະຄົນ.",
"joinAssignedQrDesc": "ຫຼັງຈາກທ່ານໄດ້ຕິດຕັ້ງແອັບ NREL OpenPATH ໃນໂທລະສັບຂອງທ່ານ, ເຂົ້າຮ່ວມການສຶກສາໂດຍການການສຳເນົາລະຫັດ QR ຫຼືການຄລອດລຸ່ມເພື່ອປ່ຽນໃນໂທລະສັບ. ລະຫັດນີ້ເລີ່ມຕົ້ນດ້ວຍ <code>nrelop_</code>",
"joinAssignedOpcodeDesc": "OPcode ແມ່ນໂທເຄັນທີ່ສ້າງຂຶ້ນແບບສຸ່ມ. ເກັບຮັກສາ OPcode ຂອງທ່ານໄວ້ໃນບ່ອນທີ່ປອດໄພໃນກໍລະນີທີ່ທ່ານສູນເສຍຫຼືປ່ຽນໂທລະສັບ. ຖ້າທ່ານເຮັດ OPcode ຂອງທ່ານເສຍ, ກະລຸນາຕິດຕໍ່ຜູ້ເບິ່ງແຍງໂຄງການຂອງທ່ານເພື່ອຂໍຄວາມຊ່ວຍເຫຼືອ. NREL ບໍ່ສາມາດເອົາມັນມາໃຫ້ທ່ານໄດ້ເພາະວ່າພວກເຮົາບໍ່ມີ. ຄວາມສາມາດໃນການຈັບຄູ່ token ກັບຜູ້ໃຊ້ສ່ວນບຸກຄົນ.",
"joinEnsureAppInstalled": "ຖ້າແອັບບໍ່ເປີດໂດຍອັດຕະໂນມັດ, ກະລຸນາກວດສອບວ່າມັນຖືກຕິດຕັ້ງແລ້ວ (ຄໍາແນະນໍາຂ້າງເທິງ) ແລະລອງໃໝ່ອີກ.",
"dataPrivacy":"ຄວາມເປັນສ່ວນຕົວຂອງຂໍ້ມູນ ແລະຄວາມປອດໄພ",
"dP1":"ລະບົບ",
"dP2":"ຈະບໍ່",
Expand Down
1 change: 1 addition & 0 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,7 @@ <h2 data-i18n="contact">Contact</h2>
if(isMobile) {
$('#joinButton').on("click", () => {
window.location.href = joinUri.href;
setTimeout(() => window.alert($.i18n('joinEnsureAppInstalled')), 100);
});
$('#joinQrRow').hide();
} else {
Expand Down

0 comments on commit 16b0263

Please sign in to comment.