diff options
Diffstat (limited to 'apps/weather_status/src/weather-status.js')
-rw-r--r-- | apps/weather_status/src/weather-status.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/apps/weather_status/src/weather-status.js b/apps/weather_status/src/weather-status.js new file mode 100644 index 00000000000..0e7c5690b90 --- /dev/null +++ b/apps/weather_status/src/weather-status.js @@ -0,0 +1,28 @@ +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) + }) +}) |