diff options
author | David Gay <david@davidgay.org> | 2021-05-27 19:24:12 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-05-27 19:24:12 -0400 |
commit | 09dbf09b5fa6d106a57cdb601c6ed6c23e00f7dd (patch) | |
tree | 26ff703ba99ef0821f0f74539378e40e18dd85af /app/views/look | |
parent | d9f829e7a723ae36367280950dcbb7edf394e9a2 (diff) |
Make timer more robust, and `stop_activity` if you can't do it
Diffstat (limited to 'app/views/look')
-rw-r--r-- | app/views/look/_results.html.erb | 2 | ||||
-rw-r--r-- | app/views/look/show.html.erb | 21 |
2 files changed, 14 insertions, 9 deletions
diff --git a/app/views/look/_results.html.erb b/app/views/look/_results.html.erb index 36e8103..8b5466e 100644 --- a/app/views/look/_results.html.erb +++ b/app/views/look/_results.html.erb @@ -21,7 +21,7 @@ <% when "message" %> <p><%= result[:body] %></p> <% when "error" %> - <p><%= result[:message] %></p> + <p class="text-red-500"><%= result[:message] %></p> <% end %> <% end %> </div> diff --git a/app/views/look/show.html.erb b/app/views/look/show.html.erb index a0c1bd7..f5ae417 100644 --- a/app/views/look/show.html.erb +++ b/app/views/look/show.html.erb @@ -1,10 +1,15 @@ -<h1 class="text-2xl"><%= current_char.activity.name %></h1> -<p><%= current_char.activity.description %></p> +<% if current_char.activity %> + <h1 class="text-2xl"><%= current_char.activity.name %></h1> + <p><%= current_char.activity.description %></p> -<div class="min-w-full my-2 px-1 overflow-auto text-sm border-2 border-gray-800 rounded" - style="height: 30rem;" id="result_output"> -</div> + <div class="min-w-full my-2 px-1 overflow-auto text-sm border-2 border-gray-800 rounded" + style="height: 30rem;" id="result_output"> + </div> -<div id="result_controls"> - <%= render "timer" %> -</div> + <div id="result_controls"> + <%= render "timer" %> + </div> +<% else %> + <p>You're not currently doing anything. Maybe you'd like to + <%= link_to "go somewhere", locations_path %>?</p> +<% end %> |