more tweaks.

3110245 · gmorell · 2024-04-16 00:27

14 files +11 -6

Files changed

modified apps/room_sanctum/lib/room_sanctum/workers/vision_worker.ex
+1 −1
@@ -120,7 +120,7 @@ defmodule RoomSanctum.Worker.Vision do
120 120 end
121 121
122 122 def handle_call(:return_state, _from, state) do
123 − {:reply, %{data: state.data, queries: state.vision_q}, state}
123 + {:reply, %{data: state.data, queries: state.vision_q, name: state.vision.name}, state}
124 124 end
125 125
126 126 def handle_call(_msg, _from, state) do
modified apps/room_sanctum/lib/room_sanctum_web/components/layouts/root_public.html.heex
+0 −3
@@ -12,9 +12,6 @@
12 12 <div class="p-2 h-full">
13 13 <div class="bg-neutral sm:rounded-lg shadow-xl p-4 h-full overflow-y-clip">
14 14 <%= @inner_content %>
15 − <div class="absolute bottom-2 right-2 ...">
16 − <p><a class="btn btn-ghost normal-case text-lg neon" href="/">apollo's</a></p>
17 − </div>
18 15 </div>
19 16 </div>
20 17 </body>
modified apps/room_sanctum/lib/room_sanctum_web/live/cfg_pythiae_live/public.ex
+3 −2
@@ -23,6 +23,7 @@ defmodule RoomSanctumWeb.PythiaeLive.Public do
23 23 socket
24 24 |> assign(:page_title, page_title(socket.assigns.live_action))
25 25 |> assign(:pythiae, Configuration.get_pythiae!(:name, name))
26 + |> assign(:curr_vision, "Pending")
26 27 |> assign(:preview, [])
27 28 |> assign(:preview_mode, :basic)}
28 29 end
@@ -31,10 +32,10 @@ defmodule RoomSanctumWeb.PythiaeLive.Public do
31 32 def handle_info(:update, socket) do
32 33 Process.send_after(self(), :update, 15000)
33 34
34 − %{data: data, queries: queries} =
35 + %{data: data, queries: queries, name: name} =
35 36 RoomSanctum.Worker.Vision.get_state(socket.assigns.pythiae.curr_vision)
36 37
37 − {:noreply, socket |> assign(:preview, data) |> assign(:queries, queries)}
38 + {:noreply, socket |> assign(:preview, data) |> assign(:queries, queries) |> assign(:curr_vision, name)}
38 39 end
39 40
40 41 defp condense({id, type}, data) do
modified apps/room_sanctum/lib/room_sanctum_web/live/cfg_pythiae_live/public.html.heex
+7 −0
@@ -1,4 +1,11 @@
1 1 <div class="2xl:columns-5 xl:columns-3 lg:columns-3 md:columns-3 sm:columns-3 gap-1">
2 + <div class="absolute bottom-2 left-2 ...">
3 + <p><a class="btn btn-ghost normal-case text-md" href="#">VISION: <%= @curr_vision %></a></p>
4 + </div>
5 + <div class="absolute bottom-2 right-2 ...">
6 + <p><a class="btn btn-ghost normal-case text-lg neon" href="/">apollo's</a></p>
7 + </div>
8 + <!-- here together because it made sense to have both here instead of the root -->
2 9 <%= for {k, p} <- @preview do %>
3 10 <%= if p != [] do %>
4 11 <div class="card card-compact bg-base-300 shadow-xl w-full mb-1">

Parents: fed6cb0