aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/src/constants/ProfileConstants.js
blob: 896adce8708a948dc1c0ee4c304d596b3706308b (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: 2021 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

/*
 * SYNC to be kept in sync with `core/Db/ProfileConfig.php`
 */

/** Enum of profile visibility constants */
export const VISIBILITY_ENUM = Object.freeze({
	SHOW: 'show',
	SHOW_USERS_ONLY: 'show_users_only',
	HIDE: 'hide',
})

/**
 * Enum of profile visibility constants to properties
 */
export const VISIBILITY_PROPERTY_ENUM = Object.freeze({
	[VISIBILITY_ENUM.SHOW]: {
		name: VISIBILITY_ENUM.SHOW,
		label: t('settings', 'Show to everyone'),
	},
	[VISIBILITY_ENUM.SHOW_USERS_ONLY]: {
		name: VISIBILITY_ENUM.SHOW_USERS_ONLY,
		label: t('settings', 'Show to logged in accounts only'),
	},
	[VISIBILITY_ENUM.HIDE]: {
		name: VISIBILITY_ENUM.HIDE,
		label: t('settings', 'Hide'),
	},
})