I have read this page about creating a login page: Starting Shiny app after password input
and try to combine the code of login page with my app.
However, I have no idea how to display multiple outputs (including tabPanel, navbarMenu, plots, tables, and some dynamic items embedded in renderUI) by modifying the part of ui:
ui2 <- function(){tagList(tabPanel("Test"))}
and the part of server:
if (USER$Logged == TRUE)
{
output$page <- renderUI({
div(class="outer",do.call(navbarPage,c(inverse=TRUE,title = "Contratulations you got in!",ui2())))
})
print(ui)
}
I have tried
source("ui.R")
of my app, but the images of the app cannot be found and displayed through this source function. Also, some dynamic outputs using "renderUI" in server.R cannot be displayed, because I failed to source server.R of my app within the code of login page.
Can I combine the login page with my app by the "source" function? Or do I need to combine all the code (login page and my app) together within one R script?