refactor: Replaced individual value boxes with a unified card for station information display in the data tab header.
Browse files
server.R
CHANGED
|
@@ -870,7 +870,7 @@ server <- function(input, output, session) {
|
|
| 870 |
}
|
| 871 |
)
|
| 872 |
|
| 873 |
-
# Data Tab Header
|
| 874 |
output$station_info_header <- renderUI({
|
| 875 |
id <- current_station_id()
|
| 876 |
if (is.null(id)) {
|
|
@@ -896,37 +896,47 @@ server <- function(input, output, session) {
|
|
| 896 |
dates_text <- paste(date_range[1], "to", date_range[2])
|
| 897 |
}
|
| 898 |
|
| 899 |
-
|
| 900 |
-
|
| 901 |
-
|
| 902 |
-
|
| 903 |
-
|
| 904 |
-
|
| 905 |
-
|
| 906 |
-
|
| 907 |
-
|
| 908 |
-
|
| 909 |
-
|
| 910 |
-
|
| 911 |
-
|
| 912 |
-
|
| 913 |
-
|
| 914 |
-
|
| 915 |
-
|
| 916 |
-
|
| 917 |
-
|
| 918 |
-
|
| 919 |
-
|
| 920 |
-
|
| 921 |
-
|
| 922 |
-
|
| 923 |
-
|
| 924 |
-
|
| 925 |
-
|
| 926 |
-
|
| 927 |
-
|
| 928 |
-
|
| 929 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 930 |
)
|
| 931 |
)
|
| 932 |
})
|
|
|
|
| 870 |
}
|
| 871 |
)
|
| 872 |
|
| 873 |
+
# Data Tab Header - Info Callout Card
|
| 874 |
output$station_info_header <- renderUI({
|
| 875 |
id <- current_station_id()
|
| 876 |
if (is.null(id)) {
|
|
|
|
| 896 |
dates_text <- paste(date_range[1], "to", date_range[2])
|
| 897 |
}
|
| 898 |
|
| 899 |
+
# Unified Info Card
|
| 900 |
+
card(
|
| 901 |
+
style = "margin-bottom: 20px; border-left: 5px solid #007bff;",
|
| 902 |
+
card_body(
|
| 903 |
+
padding = 15,
|
| 904 |
+
layout_columns(
|
| 905 |
+
fill = FALSE,
|
| 906 |
+
# Col 1: Station
|
| 907 |
+
div(
|
| 908 |
+
strong("Station"), br(),
|
| 909 |
+
span(s_name, style = "font-size: 1.1rem;"), br(),
|
| 910 |
+
tags$small(class = "text-muted", paste("ID:", id))
|
| 911 |
+
),
|
| 912 |
+
# Col 2: Location
|
| 913 |
+
div(
|
| 914 |
+
strong("Location"), br(),
|
| 915 |
+
span(s_state), br(),
|
| 916 |
+
tags$small(class = "text-muted", paste0(meta$latitude[1], "°N, ", meta$longitude[1], "°E"))
|
| 917 |
+
),
|
| 918 |
+
# Col 3: Elevation & Resolution
|
| 919 |
+
div(
|
| 920 |
+
strong("Technical"), br(),
|
| 921 |
+
span(paste0(s_elev, " m")), br(),
|
| 922 |
+
span(class = "badge bg-info text-dark", input$data_resolution)
|
| 923 |
+
),
|
| 924 |
+
# Col 4: Period
|
| 925 |
+
div(
|
| 926 |
+
strong("Data Selection"), br(),
|
| 927 |
+
span(dates_text)
|
| 928 |
+
),
|
| 929 |
+
# Col 5: Actions
|
| 930 |
+
div(
|
| 931 |
+
class = "d-flex align-items-center justify-content-end",
|
| 932 |
+
downloadButton(
|
| 933 |
+
"download_hourly",
|
| 934 |
+
label = "Export CSV",
|
| 935 |
+
class = "btn-sm btn-primary",
|
| 936 |
+
icon = icon("download")
|
| 937 |
+
)
|
| 938 |
+
)
|
| 939 |
+
)
|
| 940 |
)
|
| 941 |
)
|
| 942 |
})
|