Update app.R
Browse files
app.R
CHANGED
|
@@ -572,7 +572,31 @@ summary_table <- function(game) {
|
|
| 572 |
|
| 573 |
# Modify the UI
|
| 574 |
ui <- fluidPage(
|
| 575 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 576 |
)
|
| 577 |
|
| 578 |
# Server Definition
|
|
@@ -609,12 +633,27 @@ server <- function(input, output, session) {
|
|
| 609 |
mainPanel(
|
| 610 |
div(style = "width: 1000px; height: 1000px; overflow: auto;",
|
| 611 |
plotOutput("combinedPlot", width = "100%", height = "100%")
|
|
|
|
|
|
|
| 612 |
)
|
| 613 |
)
|
| 614 |
-
|
| 615 |
-
)
|
| 616 |
-
|
| 617 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 618 |
|
| 619 |
game_data <- reactiveVal()
|
| 620 |
|
|
|
|
| 572 |
|
| 573 |
# Modify the UI
|
| 574 |
ui <- fluidPage(
|
| 575 |
+
theme = bs_theme(bg = "#ffffff", fg = "#333333", primary = "#428bca"),
|
| 576 |
+
tagList(
|
| 577 |
+
tags$head(
|
| 578 |
+
tags$link(href = "https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@400;700&display=swap",
|
| 579 |
+
rel = "stylesheet"),
|
| 580 |
+
tags$style(HTML("
|
| 581 |
+
* { font-family: 'Roboto Condensed', sans-serif !important; }
|
| 582 |
+
.login-screen {
|
| 583 |
+
max-width: 400px;
|
| 584 |
+
margin: 100px auto;
|
| 585 |
+
padding: 20px;
|
| 586 |
+
border: 1px solid #ddd;
|
| 587 |
+
border-radius: 5px;
|
| 588 |
+
box-shadow: 0 0 10px rgba(0,0,0,0.1);
|
| 589 |
+
}
|
| 590 |
+
.login-header {
|
| 591 |
+
text-align: center;
|
| 592 |
+
margin-bottom: 20px;
|
| 593 |
+
}
|
| 594 |
+
"))
|
| 595 |
+
),
|
| 596 |
+
|
| 597 |
+
# Use uiOutput to conditionally render either login or main page
|
| 598 |
+
uiOutput("page")
|
| 599 |
+
)
|
| 600 |
)
|
| 601 |
|
| 602 |
# Server Definition
|
|
|
|
| 633 |
mainPanel(
|
| 634 |
div(style = "width: 1000px; height: 1000px; overflow: auto;",
|
| 635 |
plotOutput("combinedPlot", width = "100%", height = "100%")
|
| 636 |
+
)
|
| 637 |
+
)
|
| 638 |
)
|
| 639 |
)
|
| 640 |
+
}
|
| 641 |
+
})
|
| 642 |
+
observeEvent(input$login, {
|
| 643 |
+
|
| 644 |
+
# Check Patreon access
|
| 645 |
+
has_access <- check_patreon_access(input$email)
|
| 646 |
+
|
| 647 |
+
if (has_access) {
|
| 648 |
+
credentials$logged_in <- TRUE
|
| 649 |
+
} else {
|
| 650 |
+
showModal(modalDialog(
|
| 651 |
+
title = "Access Denied",
|
| 652 |
+
"This email does not have access. Please make sure you're using the email associated with your Patreon account and you have an active Veteran or Hall of Fame tier subscription.",
|
| 653 |
+
easyClose = TRUE
|
| 654 |
+
))
|
| 655 |
+
}
|
| 656 |
+
})
|
| 657 |
|
| 658 |
game_data <- reactiveVal()
|
| 659 |
|