2018-08-26 09:35:53 +00:00
|
|
|
/**
|
|
|
|
* @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
|
|
|
|
*
|
|
|
|
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
|
|
|
*
|
2023-01-16 09:14:51 +00:00
|
|
|
* @license AGPL-3.0-or-later
|
2018-08-26 09:35:53 +00:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
2019-09-09 14:16:40 +00:00
|
|
|
import App from './App.vue'
|
2022-10-27 13:07:12 +00:00
|
|
|
import store from './store/index.js'
|
|
|
|
import router from './router.js'
|
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'
|
2022-10-27 13:07:12 +00:00
|
|
|
import VTooltip from '@nextcloud/vue/dist/Directives/Tooltip.js'
|
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
|
2022-10-27 13:07:12 +00:00
|
|
|
size: 'twemoji', // image size
|
2018-11-16 11:23:07 +00:00
|
|
|
})
|
|
|
|
|
2018-08-26 09:35:53 +00:00
|
|
|
/* eslint-disable-next-line no-new */
|
|
|
|
new Vue({
|
2022-10-27 13:07:12 +00:00
|
|
|
router,
|
2018-10-23 13:38:03 +00:00
|
|
|
render: h => h(App),
|
2022-10-27 13:07:12 +00:00
|
|
|
store,
|
2020-09-01 22:54:44 +00:00
|
|
|
}).$mount('#content')
|