Micro commit: User menu. No items work yet.

This commit is contained in:
Ryan Pandya 2022-10-23 22:38:47 -07:00
parent 51e559478a
commit 29474f49c1
3 changed files with 13 additions and 4 deletions

View File

@ -8,10 +8,12 @@ config :bcrypt_elixir, :log_rounds, 1
# The MIX_TEST_PARTITION environment variable can be used # The MIX_TEST_PARTITION environment variable can be used
# to provide built-in test partitioning in CI environment. # to provide built-in test partitioning in CI environment.
# Run `mix help test` for more information. # Run `mix help test` for more information.
config :friends, Friends.Repo, config :friends, Friends.Repo,
username: "postgres", username: "postgres",
password: "postgres", password: "pleasework",
hostname: "localhost", hostname: "10.0.0.22",
port: "2345",
database: "friends_test#{System.get_env("MIX_TEST_PARTITION")}", database: "friends_test#{System.get_env("MIX_TEST_PARTITION")}",
pool: Ecto.Adapters.SQL.Sandbox, pool: Ecto.Adapters.SQL.Sandbox,
pool_size: 10 pool_size: 10

View File

@ -1,4 +1,4 @@
<ul> <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 %> <%= if @current_user do %>
<li><%= @current_user.email %></li> <li><%= @current_user.email %></li>
<li><%= link "Settings", to: Routes.user_settings_path(@conn, :edit) %></li> <li><%= link "Settings", to: Routes.user_settings_path(@conn, :edit) %></li>

View File

@ -3,7 +3,14 @@
<div class="flex-1"> <div class="flex-1">
<.link navigate={"/"} class="btn btn-ghost normal-case text-xl">Friends</.link> <.link navigate={"/"} class="btn btn-ghost normal-case text-xl">Friends</.link>
</div> </div>
<div class="dropdown dropdown-end">
<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>
<%= render("_user_menu.html", conn: @conn, current_user: @current_user) %>
</div>
</div> </div>
</div> </div>
<div class="mx-auto w-full lg:w-3/4"> <div class="mx-auto w-full lg:w-3/4">