Janky initial implementation of auth and profiles
This commit is contained in:
@@ -1,10 +1,16 @@
|
||||
<ul class="mt-3 p-2 shadow menu menu-compact dropdown-content bg-base-100 text-neutral rounded-box w-52">
|
||||
<%= if @current_user do %>
|
||||
<li><%= @current_user.email %></li>
|
||||
<li><%= link "Settings", to: Routes.user_settings_path(@conn, :edit) %></li>
|
||||
<li><%= link "Log out", to: Routes.user_session_path(@conn, :delete), method: :delete %></li>
|
||||
<label tabindex="0" class="btn btn-ghost btn-circle avatar">
|
||||
<div class="w-10 rounded-full">
|
||||
<img src="https://placeimg.com/80/80/people" />
|
||||
</div>
|
||||
</label>
|
||||
<ul class="mt-3 p-2 shadow menu menu-compact dropdown-content bg-base-100 text-neutral rounded-box w-52">
|
||||
<li><%= @current_user.email %></li>
|
||||
<li><%= link "Settings", to: Routes.user_settings_path(@conn, :edit) %></li>
|
||||
<li><%= link "Log out", to: Routes.user_session_path(@conn, :delete), method: :delete %></li>
|
||||
</ul>
|
||||
<% else %>
|
||||
<li><%= link "Register", to: Routes.user_registration_path(@conn, :new) %></li>
|
||||
<li><%= link "Log in", to: Routes.user_session_path(@conn, :new) %></li>
|
||||
<%= link "Log in", to: Routes.user_session_path(@conn, :new), class: "btn" %>
|
||||
<%= link "Register", to: Routes.user_registration_path(@conn, :new), class: "btn btn-primary" %>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user