enhancement - link to website
mattapel opened this issue · comments
Hi there,
thanks for this great package!
I tried to use your code in app on shiny server open source to route users back to a log in website.
Therefore I adjusted your utils.R, simply trying to add a link.
Strangely, it still only reloads, even if I remove "onclick="window.location.reload(true);" replace with onclick="window.location='https://www....';" or just add a link to href.
Is this somehow hardcoded on the side of shiny server ?
That should work. I just tried it, I changed this line
Line 17 in 1e245f0
to
htmltools::tags$a(id="ss-reload-link", href="#", onclick="window.location='https://github.com/daattali/shinydisconnect/issues/12';")
And then ran the example app:
shinyApp(
ui = fluidPage(
disconnectMessage(),
actionButton("disconnect", "Disconnect the app")
),
server = function(input, output, session) {
observeEvent(input$disconnect, {
session$close()
})
}
)
And when the app gets disconnected and I click the Refresh button, it goes to the new URL.