From eb2a5b43ece4a3f5187a9fa7eb53122484dd19f0 Mon Sep 17 00:00:00 2001 From: Christian Wolf Date: Thu, 31 Aug 2023 15:16:21 +0200 Subject: [PATCH] Register initial state library Signed-off-by: Christian Wolf --- package-lock.json | 1 + package.json | 1 + src/main.js | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/package-lock.json b/package-lock.json index 729daa32..0209ac97 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,6 +30,7 @@ }, "devDependencies": { "@nextcloud/browserslist-config": "^3.0.0", + "@nextcloud/initial-state": "^2.1.0", "@nextcloud/stylelint-config": "^2.1.2", "@nextcloud/webpack-vue-config": "^6.0.0", "check-peer-dependencies": "^4.1.0", diff --git a/package.json b/package.json index 3ed76b2d..ee941f07 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "dependencies": { "@nextcloud/axios": "^2.0.0", "@nextcloud/event-bus": "^3.1.0", + "@nextcloud/initial-state": "^2.1.0", "@nextcloud/moment": "^1.1.1", "@nextcloud/router": "^2.0.0", "@nextcloud/vue": "^7.1.0", diff --git a/src/main.js b/src/main.js index 6dd3123f..7a76d537 100644 --- a/src/main.js +++ b/src/main.js @@ -15,11 +15,16 @@ import * as ModalDialogs from "vue-modal-dialogs" import helpers from "cookbook/js/helper" import setupLogging from "cookbook/js/logging" +// eslint-disable-next-line no-unused-vars +import {loadState} from '@nextcloud/initial-state' import router from "./router" import store from "./store" import AppMain from "./components/AppMain.vue" +// Initialize the configuration +// store.commit('setConfig', { config: loadState('cookbook', 'config', {})}) + // eslint-disable-next-line camelcase,no-undef if (__webpack_use_dev_server__ || false) { // eslint-disable-next-line camelcase,no-undef