From 07a51b63d9e62ea28510bf1efacf508623f3e97c Mon Sep 17 00:00:00 2001 From: Laurent Mazet Date: Sat, 22 Aug 2026 18:57:39 +0200 Subject: [PATCH] avoid comfirmation if all rack are empty --- public/trivabble.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/public/trivabble.js b/public/trivabble.js index 5fe3b9a..bc376a0 100644 --- a/public/trivabble.js +++ b/public/trivabble.js @@ -2194,12 +2194,16 @@ } function askShowBag() { - myConfirm( - _("Do you really want to see bag content? It's kind of cheating!"), - function () { - sendCmds([{cmd: "showBag"}]); - } - ); + if (nbTilesInRacks) { + myConfirm( + _("Do you really want to see bag content? It's kind of cheating!"), + function () { + sendCmds([{cmd: "showBag"}]); + } + ); + } else { + sendCmds([{cmd: "showBag"}]); + } } function triggerFlashLight(cell) { -- 2.30.2