summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/activities/show.html.erb23
-rw-r--r--app/views/application/_navbar.html.erb3
-rw-r--r--app/views/game/finish_activity.js.erb4
-rw-r--r--app/views/locations/show.html.erb4
-rw-r--r--app/views/look/_results.html.erb (renamed from app/views/activities/_results.html.erb)0
-rw-r--r--app/views/look/_timer.html.erb (renamed from app/views/activities/_timer.html.erb)4
-rw-r--r--app/views/look/show.html.erb10
7 files changed, 32 insertions, 16 deletions
diff --git a/app/views/activities/show.html.erb b/app/views/activities/show.html.erb
index c9c6d25..4516b51 100644
--- a/app/views/activities/show.html.erb
+++ b/app/views/activities/show.html.erb
@@ -1,15 +1,12 @@
-<h1 class="text-2xl"><%= @activity.name %></h1>
-<p><%= @activity.description %></p>
+<h1 class="text-3xl mb-2"><%= @activity.name %></h1>
+<p class="italic"><%= @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 class="my-6">
+ <h2 class="text-xl">Game Data</h2>
+ <p>GID: <span class="text-code"><%= @activity.gid %></span></p>
+ <% if @activity.whatnot %>
+ <div class="text-code my-2"><%= JSON.pretty_generate(@activity.whatnot) %></div>
+ <% else %>
+ <p>Item has no additional data.</p>
+ <% end %>
</div>
-
-<div id="result_controls">
- <%= render "timer" %>
-</div>
-
-<%= form_with url: start_activity_path do |f| %>
- <%= f.hidden_field :id, value: @activity.id %>
- <%= f.submit "Start" %>
-<% end %>
diff --git a/app/views/application/_navbar.html.erb b/app/views/application/_navbar.html.erb
index c0e2761..c45db15 100644
--- a/app/views/application/_navbar.html.erb
+++ b/app/views/application/_navbar.html.erb
@@ -1,6 +1,9 @@
<ul class="py-2 px-2 col-span-12 text-display">
<% if current_char %>
<li class="mr-6 inline">
+ <%= link_to "Look", look_path %>
+ </li>
+ <li class="mr-6 inline">
<%= link_to "Locations", locations_path %>
</li>
<li class="mr-6 inline">
diff --git a/app/views/game/finish_activity.js.erb b/app/views/game/finish_activity.js.erb
index 0732600..79659b6 100644
--- a/app/views/game/finish_activity.js.erb
+++ b/app/views/game/finish_activity.js.erb
@@ -1,7 +1,7 @@
var resultOutputDiv = document.getElementById("result_output");
var resultControlsDiv = document.getElementById("result_controls");
-var outputHTML = "<%= j render(partial: "activities/results", locals: { results: @results }) %>"
+var outputHTML = "<%= j render(partial: "look/results", locals: { results: @results }) %>"
if (resultOutputDiv) {
resultOutputDiv.innerHTML += outputHTML;
@@ -11,5 +11,5 @@ if (resultOutputDiv) {
}
if (resultControlsDiv) {
- resultControlsDiv.innerHTML = "<%= j render(partial: "activities/timer") %>"
+ resultControlsDiv.innerHTML = "<%= j render(partial: "look/timer") %>"
}
diff --git a/app/views/locations/show.html.erb b/app/views/locations/show.html.erb
index bed97ac..0001c99 100644
--- a/app/views/locations/show.html.erb
+++ b/app/views/locations/show.html.erb
@@ -7,5 +7,9 @@
<div class="my-4">
<h2 class="text-xl"><%= link_to activity.name, activity_path(activity) %></h2>
<p class="italic"><%= activity.description %></p>
+ <%= form_with url: start_activity_path(activity) do |f| %>
+ <%= f.hidden_field :id, value: activity.id %>
+ <%= f.submit "Start" %>
+ <% end %>
</div>
<% end %>
diff --git a/app/views/activities/_results.html.erb b/app/views/look/_results.html.erb
index 36e8103..36e8103 100644
--- a/app/views/activities/_results.html.erb
+++ b/app/views/look/_results.html.erb
diff --git a/app/views/activities/_timer.html.erb b/app/views/look/_timer.html.erb
index c7d881c..908689b 100644
--- a/app/views/activities/_timer.html.erb
+++ b/app/views/look/_timer.html.erb
@@ -12,5 +12,7 @@
<div><%= most_recent_cs.xp_to_next_level %> XP to next level</div>
</div>
- <%= button_to "Stop", stop_activity_path %>
+ <div class="text-center my-4">
+ <%= button_to "Stop", stop_activity_path %>
+ </div>
<% end %>
diff --git a/app/views/look/show.html.erb b/app/views/look/show.html.erb
new file mode 100644
index 0000000..a0c1bd7
--- /dev/null
+++ b/app/views/look/show.html.erb
@@ -0,0 +1,10 @@
+<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 id="result_controls">
+ <%= render "timer" %>
+</div>