| summaryrefslogtreecommitdiff |
diff options
| author | nsensfel <SpamShield0@noot-noot.org> | 2018-09-27 15:40:30 +0200 |
|---|---|---|
| committer | nsensfel <SpamShield0@noot-noot.org> | 2018-09-27 15:40:30 +0200 |
| commit | 2f22e667fbea56884d74ed27777f2e9f3fc9fd53 (patch) | |
| tree | 75300c58cc7b287993887f84b2d68b9d515a9ec0 /src/popup/src/Struct/Event.elm | |
| parent | 486ee1dbe21be962e89f421e1dd5f3cbb2fd2177 (diff) | |
Starting to separate background and popup code.
Diffstat (limited to 'src/popup/src/Struct/Event.elm')
| -rw-r--r-- | src/popup/src/Struct/Event.elm | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/popup/src/Struct/Event.elm b/src/popup/src/Struct/Event.elm new file mode 100644 index 0000000..eafd812 --- /dev/null +++ b/src/popup/src/Struct/Event.elm @@ -0,0 +1,30 @@ +module Struct.Event exposing (Type(..), attempted) + +-- Elm ------------------------------------------------------------------------- +import Http + +-- Main Menu ------------------------------------------------------------------- +import Struct.Error +import Struct.ServerReply + +-------------------------------------------------------------------------------- +-- TYPES ----------------------------------------------------------------------- +-------------------------------------------------------------------------------- +type Type = + None + | Failed Struct.Error.Type + | AddPlayer + | ShouldRefresh + | SetUsername String + | SetID String + | SetURLPrefix String + | SetFrequency Int + | StoreParams + | ServerReplied (Result Http.Error (List Struct.ServerReply.Type)) + +attempted : (Result.Result err val) -> Type +attempted act = + case act of + (Result.Ok _) -> None + (Result.Err msg) -> + (Failed (Struct.Error.new Struct.Error.Failure (toString msg))) |


