2018-06-12 11:23:00 +03:00
|
|
|
/*
|
|
|
|
* @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
|
|
|
|
*
|
|
|
|
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
|
|
|
*
|
|
|
|
* @license GNU AGPL version 3 or any later version
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as
|
|
|
|
* published by the Free Software Foundation, either version 3 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
2018-10-01 08:03:23 +03:00
|
|
|
import "@babel/polyfill";
|
2018-06-12 11:23:00 +03:00
|
|
|
|
2018-03-09 19:46:34 +03:00
|
|
|
import Vue from 'vue';
|
|
|
|
import { sync } from 'vuex-router-sync';
|
|
|
|
import App from './App.vue';
|
|
|
|
import router from './router';
|
|
|
|
import store from './store';
|
|
|
|
|
|
|
|
sync(store, router);
|
|
|
|
|
2018-10-01 08:03:23 +03:00
|
|
|
// CSP config for webpack dynamic chunk loading
|
|
|
|
// eslint-disable-next-line
|
|
|
|
__webpack_nonce__ = btoa(OC.requestToken)
|
|
|
|
|
|
|
|
// Correct the root of the app for chunk loading
|
|
|
|
// OC.linkTo matches the apps folders
|
|
|
|
// OC.generateUrl ensure the index.php (or not)
|
|
|
|
// eslint-disable-next-line
|
2018-10-01 08:58:12 +03:00
|
|
|
__webpack_public_path__ = OC.linkTo('settings', 'js/')
|
2018-10-01 08:03:23 +03:00
|
|
|
|
2018-03-09 19:46:34 +03:00
|
|
|
// bind to window
|
|
|
|
Vue.prototype.t = t;
|
|
|
|
Vue.prototype.OC = OC;
|
2018-06-19 12:16:36 +03:00
|
|
|
Vue.prototype.OCA = OCA;
|
2018-03-09 19:46:34 +03:00
|
|
|
Vue.prototype.oc_userconfig = oc_userconfig;
|
2018-05-24 12:29:48 +03:00
|
|
|
Vue.prototype.oc_current_user = oc_current_user;
|
2018-03-09 19:46:34 +03:00
|
|
|
|
2018-04-14 11:34:40 +03:00
|
|
|
const app = new Vue({
|
2018-04-09 12:03:21 +03:00
|
|
|
router,
|
|
|
|
store,
|
|
|
|
render: h => h(App)
|
2018-03-09 19:46:34 +03:00
|
|
|
}).$mount('#content');
|
|
|
|
|
|
|
|
export { app, router, store };
|