From 5bc0c29ea0ff35d8cf690ab3061cb915f4a98519 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Thu, 24 Mar 2022 17:25:23 +0100 Subject: [PATCH] Update store to v4 --- .../EditContentBlockWizard.vue | 102 +++++++++--------- client/src/main.js | 16 +-- client/src/router/index.js | 2 +- client/src/store/index.js | 8 +- 4 files changed, 64 insertions(+), 64 deletions(-) diff --git a/client/src/components/content-block-form/EditContentBlockWizard.vue b/client/src/components/content-block-form/EditContentBlockWizard.vue index 26ed1b82..2549b675 100644 --- a/client/src/components/content-block-form/EditContentBlockWizard.vue +++ b/client/src/components/content-block-form/EditContentBlockWizard.vue @@ -1,75 +1,77 @@ diff --git a/client/src/main.js b/client/src/main.js index 817a23b9..0380d6eb 100644 --- a/client/src/main.js +++ b/client/src/main.js @@ -1,10 +1,10 @@ import '@babel/polyfill'; -import {createApp} from 'vue'; +import {createApp, configureCompat } from 'vue'; import VueVimeoPlayer from 'vue-vimeo-player'; import apolloClientFactory from './graphql/client'; import App from './App.vue'; -import { postLoginRedirectUrlKey, router } from './router'; -import store from '@/store/index'; +import {postLoginRedirectUrlKey, router} from './router'; +import { store } from '@/store'; import VueScrollTo from 'vue-scrollto'; import autoGrow from '@/directives/auto-grow'; import clickOutside from '@/directives/click-outside'; @@ -27,13 +27,13 @@ const apolloProvider = createApolloProvider({ defaultClient: privateApolloClient, }); -const app = createApp({ - store, - router, - apolloProvider, - render: h => h(App), +configureCompat({ + MODE: 2 }); +const app = createApp(App); + +app.use(store); const isProduction = process.env.NODE_ENV === 'production'; diff --git a/client/src/router/index.js b/client/src/router/index.js index f5013956..ddb1bbcc 100644 --- a/client/src/router/index.js +++ b/client/src/router/index.js @@ -7,7 +7,7 @@ import meRoutes from './me.routes'; import authRoutes from './auth.routes'; import roomRoutes from './room.routes'; -import store from '@/store/index'; +import {store} from '@/store'; import {LAYOUT_SIMPLE} from '@/router/core.constants'; import {EMAIL_NOT_VERIFIED_STATE, NO_VALID_LICENSE_STATE, SUCCESS_STATE} from './oauth.names'; diff --git a/client/src/store/index.js b/client/src/store/index.js index 293ac9d8..39f4848a 100644 --- a/client/src/store/index.js +++ b/client/src/store/index.js @@ -1,10 +1,8 @@ -import Vue from 'vue'; -import Vuex from 'vuex'; - -Vue.use(Vuex); +import {createStore} from 'vuex'; // WARNING fixme todo: please do not use this anymore, use the local GraphQL cache -export default new Vuex.Store({ +// export default new Vuex.Store({ +export const store = createStore({ modules: {}, state: {