Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 33 additions & 6 deletions frontend/src/Page/Packages.elm
Original file line number Diff line number Diff line change
Expand Up @@ -639,17 +639,32 @@ viewResultItem nixosChannels channel showInstallDetails show item =
, ul [ class "nav nav-tabs" ] <|
[ li
[ classList
[ ( "active", List.member showInstallDetails [ Search.Unset, Search.ViaNixShell, Search.FromFlake ] )
[ ( "active", showInstallDetails == Search.ViaNixEnv )
, ( "pull-right", True )
]
]
[ a
[ href "#"
, class "deprecated"
, Search.onClickStop <|
SearchMsg <|
Search.ShowInstallDetails Search.ViaNixShell
Search.ShowInstallDetails Search.ViaNixEnv
]
[ text "nix-shell" ]
[ text "nix-env" ]
]
, li
[ classList
[ ( "active", showInstallDetails == Search.ViaNixProfile )
, ( "pull-right", True )
]
]
[ a
[ href "#"
, Search.onClickStop <|
SearchMsg <|
Search.ShowInstallDetails Search.ViaNixProfile
]
[ text "nix profile" ]
]
, li
[ classList
Expand All @@ -667,17 +682,17 @@ viewResultItem nixosChannels channel showInstallDetails show item =
]
, li
[ classList
[ ( "active", showInstallDetails == Search.ViaNixEnv )
[ ( "active", List.member showInstallDetails [ Search.Unset, Search.ViaNixShell, Search.FromFlake ] )
, ( "pull-right", True )
]
]
[ a
[ href "#"
, Search.onClickStop <|
SearchMsg <|
Search.ShowInstallDetails Search.ViaNixEnv
Search.ShowInstallDetails Search.ViaNixShell
]
[ text "nix-env" ]
[ text "nix-shell" ]
]
]
, div
Expand Down Expand Up @@ -800,6 +815,18 @@ viewResultItem nixosChannels channel showInstallDetails show item =
, strong [] [ text item.source.attr_name ]
]
]
, div
[ classList
[ ( "active", showInstallDetails == Search.ViaNixProfile )
]
, class "tab-pane"
, id "package-details-nixpkgs"
]
[ pre [ class "code-block shell-command" ]
[ text "nix profile install nixpkgs#"
, strong [] [ text item.source.attr_name ]
]
]
]
]
, programs
Expand Down
1 change: 1 addition & 0 deletions frontend/src/Search.elm
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ type Msg a b
type Details
= ViaNixShell
| ViaNixOS
| ViaNixProfile
| ViaNixEnv
| FromFlake
| Unset
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,10 @@ header .navbar.navbar-static-top {
& > li > a {
margin-right: 0;
}

.deprecated {
color: var(--text-color-light);
}
}

div.tab-content {
Expand Down