aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_status/src/services/statusOptionsService.js
blob: 7280e58ec75af0ce376880999933f0cf833a82f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
 * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

import { translate as t } from '@nextcloud/l10n'

/**
 * Returns a list of all user-definable statuses
 *
 * @return {object[]}
 */
const getAllStatusOptions = () => {
	return [{
		type: 'online',
		label: t('user_status', 'Online'),
	}, {
		type: 'away',
		label: t('user_status', 'Away'),
	}, {
		type: 'dnd',
		label: t('user_status', 'Do not disturb'),
		subline: t('user_status', 'Mute all notifications'),
	}, {
		type: 'invisible',
		label: t('user_status', 'Invisible'),
		subline: t('user_status', 'Appear offline'),
	}]
}

export {
	getAllStatusOptions,
}