diff options
author | Benjamin Brahmer <info@b-brahmer.de> | 2022-10-08 14:08:55 +0200 |
---|---|---|
committer | Benjamin Brahmer <info@b-brahmer.de> | 2022-10-08 17:29:08 +0200 |
commit | b88e1a546a2ad8fb0cb73855f747d34778a2b1af (patch) | |
tree | 484ea8bd568e8c6c571c745affadc97a15e4a89a /src | |
parent | 64eda2fa61d96bc80fc22b9912c9cbd1ca3c733a (diff) |
New administrator setting for deleting unread items automatically
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/components/AdminSettings.vue | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/components/AdminSettings.vue b/src/components/AdminSettings.vue index 4f7da878e..31626abf0 100644 --- a/src/components/AdminSettings.vue +++ b/src/components/AdminSettings.vue @@ -26,6 +26,13 @@ SPDX-Licence-Identifier: AGPL-3.0-or-later @update:value="update('autoPurgeCount', autoPurgeCount)" /> <p><em>{{ t('news', 'Defines the maximum amount of articles that can be read per feed which will not be deleted by the cleanup job; if old articles reappear after being read, increase this value; negative values such as -1 will turn this feature off.') }}</em></p> + <NcCheckboxRadioSwitch type="switch" + :checked.sync="purgeUnread" + @update:checked="update('purgeUnread', purgeUnread)"> + {{ t('news', 'Delete unread items automatically') }} + </NcCheckboxRadioSwitch> + <p><em>{{ t('news', 'Enable this if you also want to delete unread items. Consider increasing the value above.') }}</em></p> + <NcTextField :value.sync="maxRedirects" :label="t('news', 'Maximum redirects')" :label-visible="true" @@ -90,6 +97,7 @@ export default { useCronUpdates: loadState('news', 'useCronUpdates') === '1', autoPurgeMinimumInterval: loadState('news', 'autoPurgeMinimumInterval'), autoPurgeCount: loadState('news', 'autoPurgeCount'), + purgeUnread: loadState('news', 'purgeUnread') === '1', maxRedirects: loadState('news', 'maxRedirects'), feedFetcherTimeout: loadState('news', 'feedFetcherTimeout'), exploreUrl: loadState('news', 'exploreUrl'), @@ -103,7 +111,7 @@ export default { appId: 'news', key, }) - if (key === 'useCronUpdates') { + if (key === 'useCronUpdates' || key === 'purgeUnread') { value = value ? '1' : '0' } try { |