Skip to content

Commit

Permalink
s
Browse files Browse the repository at this point in the history
  • Loading branch information
“rafal.urn” committed Aug 18, 2024
1 parent 6da4dc2 commit e145253
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 15 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Imports:
reshape2,
rstudioapi
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.0
RoxygenNote: 7.3.2
Suggests:
testthat (>= 3.0.0)
Config/testthat/edition: 3
2 changes: 0 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Generated by roxygen2: do not edit by hand

export(RunShinyWizard)
export(ShinyWizzardIncludeCSSAndTheme)
export(ShinyWizzardTheme)
export(ShinyWizzardThemeSelector)
11 changes: 7 additions & 4 deletions R/ShinyWizzardTheme.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,22 @@ ShinyWizzardTheme <- function(name = ""){
}
}

#' ShinyWizzardThemeSelector
#' @title ShinyWizzardThemeSelector
#'
#' @description
#' A short description...
#'
#' @export

ShinyWizzardThemeSelector <- function() {
fluidRow(align="center",
selectInput("tab2-shinytheme-selector", "Theme",
shiny::fluidRow(align="center",
shiny::selectInput("tab2-shinytheme-selector", "Theme",
c(allThemes()),
selectize = FALSE,
selected = "flatly", # starting theme
),

tags$script(
shiny::tags$script(
"$('#tab2-shinytheme-selector')
.on('change', function(el) {
var allThemes = $(this).find('option').map(function() {
Expand Down
13 changes: 8 additions & 5 deletions inst/source/tabs/tab1/server.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@


output$contents <- renderTable({
file <- input$file1
ext <- tools::file_ext(file$datapath)

# Upload Project File
output$contents <- renderText({

file <- input$UploadProjectFile
ext <- tools::file_ext(file$datapath)
req(file)
validate(need(ext == "zip", "Please upload a csv file"))
validate(need(ext == "zip", "Please upload a zip file"))

read.csv(file$datapath, header = input$header)
paste(file)

})
4 changes: 3 additions & 1 deletion inst/source/tabs/tab1/ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ fluidPage(
br(),
p("or edit an existing (*.zip)"),
br(),
fileInput(ns("ProjectFile"), NULL, accept = ".zip"),
fileInput(ns("UploadProjectFile"), NULL, accept = ".zip", multiple = FALSE),
HTML("</center>")
)
)

shiny::verbatimTextOutput(ns("contents"))

# zawsze ns() do id !!!!! lacznie z output każdy id z ns() !!!!!
6 changes: 4 additions & 2 deletions man/RunShinyWizard.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions man/ShinyWizzardThemeSelector.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e145253

Please sign in to comment.