Closed andirey closed 3 years ago
Have a look at #75
Thanks! Is it possible to move the "Logout" button on the right top corner?
@pvictor is saying its not possible. Coming soon. #75
If you re-install from GitHub, there's a new argument fab_position
in secure_app
to specify FAB button position. Example:
credentials <- data.frame(
user = c("shiny", "shinymanager"),
password = c("123", "456"),
stringsAsFactors = FALSE
)
library(shiny)
library(shinymanager)
ui <- fluidPage(
tags$h2("My secure application"),
verbatimTextOutput("auth_output")
)
# Wrap your UI with secure_app
ui <- secure_app(ui, fab_position = "top-right") # <- set position of FAB button here
server <- function(input, output, session) {
res_auth <- secure_server(
check_credentials = check_credentials(credentials)
)
output$auth_output <- renderPrint({
reactiveValuesToList(res_auth)
})
# your classic server logic
}
shinyApp(ui, server)
Victor
@pvictor I re-downloaded the package from Github and used the fab_position
argument, and I got this message:
Warning: Error in isTRUE: object 'lang' not found
[No stack trace available]
I re-downloaded the package from CRAN, and this message disappears, leading me to think this message came from the Github version!
fab_position = "bottom-left"
in the CRAN version makes the logout button disappear altogether. Haven't tried the github version. Anyone else having that bug?
@FreyGeospatial , with example above, CRAN version, and Chrome or Firefox, I see :
Please open a new issue with a reproducible example if possible and more (browser, type of shiny app, ...)
Victor
Hello
Im trying to change the location of the icon. I used the fab_position = "bottom-left"
but the icon disappears.
ui <- secure_app(
head_auth = tags$script(inactivity),
theme = shinythemes::shinytheme("cerulean"),
enable_admin = T,
tags_top = tags$img(
src = "logo-s.png", width = 130),
language = "es",
fab_position = "bottom-left",
fluidPage( ..... )
)
Using the parameter fab_position = "bottom-right"
will show the icon back again
ui <- secure_app(
head_auth = tags$script(inactivity),
theme = shinythemes::shinytheme("cerulean"),
enable_admin = T,
tags_top = tags$img(
src = "logo-s.png", width = 130),
language = "es",
fab_position = "bottom-right",
fluidPage( ..... )
)
@andresmorago I've opened up the issue here. The issue seems to be the sidebar hiding the button- still waiting on a fix in the next release.
I use "shinymanager" to auth users for R Shiny dashboard. By default, the position of the menu with "Logout" button is the "right bottom" corner.
ui <- secure_app(UI) Any ideas on how to change position on let say "right top" corner?
Thanks!
Link https://stackoverflow.com/questions/65389665/how-change-position-of-logout-and-menu-for-shinymanager-r-package