From 152327aeca99e23de6cf0c645cd3565fd3655285 Mon Sep 17 00:00:00 2001 From: Yanick Champoux Date: Tue, 21 Mar 2023 10:43:26 -0400 Subject: [PATCH] Propulsion --- src/lib/components/GlobalStyle.svelte | 2 ++ .../{Section/index.svelte => Section.svelte} | 1 + src/lib/components/ShipEdit/Carrier/index.svelte | 2 +- .../components/ShipEdit/Propulsion.story.svelte | 8 ++++++++ src/lib/components/ShipEdit/Propulsion.svelte | 15 +++++++++++++++ .../components/ShipEdit/Propulsion/Engine.svelte | 4 ++-- src/lib/components/ShipEdit/Propulsion/Ftl.svelte | 2 +- .../components/ShipEdit/Propulsion/index.svelte | 12 ------------ 8 files changed, 30 insertions(+), 16 deletions(-) rename src/lib/components/{Section/index.svelte => Section.svelte} (90%) create mode 100644 src/lib/components/ShipEdit/Propulsion.story.svelte create mode 100644 src/lib/components/ShipEdit/Propulsion.svelte delete mode 100644 src/lib/components/ShipEdit/Propulsion/index.svelte diff --git a/src/lib/components/GlobalStyle.svelte b/src/lib/components/GlobalStyle.svelte index 05fc199..4959dac 100644 --- a/src/lib/components/GlobalStyle.svelte +++ b/src/lib/components/GlobalStyle.svelte @@ -16,6 +16,8 @@ :root { --main-font-family: "Dosis", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; + --font-family: "Dosis", -apple-system, BlinkMacSystemFont, "Segoe UI", + Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; --font-scale-9: 0.75rem; --font-scale-10: 1em; diff --git a/src/lib/components/Section/index.svelte b/src/lib/components/Section.svelte similarity index 90% rename from src/lib/components/Section/index.svelte rename to src/lib/components/Section.svelte index caf4f94..fe3edf6 100644 --- a/src/lib/components/Section/index.svelte +++ b/src/lib/components/Section.svelte @@ -22,5 +22,6 @@ hr { flex: 1; background: #333; + border-top: 1px solid black; } diff --git a/src/lib/components/ShipEdit/Carrier/index.svelte b/src/lib/components/ShipEdit/Carrier/index.svelte index 53b8907..20789dc 100644 --- a/src/lib/components/ShipEdit/Carrier/index.svelte +++ b/src/lib/components/ShipEdit/Carrier/index.svelte @@ -10,7 +10,7 @@ {/each} - diff --git a/src/lib/components/ShipEdit/Propulsion.svelte b/src/lib/components/ShipEdit/Propulsion.svelte new file mode 100644 index 0000000..8a432bf --- /dev/null +++ b/src/lib/components/ShipEdit/Propulsion.svelte @@ -0,0 +1,15 @@ +
+ + +
+ + diff --git a/src/lib/components/ShipEdit/Propulsion/Engine.svelte b/src/lib/components/ShipEdit/Propulsion/Engine.svelte index d471089..c1a6df8 100644 --- a/src/lib/components/ShipEdit/Propulsion/Engine.svelte +++ b/src/lib/components/ShipEdit/Propulsion/Engine.svelte @@ -25,7 +25,7 @@ export let rating = 0; export let api = getContext("api"); - $: api.dispatch.setEngine({ rating, advanced }); + $: api?.dispatch?.setEngine({ rating, advanced });