Skip to content

Commit

Permalink
bump version + add Framework7 to window
Browse files Browse the repository at this point in the history
  • Loading branch information
hypebright committed May 29, 2024
1 parent d918457 commit 02dd9d6
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 25 deletions.
4 changes: 2 additions & 2 deletions R/shinyMobile-dependencies.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
add_shinyMobile_deps <- function(tag) {
shinyMobile_deps <- htmlDependency(
name = "shinyMobile",
version = "2.0.0",
src = c(file = "shinyMobile-2.0.0"),
version = "2.0.1",
src = c(file = "shinyMobile-2.0.1"),
script = "dist/shinyMobile.min.js",
stylesheet = "dist/shinyMobile.min.css",
package = "shinyMobile",
Expand Down
2 changes: 1 addition & 1 deletion esbuild.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import autoprefixer from 'autoprefixer';
esbuild
.build({
entryPoints: ['./srcjs/main.js'],
outdir: "inst/shinyMobile-2.0.0/dist",
outdir: "inst/shinyMobile-2.0.1/dist",
entryNames: "shinyMobile.min",
bundle: true,
format: "esm",
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions srcjs/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $( document ).ready(function() {
// Only for f7MultiLayout.
let hasRouter = $(".view-main").attr("data-browser-history") !== undefined;
if (hasRouter) {
// Remove content of the first page
// Remove content of the first page
// to prevent shiny from binding any input
// Because we reload the page content via the router, it will
// be reincluded automatically. This avoids duplicated
Expand All @@ -42,12 +42,12 @@ $( document ).ready(function() {
// to another page and moving back.
mainView.router.navigate(
window.location.pathname,
// Doc -> reloadCurrent: true:
// replace the current page with the new one from route,
// Doc -> reloadCurrent: true:
// replace the current page with the new one from route,
// no animation in this case
{reloadCurrent: true}
);

// For some reasons, the navbars get duplicated entries.
// We remove the first one.
$(document).on('shiny:sessioninitialized', function() {
Expand Down Expand Up @@ -75,3 +75,8 @@ $( document ).ready(function() {
export function getAppInstance() {
return app;
}

// attach Framework7 to the window object
// allows usage in browser at later stage (e.g. for offline PWA page)
window.Framework7 = Framework7;

0 comments on commit 02dd9d6

Please sign in to comment.