Skip to content

Commit

Permalink
pin verification page topbar fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Kimutai01 committed Nov 14, 2024
1 parent bd3577d commit d1806bf
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 65 deletions.
135 changes: 71 additions & 64 deletions lib/animina_web/components/top_navigation_components.ex
Original file line number Diff line number Diff line change
Expand Up @@ -190,79 +190,86 @@ defmodule AniminaWeb.TopNavigationCompontents do
<div>
<%= if @current_user do %>
<div class="dark:bg-gray-800 text-gray-700 w-[80%] ml-[20%] py-2 text-sm bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none flex flex-col rounded-md gap-2 dark:text-white">
<div class="border-gray-100 border-b-[1px] py-1">
<p class="px-2 text-sm " role="none">
<%= if @active_tab != :verification do %>
<div class="border-gray-100 border-b-[1px] py-1">
<p class="px-2 text-sm" role="none">
<%= with_locale(@language, fn -> %>
<%= gettext("Signed in as") %>
<% end) %>
</p>
<p class="px-2 text-sm font-medium text-gray-900 truncate dark:text-gray-400">
<%= StringHelper.truncate_username(@current_user.username) %>
</p>
</div>
<.link
class="border-b-[0.5px] px-2 pb-2 border-gray-100"
navigate={"/#{@current_user.username}"}
>
<%= with_locale(@language, fn -> %>
<%= gettext("Signed in as") %>
<%= gettext("Show Profile") %>
<% end) %>
</p>
<p class="px-2 text-sm font-medium text-gray-900 truncate dark:text-gray-400">
<%= StringHelper.truncate_username(@current_user.username) %>
</p>
</div>
<.link
class=" border-b-[0.5px] px-2 pb-2 border-gray-100"
navigate={"/#{@current_user.username}"}
>
<%= with_locale(@language, fn -> %>
<%= gettext("Show Profile") %>
<% end) %>
</.link>
<.link class="px-2" navigate="/my/profile/edit">
<%= with_locale(@language, fn -> %>
<%= gettext("Edit Profile") %>
<% end) %>
</.link>
<.link class="px-2" navigate="/my/profile-photo">
<%= with_locale(@language, fn -> %>
<%= gettext("Change Profile Photo") %>
<% end) %>
</.link>
<.link class="px-2" navigate="/my/flags/white">
<%= with_locale(@language, fn -> %>
<%= gettext("Edit White Flags") %>
<% end) %>
</.link>
<.link class="px-2" navigate="/my/flags/green">
<div class="flex items-center gap-2">
</.link>
<.link class="px-2" navigate="/my/profile/edit">
<%= with_locale(@language, fn -> %>
<%= gettext("Edit Green Flags") %>
<%= gettext("Edit Profile") %>
<% end) %>
<p class="w-2 h-2 bg-green-500 rounded-full" />
</div>
</.link>
<.link class="px-2" navigate="/my/flags/red">
<div class="flex items-center gap-2">
</.link>
<.link class="px-2" navigate="/my/profile-photo">
<%= with_locale(@language, fn -> %>
<%= gettext("Edit Red Flags") %>
<%= gettext("Change Profile Photo") %>
<% end) %>
<p class="w-2 h-2 bg-red-500 rounded-full" />
</div>
</.link>
<.link class="px-2" navigate="/my/potential-partner">
<%= with_locale(@language, fn -> %>
<%= gettext("Edit Potential Partner Preferences") %>
<% end) %>
</.link>
<.link class="px-2" navigate="/my/profile/visibility">
<div class="flex items-center gap-2">
</.link>
<.link class="px-2" navigate="/my/flags/white">
<%= with_locale(@language, fn -> %>
<%= gettext("Change Visibility") %>
<%= gettext("Edit White Flags") %>
<% end) %>
</.link>
<.link class="px-2" navigate="/my/flags/green">
<div class="flex items-center gap-2">
<%= with_locale(@language, fn -> %>
<%= gettext("Edit Green Flags") %>
<% end) %>
<p class="w-2 h-2 bg-green-500 rounded-full" />
</div>
</.link>
<.link class="px-2" navigate="/my/flags/red">
<div class="flex items-center gap-2">
<%= with_locale(@language, fn -> %>
<%= gettext("Edit Red Flags") %>
<% end) %>
<p class="w-2 h-2 bg-red-500 rounded-full" />
</div>
</.link>
<.link class="px-2" navigate="/my/potential-partner">
<%= with_locale(@language, fn -> %>
<%= gettext("Edit Potential Partner Preferences") %>
<% end) %>
</.link>
<.link class="px-2" navigate="/my/profile/visibility">
<div class="flex items-center gap-2">
<%= with_locale(@language, fn -> %>
<%= gettext("Change Visibility") %>
<% end) %>
</div>
</.link>
<p class="h-[1px] bg-gray-100 my-1 w-[100%]"></p>
<div class="px-2">
<.flag_language_switcher base_url="/my/dashboard/" language={@language} />
</div>
</.link>
<p class=" h-[1px] bg-gray-100 my-1 w-[100%]"></p>
<div class="px-2">
<.flag_language_switcher base_url="/my/dashboard/" language={@language} />
</div>
<p class=" h-[1px] bg-gray-100 my-1 w-[100%]"></p>
<.link class="px-2" navigate="/auth/user/sign-out">
<%= with_locale(@language, fn -> %>
<%= gettext("Sign Out") %>
<% end) %>
</.link>
<p class="h-[1px] bg-gray-100 my-1 w-[100%]"></p>
<.link class="px-2" navigate="/auth/user/sign-out">
<%= with_locale(@language, fn -> %>
<%= gettext("Sign Out") %>
<% end) %>
</.link>
<% else %>
<.link class="px-2 w-[150px] text-center" navigate="/auth/user/sign-out">
<%= with_locale(@language, fn -> %>
<%= gettext("Sign Out") %>
<% end) %>
</.link>
<% end %>
</div>
<% else %>
<div class="flex flex-col gap-2 p-4 text-sm text-gray-700 bg-white rounded-md shadow-lg dark:bg-gray-900 ring-1 ring-black ring-opacity-5 focus:outline-none dark:text-white ">
Expand Down
2 changes: 1 addition & 1 deletion lib/animina_web/live/email_validation_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule AniminaWeb.EmailValidationLive do
def mount(_, %{"language" => language} = _session, socket) do
socket =
socket
|> assign(active_tab: :home)
|> assign(active_tab: :verification)
|> assign(language: language)

{:ok, socket}
Expand Down

0 comments on commit d1806bf

Please sign in to comment.