Add ability to stop the morse.

This commit is contained in:
Pim Kunis 2019-10-25 13:33:22 +02:00
parent 0e722b813e
commit 7ea4dd1752
5 changed files with 37 additions and 29 deletions

View file

@ -4,9 +4,9 @@
<div id="buttonwrap">
<%= if @in_progress? do %>
<button phx-click="start_morse" class="button" <%= if @in_progress?, do: ~s(disabled=disabled) %>>In progress...</button>
<button phx-click="toggle_morse" class="button stop">Stop</button>
<% else %>
<button phx-click="start_morse" class="button">Start</button>
<button phx-click="toggle_morse" class="button">Start</button>
<% end %>
<div id="response-block">
<h2>Progress:</h2>