diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main-cron-warning.js | 11 | ||||
-rw-r--r-- | src/main.js | 9 |
2 files changed, 12 insertions, 8 deletions
diff --git a/src/main-cron-warning.js b/src/main-cron-warning.js new file mode 100644 index 000000000..298fa3b61 --- /dev/null +++ b/src/main-cron-warning.js @@ -0,0 +1,11 @@ +// Send error to Vuex State for displaying in Vue Application +window.store.commit('SET_ERROR', { + toString: () => t('news', 'Ajax or webcron mode detected! Your feeds will not be updated!'), + links: [{ + url: 'https://docs.nextcloud.org/server/latest/admin_manual/configuration_server/background_jobs_configuration.html#cron', + text: t('news', 'How to set up the operating system cron'), + }, { + url: 'https://github.com/nextcloud/news-updater', + text: t('news', 'Install and set up a faster parallel updater that uses the News app\'s update API'), + }], +}) diff --git a/src/main.js b/src/main.js index c7314d17b..97e48b442 100644 --- a/src/main.js +++ b/src/main.js @@ -45,12 +45,5 @@ export default new Vue({ render: (h) => h(App), }) -/** - * Closes warning messages generated by PHP code - */ -function closeCronWarning() { - document.getElementById('cron-warning').style.display = 'none' -} -// document.getElementById('close-cron-warning').onclick = closeCronWarning - +// Make store accessible for setting cron warning (also for plugins in the future) window.store = store |