From df5ca2d577d1ac47f0d11e93f05f7fa87a1bd193 Mon Sep 17 00:00:00 2001 From: Yanick Champoux Date: Tue, 28 Jul 2020 17:20:30 -0400 Subject: [PATCH 1/2] add notes --- src/components/App.svelte | 37 ++++++++++++++++++++- src/components/Notes.svelte | 64 +++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 src/components/Notes.svelte diff --git a/src/components/App.svelte b/src/components/App.svelte index 2a011de..1bf0911 100644 --- a/src/components/App.svelte +++ b/src/components/App.svelte @@ -1,7 +1,15 @@
+ +{#if show_notes} + +{/if} +
@@ -41,7 +49,13 @@ +
+ diff --git a/src/components/Notes.svelte b/src/components/Notes.svelte new file mode 100644 index 0000000..8fb753d --- /dev/null +++ b/src/components/Notes.svelte @@ -0,0 +1,64 @@ + + + + + From b014f02d912b4a96ef5c80cc5912766bac4a0894 Mon Sep 17 00:00:00 2001 From: Yanick Champoux Date: Tue, 28 Jul 2020 18:00:39 -0400 Subject: [PATCH 2/2] json component --- src/components/App.svelte | 22 ++++++++++++-- src/components/Output/Json.svelte | 50 +++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 src/components/Output/Json.svelte diff --git a/src/components/App.svelte b/src/components/App.svelte index 1bf0911..8fe86cd 100644 --- a/src/components/App.svelte +++ b/src/components/App.svelte @@ -4,12 +4,20 @@ {/if} +{#if output === 'json'} + set_output(null)}/> +{/if} +
@@ -62,6 +70,7 @@ import Header from './Header'; import shipStore from "~/stores/ship"; + import OutputJson from './Output/Json.svelte'; import ShipSpecs from './ShipSpecs/index.svelte'; import Notes from './Notes'; @@ -108,8 +117,13 @@ setContext("ship_change", ship.dispatch); - let show_notes = true; + let show_notes = false; const toggle_notes = () => show_notes = !show_notes; + + let output = null; + + const set_output = value => output = value; + diff --git a/src/components/Output/Json.svelte b/src/components/Output/Json.svelte new file mode 100644 index 0000000..f6a3204 --- /dev/null +++ b/src/components/Output/Json.svelte @@ -0,0 +1,50 @@ + + + + +