Good night and thanks for reading me
I am working on a shiny manager protected application and would like to add an initial animation to the home panel, but what I have tried so far does not work. Does anyone know if it is possible to add such animation? Or some way to correct the code to make it work? I appreciate your help
The code im using is the following:
js <- "
$(document).ready(function(){
$('#plotContainer').on('show', function(event){
$(this).css('opacity', 0).animate({opacity: 1}, {duration: 1000});
});
});
"
credentials <- data.frame(
user = c("shiny", "shinymanager"),
password = c("azerty", "12345"),
stringsAsFactors = FALSE
)
library(shiny)
library(shinymanager)
ui <- fluidPage(
tags$h2("My secure application"),
verbatimTextOutput("auth_output")
)
ui <- secure_app(
tags$head(tags$script(HTML(js))),
ui, choose_language = TRUE)
server <- function(input, output, session) {
res_auth <- secure_server(
check_credentials = check_credentials(credentials)
)
output$auth_output <- renderPrint({
reactiveValuesToList(res_auth)
})
observe({
print(input$shinymanager_where)
print(input$shinymanager_language)
})
}
shinyApp(ui, server)