[WV2] Simplify item search layout
This commit is contained in:
parent
74386b45d7
commit
955aeb984e
1 changed files with 20 additions and 20 deletions
|
|
@ -85,8 +85,6 @@
|
|||
= submit_tag "Change pose", name: nil, class: "pose-submit-button"
|
||||
|
||||
.outfit-controls-section
|
||||
%h1 Customize your pet
|
||||
|
||||
= form_with url: wardrobe_v2_path, method: :get, class: "item-search-form" do |f|
|
||||
= outfit_state_params
|
||||
= f.text_field "q[name]", placeholder: "Search for items...", value: params.dig(:q, :name), "aria-label": "Search for items"
|
||||
|
|
@ -94,21 +92,23 @@
|
|||
|
||||
- if @search_mode
|
||||
= render "search_results"
|
||||
- elsif @outfit.worn_items.any?
|
||||
.worn-items
|
||||
- outfit_items_by_zone(@outfit).each do |zone_group|
|
||||
.zone-group
|
||||
%h3.zone-label= zone_group[:zone_label]
|
||||
%ul.items-list
|
||||
- zone_group[:items].each do |item|
|
||||
%li.item-card
|
||||
.item-thumbnail
|
||||
= image_tag item.thumbnail_url, alt: item.name, loading: "lazy"
|
||||
.item-info
|
||||
.item-name= item.name
|
||||
.item-badges
|
||||
= render "items/badges/kind", item: item
|
||||
= render "items/badges/first_seen", item: item
|
||||
= button_to wardrobe_v2_path, method: :get, class: "item-remove-button", title: "Remove #{item.name}", "aria-label": "Remove #{item.name}" do
|
||||
❌
|
||||
= outfit_state_params @outfit.without_item(item)
|
||||
- else
|
||||
%h1 Untitled outfit
|
||||
- if @outfit.worn_items.any?
|
||||
.worn-items
|
||||
- outfit_items_by_zone(@outfit).each do |zone_group|
|
||||
.zone-group
|
||||
%h3.zone-label= zone_group[:zone_label]
|
||||
%ul.items-list
|
||||
- zone_group[:items].each do |item|
|
||||
%li.item-card
|
||||
.item-thumbnail
|
||||
= image_tag item.thumbnail_url, alt: item.name, loading: "lazy"
|
||||
.item-info
|
||||
.item-name= item.name
|
||||
.item-badges
|
||||
= render "items/badges/kind", item: item
|
||||
= render "items/badges/first_seen", item: item
|
||||
= button_to wardrobe_v2_path, method: :get, class: "item-remove-button", title: "Remove #{item.name}", "aria-label": "Remove #{item.name}" do
|
||||
❌
|
||||
= outfit_state_params @outfit.without_item(item)
|
||||
|
|
|
|||
Loading…
Reference in a new issue