Remove owned checkbox and switch sort options

This commit is contained in:
Correl Roush 2022-12-15 12:04:29 -05:00
parent 232accd01d
commit 43bdae5156

View file

@ -193,7 +193,7 @@ criteriaFromUrl : Url.Url -> Criteria
criteriaFromUrl url =
let
emptyCriteria =
{ query = "", sortBy = "rarity", ownedOnly = True }
{ query = "", sortBy = "price", ownedOnly = True }
in
Url.Parser.parse parseUrl url
|> Maybe.withDefault emptyCriteria
@ -431,16 +431,10 @@ searchBar model =
, selected = Just model.criteria.sortBy
, label = Input.labelLeft [ Font.color colors.text ] (E.text "Sort by")
, options =
[ Input.option "rarity" <| E.el [ Font.color colors.text ] <| E.text "Rarity DESC"
, Input.option "price" <| E.el [ Font.color colors.text ] <| E.text "Price DESC"
[ Input.option "price" <| E.el [ Font.color colors.text ] <| E.text "Price DESC"
, Input.option "rarity" <| E.el [ Font.color colors.text ] <| E.text "Rarity DESC"
]
}
, Input.checkbox []
{ onChange = UpdateCriteria << UpdateOwnedOnly
, icon = Input.defaultCheckbox
, checked = model.criteria.ownedOnly
, label = Input.labelRight [ Font.color colors.text ] (E.text "Owned only?")
}
]
]