Initial sketch of dashboard.
This commit is contained in:
@@ -416,6 +416,16 @@ h1, h2, h3, h4, h5, h6 {
|
||||
(h1 (@ (style ((font-size ,($ 'font.size.xxl))))) ,step)
|
||||
,@contents)))
|
||||
|
||||
(define-widget (Main-Container () contents)
|
||||
`(VStack
|
||||
(@ (style ((background ,($ 'color.primary.background))
|
||||
(color ,($ 'color.primary.background-contrast))
|
||||
(border-radius ,($ 'radius.large))
|
||||
(padding ,($ 'gap.gutter)))))
|
||||
;; (header
|
||||
;; (Steps (@ (steps ("Services" "Apps" "Machine" "Review")) (current ,step))))
|
||||
,@contents))
|
||||
|
||||
(define-widget (Fieldset ((title "Title")) contents)
|
||||
`(VStack
|
||||
(@ (element fieldset)
|
||||
@@ -441,6 +451,15 @@ h1, h2, h3, h4, h5, h6 {
|
||||
,(if (equal? type "checkbox") input label)
|
||||
,(if (equal? type "checkbox") label input))))
|
||||
|
||||
(define-widget (Button ((type "submit")) contents)
|
||||
`(button (@ (type ,type)
|
||||
(style ((background ,($ 'color.primary))
|
||||
(color ,($ 'color.primary.contrast))
|
||||
(border-radius ,($ 'radius.medium))
|
||||
(border-color ,($ 'color.primary.shade))
|
||||
(cursor "pointer"))))
|
||||
,@contents))
|
||||
|
||||
(define-widget (Form-Nav ((back-to #f) (submit-button "Next")))
|
||||
`(HStack
|
||||
(@ (style ((justify-content "space-between"))))
|
||||
@@ -457,14 +476,8 @@ h1, h2, h3, h4, h5, h6 {
|
||||
,@(if back-to
|
||||
'()
|
||||
'((pointer-events "none"))))))
|
||||
"Back")
|
||||
(button (@ (type "submit")
|
||||
(style ((background ,($ 'color.primary))
|
||||
(color ,($ 'color.primary.contrast))
|
||||
(border-radius ,($ 'radius.medium))
|
||||
(border-color ,($ 'color.primary.shade))
|
||||
(cursor "pointer"))))
|
||||
,submit-button)))
|
||||
"Back")
|
||||
(Button ,submit-button)))
|
||||
|
||||
(get
|
||||
("/config/wizard/services")
|
||||
@@ -919,5 +932,20 @@ h1, h2, h3, h4, h5, h6 {
|
||||
(pre ,output)
|
||||
)))
|
||||
|
||||
(get
|
||||
("/dashboard")
|
||||
`(App
|
||||
(Main-Container
|
||||
(main
|
||||
(h1 (@ (style ((font-size ,($ 'font.size.xxl))))) "Deployments")
|
||||
(Button "Setup New Deployment")
|
||||
(ul ,@(map (lambda (deployment)
|
||||
`(li (a (@ (href ,(string-append "/deployments/" (number->string (alist-ref 'id deployment)))))
|
||||
,(alist-ref 'root-domain deployment))
|
||||
" - ",(alist-ref 'status deployment)))
|
||||
(with-db/transaction
|
||||
(lambda (db)
|
||||
(get-user-deployments db (session-get "user-id"))))))))))
|
||||
|
||||
(schematra:schematra-install)
|
||||
(schematra:schematra-start)
|
||||
|
||||
Reference in New Issue
Block a user