@@ -41,7 +41,7 @@ type alias Flags =
4141 , dirs : List String
4242 , files : List File
4343 , readme : Maybe String
44− , project : Project.Project
44+ , project : Maybe Project.Project
4545 , exactDeps : Dict.Dict String Version.Version
4646 }
4747
@@ -64,7 +64,7 @@ decoder =
6464 (D.field "dirs" (D.list D.string))
6565 (D.field "files" (D.list fileDecoder))
6666 (D.field "readme" (D.nullable D.string))
67− (D.field "project" Project.decoder)
67+ (D.field "project" (D.nullable Project.decoder))
6868 (D.field "exactDeps" (D.dict Version.decoder))
6969
7070
@@ -103,21 +103,35 @@ view model =
103103 [ header [ class "header" ] []
104104 , div [ class "content" ]
105105 [ Navigator.view root pwd
106− , section [ class "left-column" ]
107− [ viewFiles dirs files
108− , viewReadme readme
109− ]
110− , section [ class "right-column" ]
111− [ viewProjectSummary project
112− , viewDeps exactDeps project
113− , viewTestDeps exactDeps project
114− ]
106+ , viewLeftColumn dirs files readme
107+ , viewRightColumn exactDeps project
115108 , div [ style "clear" "both" ] []
116109 ]
117110 ]
118111 }
119112
120113
114+viewLeftColumn : List String -> List File -> Maybe String -> Html msg
115+viewLeftColumn dirs files readme =
116+ section [ class "left-column" ]
117+ [ viewFiles dirs files
118+ , viewReadme readme
119+ ]
120+
121+
122+viewRightColumn : ExactDeps -> Maybe Project.Project -> Html msg
123+viewRightColumn exactDeps maybeProject =
124+ section [ class "right-column" ] <|
125+ case maybeProject of
126+ Nothing ->
127+ []
128+
129+ Just project ->
130+ [ viewProjectSummary project
131+ , viewDeps exactDeps project
132+ , viewTestDeps exactDeps project
133+ ]
134+
121135
122136-- VIEW README
123137