summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/roster-editor')
-rw-r--r--src/roster-editor/src/Comm/JoinBattle.elm16
-rw-r--r--src/roster-editor/src/Comm/LoadRoster.elm6
-rw-r--r--src/roster-editor/src/Comm/Send.elm6
-rw-r--r--src/roster-editor/src/Comm/UpdateRoster.elm6
-rw-r--r--src/roster-editor/src/ElmModule/Init.elm4
-rw-r--r--src/roster-editor/src/Main.elm4
-rw-r--r--src/roster-editor/src/Struct/Character.elm4
-rw-r--r--src/roster-editor/src/Struct/Model.elm12
-rw-r--r--src/roster-editor/src/Update/GoToMainMenu.elm4
-rw-r--r--src/roster-editor/src/Update/HandleServerReply.elm14
-rw-r--r--src/roster-editor/src/Update/ToggleBattleIndex.elm4
-rw-r--r--src/roster-editor/src/View/Character.elm4
-rw-r--r--src/roster-editor/src/View/CharacterCard.elm8
-rw-r--r--src/roster-editor/src/View/Controlled.elm4
-rw-r--r--src/roster-editor/src/View/GlyphSelection.elm4
-rw-r--r--src/roster-editor/src/View/MainMenu.elm4
-rw-r--r--src/roster-editor/src/View/WeaponSelection.elm4
17 files changed, 55 insertions, 53 deletions
diff --git a/src/roster-editor/src/Comm/JoinBattle.elm b/src/roster-editor/src/Comm/JoinBattle.elm
index f605ffc..f5ba678 100644
--- a/src/roster-editor/src/Comm/JoinBattle.elm
+++ b/src/roster-editor/src/Comm/JoinBattle.elm
@@ -6,7 +6,7 @@ import Array
import Json.Encode
-- Shared ----------------------------------------------------------------------
-import Struct.Flags
+import Shared.Struct.Flags
-- Local Module ----------------------------------------------------------------
import Comm.Send
@@ -30,12 +30,12 @@ maybe_encode model =
[
("stk",
(Json.Encode.string
- (Struct.Flags.get_session_token model.flags)
+ (Shared.Struct.Flags.get_session_token model.flags)
)
),
("pid",
(Json.Encode.string
- (Struct.Flags.get_user_id model.flags)
+ (Shared.Struct.Flags.get_user_id model.flags)
)
),
(
@@ -44,7 +44,7 @@ maybe_encode model =
(
case
(String.toInt
- (Struct.Flags.force_get_parameter "six" model.flags)
+ (Shared.Struct.Flags.force_get_parameter "six" model.flags)
)
of
(Just ix) -> ix
@@ -55,25 +55,25 @@ maybe_encode model =
(
"cat",
(Json.Encode.string
- (Struct.Flags.force_get_parameter "cat" model.flags)
+ (Shared.Struct.Flags.force_get_parameter "cat" model.flags)
)
),
(
"mod",
(Json.Encode.string
- (Struct.Flags.force_get_parameter "mod" model.flags)
+ (Shared.Struct.Flags.force_get_parameter "mod" model.flags)
)
),
(
"s",
(Json.Encode.string
- (Struct.Flags.force_get_parameter "s" model.flags)
+ (Shared.Struct.Flags.force_get_parameter "s" model.flags)
)
),
(
"map_id",
(Json.Encode.string
- (Struct.Flags.force_get_parameter "map_id" model.flags)
+ (Shared.Struct.Flags.force_get_parameter "map_id" model.flags)
)
),
(
diff --git a/src/roster-editor/src/Comm/LoadRoster.elm b/src/roster-editor/src/Comm/LoadRoster.elm
index 5156826..a479e6d 100644
--- a/src/roster-editor/src/Comm/LoadRoster.elm
+++ b/src/roster-editor/src/Comm/LoadRoster.elm
@@ -4,7 +4,7 @@ module Comm.LoadRoster exposing (try)
import Json.Encode
-- Shared ----------------------------------------------------------------------
-import Struct.Flags
+import Shared.Struct.Flags
-- Local Module ----------------------------------------------------------------
import Comm.Send
@@ -28,12 +28,12 @@ maybe_encode model =
[
("stk",
(Json.Encode.string
- (Struct.Flags.get_session_token model.flags)
+ (Shared.Struct.Flags.get_session_token model.flags)
)
),
("pid",
(Json.Encode.string
- (Struct.Flags.get_user_id model.flags)
+ (Shared.Struct.Flags.get_user_id model.flags)
)
),
("rid", (Json.Encode.string model.roster_id))
diff --git a/src/roster-editor/src/Comm/Send.elm b/src/roster-editor/src/Comm/Send.elm
index f0d6387..d47df92 100644
--- a/src/roster-editor/src/Comm/Send.elm
+++ b/src/roster-editor/src/Comm/Send.elm
@@ -6,11 +6,13 @@ import Http
import Json.Decode
import Json.Encode
+--- Shared ---------------------------------------------------------------------
+import Shared.Comm.GoTo
+
--- Battle Characters ----------------------------------------------------------
import BattleCharacters.Comm.AddDataSetItem
--- Local Module ---------------------------------------------------------------
-import Comm.GoTo
import Comm.AddChar
import Comm.SetInventory
@@ -33,7 +35,7 @@ internal_decoder reply_type =
"add_char" -> (Comm.AddChar.decode)
"disconnected" -> (Json.Decode.succeed Struct.ServerReply.Disconnected)
- "goto" -> (Comm.GoTo.decode)
+ "goto" -> (Shared.Comm.GoTo.decode)
"okay" -> (Json.Decode.succeed Struct.ServerReply.Okay)
other ->
diff --git a/src/roster-editor/src/Comm/UpdateRoster.elm b/src/roster-editor/src/Comm/UpdateRoster.elm
index a6066a9..058a39e 100644
--- a/src/roster-editor/src/Comm/UpdateRoster.elm
+++ b/src/roster-editor/src/Comm/UpdateRoster.elm
@@ -8,7 +8,7 @@ import List
import Json.Encode
-- Shared ----------------------------------------------------------------------
-import Struct.Flags
+import Shared.Struct.Flags
-- Local Module ----------------------------------------------------------------
import Comm.Send
@@ -33,12 +33,12 @@ maybe_encode model =
[
("stk",
(Json.Encode.string
- (Struct.Flags.get_session_token model.flags)
+ (Shared.Struct.Flags.get_session_token model.flags)
)
),
("pid",
(Json.Encode.string
- (Struct.Flags.get_user_id model.flags)
+ (Shared.Struct.Flags.get_user_id model.flags)
)
),
(
diff --git a/src/roster-editor/src/ElmModule/Init.elm b/src/roster-editor/src/ElmModule/Init.elm
index 2e72f49..16dfc72 100644
--- a/src/roster-editor/src/ElmModule/Init.elm
+++ b/src/roster-editor/src/ElmModule/Init.elm
@@ -1,7 +1,7 @@
module ElmModule.Init exposing (init)
-- Shared ----------------------------------------------------------------------
-import Struct.Flags
+import Shared.Struct.Flags
-- Local Module ----------------------------------------------------------------
import Comm.LoadRoster
@@ -22,7 +22,7 @@ import Struct.Model
--------------------------------------------------------------------------------
-- EXPORTED --------------------------------------------------------------------
--------------------------------------------------------------------------------
-init : Struct.Flags.Type -> (Struct.Model.Type, (Cmd Struct.Event.Type))
+init : Shared.Struct.Flags.Type -> (Struct.Model.Type, (Cmd Struct.Event.Type))
init flags =
let model = (Struct.Model.new flags) in
(
diff --git a/src/roster-editor/src/Main.elm b/src/roster-editor/src/Main.elm
index 9a8eeb7..f4a63bb 100644
--- a/src/roster-editor/src/Main.elm
+++ b/src/roster-editor/src/Main.elm
@@ -4,7 +4,7 @@ module Main exposing (main)
import Browser
-- Shared ----------------------------------------------------------------------
-import Struct.Flags
+import Shared.Struct.Flags
-- Local Module ----------------------------------------------------------------
import Struct.Model
@@ -15,7 +15,7 @@ import ElmModule.Subscriptions
import ElmModule.View
import ElmModule.Update
-main : (Program Struct.Flags.Type Struct.Model.Type Struct.Event.Type)
+main : (Program Shared.Struct.Flags.Type Struct.Model.Type Struct.Event.Type)
main =
(Browser.element
{
diff --git a/src/roster-editor/src/Struct/Character.elm b/src/roster-editor/src/Struct/Character.elm
index d2dc129..ac516c1 100644
--- a/src/roster-editor/src/Struct/Character.elm
+++ b/src/roster-editor/src/Struct/Character.elm
@@ -32,7 +32,7 @@ import Json.Decode.Pipeline
import Json.Encode
-- Shared ----------------------------------------------------------------------
-import Util.List
+import Shared.Util.List
-- Battle ----------------------------------------------------------------------
import Battle.Struct.Attributes
@@ -99,7 +99,7 @@ compute_glyph_family_id_collections equipment =
),
(Set.remove
no_glyph_family_id
- (Util.List.duplicates
+ (Shared.Util.List.duplicates
family_ids_list
)
)
diff --git a/src/roster-editor/src/Struct/Model.elm b/src/roster-editor/src/Struct/Model.elm
index f661edf..174a6f2 100644
--- a/src/roster-editor/src/Struct/Model.elm
+++ b/src/roster-editor/src/Struct/Model.elm
@@ -19,9 +19,9 @@ import List
import Dict
-- Shared ----------------------------------------------------------------------
-import Struct.Flags
+import Shared.Struct.Flags
-import Util.Array
+import Shared.Util.Array
-- Battle Characters -----------------------------------------------------------
import BattleCharacters.Struct.DataSet
@@ -39,7 +39,7 @@ import Struct.UI
--------------------------------------------------------------------------------
type alias Type =
{
- flags : Struct.Flags.Type,
+ flags : Shared.Struct.Flags.Type,
error : (Maybe Struct.Error.Type),
ui : Struct.UI.Type,
help_request : Struct.HelpRequest.Type,
@@ -86,7 +86,7 @@ has_loaded_data model =
--------------------------------------------------------------------------------
-- EXPORTED --------------------------------------------------------------------
--------------------------------------------------------------------------------
-new : Struct.Flags.Type -> Type
+new : Shared.Struct.Flags.Type -> Type
new flags =
{
flags = flags,
@@ -98,7 +98,7 @@ new flags =
battle_order =
(Array.repeat
(
- case (Struct.Flags.maybe_get_parameter "s" flags) of
+ case (Shared.Struct.Flags.maybe_get_parameter "s" flags) of
Nothing -> 0
(Just "s") -> 8
(Just "m") -> 16
@@ -167,7 +167,7 @@ update_character_fun : (
)
update_character_fun ix fun model =
{model |
- characters = (Util.Array.update ix (fun) model.characters)
+ characters = (Shared.Util.Array.update ix (fun) model.characters)
}
invalidate : Struct.Error.Type -> Type -> Type
diff --git a/src/roster-editor/src/Update/GoToMainMenu.elm b/src/roster-editor/src/Update/GoToMainMenu.elm
index a0471f2..3819fd9 100644
--- a/src/roster-editor/src/Update/GoToMainMenu.elm
+++ b/src/roster-editor/src/Update/GoToMainMenu.elm
@@ -1,7 +1,7 @@
module Update.GoToMainMenu exposing (apply_to)
-- Shared ----------------------------------------------------------------------
-import Action.Ports
+import Shared.Action.Ports
-- Local Module ----------------------------------------------------------------
import Constants.IO
@@ -20,5 +20,5 @@ apply_to : Struct.Model.Type -> (Struct.Model.Type, (Cmd Struct.Event.Type))
apply_to model =
(
model,
- (Action.Ports.go_to (Constants.IO.base_url ++"/main-menu/"))
+ (Shared.Action.Ports.go_to (Constants.IO.base_url ++"/main-menu/"))
)
diff --git a/src/roster-editor/src/Update/HandleServerReply.elm b/src/roster-editor/src/Update/HandleServerReply.elm
index f456355..c85c44d 100644
--- a/src/roster-editor/src/Update/HandleServerReply.elm
+++ b/src/roster-editor/src/Update/HandleServerReply.elm
@@ -8,11 +8,11 @@ import Http
import Url
-- Shared ----------------------------------------------------------------------
-import Action.Ports
+import Shared.Action.Ports
-import Struct.Flags
+import Shared.Struct.Flags
-import Util.Http
+import Shared.Util.Http
-- Battle Characters -----------------------------------------------------------
import BattleCharacters.Struct.DataSetItem
@@ -43,7 +43,7 @@ disconnected current_state =
(
model,
[
- (Action.Ports.go_to
+ (Shared.Action.Ports.go_to
(
Constants.IO.base_url
++ "/login/?action=disconnect&goto="
@@ -51,7 +51,7 @@ disconnected current_state =
(Url.percentEncode
(
"/roster-editor/?"
- ++ (Struct.Flags.get_parameters_as_url model.flags)
+ ++ (Shared.Struct.Flags.get_parameters_as_url model.flags)
)
)
)
@@ -69,7 +69,7 @@ goto url current_state =
(
model,
[
- (Action.Ports.go_to (Constants.IO.base_url ++ "/" ++ url))
+ (Shared.Action.Ports.go_to (Constants.IO.base_url ++ "/" ++ url))
]
)
@@ -155,7 +155,7 @@ apply_to model query_result =
(Struct.Model.invalidate
(Struct.Error.new
Struct.Error.Networking
- (Util.Http.error_to_string error)
+ (Shared.Util.Http.error_to_string error)
)
model
),
diff --git a/src/roster-editor/src/Update/ToggleBattleIndex.elm b/src/roster-editor/src/Update/ToggleBattleIndex.elm
index 27a61c3..81a9313 100644
--- a/src/roster-editor/src/Update/ToggleBattleIndex.elm
+++ b/src/roster-editor/src/Update/ToggleBattleIndex.elm
@@ -4,7 +4,7 @@ module Update.ToggleBattleIndex exposing (apply_to)
import Array
-- Shared ----------------------------------------------------------------------
-import Util.Array
+import Shared.Util.Array
-- Local Module ----------------------------------------------------------------
import Struct.Character
@@ -44,7 +44,7 @@ give_battle_index : (
Struct.Model.Type
)
give_battle_index model char index =
- case (Util.Array.indexed_search (\e -> (e == -1)) model.battle_order) of
+ case (Shared.Util.Array.indexed_search (\e -> (e == -1)) model.battle_order) of
Nothing -> model
(Just (battle_index, _)) ->
{model |
diff --git a/src/roster-editor/src/View/Character.elm b/src/roster-editor/src/View/Character.elm
index 1462b07..475cf9c 100644
--- a/src/roster-editor/src/View/Character.elm
+++ b/src/roster-editor/src/View/Character.elm
@@ -10,7 +10,7 @@ import Html.Attributes
import Html.Events
-- Shared ----------------------------------------------------------------------
-import Util.Html
+import Shared.Util.Html
-- Battle Characters -----------------------------------------------------------
import BattleCharacters.Struct.Armor
@@ -65,7 +65,7 @@ get_battle_index_html char =
let battle_ix = (Struct.Character.get_battle_index char) in
if (battle_ix == -1)
then
- (Util.Html.nothing)
+ (Shared.Util.Html.nothing)
else
(Html.div
[
diff --git a/src/roster-editor/src/View/CharacterCard.elm b/src/roster-editor/src/View/CharacterCard.elm
index ab6590c..d394346 100644
--- a/src/roster-editor/src/View/CharacterCard.elm
+++ b/src/roster-editor/src/View/CharacterCard.elm
@@ -14,7 +14,7 @@ import Html.Attributes
import Html.Events
-- Shared ----------------------------------------------------------------------
-import Util.Html
+import Shared.Util.Html
-- Battle ----------------------------------------------------------------------
import Battle.Struct.Omnimods
@@ -161,7 +161,7 @@ get_weapon_field_header is_active_wp weapon =
(Html.text "(Equipped)")
]
)
- else (Util.Html.nothing)
+ else (Shared.Util.Html.nothing)
),
(Html.div
[
@@ -238,7 +238,7 @@ get_weapon_details current_tab is_active_wp has_issue weapon =
(Battle.View.Omnimods.get_signed_html
(BattleCharacters.Struct.Weapon.get_omnimods weapon)
)
- else (Util.Html.nothing)
+ else (Shared.Util.Html.nothing)
)
]
)
@@ -272,7 +272,7 @@ get_armor_details current_tab armor =
(Battle.View.Omnimods.get_signed_html
(BattleCharacters.Struct.Armor.get_omnimods armor)
)
- else (Util.Html.nothing)
+ else (Shared.Util.Html.nothing)
)
]
)
diff --git a/src/roster-editor/src/View/Controlled.elm b/src/roster-editor/src/View/Controlled.elm
index 702c05f..159a1ee 100644
--- a/src/roster-editor/src/View/Controlled.elm
+++ b/src/roster-editor/src/View/Controlled.elm
@@ -6,7 +6,7 @@ import Html.Attributes
import Html.Lazy
-- Local Module ----------------------------------------------------------------
-import Util.Html
+import Shared.Util.Html
-- Local Module ----------------------------------------------------------------
import Struct.Event
@@ -25,7 +25,7 @@ import View.CharacterCard
get_html : Struct.Model.Type -> (Html.Html Struct.Event.Type)
get_html model =
case model.edited_char of
- Nothing -> (Util.Html.nothing)
+ Nothing -> (Shared.Util.Html.nothing)
(Just char) ->
(Html.div
[(Html.Attributes.class "controlled")]
diff --git a/src/roster-editor/src/View/GlyphSelection.elm b/src/roster-editor/src/View/GlyphSelection.elm
index 8d4ef84..303c229 100644
--- a/src/roster-editor/src/View/GlyphSelection.elm
+++ b/src/roster-editor/src/View/GlyphSelection.elm
@@ -13,7 +13,7 @@ import Html.Attributes
import Html.Events
-- Shared ----------------------------------------------------------------------
-import Util.Html
+import Shared.Util.Html
-- Battle ----------------------------------------------------------------------
import Battle.Struct.Omnimods
@@ -97,7 +97,7 @@ true_get_html : (
)
true_get_html maybe_char glyph_modifier dataset =
case maybe_char of
- Nothing -> (Util.Html.nothing)
+ Nothing -> (Shared.Util.Html.nothing)
(Just char) ->
(Html.div
[
diff --git a/src/roster-editor/src/View/MainMenu.elm b/src/roster-editor/src/View/MainMenu.elm
index 96a670a..b40d706 100644
--- a/src/roster-editor/src/View/MainMenu.elm
+++ b/src/roster-editor/src/View/MainMenu.elm
@@ -8,7 +8,7 @@ import Html.Attributes
import Html.Events
-- Shared ----------------------------------------------------------------------
-import Util.Html
+import Shared.Util.Html
-- Local Module ----------------------------------------------------------------
import Struct.Event
@@ -66,7 +66,7 @@ get_go_button_html model =
]
)
else
- (Util.Html.nothing)
+ (Shared.Util.Html.nothing)
--------------------------------------------------------------------------------
-- EXPORTED --------------------------------------------------------------------
diff --git a/src/roster-editor/src/View/WeaponSelection.elm b/src/roster-editor/src/View/WeaponSelection.elm
index 830ec72..23a62c4 100644
--- a/src/roster-editor/src/View/WeaponSelection.elm
+++ b/src/roster-editor/src/View/WeaponSelection.elm
@@ -9,7 +9,7 @@ import Html.Attributes
import Html.Events
-- Shared ----------------------------------------------------------------------
-import Util.Html
+import Shared.Util.Html
-- Battle ----------------------------------------------------------------------
import Battle.View.Omnimods
@@ -148,7 +148,7 @@ true_get_html is_selecting_secondary dataset =
get_html : Struct.Model.Type -> (Html.Html Struct.Event.Type)
get_html model =
case model.edited_char of
- Nothing -> (Util.Html.nothing)
+ Nothing -> (Shared.Util.Html.nothing)
(Just char) ->
let
is_selecting_secondary =