R/run_app.R

Defines functions run_app

Documented in run_app

#' Run the Shiny Application
#'
#' @param ... arguments to pass to golem_opts. 
#' See `?golem::get_golem_options` for more details.
#' @inheritParams shiny::shinyApp
#'
#' @export
#' @importFrom shiny shinyApp
#' @importFrom golem with_golem_options 
run_app <- function(
  onStart = NULL,
  options = list(), 
  enableBookmarking = NULL,
  uiPattern = "/",
  ...
) {
  polished::global_sessions_config(
    app_name = "socialastronomy_pbs4dash",
    api_key = "EuvD1yC4gikEBrerbNlkjaS6wDo7ws4Jjd",
    is_invite_required = TRUE
  )
  
  with_golem_options(
    app = shinyApp(
      ui = polished::secure_ui(app_ui
                               ,sign_in_page_ui =polished::sign_in_ui_default(
                                 color = "#006CB5",
                                 company_name = "Belanger Analytics"
                                 #,logo_top = tags$div(h1("sup"))
                                 ,logo_top = tags$div(style = "width: 300px; max-width: 100%; color: #FFF;", class ="text-center",
                                                     h1("Social Astronomy", style = "margin-bottom: 0; margin-top: 30px;"),
                                                     h1(version_code, style = "font-size: small; font-style: italic; margin-bottom: 10px; margin-top: 10px;")
                                 )
                                 
                                 ,logo_bottom = tags$img(src = "www/images/Belanger_Analytics_Logo_Light.png",
                                                        alt = "www/images/Belanger_Analytics_Logo_Light.png",
                                                        style = "width: 200px; margin-bottom: 15px; padding-top: 15px;"
                                 )
                                 
                                 , background_image = "www/images/milky_way.jpeg"
                                 
                               )# my_custom_sign_in_page
                               ),
      server = polished::secure_server(app_server)
    ),
    golem_opts = list()
  )
  # with_golem_options(
  #   app = shinyApp(
  #     ui = app_ui,
  #     server = app_server,
  #     onStart = onStart,
  #     options = options, 
  #     enableBookmarking = enableBookmarking, 
  #     uiPattern = uiPattern
  #   ), 
  #   golem_opts = list(...)
  # )
}
BelangerAnalytics/socialastronomy.pbs4dash documentation built on Feb. 15, 2022, 8:06 a.m.