aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_status/src/services/statusOptionsService.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_status/src/services/statusOptionsService.js')
-rw-r--r--apps/user_status/src/services/statusOptionsService.js36
1 files changed, 36 insertions, 0 deletions
diff --git a/apps/user_status/src/services/statusOptionsService.js b/apps/user_status/src/services/statusOptionsService.js
new file mode 100644
index 00000000000..6c23645e5be
--- /dev/null
+++ b/apps/user_status/src/services/statusOptionsService.js
@@ -0,0 +1,36 @@
+/**
+ * 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: 'busy',
+ label: t('user_status', 'Busy'),
+ }, {
+ 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,
+}