diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/application/_chat.html.erb | 21 | ||||
-rw-r--r-- | app/views/application/_navbar.html.erb | 2 | ||||
-rw-r--r-- | app/views/application/_timer.html.erb | 8 | ||||
-rw-r--r-- | app/views/chat_messages/index.html.erb | 9 | ||||
-rw-r--r-- | app/views/locations/index.html.erb | 8 | ||||
-rw-r--r-- | app/views/look/look.html.erb (renamed from app/views/locations/show.html.erb) | 2 |
6 files changed, 31 insertions, 19 deletions
diff --git a/app/views/application/_chat.html.erb b/app/views/application/_chat.html.erb index b656ed7..1ba6f8f 100644 --- a/app/views/application/_chat.html.erb +++ b/app/views/application/_chat.html.erb @@ -3,13 +3,20 @@ <div data-chat-target="output" id="chat_output" class="game-container-box overflow-y-auto overflow-x-hidden break-words flex-grow"> </div> <div class="flex-none"> - <%= form_with model: ChatMessage.new, html: { autocomplete: "off" }, local: false, - data: { action: "chat#send" }, class: "flex" do |f| %> - <%= f.collection_select :chat_room_id, ChatRoom.accessible_to(current_char.user), - :id, :short_name, class: "flex-none" %> - <%= f.text_field :body, size: "1", maxlength: 255, required: true, - data: { chat_target: "message" }, class: "flex-grow inline-flex" %> - <% end %> + <div class="flex items-center"> + <div class="flex-grow"> + <%= form_with model: ChatMessage.new, html: { autocomplete: "off" }, local: false, + data: { action: "chat#send" }, class: "flex" do |f| %> + <%= f.collection_select :chat_room_id, ChatRoom.accessible_to(current_char.user), + :id, :short_name, class: "flex-none" %> + <%= f.text_field :body, size: "1", maxlength: 255, required: true, + data: { chat_target: "message" }, class: "flex-grow inline-flex" %> + <% end %> + </div> + <div class="flex-none text-xs mx-2"> + <%= link_to "History", chat_messages_path %> + </div> + </div> </div> </div> <% end %> diff --git a/app/views/application/_navbar.html.erb b/app/views/application/_navbar.html.erb index e315b42..d80e7b6 100644 --- a/app/views/application/_navbar.html.erb +++ b/app/views/application/_navbar.html.erb @@ -1,7 +1,7 @@ <ul class="py-2 px-2 col-span-12 text-display space-x-2.5"> <% if current_char %> <li class="inline"> - <%= link_to "Locations", locations_path %> + <%= link_to "Look", look_path %> </li> <li class="inline"> <%= link_to "Character", character_path(current_char) %> diff --git a/app/views/application/_timer.html.erb b/app/views/application/_timer.html.erb index 51d9b81..a18e739 100644 --- a/app/views/application/_timer.html.erb +++ b/app/views/application/_timer.html.erb @@ -15,14 +15,18 @@ </div> </div> - <% most_recent_cs = current_char.character_skills.order(:updated_at).last %> <div class="text-center text-sm"> <div class="text-xs"><%= most_recent_cs.skill.name %> level <%= most_recent_cs.level %></div> <div><%= most_recent_cs.xp_to_next_level %> XP to next level</div> </div> - <div class="text-center my-2"> + <div class="text-center text-sm my-2"> + <% if current_char.queued_actions %> + <div class="my-1"> + <%= pluralize(current_char.queued_actions + 1, "action") %> remaining. + </div> + <% end %> <%= button_to "Stop", stop_activity_path, class: "text-sm" %> </div> diff --git a/app/views/chat_messages/index.html.erb b/app/views/chat_messages/index.html.erb new file mode 100644 index 0000000..8791e7b --- /dev/null +++ b/app/views/chat_messages/index.html.erb @@ -0,0 +1,9 @@ +<h1 class="text-3xl mb-4"> + Chat History +</h1> + +<p class="mb-4">Last 2,000 messages listed from newest to oldest.</p> + +<div class="text-sm"> + <%= render "chat_messages/list" %> +</div> diff --git a/app/views/locations/index.html.erb b/app/views/locations/index.html.erb deleted file mode 100644 index 3c9b837..0000000 --- a/app/views/locations/index.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -<h1 class="text-3xl mb-4">Locations</h1> - -<% @locations.each do |location| %> - <div class="my-4"> - <h2 class="text-xl"><%= link_to location.name, location_path(location) %></h2> - <p class="italic"><%= location.description %></p> - </div> -<% end %> diff --git a/app/views/locations/show.html.erb b/app/views/look/look.html.erb index fcc668a..2f1074a 100644 --- a/app/views/locations/show.html.erb +++ b/app/views/look/look.html.erb @@ -6,7 +6,7 @@ <% @location.monster_spawns.select(&:alive?).each do |ms| %> <p class="text-yellow-400">A <%= ms.monster.name %> is ravaging this location! (<%= ms.remaining_hp %> HP)</p> <%# TODO: HACK %> - <% activity = Activity.find_by_gid("beastslay_leviathan_floret_region") %> + <% activity = Activity.find_by_gid("beastslay_leviathan_floret") %> <%= form_with url: start_activity_path(activity) do |f| %> <%= f.hidden_field :id, value: activity.id %> <%= f.submit "Hunt" %> |