You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nextcloud/apps/weather_status/src/weather-status.js

29 lines
663 B
JavaScript

import Vue from 'vue'
import { getRequestToken } from '@nextcloud/auth'
import { generateUrl } from '@nextcloud/router'
import App from './App'
// eslint-disable-next-line camelcase
__webpack_nonce__ = btoa(getRequestToken())
// Correct the root of the app for chunk loading
// eslint-disable-next-line
__webpack_public_path__ = generateUrl('/apps/weather_status/js/')
Vue.prototype.t = t
document.addEventListener('DOMContentLoaded', function() {
if (!OCA.Dashboard) {
return
}
OCA.Dashboard.registerStatus('weather', (el) => {
const Dashboard = Vue.extend(App)
return new Dashboard({
propsData: {
inline: true,
},
}).$mount(el)
})
})