- tie in parsing into the threadview update function
- that may not be the final place for it but it works for now to just
bring out the Show instances.
- need a renderer now
- add module for parsing post body
- creates and element and sets the innerhtml of it to a string
- then iterates over the nodes that were created to
get them into a data structure
- re-use data-structure from bunkerchan-upload script
- parsing logic is similar but uses ghcjs-dom API instead of HXT
- refactor our http call to easily construct more api methods
- make the Client Interface and Action types be polymorphic
- this requires the main application keeping an Action constructor
in the ClientAction, so we can later know what type to decode
(this is a bit weird I'm not gonna lie but it works)
- Client will have own Action and Model
- Model is TODO but needs to hold all of the aborts
usually a front-end client wants to abort other ongoing requests
- Network.Client will have an update function that uses effectSub to
create a thread that will inform the app of the results of the xhr
action. We shouldn't just do this in Main, it gets messy
- There's a lot of wrong here:
- Send function is referenced from the GHCJS.DOM.JSFFI.Generated
directly, so idk if this compiles to native (it's fine to ignore this
point though because we only really care about the front-end for XHR)
- There are actions that should be generalized out, probably there
needs to be a network client component, with an interface to keep
track of stuff for us accross different actions that trigger http