DaveM2430 commited on
Commit
1418ff0
·
verified ·
1 Parent(s): 139f6a3

Update app.R

Browse files
Files changed (1) hide show
  1. app.R +9 -28
app.R CHANGED
@@ -230,20 +230,6 @@ ui <- fluidPage(
230
  .portal-no { color:#aaa; font-weight:400; }
231
  .checkbox label { font-size:13px; color:#333; font-weight:500; }
232
  .checkbox input[type='checkbox'] { margin-right:6px; }
233
- /* progress bar */
234
- #shiny-notification-panel { top:50%; left:50%; transform:translate(-50%,-50%);
235
- width:300px; }
236
- .shiny-notification { background:#002147; color:white; border:none;
237
- border-radius:8px; padding:20px 24px;
238
- box-shadow:0 8px 32px rgba(0,0,0,0.3); }
239
- .shiny-notification-message { font-size:14px; font-weight:600; }
240
- .shiny-notification-close { color:white; opacity:0.6; }
241
- .shiny-progress-container { margin-top:10px; }
242
- .shiny-progress-bar { background:#4da6ff !important; height:6px !important;
243
- border-radius:3px !important; }
244
- .shiny-progress-bar-container { background:rgba(255,255,255,0.2) !important;
245
- height:6px !important; border-radius:3px !important; }
246
- .progress-detail { font-size:12px; color:#aabbcc; margin-top:6px; }
247
 
248
  .modal-overlay { position:fixed; top:0; left:0; width:100%; height:100%;
249
  background:rgba(0,0,0,0.55); z-index:2000;
@@ -386,20 +372,15 @@ server <- function(input, output, session) {
386
 
387
  raw_data <- reactive({
388
  req(input$level)
389
- withProgress(message = "Loading data...", value = 0, {
390
- tryCatch({
391
- setProgress(0.2, detail = "Reading pitch data...")
392
- df <- load_data(input$level)
393
- setProgress(0.6, detail = "Loading scores...")
394
- scores <- load_scores(input$level)
395
- setProgress(0.9, detail = "Loading portal list...")
396
- portal <- load_portal()
397
- setProgress(1.0, detail = "Done")
398
- list(df = df, scores = scores, portal = portal)
399
- }, error = function(e) {
400
- showNotification(paste("Failed to load:", e$message), type = "error")
401
- NULL
402
- })
403
  })
404
  })
405
 
 
230
  .portal-no { color:#aaa; font-weight:400; }
231
  .checkbox label { font-size:13px; color:#333; font-weight:500; }
232
  .checkbox input[type='checkbox'] { margin-right:6px; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
233
 
234
  .modal-overlay { position:fixed; top:0; left:0; width:100%; height:100%;
235
  background:rgba(0,0,0,0.55); z-index:2000;
 
372
 
373
  raw_data <- reactive({
374
  req(input$level)
375
+ tryCatch({
376
+ list(
377
+ df = load_data(input$level),
378
+ scores = load_scores(input$level),
379
+ portal = load_portal()
380
+ )
381
+ }, error = function(e) {
382
+ showNotification(paste("Failed to load:", e$message), type = "error")
383
+ NULL
 
 
 
 
 
384
  })
385
  })
386