From 87010f4c4248d7f2487ac75ffd63ea1edcb4a3f2 Mon Sep 17 00:00:00 2001 From: ivokwee Date: Thu, 14 Sep 2023 11:48:26 +0000 Subject: [PATCH] Style code (GHA) --- components/app/R/global.R | 2 +- components/app/R/server.R | 2 +- components/modules/AuthenticationModule.R | 27 ++++++++++++----------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/components/app/R/global.R b/components/app/R/global.R index cf46f5910..1009bcffb 100644 --- a/components/app/R/global.R +++ b/components/app/R/global.R @@ -191,7 +191,7 @@ if (is.null(opt$HOSTNAME) || opt$HOSTNAME == "") { } ACTIVE_SESSIONS <- c() MAX_SESSIONS <- 10 -if(!is.null(opt$MAX_SESSIONS)) MAX_SESSIONS <- opt$MAX_SESSIONS +if (!is.null(opt$MAX_SESSIONS)) MAX_SESSIONS <- opt$MAX_SESSIONS message("\n\n") message("=================================================================") diff --git a/components/app/R/server.R b/components/app/R/server.R index ca8275f20..bcc3e2713 100644 --- a/components/app/R/server.R +++ b/components/app/R/server.R @@ -85,7 +85,7 @@ app_server <- function(input, output, session) { ) } else if (authentication == "none2") { ## no authentication but also not showing main modal (enter) - username <- Sys.getenv("PLAYGROUND_USERNAME") + username <- Sys.getenv("PLAYGROUND_USERNAME") auth <- NoAuthenticationModule( id = "auth", show_modal = FALSE, diff --git a/components/modules/AuthenticationModule.R b/components/modules/AuthenticationModule.R index 65032c98a..33f150148 100644 --- a/components/modules/AuthenticationModule.R +++ b/components/modules/AuthenticationModule.R @@ -57,25 +57,26 @@ NoAuthenticationModule <- function(id, }) output$login_warning <- shiny::renderText("") - - shiny::observeEvent({ - input$login_btn - }, { - - shiny::removeModal() - USER$logged <- TRUE - ## set options. NEED RETHINK!!! should we allow USERDIR??? - ## should we allow OPTIONS??? - USER$options <- read_user_options(PGX.DIR) + shiny::observeEvent( + { + input$login_btn + }, + { + shiny::removeModal() + USER$logged <- TRUE + + ## set options. NEED RETHINK!!! should we allow USERDIR??? + ## should we allow OPTIONS??? + USER$options <- read_user_options(PGX.DIR) - if(!is.null(username) && username!="") { + if (!is.null(username) && username != "") { USER$username <- username USER$email <- email ## dbg("[NoAuthenticationModule] setting username=",username) + } } - - }) + ) ## export 'public' function USER$resetUSER <- resetUSER