-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3f24578
commit a3232f8
Showing
59 changed files
with
309 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module AccountSettings where | ||
|
||
import Prelude | ||
|
||
import Component.AccountSettings (usetting) | ||
import Data.Foldable (traverse_) | ||
import Effect (Effect) | ||
import Halogen.Aff as HA | ||
import Halogen.VDom.Driver (runUI) | ||
import Model (AccountSettings) | ||
import Web.DOM.ParentNode (QuerySelector(..)) | ||
import ViewRendered (viewRendered) | ||
|
||
|
||
renderAccountSettings :: String -> AccountSettings -> Effect Unit | ||
renderAccountSettings renderElSelector accountSettings = do | ||
HA.runHalogenAff do | ||
HA.selectElement (QuerySelector renderElSelector) >>= traverse_ \el -> do | ||
void $ runUI (usetting accountSettings) unit el | ||
viewRendered |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module Add where | ||
|
||
import Prelude | ||
|
||
import Component.Add (addbmark) | ||
import Data.Foldable (traverse_) | ||
import Effect (Effect) | ||
import Halogen.Aff as HA | ||
import Halogen.VDom.Driver (runUI) | ||
import Model (Bookmark) | ||
import Web.DOM.ParentNode (QuerySelector(..)) | ||
import ViewRendered (viewRendered) | ||
|
||
renderAddForm :: String -> Bookmark -> Effect Unit | ||
renderAddForm renderElSelector bmark = do | ||
HA.runHalogenAff do | ||
HA.selectElement (QuerySelector renderElSelector) >>= traverse_ \el -> do | ||
void $ runUI (addbmark bmark) unit el | ||
viewRendered |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
module Bookmarks where | ||
|
||
import Prelude | ||
|
||
import Component.TagCloud (tagcloudcomponent) | ||
import Component.BList (blist) | ||
import Data.Foldable (traverse_) | ||
import Effect (Effect) | ||
import Halogen.Aff as HA | ||
import Halogen.VDom.Driver (runUI) | ||
import Model (Bookmark, TagCloudMode, tagCloudModeToF) | ||
import Web.DOM.ParentNode (QuerySelector(..)) | ||
import ViewRendered (viewRendered) | ||
|
||
|
||
renderBookmarks :: String -> Array Bookmark -> Effect Unit | ||
renderBookmarks renderElSelector bmarks = do | ||
HA.runHalogenAff do | ||
HA.selectElement (QuerySelector renderElSelector) >>= traverse_ \el -> do | ||
void $ runUI (blist bmarks) unit el | ||
viewRendered | ||
|
||
renderTagCloud :: String -> TagCloudMode -> Effect Unit | ||
renderTagCloud renderElSelector tagCloudMode = do | ||
HA.runHalogenAff do | ||
HA.selectElement (QuerySelector renderElSelector) >>= traverse_ \el -> do | ||
void $ runUI (tagcloudcomponent (tagCloudModeToF tagCloudMode)) unit el |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module ViewRendered where | ||
|
||
import Prelude | ||
|
||
import Data.Foldable (traverse_) | ||
import Effect.Aff (Aff) | ||
import Effect.Class (liftEffect) | ||
import Halogen.Aff as HA | ||
import Web.DOM.Element (setAttribute) | ||
import Web.DOM.ParentNode (QuerySelector(..)) | ||
import Web.HTML.HTMLElement (toElement) | ||
|
||
viewRendered :: Aff Unit | ||
viewRendered = HA.selectElement (QuerySelector "#content") >>= traverse_ \el -> | ||
liftEffect $ setAttribute "view-rendered" "" (toElement el) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module Logout where | ||
|
||
import Prelude | ||
|
||
import App (logout) | ||
import Effect (Effect) | ||
import Effect.Aff (launchAff) | ||
import Web.Event.Event (Event, preventDefault) | ||
|
||
logoutE :: Event -> Effect Unit | ||
logoutE e = void <<< launchAff <<< logout =<< preventDefault e |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
module Note where | ||
|
||
import Prelude | ||
|
||
import Component.NList (nlist) | ||
import Component.NNote (nnote) | ||
import Data.Foldable (traverse_) | ||
import Effect (Effect) | ||
import Halogen.Aff as HA | ||
import Halogen.VDom.Driver (runUI) | ||
import Model (Note) | ||
import Web.DOM.ParentNode (QuerySelector(..)) | ||
import ViewRendered (viewRendered) | ||
|
||
renderNotes :: String -> Array Note -> Effect Unit | ||
renderNotes renderElSelector notes = do | ||
HA.runHalogenAff do | ||
HA.selectElement (QuerySelector renderElSelector) >>= traverse_ \el -> do | ||
void $ runUI (nlist notes) unit el | ||
viewRendered | ||
|
||
renderNote :: String -> Note -> Effect Unit | ||
renderNote renderElSelector note = do | ||
HA.runHalogenAff do | ||
HA.selectElement (QuerySelector renderElSelector) >>= traverse_ \el -> do | ||
void $ runUI (nnote note) unit el | ||
viewRendered |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.