diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/application/_flash_messages.html.erb | 6 | ||||
-rw-r--r-- | app/views/characters/hearth/index.html.erb | 4 | ||||
-rw-r--r-- | app/views/layouts/application.html.erb | 3 |
3 files changed, 9 insertions, 4 deletions
diff --git a/app/views/application/_flash_messages.html.erb b/app/views/application/_flash_messages.html.erb new file mode 100644 index 0000000..a1c7467 --- /dev/null +++ b/app/views/application/_flash_messages.html.erb @@ -0,0 +1,6 @@ +<% if notice %> + <div class="flash-message bg-gray-700 text-gray-200"><%= notice %></div> +<% end %> +<% if alert %> + <div class="flash-message bg-red-800 text-red-300"><%= alert %></div> +<% end %> diff --git a/app/views/characters/hearth/index.html.erb b/app/views/characters/hearth/index.html.erb index 82dfbe8..20b6fc0 100644 --- a/app/views/characters/hearth/index.html.erb +++ b/app/views/characters/hearth/index.html.erb @@ -33,7 +33,7 @@ <%= f.hidden_field :queued_actions, value: 0 %> <%= f.submit construct_activity.name %> <% end %> - <div class="text-sm">(costs <%= construct_activity.cost_string %>)</div> + <div class="text-sm">(costs <%= construct_activity.costs.join(", ")%>)</div> </div> <% end %> </div> @@ -47,5 +47,5 @@ <%= f.hidden_field :queued_actions, value: 0 %> <%= f.submit construct_activity.name %> <% end %> - (costs <%= construct_activity.cost_string %>) + (costs <%= construct_activity.costs.join(", ")%>) <% end %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 9b9b23a..7ce8860 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -21,8 +21,7 @@ <%= render "navbar" %> <% end %> <div class="game-container-box col-span-12 sm:col-span-8"> - <p><%= notice %></p> - <p><%= alert %></p> + <%= render "flash_messages" %> <%= yield %> </div> <% if user_signed_in? %> |