2018-08-26 09:35:53 +00: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/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
import Vue from 'vue'
|
2018-10-26 08:33:27 +00:00
|
|
|
import { sync } from 'vuex-router-sync'
|
2018-08-26 09:35:53 +00:00
|
|
|
|
2018-10-23 13:38:03 +00:00
|
|
|
import App from './App'
|
2018-10-26 08:33:27 +00:00
|
|
|
import store from './store'
|
|
|
|
import router from './router'
|
2018-11-16 11:23:07 +00:00
|
|
|
import vuetwemoji from 'vue-twemoji'
|
2018-11-21 17:27:15 +00:00
|
|
|
import contenteditableDirective from 'vue-contenteditable-directive'
|
2019-01-10 18:42:05 +00:00
|
|
|
import ClickOutside from 'vue-click-outside'
|
2019-02-26 20:10:12 +00:00
|
|
|
import VTooltip from 'nextcloud-vue/dist/Directives/Tooltip'
|
2019-07-19 11:21:20 +00:00
|
|
|
import VueMasonry from 'vue-masonry-css'
|
2019-02-06 11:42:43 +00:00
|
|
|
|
2018-10-26 08:33:27 +00:00
|
|
|
sync(store, router)
|
2018-10-23 13:38:03 +00:00
|
|
|
|
|
|
|
// CSP config for webpack dynamic chunk loading
|
|
|
|
// eslint-disable-next-line
|
|
|
|
__webpack_nonce__ = btoa(OC.requestToken)
|
2018-10-10 07:46:26 +00:00
|
|
|
|
2018-10-23 13:38:03 +00:00
|
|
|
// Correct the root of the app for chunk loading
|
|
|
|
// OC.linkTo matches the apps folders
|
|
|
|
// eslint-disable-next-line
|
|
|
|
__webpack_public_path__ = OC.linkTo('social', 'js/')
|
2018-10-10 07:46:26 +00:00
|
|
|
|
2018-08-26 09:35:53 +00:00
|
|
|
Vue.prototype.t = t
|
|
|
|
Vue.prototype.n = n
|
|
|
|
Vue.prototype.OC = OC
|
|
|
|
Vue.prototype.OCA = OCA
|
|
|
|
|
2019-01-10 18:42:05 +00:00
|
|
|
Vue.directive('ClickOutside', ClickOutside)
|
2019-03-01 12:59:35 +00:00
|
|
|
Vue.directive('Tooltip', VTooltip)
|
2018-11-21 17:27:15 +00:00
|
|
|
Vue.use(contenteditableDirective)
|
2018-11-16 11:23:07 +00:00
|
|
|
Vue.use(vuetwemoji, {
|
2018-11-21 12:13:21 +00:00
|
|
|
baseUrl: OC.linkTo('social', 'img/'), // can set to local folder of emojis. default: https://twemoji.maxcdn.com/
|
|
|
|
extension: '.svg', // .svg, .png
|
|
|
|
className: 'emoji', // custom className for image output
|
|
|
|
size: 'twemoji' // image size
|
2018-11-16 11:23:07 +00:00
|
|
|
})
|
2019-07-20 16:34:02 +00:00
|
|
|
Vue.use(VueMasonry)
|
2018-11-16 11:23:07 +00:00
|
|
|
|
2018-08-26 09:35:53 +00:00
|
|
|
/* eslint-disable-next-line no-new */
|
|
|
|
new Vue({
|
2018-10-23 13:38:03 +00:00
|
|
|
router: router,
|
|
|
|
render: h => h(App),
|
2018-10-26 08:33:27 +00:00
|
|
|
store: store
|
2018-10-23 13:38:03 +00:00
|
|
|
}).$mount('#vue-content')
|