-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR is a little hard to read due to the changes. Included in this PR: - Move away from mixing css and tailwind as much as possible, at least for now (reduces confusion about what is overriding what) - Move to using Flex instead of Grid for the app layout as the topbar needed to move into the liveview template based on the design - Fix a bunch of color and alignment issues when comparing to the design. - Change the icon in the table header based on the sort order, and use hover to indicate which other headers can be used for sorting - Use 'sidebar hints' for selecting the active tab (This is used by the old UI, along with path comparisons, and is more reliable.) - Improve sidebar hover state and gradients - Improvements to the devices pagination UI. - Don't show any of the pagination buttons if there is just 1 page of devices - Only show the total pages when the last page isn't next to it - And set the next page button to invisible if page number is the same as total pages (invisible keeps its place in the dom) <img width="1624" alt="Screenshot 2025-01-14 at 11 37 06 AM" src="https://github.com/user-attachments/assets/8c407043-68a2-4737-bf36-2ca3a9b1b56b" /> <img width="1624" alt="Screenshot 2025-01-14 at 11 37 23 AM" src="https://github.com/user-attachments/assets/15e2d713-f77a-438b-a1e2-2fa0520c1fcb" /> <img width="378" alt="Screenshot 2025-01-14 at 11 39 20 AM" src="https://github.com/user-attachments/assets/040b75b0-0d4d-40c1-9ffe-84d9f85977fc" /> <img width="318" alt="Screenshot 2025-01-14 at 11 39 42 AM" src="https://github.com/user-attachments/assets/38bca32c-df69-49a9-985d-876c387347ad" />
- Loading branch information
Showing
20 changed files
with
544 additions
and
513 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
123 changes: 61 additions & 62 deletions
123
lib/nerves_hub_web/components/layouts/sidebar.html.heex
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
defmodule NervesHubWeb.Components.Sorting do | ||
use NervesHubWeb, :component | ||
|
||
attr(:field, :any) | ||
attr(:text, :any) | ||
attr(:selected_field, :any) | ||
attr(:selected_direction, :any) | ||
|
||
def sort_icon(assigns) do | ||
~H""" | ||
<div class="flex items-center group"> | ||
<%= @text %> | ||
<svg :if={@selected_field != @field} class="ml-auto invisible group-hover:visible w-6 h-6" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<path d="M12.5 7.5L10 5L7.5 7.5M12.5 12.5L10 15L7.5 12.5" stroke="#71717A" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" /> | ||
</svg> | ||
<svg :if={@selected_field == @field && @selected_direction == "asc"} class="ml-auto w-5 h-5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<path d="M17 14L12 9L7 14" stroke="#71717A" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" /> | ||
</svg> | ||
<svg :if={@selected_field == @field && @selected_direction == "desc"} class="ml-auto w-5 h-5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<path d="M17 10L12 15L7 10" stroke="#71717A" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" /> | ||
</svg> | ||
</div> | ||
""" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.