Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Ambrosini <marcoambrosini@pm.me>2019-09-17 19:16:26 +0300
committerMarco Ambrosini <marcoambrosini@pm.me>2019-10-09 11:50:29 +0300
commit88f8554384b8ef655af6b7c579fccfb3ed9dc3da (patch)
tree1f8c7d4424a62e4c82f330204c4c82554a2072a4 /src/main.js
parentb31c1044f497711c024018ecde84258ad1488a03 (diff)
Create Vuex store
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
Diffstat (limited to 'src/main.js')
-rw-r--r--src/main.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main.js b/src/main.js
index 758ab937d..5aab72807 100644
--- a/src/main.js
+++ b/src/main.js
@@ -21,15 +21,32 @@
*/
import Vue from 'vue'
import App from './App'
+import Vuex from 'vuex'
import contenteditableDirective from 'vue-contenteditable-directive'
+import store from './store'
+import { generateFilePath } from 'nextcloud-router'
+import { getRequestToken } from 'nextcloud-auth'
+
+// CSP config for webpack dynamic chunk loading
+// eslint-disable-next-line
+__webpack_nonce__ = btoa(getRequestToken())
+
+// Correct the root of the app for chunk loading
+// OC.linkTo matches the apps folders
+// OC.generateUrl ensure the index.php (or not)
+// We do not want the index.php since we're loading files
+// eslint-disable-next-line
+__webpack_public_path__ = generateFilePath('spreed', '', 'js/')
Vue.prototype.t = t
Vue.prototype.n = n
Vue.prototype.OC = OC
Vue.prototype.OCA = OCA
Vue.use(contenteditableDirective)
+Vue.use(Vuex)
export default new Vue({
el: '#content',
+ store,
render: h => h(App)
})