cht-core
cht-core copied to clipboard
Detect unsupported browser within the app
Description
I've added bowser as a webapp dependency. Its bundled.js
file located in webapp/node_modules/bowser/bundled.js
is also used on the login page served by the API. Since the API doesn't have any tooling to bundle and import dependencies for this page, I symlinked this script to api/src/public/login/bowser.js
.
Grunt didn't know how to deal with symbolic links so I patched grunt-contrib-copy
to resolve the symlink and give the real file's path to grunt when copying the file to the build directory.
medic/cht-core#7448
Code review checklist
- [ ] Readable: Concise, well named, follows the style guide, documented if necessary.
- [ ] Documented: Configuration and user documentation on cht-docs
- [ ] Tested: Unit and/or e2e where appropriate
- [ ] Internationalised: All user facing text
- [ ] Backwards compatible: Works with existing data and configuration or includes a migration. Any breaking changes documented in the release notes.
License
The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.
@dianabarsan could you please take another look? Thanks :raised_hands:
@dianabarsan can you please review it one more time?
This is what happened since your last review:
- I re-committed the
lib-bowser.js
file because it wasn't getting picked up by the service worker builder and it ended up not being loaded properly - I've added translation keys as
translate
attribute on the login page so that it gets picked up by the language changes - The about page now displays the outdated component too (cht-android, webview or the browser)
Thanks!