summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDevlin Junker <devlin.junker@gmail.com>2023-10-16 13:48:01 -0700
committerBenjamin Brahmer <info@b-brahmer.de>2023-10-19 08:26:39 +0200
commit94f04d4a20cbbadb7d8ad835bc7ae3dc1c4256fd (patch)
treea425fe5ec79ea6c168d3c3d99398fc6714d823e0 /src
parent9cab23574fbaf59c07dc3f187f0490f298dd9e75 (diff)
cleanup old cron stuff and make cron-warning.js part of build so it can be committed
Signed-off-by: Devlin Junker <devlin.junker@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/main-cron-warning.js11
-rw-r--r--src/main.js9
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