cinny/src/client/state/cons.js

123 lines
3.7 KiB
JavaScript
Raw Normal View History

2021-07-28 16:15:52 +03:00
const cons = {
version: '1.6.0',
2021-07-28 16:15:52 +03:00
secretKey: {
ACCESS_TOKEN: 'cinny_access_token',
DEVICE_ID: 'cinny_device_id',
USER_ID: 'cinny_user_id',
BASE_URL: 'cinny_hs_base_url',
},
DEVICE_DISPLAY_NAME: 'Cinny Web',
2021-09-05 16:26:34 +03:00
'in.cinny.spaces': 'in.cinny.spaces',
tabs: {
HOME: 'home',
DIRECTS: 'dm',
},
supportEventTypes: ['m.room.create', 'm.room.message', 'm.room.encrypted', 'm.room.member', 'm.sticker'],
2021-09-09 15:19:57 +03:00
notifs: {
DEFAULT: 'default',
ALL_MESSAGES: 'all_messages',
MENTIONS_AND_KEYWORDS: 'mentions_and_keywords',
MUTE: 'mute',
},
2021-12-06 06:52:45 +02:00
status: {
PRE_FLIGHT: 'pre-flight',
IN_FLIGHT: 'in-flight',
SUCCESS: 'success',
ERROR: 'error',
},
2021-07-28 16:15:52 +03:00
actions: {
navigation: {
2021-09-05 16:26:34 +03:00
SELECT_TAB: 'SELECT_TAB',
2021-09-03 15:28:01 +03:00
SELECT_SPACE: 'SELECT_SPACE',
2021-07-28 16:15:52 +03:00
SELECT_ROOM: 'SELECT_ROOM',
TOGGLE_PEOPLE_DRAWER: 'TOGGLE_PEOPLE_DRAWER',
OPEN_INVITE_LIST: 'OPEN_INVITE_LIST',
2021-08-31 16:13:31 +03:00
OPEN_PUBLIC_ROOMS: 'OPEN_PUBLIC_ROOMS',
OPEN_CREATE_ROOM: 'OPEN_CREATE_ROOM',
2021-07-28 16:15:52 +03:00
OPEN_INVITE_USER: 'OPEN_INVITE_USER',
OPEN_PROFILE_VIEWER: 'OPEN_PROFILE_VIEWER',
2021-07-28 16:15:52 +03:00
OPEN_SETTINGS: 'OPEN_SETTINGS',
2021-08-14 07:49:29 +03:00
OPEN_EMOJIBOARD: 'OPEN_EMOJIBOARD',
2021-08-16 15:07:29 +03:00
OPEN_READRECEIPTS: 'OPEN_READRECEIPTS',
2021-09-09 15:19:57 +03:00
OPEN_ROOMOPTIONS: 'OPEN_ROOMOPTIONS',
CLICK_REPLY_TO: 'CLICK_REPLY_TO',
OPEN_SEARCH: 'OPEN_SEARCH',
2021-07-28 16:15:52 +03:00
},
room: {
JOIN: 'JOIN',
LEAVE: 'LEAVE',
CREATE: 'CREATE',
2021-09-05 16:26:34 +03:00
CREATE_SPACE_SHORTCUT: 'CREATE_SPACE_SHORTCUT',
DELETE_SPACE_SHORTCUT: 'DELETE_SPACE_SHORTCUT',
2021-07-28 16:15:52 +03:00
error: {
2021-08-08 19:26:34 +03:00
CREATE: 'ERROR_CREATE',
2021-07-28 16:15:52 +03:00
},
},
2021-08-08 19:26:34 +03:00
settings: {
TOGGLE_MARKDOWN: 'TOGGLE_MARKDOWN',
TOGGLE_PEOPLE_DRAWER: 'TOGGLE_PEOPLE_DRAWER',
TOGGLE_MEMBERSHIP_EVENT: 'TOGGLE_MEMBERSHIP_EVENT',
TOGGLE_NICKAVATAR_EVENT: 'TOGGLE_NICKAVATAR_EVENT',
2021-08-08 19:26:34 +03:00
},
2021-07-28 16:15:52 +03:00
},
events: {
navigation: {
2021-09-05 16:26:34 +03:00
TAB_SELECTED: 'TAB_SELECTED',
2021-09-03 15:28:01 +03:00
SPACE_SELECTED: 'SPACE_SELECTED',
2021-07-28 16:15:52 +03:00
ROOM_SELECTED: 'ROOM_SELECTED',
PEOPLE_DRAWER_TOGGLED: 'PEOPLE_DRAWER_TOGGLED',
INVITE_LIST_OPENED: 'INVITE_LIST_OPENED',
2021-08-31 16:13:31 +03:00
PUBLIC_ROOMS_OPENED: 'PUBLIC_ROOMS_OPENED',
CREATE_ROOM_OPENED: 'CREATE_ROOM_OPENED',
2021-07-28 16:15:52 +03:00
INVITE_USER_OPENED: 'INVITE_USER_OPENED',
SETTINGS_OPENED: 'SETTINGS_OPENED',
PROFILE_VIEWER_OPENED: 'PROFILE_VIEWER_OPENED',
2021-08-14 07:49:29 +03:00
EMOJIBOARD_OPENED: 'EMOJIBOARD_OPENED',
2021-08-16 15:07:29 +03:00
READRECEIPTS_OPENED: 'READRECEIPTS_OPENED',
2021-09-09 15:19:57 +03:00
ROOMOPTIONS_OPENED: 'ROOMOPTIONS_OPENED',
REPLY_TO_CLICKED: 'REPLY_TO_CLICKED',
SEARCH_OPENED: 'SEARCH_OPENED',
2021-07-28 16:15:52 +03:00
},
roomList: {
ROOMLIST_UPDATED: 'ROOMLIST_UPDATED',
INVITELIST_UPDATED: 'INVITELIST_UPDATED',
ROOM_JOINED: 'ROOM_JOINED',
ROOM_LEAVED: 'ROOM_LEAVED',
ROOM_CREATED: 'ROOM_CREATED',
2021-09-05 16:26:34 +03:00
SPACE_SHORTCUT_UPDATED: 'SPACE_SHORTCUT_UPDATED',
2021-07-28 16:15:52 +03:00
},
notifications: {
NOTI_CHANGED: 'NOTI_CHANGED',
FULL_READ: 'FULL_READ',
},
2021-07-28 16:15:52 +03:00
roomTimeline: {
READY: 'READY',
2021-07-28 16:15:52 +03:00
EVENT: 'EVENT',
PAGINATED: 'PAGINATED',
TYPING_MEMBERS_UPDATED: 'TYPING_MEMBERS_UPDATED',
LIVE_RECEIPT: 'LIVE_RECEIPT',
MARKED_AS_READ: 'MARKED_AS_READ',
EVENT_REDACTED: 'EVENT_REDACTED',
AT_BOTTOM: 'AT_BOTTOM',
SCROLL_TO_LIVE: 'SCROLL_TO_LIVE',
2021-07-28 16:15:52 +03:00
},
roomsInput: {
MESSAGE_SENT: 'MESSAGE_SENT',
FILE_UPLOADED: 'FILE_UPLOADED',
UPLOAD_PROGRESS_CHANGES: 'UPLOAD_PROGRESS_CHANGES',
FILE_UPLOAD_CANCELED: 'FILE_UPLOAD_CANCELED',
ATTACHMENT_CANCELED: 'ATTACHMENT_CANCELED',
},
2021-08-08 19:26:34 +03:00
settings: {
MARKDOWN_TOGGLED: 'MARKDOWN_TOGGLED',
PEOPLE_DRAWER_TOGGLED: 'PEOPLE_DRAWER_TOGGLED',
MEMBERSHIP_EVENTS_TOGGLED: 'MEMBERSHIP_EVENTS_TOGGLED',
NICKAVATAR_EVENTS_TOGGLED: 'NICKAVATAR_EVENTS_TOGGLED',
2021-08-08 19:26:34 +03:00
},
2021-07-28 16:15:52 +03:00
},
};
Object.freeze(cons);
export default cons;