-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapp_test.R
49 lines (42 loc) · 1007 Bytes
/
app_test.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
library(tidyverse)
library(shiny)
library(shinyjs)
library(shiny.semantic)
library(semantic.dashboard)
library(shinyuser)
library(openssl)
library(bcrypt)
ui <- function(){
dashboardPage(
dashboardHeader(
inverted = T,
shinyuser::login_ui("user", test = T),
div(class = "ui circular icon button action-button", id = "user-logout",
icon("power off")
)
),
dashboardSidebar(
side = "left", size = "", inverted = T,
sidebarMenu(
div(class = "item",
h4(class = "ui inverted header", "Something")
)
)
),
dashboardBody(
div(class = "sixteen wide column",
"Something great content"
)
)
)
}
server <- function(input, output) {
users <- reactive({
dplyr::tibble(name = "admin", email = name, pw = bcrypt::hashpw("test"))
})
user <- callModule(shinyuser::login_server, "user", users)
observeEvent(user(), {
observe(print(user()))
})
}
shinyApp(ui, server)