Skip to content

Commit

Permalink
Clean up mobile experience
Browse files Browse the repository at this point in the history
  • Loading branch information
zacksiri committed Feb 28, 2024
1 parent 7e3828e commit 01a1750
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 56 deletions.
2 changes: 1 addition & 1 deletion lib/polar_web/components/layouts/app.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
</header>
<main>
<.flash_group flash={@flash} />
<div class="mx-auto max-w-7xl py-10 sm:px-6 lg:px-8">
<div class="mx-auto max-w-7xl pt-10 sm:px-6 lg:px-8">
<%= @inner_content %>
</div>
</main>
Expand Down
66 changes: 34 additions & 32 deletions lib/polar_web/live/dashboard/space_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -51,40 +51,42 @@ defmodule PolarWeb.Dashboard.SpaceLive do
id={"credential_#{credential.id}"}
class="relative flex justify-between gap-x-6 px-4 py-5 hover:bg-gray-50 sm:px-6"
>
<div class="min-w-0">
<div class="flex items-start gap-x-3">
<p class="text-sm font-semibold leading-6 text-gray-900"><%= credential.name %></p>
<.link navigate={~p"/dashboard/spaces/#{credential.space_id}/credentials/#{credential.id}"}>
<div class="min-w-0">
<div class="flex items-start gap-x-3">
<p class="text-sm font-semibold leading-6 text-gray-900"><%= credential.name %></p>
</div>
<div class="mt-1 flex items-center gap-x-2 text-xs leading-5 text-gray-500">
<p class="whitespace-nowrap">
<%= gettext("Created on") %>
<time datetime={credential.inserted_at}>
<%= Calendar.strftime(credential.inserted_at, "%d %b %Y") %>
</time>
</p>
<svg viewBox="0 0 2 2" class="h-0.5 w-0.5 fill-current">
<circle cx="1" cy="1" r="1" />
</svg>
<p class="truncate">
<%= if credential.expires_at do %>
<%= gettext("Expires at") %> <%= Calendar.strftime(
credential.expires_at,
"%d %b %Y"
) %>
<% else %>
<%= gettext("Never Expires") %>
<% end %>
</p>
</div>
</div>
<div class="mt-1 flex items-center gap-x-2 text-xs leading-5 text-gray-500">
<p class="whitespace-nowrap">
<%= gettext("Created on") %>
<time datetime={credential.inserted_at}>
<%= Calendar.strftime(credential.inserted_at, "%d %b %Y") %>
</time>
</p>
<svg viewBox="0 0 2 2" class="h-0.5 w-0.5 fill-current">
<circle cx="1" cy="1" r="1" />
</svg>
<p class="truncate">
<%= if credential.expires_at do %>
<%= gettext("Expires at") %> <%= Calendar.strftime(
credential.expires_at,
"%d %b %Y"
) %>
<% else %>
<%= gettext("Never Expires") %>
<% end %>
</p>
<div class="flex flex-none items-center gap-x-4">
<.link
navigate={~p"/dashboard/spaces/#{credential.space_id}/credentials/#{credential.id}"}
class="hidden rounded-md bg-white px-2.5 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:block"
>
<%= gettext("View credential") %>
</.link>
</div>
</div>
<div class="flex flex-none items-center gap-x-4">
<.link
navigate={~p"/dashboard/spaces/#{credential.space_id}/credentials/#{credential.id}"}
class="hidden rounded-md bg-white px-2.5 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:block"
>
<%= gettext("View credential") %>
</.link>
</div>
</.link>
</li>
</ul>
</div>
Expand Down
48 changes: 25 additions & 23 deletions lib/polar_web/live/dashboard_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -48,31 +48,33 @@ defmodule PolarWeb.DashboardLive do
id={"space_#{space.id}"}
class="relative flex justify-between gap-x-6 px-4 py-5 hover:bg-gray-50 sm:px-6"
>
<div class="min-w-0">
<div class="flex items-start gap-x-3">
<p class="text-sm font-semibold leading-6 text-gray-900"><%= space.name %></p>
<.link navigate={~p"/dashboard/spaces/#{space.id}"}>
<div class="min-w-0">
<div class="flex items-start gap-x-3">
<p class="text-sm font-semibold leading-6 text-gray-900"><%= space.name %></p>
</div>
<div class="mt-1 flex items-center gap-x-2 text-xs leading-5 text-gray-500">
<p class="whitespace-nowrap">
<%= gettext("Created on") %>
<time datetime={space.inserted_at}>
<%= Calendar.strftime(space.inserted_at, "%d %b %Y") %>
</time>
</p>
<svg viewBox="0 0 2 2" class="h-0.5 w-0.5 fill-current">
<circle cx="1" cy="1" r="1" />
</svg>
<p class="truncate"><%= gettext("Owned by") %> <%= space.owner.email %></p>
</div>
</div>
<div class="mt-1 flex items-center gap-x-2 text-xs leading-5 text-gray-500">
<p class="whitespace-nowrap">
<%= gettext("Created on") %>
<time datetime={space.inserted_at}>
<%= Calendar.strftime(space.inserted_at, "%d %b %Y") %>
</time>
</p>
<svg viewBox="0 0 2 2" class="h-0.5 w-0.5 fill-current">
<circle cx="1" cy="1" r="1" />
</svg>
<p class="truncate"><%= gettext("Owned by") %> <%= space.owner.email %></p>
<div class="flex flex-none items-center gap-x-4">
<.link
navigate={~p"/dashboard/spaces/#{space.id}"}
class="hidden rounded-md bg-white px-2.5 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:block"
>
<%= gettext("View space") %>
</.link>
</div>
</div>
<div class="flex flex-none items-center gap-x-4">
<.link
navigate={~p"/dashboard/spaces/#{space.id}"}
class="hidden rounded-md bg-white px-2.5 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:block"
>
<%= gettext("View space") %>
</.link>
</div>
</.link>
</li>
</ul>
</div>
Expand Down

0 comments on commit 01a1750

Please sign in to comment.