Fix client routing
[?]
Jan 24, 2021, 6:54 AM
AAALU5A2FQQTNV7ZVAFCU2JTRUONEUWWZKENDUUXDOFUGWHM3KZQCDependencies
- [2]
XA7SOE6JDockerize reactclient. - [3]
WRPIYG3EUse project listing functionality to check for whether we have a cookie. - [4]
3GLHIR4FAdd migrate script for prod system. - [5]
BFZN4SUAMake timeline component work. - [6]
GMYPBCWEMake docker-compose work. - [7]
NJNMO72SAdd zcash.com submodule and update client to modern halogen. - [8]
3LMXT7Z6preventDefault on login form submission. - [9]
5R2Z7FSXInitial rendering for signup controls. - [10]
SAESJLLYInitial experiments in hash routing. - [11]
5SBSBFLSBind log directories to local paths for development. - [12]
IR75ZMX3Return actual events for interval ends, not just timestamps. - [13]
QMEYU4MWAdd display for prior intervals. - [14]
TKGBRIQTLogin component now raises LoginComplete message. - [15]
PT4276XCAdd logout functionality. - [16]
O2BZOX7MAdd signup form, captcha check. - [17]
QU5FW67RAdd project selection to time tracker. - [*]
EA5BFM5GSplit Login component into its own module. - [*]
RB2ETNIFAdd skeletal PureScript client project. - [*]
ARX7SHY5Begin work on login UI.
Change contents
- replacement in client/src/Aftok/Login.purs at line 148
[ P.href "./#signup" ][ P.href "#signup" ] - replacement in client/src/Aftok/Signup.purs at line 190
[ HH.text "Alreay have an account? "[ HH.text "Already have an account? " - replacement in client/src/Aftok/Signup.purs at line 192
[ P.href "#", E.onClick (Just <<< Signin) ][ P.href "#login" ] - edit in client/src/Aftok/Types.purs at line 40
, setHash :: String -> m Unit - edit in client/src/Aftok/Types.purs at line 52
, setHash: liftEffect <<< H.setHash - edit in client/src/Main.purs at line 7[21.493][3.307503]
import Data.Foldable (oneOf) - edit in client/src/Main.purs at line 12
import Effect.Class (liftEffect)import Effect.Aff (launchAff_) - edit in client/src/Main.purs at line 24[3.1485][21.1094]
import Routing (match)import Routing.Hash (matchesWith)import Routing.Match (Match, lit) - replacement in client/src/Main.purs at line 44
runUI mainComponent unit bodyhalogenIO <- runUI mainComponent unit body - replacement in client/src/Main.purs at line 46
data MainViewvoid $ liftEffect $ matchesWith (match mainRoute) \oldMay new ->when (oldMay /= Just new) dolaunchAff_ <<< halogenIO.query <<< H.tell $ Navigate newdata View - edit in client/src/Main.purs at line 55
mainRoute :: Match ViewmainRoute = oneOf[ VSignup <$ lit "signup", VLogin <$ lit "login", VTimeline <$ lit "timeline"]routeHash :: View -> StringrouteHash = case _ ofVSignup -> "signup"VLogin -> "login"VTimeline -> "timeline"VLoading -> "" - edit in client/src/Main.purs at line 70
-- derive instance genericView :: Generic View _derive instance eqView :: Eq Viewderive instance ordView :: Ord Viewdata MainQuery a = Navigate View a - replacement in client/src/Main.purs at line 77
{ view :: MainView{ view :: View - replacement in client/src/Main.purs at line 98
:: forall query input output m:: forall input output m - replacement in client/src/Main.purs at line 105
-> H.Component HH.HTML query input output m-> H.Component HH.HTML MainQuery input output m - replacement in client/src/Main.purs at line 110
{ handleAction = eval{ handleAction = handleAction, handleQuery = handleQuery - replacement in client/src/Main.purs at line 114
} where}where - replacement in client/src/Main.purs at line 139
eval :: MainAction -> H.HalogenM MainState MainAction Slots output m Uniteval action = case action ofhandleAction :: MainAction -> H.HalogenM MainState MainAction Slots output m UnithandleAction = case _ of - replacement in client/src/Main.purs at line 152
H.modify_ (_ { view = nextView })navigate nextView - replacement in client/src/Main.purs at line 155
H.modify_ (_ { view = VTimeline })navigate VTimeline - replacement in client/src/Main.purs at line 158
H.modify_ (_ { view = VTimeline })navigate VTimeline - replacement in client/src/Main.purs at line 161
H.modify_ (_ { view = VLogin })navigate VLogin - replacement in client/src/Main.purs at line 165
H.modify_ (_ { view = VLogin })navigate VLoginhandleQuery :: forall a. MainQuery a -> H.HalogenM MainState MainAction Slots output m (Maybe a)handleQuery = case _ ofNavigate view a -> docurrentView <- H.gets _.viewwhen (currentView /= view) $ navigate viewpure (Just a) - edit in client/src/Main.purs at line 174
navigate :: View -> H.HalogenM MainState MainAction Slots output m Unitnavigate view = dolift $ system.setHash (routeHash view)H.modify_ (_ { view = view }) - replacement in docker-compose.yml at line 66[3.405]→[3.2646:2703](∅→∅),[3.2703]→[3.9998:10062](∅→∅),[3.9998]→[3.9998:10062](∅→∅),[3.10062]→[3.2704:2756](∅→∅)
# - type: bind# source: ./client/dist# target: /opt/static/app# read_only: true- type: volumesource: v_aftok-client- type: bindsource: ./client/dist - edit in docker-compose.yml at line 70
# - type: volume# source: v_aftok-client# target: /opt/static/app# read_only: true