1
1
mirror of https://github.com/aelve/guide.git synced 2024-12-24 21:35:06 +03:00

More TODOs

This commit is contained in:
Artyom 2016-02-26 14:07:03 +03:00
parent bd2a6ee11b
commit 36c8ac3705

View File

@ -415,6 +415,7 @@ renderRoot globalState = do
renderCategoryList (globalState^.categories) renderCategoryList (globalState^.categories)
-- TODO: perhaps use infinite scrolling/loading? -- TODO: perhaps use infinite scrolling/loading?
-- TODO: add links to source and donation buttons -- TODO: add links to source and donation buttons
-- TODO: maybe add a button like “give me random category that is unfinished”
renderCategoryList :: [Category] -> HtmlT IO () renderCategoryList :: [Category] -> HtmlT IO ()
renderCategoryList cats = renderCategoryList cats =
@ -516,6 +517,7 @@ renderItemInfo editable item =
emptySpan "1em" emptySpan "1em"
textButton "edit details" $ textButton "edit details" $
JS.setItemInfoMode (this, item^.uid, InEdit) JS.setItemInfoMode (this, item^.uid, InEdit)
-- TODO: maybe some space here?
InEdit -> do InEdit -> do
let handler s = JS.submitItemInfo (this, item^.uid, s) let handler s = JS.submitItemInfo (this, item^.uid, s)
form_ [onFormSubmit handler] $ do form_ [onFormSubmit handler] $ do
@ -557,8 +559,10 @@ renderItemTraits editable item =
thisNode thisNode
textInput [placeholder_ "add pro"] $ textInput [placeholder_ "add pro"] $
JS.addPro (listNode, item^.uid, inputValue) <> clearInput JS.addPro (listNode, item^.uid, inputValue) <> clearInput
-- TODO: maybe add a separator explicitly? instead of CSS
div_ [class_ "traits-group"] $ do div_ [class_ "traits-group"] $ do
p_ "Cons:" p_ "Cons:"
-- TODO: maybe add a line here?
case editable of case editable of
Normal -> Normal ->
ul_ $ mapM_ (renderTrait Normal (item^.uid)) (item^.cons) ul_ $ mapM_ (renderTrait Normal (item^.uid)) (item^.cons)
@ -626,6 +630,9 @@ button value attrs handler =
handler' = fromJS handler handler' = fromJS handler
-- A text button looks like “[cancel]” -- A text button looks like “[cancel]”
--
-- TODO: consider dotted links instead?
-- TODO: text button links shouldn't be marked as visited
textButton textButton
:: Text -- ^ Button text :: Text -- ^ Button text
-> JS -- ^ Onclick handler -> JS -- ^ Onclick handler