Skip to content

Commit

Permalink
Admin tools and logo update (#137)
Browse files Browse the repository at this point in the history
* css and logo update
* fix typo in segments export

---------

Co-authored-by: hlageek <22201406+hlageek@users.noreply.github.com>
  • Loading branch information
hlageek and hlageek committed May 3, 2024
1 parent 1698087 commit 25f4587
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 23 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: requal
Title: Shiny Application for Computer-Assisted Qualitative Data Analysis
Version: 1.1.1.9004
Version: 1.1.1.9005
Authors@R:
c(
person(given = "Radim",
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- export memos
- updated segment export (with segment start for easier narrative analysis)
- added CITATION file
- logo update

# requal 1.1.0

Expand Down
17 changes: 5 additions & 12 deletions R/app_server.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,11 @@ app_server <- function(input, output, session) {
# memo
mod_memo_server("memo_ui_1", glob)

# admin interface
output$fab_button_ui <- renderUI({
if (req(glob$user$is_admin)) {
shinymanager::fab_button(
actionButton(
inputId = ".shinymanager_admin",
label = "User database",
icon = icon("gears", verify_fa = FALSE)
),
position = "bottom-left"
)
}
# show admin interface
observeEvent(glob$user$is_admin, {
if (req(glob$user$is_admin)){
shinyjs::show(selector = ".mfb-component--bl")
}
})
# shared
mod_download_csv_server("download_csv_ui_1", glob)
Expand Down
1 change: 1 addition & 0 deletions R/app_ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#' @noRd
app_ui <- function(request, mode = NULL, access = NULL) {
tagList(
shinyjs::useShinyjs(),
# Leave this function for adding external resources
golem_add_external_resources(),
# Your application UI logic
Expand Down
2 changes: 1 addition & 1 deletion R/mod_analysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ mod_rql_button_server(
shinyjs::enable("download_csv_ui_1-download", asis = TRUE)
shinyjs::enable("download_html_ui_1-report", asis = TRUE)
glob$segments_df <- loc$segments_df %>%
dplyr::select(doc_name, doc_id, segment_start, segmend_end, code_name,
dplyr::select(doc_name, doc_id, segment_start, segment_end, code_name,
code_id, segment_text, user_name)
glob$segments_taglist <- loc$segments_taglist
} else {
Expand Down
2 changes: 1 addition & 1 deletion R/run_app.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ run_app <- function(mode = "local",
height = "30%", style = "margin-right: 20px"
),
enable_admin = TRUE,
fab_position = "none"
fab_position = "bottom-left"
),
local = app_ui,
local_test = app_ui
Expand Down
9 changes: 2 additions & 7 deletions R/utils.R

Large diffs are not rendered by default.

19 changes: 18 additions & 1 deletion inst/app/www/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,21 @@ width: 100% !important;
padding-top: 20px;
padding-left: 20px;
padding-right: 20px;
}
}

/* initiates admin button as hidden */
.mfb-component--bl {
display: none;
}
#\.shinymanager_logout {
display: none;
}
#\.shinymanager_admin {
position: relative;
bottom: -5em;
}

/* logo style */
.logo {
background-color: rgb(63, 79, 144) !important;
}
Binary file modified inst/app/www/requal_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 25f4587

Please sign in to comment.