Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixos-search
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cdeb29766a18
Choose a base ref
...
head repository: NixOS/nixos-search
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f5af7906acb5
Choose a head ref
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Jan 17, 2021

  1. elm fmt

    turboMaCk committed Jan 17, 2021

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    dhess Drew Hess
    Copy the full SHA
    f5af790 View commit details
Showing with 11 additions and 10 deletions.
  1. +1 −1 src/Page/Options.elm
  2. +2 −1 src/Page/Packages.elm
  3. +8 −8 src/Utils.elm
2 changes: 1 addition & 1 deletion src/Page/Options.elm
Original file line number Diff line number Diff line change
@@ -24,9 +24,9 @@ import Html
import Html.Attributes
exposing
( class
, classList
, href
, target
, classList
)
import Html.Events
exposing
3 changes: 2 additions & 1 deletion src/Page/Packages.elm
Original file line number Diff line number Diff line change
@@ -546,12 +546,13 @@ viewResultItem channel showNixOSDetails show item =

trapClick =
Html.Attributes.map SearchMsg Search.trapClick

isOpen =
Just item.source.attr_name == show
in
li
[ class "package"
, classList [ ( "opened", isOpen) ]
, classList [ ( "opened", isOpen ) ]
, Search.elementId item.source.attr_name
]
([]
16 changes: 8 additions & 8 deletions src/Utils.elm
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module Utils exposing
( toggleList
)
module Utils exposing (toggleList)


toggleList :
toggleList :
List a
-> a
-> a
-> List a
toggleList list item =
if List.member item list
then List.filter (\x -> x /= item) list
else List.append list [item]
if List.member item list then
List.filter (\x -> x /= item) list

else
List.append list [ item ]