Skip to content

Commit

Permalink
Marlowe playground FE: formatted with purty
Browse files Browse the repository at this point in the history
  • Loading branch information
hrajchert committed Nov 24, 2020
1 parent 0b988a5 commit b31e35b
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 18 deletions.
3 changes: 1 addition & 2 deletions marlowe-playground-client/src/Demos/View.purs
Expand Up @@ -20,8 +20,7 @@ render ::
render state =
div_
[ div [ classes [ ClassName "modal-header" ] ]
[ -- TODO: create an HTML helper so all dialogs have the same header/title?
h2 [ classes [ ClassName "title" ] ] [ text "Demo Files" ]
[ h2 [ classes [ ClassName "title" ] ] [ text "Demo Files" ] -- TODO: create an HTML helper so all dialogs have the same header/title?
]
, div [ classes [ ClassName "modal-content", ClassName "projects-container" ] ]
[ demoFile (wrap "Escrow") "Escrow" "Escrow is a financial arrangement where a third party holds and regulates payment of the funds required for two parties involved in a given transaction."
Expand Down
2 changes: 1 addition & 1 deletion marlowe-playground-client/src/GistButtons.purs
Expand Up @@ -29,7 +29,7 @@ authButton intendedAction state =
Success Anonymous ->
-- TODO: Validate this dialog with the designer, see if we should add a title
-- based on the intendedAction
div [ classes [ClassName "modal-content", ClassName "auth-button-container"] ]
div [ classes [ ClassName "modal-content", ClassName "auth-button-container" ] ]
[ p_ [ text "We use gists to save your projects, in order to save and load your projects you will need to login to Github." ]
, p_ [ text "If you don't wish to login you can still use the Marlowe Playground however you won't be able to save your work." ]
, div_
Expand Down
2 changes: 1 addition & 1 deletion marlowe-playground-client/src/MainFrame/View.purs
Expand Up @@ -43,7 +43,7 @@ render ::
State ->
ComponentHTML Action ChildSlots m
render settings state =
div [ class_ ( ClassName "site-wrap")]
div [ class_ (ClassName "site-wrap") ]
( [ header [ classes [ noMargins, aHorizontal ] ]
[ div [ classes [ aHorizontal, fullWidth ] ]
[ div [ classes [ ClassName "group", aHorizontal, ClassName "marlowe-title-group" ] ]
Expand Down
8 changes: 5 additions & 3 deletions marlowe-playground-client/src/NewProject/State.purs
Expand Up @@ -32,9 +32,11 @@ render ::
render state =
div_
[ div [ classes [ ClassName "modal-header" ] ]
[ -- TODO: confirm that we dont want to change the project name and remove -- input [ value (state ^. _projectName), onValueChange (Just <<< ChangeProjectName) ]
-- TODO: create an HTML helper so all dialogs have the same header/title?
h2 [ classes [ ClassName "title" ] ] [ text "New Project" ]
[ {-
TODO: confirm that we dont want to change the project name and remove
input [ value (state ^. _projectName), onValueChange (Just <<< ChangeProjectName) ]
TODO: create an HTML helper so all dialogs have the same header/title?
-} h2 [ classes [ ClassName "title" ] ] [ text "New Project" ]
]
, div [ classes [ ClassName "modal-content", ClassName "new-project-container" ] ]
[ h3 [ classes [ ClassName "text-base", ClassName "font-semibold" ] ] [ text "Please choose your initial coding environment" ]
Expand Down
15 changes: 6 additions & 9 deletions marlowe-playground-client/src/Projects/State.purs
Expand Up @@ -58,15 +58,11 @@ render ::
ComponentHTML Action ChildSlots m
render state =
div_
[
div [ classes [ ClassName "modal-header" ] ]
[
-- TODO: create an HTML helper so all dialogs have the same header/title?
h2 [ classes [ ClassName "title" ] ] [ text "Open Project" ]
],
div [ classes [ ClassName "modal-content", ClassName "projects-container" ] ]
[
body (view _projects state)
[ div [ classes [ ClassName "modal-header" ] ]
[ h2 [ classes [ ClassName "title" ] ] [ text "Open Project" ] -- TODO: create an HTML helper so all dialogs have the same header/title?
]
, div [ classes [ ClassName "modal-content", ClassName "projects-container" ] ]
[ body (view _projects state)
]
]
where
Expand All @@ -75,6 +71,7 @@ render state =
body (Success gists) = gistsTable $ filter playgroundGist gists

body (Failure _) = span [ class_ (ClassName "error") ] [ text "Failed to load gists" ]

-- TODO: fix loading design
body Loading = span [ class_ (ClassName "loading") ] [ text "Loading..." ]

Expand Down
3 changes: 1 addition & 2 deletions marlowe-playground-client/src/Rename/State.purs
Expand Up @@ -30,8 +30,7 @@ render ::
render state =
div_
[ div [ classes [ ClassName "modal-header" ] ]
[ -- TODO: create an HTML helper so all dialogs have the same header/title?
h2 [ classes [ ClassName "title" ] ] [ text "Rename Project" ]
[ h2 [ classes [ ClassName "title" ] ] [ text "Rename Project" ] -- TODO: create an HTML helper so all dialogs have the same header/title?
]
, div [ classes [ ClassName "modal-content" ] ]
[ input [ class_ (ClassName "project-name-input"), value (state ^. _projectName), onValueChange (Just <<< ChangeInput) ]
Expand Down

0 comments on commit b31e35b

Please sign in to comment.