userMenuUI <- function(id){
ns <- NS(id)
dropdownMenuOutput(ns("user_menu"))
}
userMenu <- function(input, output, session){
ns <- session$ns
user <- reactiveValues(
logged_in = FALSE
)
output$user_menu <- renderMenu({
# headerText <- ifelse(
# test = user$logged_in,
# yes = actionLink(ns("logout"), sprintf("You are logged in as %s. Click to logout", user$user_name)),
# no =
# )
dropdownMenu(
type = "message",
icon = icon("user-o"),
badgeStatus = NULL,
headerText = actionLink(ns("login"), "Click to login.")
)
})
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.