diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2021-06-28 13:04:34 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2021-07-01 10:56:33 +0200 |
commit | ee443f249edd2a7f8506b98ade7e58eacfed5def (patch) | |
tree | 3c1233c2ae440d785b59bad3863408e97d01efaf /src/models/constants.ts | |
parent | 8bbc0c2d3bc40122297b19665cf1df3ff3670e1f (diff) |
Approve request from contacts UI
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'src/models/constants.ts')
-rw-r--r-- | src/models/constants.ts | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/models/constants.ts b/src/models/constants.ts index 9b7e83aa..b7a9b7f5 100644 --- a/src/models/constants.ts +++ b/src/models/constants.ts @@ -28,6 +28,7 @@ interface OC extends Nextcloud.Common.OC { } declare const OC: OC +export type DefaultGroup = string export type CircleConfig = number export type MemberLevel = number export type MemberType = number @@ -35,10 +36,10 @@ export type MemberType = number // Global sizes export const LIST_SIZE = 60 -// Dynamic groups -export const GROUP_ALL_CONTACTS = t('contacts', 'All contacts') -export const GROUP_NO_GROUP_CONTACTS = t('contacts', 'Not grouped') -export const GROUP_RECENTLY_CONTACTED = t('contactsinteraction', 'Recently contacted') +// Dynamic default groups +export const GROUP_ALL_CONTACTS: DefaultGroup = t('contacts', 'All contacts') +export const GROUP_NO_GROUP_CONTACTS: DefaultGroup = t('contacts', 'Not grouped') +export const GROUP_RECENTLY_CONTACTED: DefaultGroup = t('contactsinteraction', 'Recently contacted') // Circle route, see vue-router conf export const ROUTE_CIRCLE = 'circle' @@ -78,6 +79,7 @@ const CIRCLE_CONFIG_ROOT: CircleConfig = 4096 // Circle cannot be inside anot const CIRCLE_CONFIG_CIRCLE_INVITE: CircleConfig = 8192 // Circle must confirm when invited in another circle const CIRCLE_CONFIG_FEDERATED: CircleConfig = 16384 // Federated +// Existing members types export const CIRCLES_MEMBER_TYPES = { [MEMBER_TYPE_CIRCLE]: t('circles', 'Circle'), [MEMBER_TYPE_USER]: t('circles', 'User'), @@ -86,14 +88,16 @@ export const CIRCLES_MEMBER_TYPES = { [MEMBER_TYPE_CONTACT]: t('circles', 'Contact'), } +// Available circles promote/demote levels export const CIRCLES_MEMBER_LEVELS = { - [MEMBER_LEVEL_NONE]: t('circles', 'Pending'), + // [MEMBER_LEVEL_NONE]: t('circles', 'Pending'), [MEMBER_LEVEL_MEMBER]: t('circles', 'Member'), [MEMBER_LEVEL_MODERATOR]: t('circles', 'Moderator'), [MEMBER_LEVEL_ADMIN]: t('circles', 'Admin'), [MEMBER_LEVEL_OWNER]: t('circles', 'Owner'), } +// Available circle configs in the circle details view export const PUBLIC_CIRCLE_CONFIG = { [t('contacts', 'Invites')]: { [CIRCLE_CONFIG_OPEN]: t('contacts', 'Anyone can request membership'), @@ -205,3 +209,8 @@ export enum CircleConfigs { CIRCLE_INVITE = CIRCLE_CONFIG_CIRCLE_INVITE, FEDERATED = CIRCLE_CONFIG_FEDERATED, } + +export enum MemberStatus { + INVITED = 'invited', + REQUESTING = 'Requesting', +} |