diff --git a/.vercelignore b/.vercelignore new file mode 100644 index 0000000..412392d --- /dev/null +++ b/.vercelignore @@ -0,0 +1,2 @@ +*.md +.gitignore diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..a25cb58 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Shane B. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 029b656..1d5cde5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Wormroller (To be renamed maybe?) -This is a simple app built with Vue on Vite to help plan rolling off wormholes in Eve Online. +The repo for http://wormroller.dotlag.info. + +This is just a calculator built on Vue to help simplify the process of rolling wormholes in Eve Online. ## Documentation diff --git a/package-lock.json b/package-lock.json index f284104..46fa957 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "@fortawesome/vue-fontawesome": "^3.0.3", "@vueuse/core": "^10.3.0", "pinia": "^2.1.4", + "pinia-plugin-persistedstate": "^3.2.0", "vue": "^3.3.4", "vuedraggable": "^4.1.0" }, @@ -1449,6 +1450,14 @@ } } }, + "node_modules/pinia-plugin-persistedstate": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/pinia-plugin-persistedstate/-/pinia-plugin-persistedstate-3.2.0.tgz", + "integrity": "sha512-tZbNGf2vjAQcIm7alK40sE51Qu/m9oWr+rEgNm/2AWr1huFxj72CjvpQcIQzMknDBJEkQznCLAGtJTIcLKrKdw==", + "peerDependencies": { + "pinia": "^2.0.0" + } + }, "node_modules/pinia/node_modules/vue-demi": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.5.tgz", diff --git a/package.json b/package.json index 29ecdee..2f4bf92 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "@fortawesome/vue-fontawesome": "^3.0.3", "@vueuse/core": "^10.3.0", "pinia": "^2.1.4", + "pinia-plugin-persistedstate": "^3.2.0", "vue": "^3.3.4", "vuedraggable": "^4.1.0" }, diff --git a/src/App.vue b/src/App.vue index cbc5a8c..d597bce 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,33 +1,34 @@ + + diff --git a/src/components/Ship.vue b/src/components/Ship.vue index 09028cc..623766a 100644 --- a/src/components/Ship.vue +++ b/src/components/Ship.vue @@ -3,8 +3,10 @@ import ColorPicker from "./ColorPicker.vue"; import Toggle from "./Toggle.vue"; import { useSolverStore } from "../stores/solver"; +import { useShipStore } from "../stores/ship"; const store = useSolverStore(); +const { updateShipProperty } = useShipStore(); const { useTons = false, @@ -15,17 +17,13 @@ const { useTons: Boolean, ship: Object, }); -defineEmits(["change:ship", "change:shipIdx", "delete:ship", "copy:ship"]); - -const updateShipProperty = (key, val) => { - let updatedShip = ship; - if (["hot", "cold"].includes(key)) { - updatedShip[key] = val * (useTons ? 1 : 1000); - } else { - updatedShip[key] = val; - } - return updatedShip; -}; +defineEmits([ + "change:ship", + "change:shipIdx", + "delete:ship", + "copy:ship", + "save:ship", +]);