nextcloud/apps/user_status/src/services/clearAtOptionsService.js
Grigorii K. Shartsev fb44adc365 refactor(user_status): prepare for Vue 3 migration
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
2025-11-26 14:05:37 +01:00

52 lines
851 B
JavaScript

/**
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import { t } from '@nextcloud/l10n'
/**
* Returns an array
*
* @return {object[]}
*/
function getAllClearAtOptions() {
return [{
label: t('user_status', 'Don\'t clear'),
clearAt: null,
}, {
label: t('user_status', '30 minutes'),
clearAt: {
type: 'period',
time: 1800,
},
}, {
label: t('user_status', '1 hour'),
clearAt: {
type: 'period',
time: 3600,
},
}, {
label: t('user_status', '4 hours'),
clearAt: {
type: 'period',
time: 14400,
},
}, {
label: t('user_status', 'Today'),
clearAt: {
type: 'end-of',
time: 'day',
},
}, {
label: t('user_status', 'This week'),
clearAt: {
type: 'end-of',
time: 'week',
},
}]
}
export {
getAllClearAtOptions,
}