summaryrefslogtreecommitdiffstats
path: root/apps/settings
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-09-07 14:03:48 +0200
committerCarl Schwan <carl@carlschwan.eu>2022-09-08 14:13:42 +0200
commit0b776073626e0ad2414883a89f4caeb9ae86af56 (patch)
tree0cb43ca40fb5e4bfba1568135bceff266f0d962b /apps/settings
parent58706dd5aa12ac5bbd0364e34fe07834a985bb99 (diff)
downloadnextcloud-server-0b776073626e0ad2414883a89f4caeb9ae86af56.tar.gz
nextcloud-server-0b776073626e0ad2414883a89f4caeb9ae86af56.zip
Use NoteCard component in BackgroundJob settings
Fix #33880 Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/settings')
-rw-r--r--apps/settings/src/components/BasicSettings/BackgroundJob.vue26
1 files changed, 14 insertions, 12 deletions
diff --git a/apps/settings/src/components/BasicSettings/BackgroundJob.vue b/apps/settings/src/components/BasicSettings/BackgroundJob.vue
index 3b3c0c08342..678251e5f15 100644
--- a/apps/settings/src/components/BasicSettings/BackgroundJob.vue
+++ b/apps/settings/src/components/BasicSettings/BackgroundJob.vue
@@ -25,26 +25,26 @@
:description="t('settings', 'For the server to work properly, it\'s important to configure background jobs correctly. Cron is the recommended setting. Please see the documentation for more information.')"
:doc-url="backgroundJobsDocUrl">
<template v-if="lastCron !== 0">
- <span v-if="oldExecution" class="error">
+ <NcNoteCard v-if="oldExecution" type="error">
{{ t('settings', 'Last job execution ran {time}. Something seems wrong.', {time: relativeTime}) }}
- </span>
+ </NcNoteCard>
- <span v-else-if="longExecutionNotCron" class="warning">
+ <NcNoteCard v-else-if="longExecutionNotCron" type="warning">
{{ t('settings', "Some jobs have not been executed since {maxAgeRelativeTime}. Please consider increasing the execution frequency.", {maxAgeRelativeTime}) }}
- </span>
+ </NcNoteCard>
- <span v-else-if="longExecutionCron" class="warning">
+ <NcNoteCard v-else-if="longExecutionCron" type="warning">
{{ t('settings', "Some jobs have not been executed since {maxAgeRelativeTime}. Please consider switching to system cron.", {maxAgeRelativeTime}) }}
- </span>
+ </NcNoteCard>
- <span v-else>
+ <NcNoteCard v-else type="success">
{{ t('settings', 'Last job ran {relativeTime}.', {relativeTime}) }}
- </span>
+ </NcNoteCard>
</template>
- <span v-else class="error">
+ <NcNoteCard v-else type="error">
{{ t('settings', 'Background job did not run yet!') }}
- </span>
+ </NcNoteCard>
<NcCheckboxRadioSwitch type="radio"
:checked.sync="backgroundJobsMode"
@@ -86,8 +86,9 @@
<script>
import { loadState } from '@nextcloud/initial-state'
import { showError } from '@nextcloud/dialogs'
-import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch'
-import NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection'
+import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'
+import NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection.js'
+import NcNoteCard from '@nextcloud/vue/dist/Components/NcNoteCard.js'
import moment from '@nextcloud/moment'
import axios from '@nextcloud/axios'
import { generateOcsUrl } from '@nextcloud/router'
@@ -106,6 +107,7 @@ export default {
components: {
NcCheckboxRadioSwitch,
NcSettingsSection,
+ NcNoteCard,
},
data() {