This commit is contained in:
Rüdiger Diedrich
2022-07-25 13:13:46 +02:00
parent ef0e89478c
commit 4be05a6cbd
5 changed files with 81 additions and 29 deletions

View File

@ -1,10 +1,13 @@
<div class="user-box">
<%= if @current_user do %>
<h4 class="w-full"><%= @current_user.email %></h4>
<%= link "Settings", class: "link",
to: Routes.user_settings_path(@conn, :edit) %>
<%= button "Log out", class: "btn btn-sm",
to: Routes.user_session_path(@conn, :delete), method: :delete %>
<div class="user-box flex gap-2">
<%= if @current_user do %>
<h4 class=""><%= @current_user.email %></h4>
<div class="tooltip tooltip-bottom" data-tip="Settings">
<%= button class: "btn btn-square btn-outline btn-sm", to: Routes.user_settings_path(@conn, :edit), method: :get do %>
<Icons.settings />
<% end %>
</div>
<%= button "Log out", class: "btn btn-outline btn-sm",
to: Routes.user_session_path(@conn, :delete), method: :delete %>
<% else %>
<%= link "Register", class: "link",
to: Routes.user_registration_path(@conn, :new) %>