Skip to content

Commit

Permalink
refact: update "game not initialised" alert
Browse files Browse the repository at this point in the history
  • Loading branch information
juliendiot42 committed Jun 25, 2024
1 parent 498319c commit 40a1b50
Showing 1 changed file with 6 additions and 21 deletions.
27 changes: 6 additions & 21 deletions server.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,27 +45,12 @@ shinyServer(function(input, output, session) {

observe({
if (!gameInitialised()) {
alert("Game is not initialised :-(")

# insertUI("#id_main_ui", where = "beforeBegin", {
# source("src/ui/ui_gameNotInitialised.R", local = TRUE, encoding = "UTF-8")$value
# })
# removeUI("#id_main_ui")

# insertUI("#pltmat_main_ui", where = "beforeBegin", {
# source("src/ui/ui_gameNotInitialised.R", local = TRUE, encoding = "UTF-8")$value
# })
# removeUI("#pltmat_main_ui")

# insertUI("#pheno_main_ui", where = "beforeBegin", {
# source("src/ui/ui_gameNotInitialised.R", local = TRUE, encoding = "UTF-8")$value
# })
# removeUI("#pheno_main_ui")

# insertUI("#geno_main_ui", where = "beforeBegin", {
# source("src/ui/ui_gameNotInitialised.R", local = TRUE, encoding = "UTF-8")$value
# })
# removeUI("#geno_main_ui")
msg <- paste(
"The game have not been initialised. It is therefore currently impossible to play.",
'\nTo initialise the game, go to the "Admin" menu and in the "Game setup" tab.',
"From there you will be able to initialise a new game."
)
alert(msg)
}
})

Expand Down

0 comments on commit 40a1b50

Please sign in to comment.