Skip to content

Commit

Permalink
feat: change layout
Browse files Browse the repository at this point in the history
  • Loading branch information
ruioliveira02 committed Nov 18, 2024
1 parent 0f07176 commit 36a3776
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 17 deletions.
1 change: 0 additions & 1 deletion assets/js/hooks/countdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export const Countdown = {
};

window.addEventListener("phx:highlight", (e) => {
console.log("Highlight");
timeReceived(new Date(e.detail.start_time).getTime())
});
}
Expand Down
34 changes: 18 additions & 16 deletions lib/safira_web/components/layouts/app.html.heex
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
<div class="relative h-screen flex overflow-hidden">
<.sidebar
current_user={@current_user}
pages={SafiraWeb.Config.app_pages()}
current_page={Map.get(assigns, :current_page, nil)}
background="bg-primaryDark"
border="border-darkShade"
logo_padding="px-16 pt-8 pb-4"
logo_images={%{light: "/images/sei.svg", dark: "/images/sei.svg"}}
logo_url={~p"/app/"}
user_dropdown_name_color="text-light"
user_dropdown_handle_color="text-lightMuted"
user_dropdown_icon_color="text-lightShade"
link_class="px-3 group flex items-center py-2 text-sm font-medium rounded-md transition-colors"
link_active_class="bg-light text-primaryDark"
link_inactive_class="hover:bg-primary-500/10 text-light"
/>
<%= if Map.get(assigns, :event_started, true) do %>
<.sidebar
current_user={@current_user}
pages={SafiraWeb.Config.app_pages()}
current_page={Map.get(assigns, :current_page, nil)}
background="bg-primaryDark"
border="border-darkShade"
logo_padding="px-16 pt-8 pb-4"
logo_images={%{light: "/images/sei.svg", dark: "/images/sei.svg"}}
logo_url={~p"/app/"}
user_dropdown_name_color="text-light"
user_dropdown_handle_color="text-lightMuted"
user_dropdown_icon_color="text-lightShade"
link_class="px-3 group flex items-center py-2 text-sm font-medium rounded-md transition-colors"
link_active_class="bg-light text-primaryDark"
link_inactive_class="hover:bg-primary-500/10 text-light"
/>
<% end %>
<div class="flex flex-col flex-1 overflow-hidden">
<div class="bg-primaryDark flex justify-end lg:hidden px-4 sm:px-6 py-2">
<button
Expand Down
4 changes: 4 additions & 0 deletions lib/safira_web/live/app/waiting_live/index.ex
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ defmodule SafiraWeb.App.WaitingLive.Index do
phx-hook="Countdown"
>
</div>
<.link class="text-center block mt-8 underline" href="/users/log_out" method="delete">
Sign out
</.link>
</div>
"""
end
Expand All @@ -35,6 +38,7 @@ defmodule SafiraWeb.App.WaitingLive.Index do

{:ok,
socket
|> assign(:event_started, false)
|> push_event("highlight", %{start_time: Event.get_event_start_time!()})}
end
end
Expand Down

0 comments on commit 36a3776

Please sign in to comment.