-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PWA update sources #30
Conversation
@@ -18,20 +18,27 @@ const CACHE_NAME = "offline"; | |||
// Customize this with a different URL if needed. | |||
const OFFLINE_URL = "offline.html"; | |||
|
|||
async function cacheResources() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: changed this because easier debugging, and better error messages if something goes wrong!
Can be merged once this PR in shinyMobile is merged |
inst/pwa-utils/html/offline.html
Outdated
// Few tweaks | ||
if (Framework7.device.standalone) { | ||
$("html, body").css({ height: "100vh", width: "100vw" }); | ||
if ($(".appbar").length > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
appbar does not exist anymore in Framework7 v8. See here: https://github.com/RinteRface/shinyMobile/blob/master/srcjs/utils/shinyUtils.js#L31. Does it work for you @hypebright. If not, we can leave as is. Let me know.
new Request("/shiny-javascript-1.8.1.1/shiny.min.js", { cache: "reload" }) | ||
]; | ||
|
||
for (const resource of resources) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx for improving this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only check my comment about the appbar custom style. Maybe not needed anymore
@DivadNojnarg - we don't need it, I removed it. I also realised the leading (not trailing... 😅) slash needed to go, this was causing issues when deployed on shinyapps.io for instance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@DivadNojnarg Since this hard codes the
shinyMobile
version (which is not ideal), would have to wait for the 2.0.1 release (?). See RinteRface/shinyMobile#261