From b652ca68866dd0bdaba0ac3a03982627fe446a1f Mon Sep 17 00:00:00 2001 From: Dylan Chong Date: Wed, 20 Sep 2023 20:21:11 +1200 Subject: [PATCH] Add JSON import --- src/components/App.vue | 4 + src/components/BoardSelector.vue | 19 ++- src/components/BunchingEffect.vue | 3 +- src/components/HandImporter.vue | 195 ++++++++++++++++++++++++++++++ src/components/RangeEditor.vue | 48 +++----- src/components/SideBar.vue | 13 +- src/range-utils.ts | 67 ++++++++++ src/store.ts | 62 +++++++++- src/style.css | 4 + src/utils.ts | 11 ++ 10 files changed, 383 insertions(+), 43 deletions(-) create mode 100644 src/components/HandImporter.vue create mode 100644 src/range-utils.ts diff --git a/src/components/App.vue b/src/components/App.vue index 1cf7d36..525f2e1 100644 --- a/src/components/App.vue +++ b/src/components/App.vue @@ -24,6 +24,9 @@ +
+ +
@@ -70,6 +73,7 @@ import BunchingEffect from "./BunchingEffect.vue"; import RunSolver from "./RunSolver.vue"; import AboutPage from "./AboutPage.vue"; import ResultViewer from "./ResultViewer.vue"; +import HandImporter from "./HandImporter.vue"; const store = useStore(); const header = computed(() => store.headers[store.sideView].join(" > ")); diff --git a/src/components/BoardSelector.vue b/src/components/BoardSelector.vue index c948bd1..61412a2 100644 --- a/src/components/BoardSelector.vue +++ b/src/components/BoardSelector.vue @@ -38,7 +38,7 @@ diff --git a/src/components/BunchingEffect.vue b/src/components/BunchingEffect.vue index 069e087..18ab57c 100644 --- a/src/components/BunchingEffect.vue +++ b/src/components/BunchingEffect.vue @@ -202,7 +202,8 @@ diff --git a/src/components/RangeEditor.vue b/src/components/RangeEditor.vue index 4e5628e..486beb8 100644 --- a/src/components/RangeEditor.vue +++ b/src/components/RangeEditor.vue @@ -135,9 +135,10 @@