From 89daadf1c0f2689d096e1256300e5306c362d601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 7 Feb 2023 15:03:58 +0100 Subject: [PATCH] ui fixes (#135) --- R/client.R | 2 +- R/ui.R | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/R/client.R b/R/client.R index 9276a36..6b01a77 100644 --- a/R/client.R +++ b/R/client.R @@ -68,7 +68,7 @@ get_service_name <- function(service_url) { # Checks if there is internet and performs an HTTP GET request perform_http_request <- function(service_url) { cli_alert_danger("WFS client creation failed.") - cli_alert_info("Service: {.val {service_url}}") + cli_alert_info("Service: {.val {service_url}}", .envir = parent.frame(n = 2)) has_internet <- function() { if (nzchar(Sys.getenv("NO_INTERNET_TEST_EMODNET"))) { diff --git a/R/ui.R b/R/ui.R index 8e44ad9..8e5e081 100644 --- a/R/ui.R +++ b/R/ui.R @@ -1,17 +1,17 @@ -cli_alert_success <- function(...) { +cli_alert_success <- function(text, .envir = parent.frame()) { if (!getOption("EMODnetWFS.quiet", FALSE)) { - cli::cli_alert_success(...) + cli::cli_alert_success(text, .envir = .envir) } } -cli_alert_info <- function(...) { +cli_alert_info <- function(text, .envir = parent.frame()) { if (!getOption("EMODnetWFS.quiet", FALSE)) { - cli::cli_alert_info(...) + cli::cli_alert_info(text, .envir = .envir) } } -cli_alert_danger <- function(...) { +cli_alert_danger <- function(text, .envir = parent.frame()) { if (!getOption("EMODnetWFS.quiet", FALSE)) { - cli::cli_alert_danger(...) + cli::cli_alert_danger(text, .envir = .envir) } }