From a2f45e86dac8731abfd3b160e0f7de7abedd4963 Mon Sep 17 00:00:00 2001 From: "Carlos R. Mercado" <107061601+charlieflipside@users.noreply.github.com> Date: Tue, 30 Aug 2022 11:44:24 -0400 Subject: [PATCH] screenshot + silent warning on incorrect PUNCH --- eoa/server.R | 2 +- eoa/ui.R | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/eoa/server.R b/eoa/server.R index 6a376ae..36ff78e 100644 --- a/eoa/server.R +++ b/eoa/server.R @@ -8,7 +8,7 @@ shinyServer(function(input, output, session) { onclick(id = "go-button", expr = { if(nchar(input$address) != 42 | !grepl("^0x", input$address)){ - stop("Double check address is a valid ETH address (not ENS)") + warning("Double check address is a valid ETH address (not ENS)") } else { x <- get_tx_by_day(eoa_address = input$address, diff --git a/eoa/ui.R b/eoa/ui.R index 7d628fd..9eb3160 100644 --- a/eoa/ui.R +++ b/eoa/ui.R @@ -1,4 +1,5 @@ library(shiny) +library(shinyscreenshot) source("global.R") # Define UI ------- @@ -38,7 +39,7 @@ shinyUI(fluidPage( ) }), - div(class = "timecard-holder", + div(class = "timecard-holder", id = 'tch', fluidRow(class='solid', div(class='title', 'Ethereum Activity'), div(class = "subtitle", 'Your Onchain Timecard'), @@ -130,6 +131,11 @@ shinyUI(fluidPage( "Github") ) )) + ), + fluidRow( + div(class = 'about', + screenshotButton(label = "Print your card!", selector = '#tch', filename = 'mytimecard') + ) ) ) # close timecard-holder div