diff --git a/dist/server.js b/dist/server.js index 1835e53..848ecee 100644 --- a/dist/server.js +++ b/dist/server.js @@ -276,6 +276,12 @@ function stop_recipe() { socket.emit('stop recipe'); } +function maybe_stop_recipe() { + question_modal({required: true, dismissed: false, label: "Stoppiamo?", options: [ + {action: "stop_recipe();", tag:"Sicuro"}, + {action: "alert('non interrompiamo')", tag:"No"}]}); +} + function next_phase() { socket.emit('next phase'); } @@ -375,7 +381,7 @@ On Exit: {{current_phase.onexit}} Next Phase - Stop `; @@ -407,6 +413,31 @@ function manual_modal(data) { } +function question_modal(data) { + let modal = document.getElementById("question-modal"); + let template = ``; + modal.innerHTML = Mustache.render(template, data); +} + + let items = document.querySelectorAll('#items-list > li') diff --git a/templates/base.html b/templates/base.html index ada1612..f7d6013 100644 --- a/templates/base.html +++ b/templates/base.html @@ -43,6 +43,7 @@ {% raw %} {% endraw %}
+