summaryrefslogtreecommitdiff
path: root/app/views/look/_timer.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/look/_timer.html.erb')
-rw-r--r--app/views/look/_timer.html.erb18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/views/look/_timer.html.erb b/app/views/look/_timer.html.erb
new file mode 100644
index 0000000..908689b
--- /dev/null
+++ b/app/views/look/_timer.html.erb
@@ -0,0 +1,18 @@
+<% if current_char.activity %>
+ <div data-controller="timer"
+ data-timer-start-value="<%= current_char.activity_time_remaining.ceil %>"
+ data-timer-post-url-value="<%= finish_activity_url %>"
+ class="text-center">
+ <span data-timer-target="timer" class="text-3xl"></span>
+ </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-4">
+ <%= button_to "Stop", stop_activity_path %>
+ </div>
+<% end %>