From 8a28f608d8e08fba4bbe54b46804d261686c3c03 Mon Sep 17 00:00:00 2001 From: Joris Date: Tue, 30 Oct 2018 20:33:17 +0100 Subject: Upgrade reflex-platform --- .ghc.environment.x86_64-linux-8.4.3 | 157 ++++++++++++++++++++++++++++++++++++ Makefile | 4 +- README.md | 4 +- client/src/Util/Ajax.hs | 2 +- client/src/Util/WaitFor.hs | 2 +- client/src/View/Payment/Header.hs | 1 + default.nix | 6 +- server/server.cabal | 3 + server/src/Design/Modal.hs | 2 +- server/src/Design/Views.hs | 2 +- tools.nix | 4 +- 11 files changed, 173 insertions(+), 14 deletions(-) create mode 100644 .ghc.environment.x86_64-linux-8.4.3 diff --git a/.ghc.environment.x86_64-linux-8.4.3 b/.ghc.environment.x86_64-linux-8.4.3 new file mode 100644 index 0000000..7d3e48e --- /dev/null +++ b/.ghc.environment.x86_64-linux-8.4.3 @@ -0,0 +1,157 @@ +-- This is a GHC environment file written by cabal. This means you can +-- run ghc or ghci and get the environment of the project as a whole. +-- But you still need to use cabal repl $target to get the environment +-- of specific components (libs, exes, tests etc) because each one can +-- have its own source dirs, cpp flags etc. +-- +clear-package-db +global-package-db +package-db /home/joris/.cabal/store/ghc-8.4.3/package.db +package-db dist-server/packagedb/ghc-8.4.3 +package-id common-0.0.1-inplace +package-id aeson-1.3.1.1-Lq3qt0bucT8Ce9ru8xJuCI +package-id attoparsec-0.13.2.2-ATx7nMcxk3nBRIyNYmGqiS +package-id array-0.5.2.0 +package-id base-4.11.1.0 +package-id rts +package-id ghc-prim-0.5.2.0 +package-id integer-gmp-1.0.2.0 +package-id bytestring-0.10.8.2 +package-id deepseq-1.4.3.0 +package-id containers-0.5.11.0 +package-id scientific-0.3.6.2-CQmXpomPvoD3ixE02xGLRK +package-id integer-logarithms-1.0.2.1-KTtq4CBpjpvEUZ9qRz5Dnw +package-id text-1.2.3.0 +package-id binary-0.8.5.1 +package-id hashable-1.2.7.0-3tjvi3NV6rN9wchx0YHnZD +package-id primitive-0.6.3.0-DaZpcxwJp2TGn8ITSgfI4C +package-id transformers-0.5.5.0 +package-id base-compat-0.10.4-9FtFg9E90S5CFRyvxjUaaZ +package-id unix-2.7.2.2 +package-id time-1.8.0.2 +package-id dlist-0.8.0.4-EWVGGTJvTTW8quLYK9yz9r +package-id tagged-0.8.5-4YetGW889ApC8am7APN51M +package-id template-haskell-2.13.0.0 +package-id ghc-boot-th-8.4.3 +package-id pretty-1.1.3.6 +package-id transformers-compat-0.6.2-EZ0ZvADLUlc4V8RuKaJX5W +package-id th-abstraction-0.2.8.0-Ct896m4STpK8GA15Cl5y88 +package-id time-locale-compat-0.1.1.5-KqeVbnHNo2M7DUvscbLCec +package-id unordered-containers-0.2.9.0-5IJJnkQI2ZvDdhI29XIpGM +package-id uuid-types-1.0.3-8w4UPTs1JS8B9G14pA0XAT +package-id random-1.1-9LLJAJa4iQFLJiLXBOBXBV +package-id vector-0.12.0.1-4awQG9XUvVEBfJgKGHBhOb +package-id base64-bytestring-1.0.0.1-5trcv0VH0VU6H0uIZkhZ3k +package-id blaze-builder-0.4.1.0-5wTyfrZhdBm5HR5E6AoC8q +package-id blaze-html-0.9.1.1-2WuVUrAVuLu82r7EJau7GP +package-id blaze-markup-0.8.2.1-5q61W3qlhuHHgHlyBxVWdI +package-id clay-0.13.1-8XtTo244BlHJ5E7LTRpxDO +package-id mtl-2.2.2 +package-id clientsession-0.9.1.2-Kp1X4vuJeaaJGosy9Go9AT +package-id cereal-0.5.7.0-1u6PhbqJMrKHERqJJagiCb +package-id directory-1.3.1.5 +package-id filepath-1.4.2 +package-id crypto-api-0.13.3-9IodYT3eNDPBQONIDwB97L +package-id entropy-0.4.1.1-FmBdJKRG6hQDsYzBhT7c6v +package-id skein-1.0.9.4-KqWA7IwIzMC5B1u6Q3OfIC +package-id cprng-aes-0.6.1-63etvHRpER8EeGrwwFmDBf +package-id byteable-0.1.1-APABKKN6nDlC3QxQBw4YlY +package-id crypto-random-0.0.9-8Tu8ZbKJeNNKNdtsawKUJP +package-id securemem-0.1.10-47zZUPlFQPlLT2d3byocKS +package-id memory-0.14.16-GTCi0eCrvrnI3inLDBWVMK +package-id basement-0.0.8-8QjArDsw3GWCcbHE5iqtz3 +package-id foundation-0.0.21-2XnEGrFO7ZkKqT4yFq3WNW +package-id cipher-aes-0.2.11-JuxqKjUdElsKUllS45vrnr +package-id crypto-cipher-types-0.0.9-Iu6qf1HOoNxJnMNZvefoYo +package-id setenv-0.1.1.3-H1xmIqlPy4yIDquO6eJhBl +package-id config-manager-0.3.0.1-ErZESEYU0J61ILS0rVvaqp +package-id parsec-3.1.13.0 +package-id cookie-0.4.4-CbgKffgfVXL7ehGVl03UQt +package-id data-default-class-0.1.2.0-2kYzERBLX3wJoPfj7mwVvW +package-id email-validate-2.3.2.6-5cF9aOuvvJ3B7vRZe3M5wS +package-id http-conduit-2.3.2-9qWpTkSiT7OIggksuiU0NL +package-id resourcet-1.2.1-VQ4XM4cYxr16gqpSEgCOy +package-id exceptions-0.10.0-D5kcCq3onNJ8Xd3zaVEIaB +package-id stm-2.4.5.0 +package-id unliftio-core-0.1.2.0-900TPot3SR34dceIcVaslS +package-id conduit-1.3.0.3-Ag2soCkulYh4LXK7KSKXoI +package-id mono-traversable-1.0.9.0-ClemTK6PNuCEdKAFXMoJbR +package-id split-0.2.3.3-EmQETEsKhhCBcRcdyKMbme +package-id vector-algorithms-0.7.0.4-LTeQMW2mffA77UAhZhdPqK +package-id conduit-extra-1.3.0-IvU7g6gaQD229U2EMYtyRt +package-id async-2.2.1-9Pc6MzjEaIMLKHdFpoYFYT +package-id network-2.6.3.6-2g6VId0Xlc85XRtUcfQj0T +package-id process-1.6.3.0 +package-id streaming-commons-0.2.1.0-EohdSCkYJCzJ8j6F5uKOLe +package-id zlib-0.6.2-FP80mWgJNoyCiVcPtw6kKj +package-id typed-process-0.2.3.0-3tpgRagpzJP7pjiSyDz0nm +package-id http-types-0.12.1-GrpELT1BwSZHH8qr3E2SOs +package-id case-insensitive-1.2.0.11-JyXkkg6pL0XjfMAnCwmax +package-id http-client-0.5.13.1-9cMLZOykl2HLT4rQDGR74b +package-id mime-types-0.1.0.8-LKKvOy4Qa71IxJa0ssc0G3 +package-id network-uri-2.6.1.0-58iE8XZUuHG29WOa1Wcd6B +package-id http-client-tls-0.3.5.3-Ijx3BXTqwcWHk6zAxUfVZC +package-id connection-0.2.8-KsXaNBvRY6SEBsRXaIsNph +package-id socks-0.5.6-E2UdBGsYbPg15P7ufoQudW +package-id tls-1.4.1-86xaCnbqM9j4gcJwKoy8kL +package-id cryptonite-0.25-GgyZs9E1viv2owjaLxA3vq +package-id asn1-types-0.3.2-D5pV0M5JoITIzfbcuQzEgZ +package-id hourglass-0.2.12-3UpIPqczZGGFB8xo4AtO7k +package-id asn1-encoding-0.9.5-GlFjXiAJ16sE0dEqFJUiZm +package-id x509-1.7.3-6xPfCnkvwZA7yWmuNY705r +package-id pem-0.2.4-KNeFq9SFLwqKj6C5ugBM0P +package-id asn1-parse-0.9.4-GPR0gL1pKKm7p8d8kand6q +package-id x509-store-1.6.6-IqoEuOPiJVoFoe5dvQdGI +package-id x509-validation-1.6.10-BPP7TLcoO4h8axlCTrfvOz +package-id x509-system-1.6.6-GHbFvQ8bgRK7oqdcOEJZc9 +package-id mime-mail-0.4.14-F6ySGbdVER65wtqCqWqOl3 +package-id monad-logger-0.3.29-6bZsQD4SE1xLoctmBqiUHU +package-id fast-logger-2.4.11-GgPMTheucOf1lpGoClAZZ9 +package-id auto-update-0.1.4-7k5Okr80TfS9UGlvnbDZr0 +package-id easy-file-0.2.2-4l2xgq1xN4PHgDPMu188oI +package-id unix-time-0.3.8-5bbDZ3NgOpv6wzZECQszPQ +package-id old-time-1.1.0.3-2H7uVRdRD4GDRLoYt56mwc +package-id old-locale-1.0.0.7-26K7wLFR2jK44UeOklvTCh +package-id lifted-base-0.2.3.12-8egLh9Bh3xRGu9ioodnJbr +package-id transformers-base-0.4.5.2-15Q5KM4EiRA3cyTs4bqRMY +package-id base-orphans-0.7-53B8vWYZ549FoHd6pWzX45 +package-id monad-control-1.0.2.3-YxLr8wGYVF1whrb88JCVF +package-id monad-loops-0.4.3-4dVf0xJrZft7wNMs79AFwP +package-id stm-chans-3.0.0.4-1zxsnYr1r3u2n2uZuqSuqq +package-id scotty-0.11.2-Aakq2WpJ8g59uR4UgaFkV2 +package-id fail-4.9.0.0-BAHmj60kS5K7NVhhKpm9J5 +package-id nats-1.1.2-1IJUekZt6ps5IWVCKMBPeK +package-id regex-compat-0.95.1-GpayP5pCY7oFkOLgNVrkag +package-id regex-base-0.93.2-98bD2PeVUkV8MO804tnXmq +package-id regex-posix-0.95.2-FLMmMz75XIwP5t3X8eXe +package-id wai-3.2.1.2-tyzSRIN6w83qZ0VQLCWbw +package-id vault-0.3.1.2-1TB2YirTMicAuuTDRwE6kX +package-id semigroups-0.18.5-E4FVMc5VZAG98u64romz5 +package-id wai-extra-3.0.24.2-AvTLVrqVXmKA5VMHa9boEF +package-id wai-logger-2.3.2-FDfZC2RZ3dFAtwJUbKFuvA +package-id byteorder-1.0.4-JGHrMy8StI888DOmmSVbRy +package-id ansi-terminal-0.8.0.4-JygoK7BZB5m4K6OxT2muhl +package-id colour-2.3.4-C3PVIHDZkyCIpOJGl3M0hE +package-id void-0.7.2-AeUlTizrscF7IT5YtjodSF +package-id stringsearch-0.3.6.6-6DZU68MAKlcJFBtzhQCsgS +package-id word8-0.1.3-K7c7pnNichCC0T510LrMTC +package-id unix-compat-0.5.1-IZ2l0C7CE13FdrCF8rJfBj +package-id iproute-1.7.5-sGroOlpubcDgMr0Wr8rcw +package-id appar-0.1.4-J5mdtVuytVIKFPXD2MXW4E +package-id warp-3.2.23-2pmcK8CzflY6enLxynQiQ +package-id bsb-http-chunked-0.0.0.3-E7NwspJN6SxIKqIRCJ80gO +package-id bytestring-builder-0.10.8.1.0-79xKWk2yKAy2kdzRqfwsUV +package-id http2-1.6.3-17wK0i2oRMq6bDCOjAuG6e +package-id psqueues-0.2.7.0-61W4WPtGYUOI5ei0j8xe3i +package-id simple-sendfile-0.2.27-2TzFC62eMnEJApcSMGU0P6 +package-id http-date-0.0.8-H1gAnhnvIOqv1hADs2y4c +package-id sqlite-simple-0.4.16.0-1X7hKRWKO0T3XyEgQEMkzU +package-id blaze-textual-0.2.1.0-DyWVSpyf0gV3fMlgELHYIq +package-id direct-sqlite-2.3.24-IIklpzBOtgwBoWbRSy0dek +package-id Only-0.1-ESoRmRbP5ByJm8IsgOJKc0 +package-id uuid-1.3.13-F6NIzx4IcRFHIkFHCKpKxt +package-id cryptohash-sha1-0.11.100.1-8iUWTKIak4F2397EhPbMrb +package-id cryptohash-md5-0.11.100.1-GxTbFNHFy9d4RJgBkoQPg7 +package-id network-info-0.2.0.10-Jad1urRPRS69Kkzc04cakY +package-id wai-middleware-static-0.8.2-FLTnHo5pQAg9J9aQ1NGcN0 +package-id expiring-cache-map-0.0.6.1-7nOabKJZiSQ8IBqNWYOW5A diff --git a/Makefile b/Makefile index ac939fc..31d9a62 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ build-client-inside: @cabal --project-file=cabal-client.project --builddir=dist-client new-build all cp-client: - @cp dist-client/build/x86_64-linux/ghcjs-0.2.1/client-0.0.1/c/client/build/client/client.jsexe/all.js public/javascript/main.js + @cp dist-client/build/x86_64-linux/ghcjs-*/client-*/*/client/build/client/client.jsexe/all.js public/javascript/main.js watch-client: @nix-shell -A shells.ghcjs --run "nodemon --delay 0.2 --watch client --watch common --ext hs --exec '(clear && make build-client-inside && make cp-client) || true'" @@ -45,7 +45,7 @@ build-server-inside: run-server: @(fuser -k 3000/tcp &>/dev/null) || : - @./dist-server/build/x86_64-linux/ghc-8.0.2/server-0.0.1/c/server/build/server/server + @./dist-server/build/x86_64-linux/ghc-*/server-0.0.1/*/server/build/server/server watch-server: @nix-shell -A shells.ghc --run "nodemon --delay 0.2 --watch ./server --watch ./common --ext hs --exec '(clear && make build-server-inside && make run-server) || :'" diff --git a/README.md b/README.md index 620dae6..9e10234 100644 --- a/README.md +++ b/README.md @@ -60,9 +60,9 @@ TODO ### Interface -- Add a payment. +- Add payment error handling. +- Delete payment waitFor. - Edit a payment. -- Delete a payment. - Clone a payment. #### Bonus diff --git a/client/src/Util/Ajax.hs b/client/src/Util/Ajax.hs index 0d76638..7b65c52 100644 --- a/client/src/Util/Ajax.hs +++ b/client/src/Util/Ajax.hs @@ -31,7 +31,7 @@ delete -> Event t () -> m (Event t (Either Text Text)) delete url fire = do - response <- R.performRequestAsync (R.attachPromptlyDynWith (\u _ -> request "DELETE" u ()) url fire) + response <- R.performRequestAsync (R.attachWith (\u _ -> request "DELETE" u ()) (R.current url) fire) return $ fmap getResult response getJsonResult :: forall a. (FromJSON a) => XhrResponse -> Either Text a diff --git a/client/src/Util/WaitFor.hs b/client/src/Util/WaitFor.hs index 0175c95..7d5e7c5 100644 --- a/client/src/Util/WaitFor.hs +++ b/client/src/Util/WaitFor.hs @@ -13,6 +13,6 @@ waitFor -> Dynamic t a -> m (Event t b, Event t Bool) waitFor op start input = do - result <- op (R.tagPromptlyDyn input start) >>= R.debounce (0.5 :: NominalDiffTime) + result <- op (R.tag (R.current input) start) >>= R.debounce (0.5 :: NominalDiffTime) let waiting = R.leftmost [ const True <$> start , const False <$> result ] return (result, waiting) diff --git a/client/src/View/Payment/Header.hs b/client/src/View/Payment/Header.hs index 653df5e..6fbaecf 100644 --- a/client/src/View/Payment/Header.hs +++ b/client/src/View/Payment/Header.hs @@ -11,6 +11,7 @@ import qualified Data.Map as M import Data.Maybe (fromMaybe) import Data.Text (Text) import qualified Data.Text as T +import Data.Time (NominalDiffTime) import qualified Data.Time as Time import Prelude hiding (init) import Reflex.Dom (Dynamic, Event, MonadWidget, Reflex) diff --git a/default.nix b/default.nix index 657de1b..e34d5bc 100644 --- a/default.nix +++ b/default.nix @@ -4,10 +4,8 @@ let reflex-platform = import (pkgs.fetchFromGitHub { owner = "reflex-frp"; repo = "reflex-platform"; - rev = "504b0344dfa6d03e4c89cf70ab9792b0a1fa021b"; - sha256 = "01hvdwc6bw48falpha5kaq4p7w98hc804kkwrayipb5ld1snchpz"; - # rev = "a457c21ceb32ea27f66f3fae930e5d8bf7ec768d"; - # sha256 = "0drzvma2q809b6hafdlq4k23mnlbmy8ny5qz140ya76zizbq34vs"; + rev = "7e002c573a3d7d3224eb2154ae55fc898e67d211"; + sha256 = "1adhzvw32zahybwd6hn1fmqm0ky2x252mshscgq2g1qlks915436"; }) {}; in reflex-platform.project ({ pkgs, ... }: { diff --git a/server/server.cabal b/server/server.cabal index 2c6bef1..644f57a 100644 --- a/server/server.cabal +++ b/server/server.cabal @@ -73,6 +73,7 @@ Executable server Design.View.Header Design.View.Payment Design.View.Payment.Add + Design.View.Payment.Delete Design.View.Payment.Header Design.View.Payment.Pages Design.View.Payment.Table @@ -88,7 +89,9 @@ Executable server Job.WeeklyReport Json LoginSession + Model.IncomeResource Model.Mail + Model.PaymentResource Model.Query Model.SignIn Model.UUID diff --git a/server/src/Design/Modal.hs b/server/src/Design/Modal.hs index 2677fd8..914c011 100644 --- a/server/src/Design/Modal.hs +++ b/server/src/Design/Modal.hs @@ -31,7 +31,7 @@ design = do zIndex 1000 backgroundColor white sym borderRadius (px 5) - boxShadow (px 0) (px 0) (px 15) (rgba 0 0 0 0.5) + boxShadow . pure . bsColor (rgba 0 0 0 0.5) $ shadowWithBlur (px 0) (px 0) (px 15) ".add" ? Add.design ".delete" ? Delete.design diff --git a/server/src/Design/Views.hs b/server/src/Design/Views.hs index a73a1fa..b9e3cf8 100644 --- a/server/src/Design/Views.hs +++ b/server/src/Design/Views.hs @@ -43,5 +43,5 @@ design = do ".tag" ? do sym borderRadius (px 4) sym2 padding (px 2) (px 5) - boxShadow (px 2) (px 2) (px 5) (rgba 0 0 0 0.3) + boxShadow . pure . bsColor (rgba 0 0 0 0.3) $ shadowWithBlur (px 2) (px 2) (px 5) color Color.white diff --git a/tools.nix b/tools.nix index 5fd5129..9a506c7 100644 --- a/tools.nix +++ b/tools.nix @@ -1,13 +1,13 @@ with import {}; { env = stdenv.mkDerivation { name = "tools"; - buildInputs = with pkgs; with nodePackages; with haskellPackages; [ + buildInputs = with pkgs; with nodePackages; [ nodemon sqlite cabal-install tmux tmuxinator - stylish-haskell + haskellPackages.stylish-haskell ]; }; } -- cgit v1.2.3