repod/src/main.js

28 lines
707 B
JavaScript
Raw Normal View History

2023-07-03 15:30:09 +00:00
import { translate, translatePlural } from '@nextcloud/l10n'
2023-06-23 07:44:48 +00:00
import App from './App.vue'
2023-07-02 16:30:42 +00:00
import Vue from 'vue'
import { generateFilePath } from '@nextcloud/router'
import router from './router.js'
2023-08-28 22:47:22 +00:00
import store from './store/main.js'
2023-06-22 18:10:30 +00:00
// eslint-disable-next-line
__webpack_public_path__ = generateFilePath(appName, '', 'js/')
2023-07-03 15:30:09 +00:00
const t = (...args) => translate('repod', ...args)
const n = (...args) => translatePlural('repod', ...args)
2023-06-22 18:10:30 +00:00
Vue.mixin({ methods: { t, n } })
2023-07-07 16:38:53 +00:00
2023-12-23 20:36:20 +00:00
Vue.filter('stripHTML', (value) => {
const div = document.createElement('div')
div.innerHTML = value
return div.textContent || div.innerText || ''
})
2023-06-22 18:10:30 +00:00
export default new Vue({
el: '#content',
2023-07-02 16:30:42 +00:00
router,
2023-07-07 16:38:53 +00:00
store,
2023-06-22 18:10:30 +00:00
render: h => h(App),
})