From e6676d48fcc96a1437ea1ef3e836560a66e52a9c Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Thu, 27 May 2021 01:14:43 -0500 Subject: [PATCH] Set up main display including component coercion --- package-lock.json | 15 ++ package.json | 1 + src/components/features/MainDisplay.vue | 49 +++++++ src/components/index.js | 42 ++++++ src/components/system/DefaultLayerTab.vue | 38 +++++ src/components/system/Info.vue | 4 - src/components/system/LayerProvider.vue | 4 +- src/components/system/LayerTab.vue | 42 +++++- src/components/system/Nav.vue | 5 - src/components/system/Options.vue | 14 +- src/components/system/Resource.vue | 18 +++ src/components/system/Tabs.vue | 21 ++- src/data/layers/demo-infinity.js | 8 +- src/data/layers/demo.js | 37 ++--- src/data/mod.js | 6 +- src/data/modInfo.json | 2 +- src/main.js | 6 +- src/store/layers.js | 167 ++++++++++++++-------- src/store/proxies.js | 43 ++++-- src/util/bignum.js | 11 ++ src/util/features.js | 4 + src/util/layers.js | 11 ++ src/util/load.js | 3 +- src/util/vue.js | 32 +++++ vue.config.js | 3 +- 25 files changed, 457 insertions(+), 129 deletions(-) create mode 100644 src/components/features/MainDisplay.vue create mode 100644 src/components/index.js create mode 100644 src/components/system/DefaultLayerTab.vue create mode 100644 src/components/system/Resource.vue create mode 100644 src/util/layers.js create mode 100644 src/util/vue.js diff --git a/package-lock.json b/package-lock.json index aa22cc1..a10d1b4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "dependencies": { "core-js": "^3.6.5", "vue": "^2.6.11", + "vue-fragment": "^1.5.2", "vue-select": "^3.11.2", "vuex": "^3.4.0" }, @@ -13458,6 +13459,14 @@ "node": ">=8.0.0" } }, + "node_modules/vue-fragment": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/vue-fragment/-/vue-fragment-1.5.2.tgz", + "integrity": "sha512-KEW0gkeNOLJjtXN4jqJhTazez5jtrwimHkE5Few/VxblH4F9EcvJiEsahrV5kg5uKd5U8du4ORKS6QjGE0piYA==", + "peerDependencies": { + "vue": "^2.5.16" + } + }, "node_modules/vue-hot-reload-api": { "version": "2.3.4", "resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz", @@ -25801,6 +25810,12 @@ } } }, + "vue-fragment": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/vue-fragment/-/vue-fragment-1.5.2.tgz", + "integrity": "sha512-KEW0gkeNOLJjtXN4jqJhTazez5jtrwimHkE5Few/VxblH4F9EcvJiEsahrV5kg5uKd5U8du4ORKS6QjGE0piYA==", + "requires": {} + }, "vue-hot-reload-api": { "version": "2.3.4", "resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz", diff --git a/package.json b/package.json index 61c733d..d75da71 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "dependencies": { "core-js": "^3.6.5", "vue": "^2.6.11", + "vue-fragment": "^1.5.2", "vue-select": "^3.11.2", "vuex": "^3.4.0" }, diff --git a/src/components/features/MainDisplay.vue b/src/components/features/MainDisplay.vue new file mode 100644 index 0000000..a6d3988 --- /dev/null +++ b/src/components/features/MainDisplay.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/src/components/index.js b/src/components/index.js new file mode 100644 index 0000000..6cea9e4 --- /dev/null +++ b/src/components/index.js @@ -0,0 +1,42 @@ +// Import and register all components, +// which will allow us to use them in any template strings anywhere in the project + +import Vue from 'vue'; + +/* system */ +import DefaultLayerTab from './system/DefaultLayerTab'; +import Info from './system/Info'; +import LayerProvider from './system/LayerProvider'; +import LayerTab from './system/LayerTab'; +import Modal from './system/Modal'; +import Nav from './system/Nav'; +import Options from './system/Options'; +import Resource from './system/Resource'; +import Tabs from './system/Tabs'; +import TPS from './system/TPS'; +/* fields */ +import Select from './fields/Select'; +import Toggle from './fields/Toggle'; +/* features */ +import MainDisplay from './features/MainDisplay'; +/* misc */ +import { Fragment } from 'vue-fragment'; + +/* system */ +Vue.component(DefaultLayerTab.name, DefaultLayerTab); +Vue.component(Info.name, Info); +Vue.component(LayerProvider.name, LayerProvider); +Vue.component(LayerTab.name, LayerTab); +Vue.component(Modal.name, Modal); +Vue.component(Nav.name, Nav); +Vue.component(Options.name, Options); +Vue.component(Resource.name, Resource); +Vue.component(Tabs.name, Tabs); +Vue.component(TPS.name, TPS); +/* fields */ +Vue.component(Select.name, Select); +Vue.component(Toggle.name, Toggle); +/* features */ +Vue.component(MainDisplay.name, MainDisplay); +/* misc */ +Vue.component(Fragment.name, Fragment); diff --git a/src/components/system/DefaultLayerTab.vue b/src/components/system/DefaultLayerTab.vue new file mode 100644 index 0000000..7a78c87 --- /dev/null +++ b/src/components/system/DefaultLayerTab.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/src/components/system/Info.vue b/src/components/system/Info.vue index 291acd8..ec98dd8 100644 --- a/src/components/system/Info.vue +++ b/src/components/system/Info.vue @@ -54,7 +54,6 @@ diff --git a/src/components/system/Nav.vue b/src/components/system/Nav.vue index 7f2a83e..cbb71b1 100644 --- a/src/components/system/Nav.vue +++ b/src/components/system/Nav.vue @@ -42,8 +42,6 @@ + + diff --git a/src/components/system/Tabs.vue b/src/components/system/Tabs.vue index 884f92a..9b51041 100644 --- a/src/components/system/Tabs.vue +++ b/src/components/system/Tabs.vue @@ -2,7 +2,7 @@
- + @@ -13,25 +13,21 @@