From 5d3adc23d0e9c2bd1455cbd1bf78318c9a8bcd3c Mon Sep 17 00:00:00 2001 From: Gavin Jaeger-Freeborn Date: Tue, 14 Jan 2025 09:46:28 -0800 Subject: [PATCH 1/6] Beginning of migrating from vuex to pinia Signed-off-by: Gavin Jaeger-Freeborn --- src/App.vue | 5 +- src/components/contact/ContactForm.vue | 13 +- src/components/entity/CredentialItem.vue | 4 +- src/components/entity/EntityResult.vue | 911 ++++++++---------- .../credentialDetail/CredentialDetail.vue | 15 +- .../entity/filter/EntityFilterChips.vue | 5 +- .../entity/filter/EntityFilterDialog.vue | 5 +- src/components/layout/footer/Feedback.vue | 6 +- src/components/search/SearchBar.vue | 5 +- .../search/filter/SearchFilterDialog.vue | 4 +- src/main.ts | 5 + src/store/index.ts | 14 - src/store/modules/app.ts | 35 - src/store/modules/contact.ts | 45 - src/store/modules/credential-detail.ts | 62 -- src/store/modules/entity.ts | 2 + src/store/modules/topic.ts | 93 -- src/views/About.vue | 6 +- src/views/Contact.vue | 5 +- src/views/Search.vue | 7 +- 20 files changed, 485 insertions(+), 762 deletions(-) delete mode 100644 src/store/modules/app.ts delete mode 100644 src/store/modules/contact.ts delete mode 100644 src/store/modules/credential-detail.ts delete mode 100644 src/store/modules/topic.ts diff --git a/src/App.vue b/src/App.vue index e3ec333..206096a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -14,7 +14,8 @@ import { Component, Vue } from "vue-property-decorator"; import Header from "@/components/layout/header/Header.vue"; import Footer from "@/components/layout/footer/Footer.vue"; import Loading from "@/components/shared/Loading.vue"; -import { mapGetters } from "vuex"; +import { useAppState } from "@/stores/app" +import { mapState } from "pinia"; @Component({ components: { @@ -23,7 +24,7 @@ import { mapGetters } from "vuex"; Loading, }, computed: { - ...mapGetters(["loading"]), + ...mapState(useAppState, {loading: "getLoading"}), }, }) export default class App extends Vue {} diff --git a/src/components/contact/ContactForm.vue b/src/components/contact/ContactForm.vue index c359a1a..7839d85 100644 --- a/src/components/contact/ContactForm.vue +++ b/src/components/contact/ContactForm.vue @@ -122,10 +122,13 @@ diff --git a/src/components/entity/credentialDetail/CredentialDetail.vue b/src/components/entity/credentialDetail/CredentialDetail.vue index d2de6dd..6d928c2 100644 --- a/src/components/entity/credentialDetail/CredentialDetail.vue +++ b/src/components/entity/credentialDetail/CredentialDetail.vue @@ -121,6 +121,8 @@ diff --git a/src/components/layout/footer/Feedback.vue b/src/components/layout/footer/Feedback.vue index 4614d24..9207452 100644 --- a/src/components/layout/footer/Feedback.vue +++ b/src/components/layout/footer/Feedback.vue @@ -42,9 +42,10 @@ diff --git a/src/components/entity/filter/EntityFilterFacetPanels.vue b/src/components/entity/filter/EntityFilterFacetPanels.vue index c80b437..51589ab 100644 --- a/src/components/entity/filter/EntityFilterFacetPanels.vue +++ b/src/components/entity/filter/EntityFilterFacetPanels.vue @@ -236,6 +236,8 @@