From 54b273c9ac70dc8fa0eba598abae1ac37f928c0f Mon Sep 17 00:00:00 2001 From: wass3rw3rk <49894298+wass3rw3rk@users.noreply.github.com> Date: Mon, 20 May 2024 10:04:18 -0500 Subject: [PATCH] improve no repos message --- src/elm/Pages/Dashboards/Dashboard_.elm | 11 +++++++++-- src/scss/_main.scss | 6 ++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/elm/Pages/Dashboards/Dashboard_.elm b/src/elm/Pages/Dashboards/Dashboard_.elm index 68c978475..4782c5c13 100644 --- a/src/elm/Pages/Dashboards/Dashboard_.elm +++ b/src/elm/Pages/Dashboards/Dashboard_.elm @@ -16,6 +16,7 @@ import Html ( div , h1 , main_ + , code , span , text ) @@ -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. @@ -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 diff --git a/src/scss/_main.scss b/src/scss/_main.scss index 4e0fdaee6..e865af718 100644 --- a/src/scss/_main.scss +++ b/src/scss/_main.scss @@ -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);