screenshot + silent warning on incorrect PUNCH

This commit is contained in:
Carlos R. Mercado 2022-08-30 11:44:24 -04:00
parent ef0bf97f5f
commit a2f45e86da
2 changed files with 8 additions and 2 deletions

View File

@ -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,

View File

@ -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(
"<u><a href = 'https://github.com/FlipsideCrypto/eth_activity'>Github</a></u>")
)
))
),
fluidRow(
div(class = 'about',
screenshotButton(label = "Print your card!", selector = '#tch', filename = 'mytimecard')
)
)
) # close timecard-holder div