Skip to content

Commit

Permalink
improve no repos message
Browse files Browse the repository at this point in the history
  • Loading branch information
wass3rw3rk committed May 20, 2024
1 parent 58d706b commit 54b273c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
11 changes: 9 additions & 2 deletions src/elm/Pages/Dashboards/Dashboard_.elm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import Html
( div
, h1
, main_
, code
, span
, text
)
Expand All @@ -37,6 +38,8 @@ import Utils.Helpers as Util
import Utils.Interval as Interval
import Vela
import View exposing (View)
import Html exposing (p)
import Html exposing (br)


{-| page : takes user, shared model, route, and returns the dashboard page.
Expand Down Expand Up @@ -217,9 +220,13 @@ view shared route model =
[ h1 [ class "dashboard-title" ] [ text dashboard.dashboard.name ]
, div [ class "cards" ]
(if List.isEmpty dashboard.repos then
[ span
[ p
[]
[ text "This dashboard doesn't have repositories added yet." ]
[ text "This dashboard doesn't have repositories added yet. Add some with the CLI:"
, br [] []
, code [ class "shell" ]
[ text ("vela update dashboard --id " ++ route.params.dashboard ++ " --add-repos org/repo") ]
]
]

else
Expand Down
6 changes: 4 additions & 2 deletions src/scss/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1749,15 +1749,17 @@ details.build-toggle {
code.shell {
position: relative;

display: inline-block;
margin: 1rem 0;
padding: 0.75rem 1rem 0.75rem 2rem;

background-color: var(--color-bg-dark);

&::before {
position: absolute;
top: 50%;
left: 0.8rem;

display: block;

color: var(--color-green);
Expand Down

0 comments on commit 54b273c

Please sign in to comment.