mattermost-redux
Version:
Common code (API client, Redux stores, logic, utility functions) for building a Mattermost client
215 lines (214 loc) • 8.64 kB
JavaScript
"use strict";
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
Object.defineProperty(exports, "__esModule", { value: true });
const Preferences = {
APP_BAR: 'app_bar',
CATEGORY_CHANNEL_OPEN_TIME: 'channel_open_time',
CATEGORY_CHANNEL_APPROXIMATE_VIEW_TIME: 'channel_approximate_view_time',
CATEGORY_DIRECT_CHANNEL_SHOW: 'direct_channel_show',
CATEGORY_GROUP_CHANNEL_SHOW: 'group_channel_show',
CATEGORY_FLAGGED_POST: 'flagged_post',
CATEGORY_AUTO_RESET_MANUAL_STATUS: 'auto_reset_manual_status',
CATEGORY_NOTIFICATIONS: 'notifications',
COLLAPSED_REPLY_THREADS: 'collapsed_reply_threads',
COLLAPSED_REPLY_THREADS_OFF: 'off',
COLLAPSED_REPLY_THREADS_ON: 'on',
COLLAPSED_REPLY_THREADS_FALLBACK_DEFAULT: 'off',
COMMENTS: 'comments',
COMMENTS_ANY: 'any',
COMMENTS_ROOT: 'root',
COMMENTS_NEVER: 'never',
EMAIL: 'email',
EMAIL_INTERVAL: 'email_interval',
INTERVAL_FIFTEEN_MINUTES: 15 * 60,
INTERVAL_HOUR: 60 * 60,
INTERVAL_IMMEDIATE: 30,
// "immediate" is a 30 second interval
INTERVAL_NEVER: 0,
INTERVAL_NOT_SET: -1,
CATEGORY_DISPLAY_SETTINGS: 'display_settings',
NAME_NAME_FORMAT: 'name_format',
DISPLAY_PREFER_NICKNAME: 'nickname_full_name',
DISPLAY_PREFER_FULL_NAME: 'full_name',
DISPLAY_PREFER_USERNAME: 'username',
MENTION_KEYS: 'mention_keys',
USE_MILITARY_TIME: 'use_military_time',
CATEGORY_CUSTOM_STATUS: 'custom_status',
NAME_CUSTOM_STATUS_TUTORIAL_STATE: 'custom_status_tutorial_state',
NAME_RECENT_CUSTOM_STATUSES: 'recent_custom_statuses',
CUSTOM_STATUS_MODAL_VIEWED: 'custom_status_modal_viewed',
CATEGORY_SIDEBAR_SETTINGS: 'sidebar_settings',
CHANNEL_SIDEBAR_ORGANIZATION: 'channel_sidebar_organization',
LIMIT_VISIBLE_DMS_GMS: 'limit_visible_dms_gms',
SHOW_UNREAD_SECTION: 'show_unread_section',
CATEGORY_ADVANCED_SETTINGS: 'advanced_settings',
ADVANCED_FILTER_JOIN_LEAVE: 'join_leave',
RENDER_EMOTICONS_AS_EMOJI: 'render_emoticons_as_emoji',
ADVANCED_CODE_BLOCK_ON_CTRL_ENTER: 'code_block_ctrl_enter',
ADVANCED_SEND_ON_CTRL_ENTER: 'send_on_ctrl_enter',
ADVANCED_SYNC_DRAFTS: 'sync_drafts',
CATEGORY_WHATS_NEW_MODAL: 'whats_new_modal',
HAS_SEEN_SIDEBAR_WHATS_NEW_MODAL: 'has_seen_sidebar_whats_new_modal',
CATEGORY_PERFORMANCE_DEBUGGING: 'performance_debugging',
NAME_DISABLE_CLIENT_PLUGINS: 'disable_client_plugins',
NAME_DISABLE_TELEMETRY: 'disable_telemetry',
NAME_DISABLE_TYPING_MESSAGES: 'disable_typing_messages',
UNREAD_SCROLL_POSITION: 'unread_scroll_position',
UNREAD_SCROLL_POSITION_START_FROM_LEFT: 'start_from_left_off',
UNREAD_SCROLL_POSITION_START_FROM_NEWEST: 'start_from_newest',
CATEGORY_UPGRADE_CLOUD: 'upgrade_cloud',
SYSTEM_CONSOLE_LIMIT_REACHED: 'system_console_limit_reached',
NEW_CHANNEL_WITH_BOARD_TOUR_SHOWED: 'channel_with_board_tip_showed',
CATEGORY_ONBOARDING: 'category_onboarding',
CATEGORY_DRAFTS: 'drafts',
CATEGORY_REPORTING: 'reporting',
HIDE_BATCH_EXPORT_CONFIRM_MODAL: 'hide_batch_export_confirm_modal',
HIDE_MYSQL_STATS_NOTIFICATION: 'hide_mysql_stats_notifcation',
CATEGORY_OVERAGE_USERS_BANNER: 'overage_users_banner',
CATEGORY_THEME: 'theme',
THEMES: {
denim: {
type: 'Denim',
sidebarBg: '#1e325c',
sidebarText: '#ffffff',
sidebarUnreadText: '#ffffff',
sidebarTextHoverBg: '#28427b',
sidebarTextActiveBorder: '#5d89ea',
sidebarTextActiveColor: '#ffffff',
sidebarHeaderBg: '#192a4d',
sidebarHeaderTextColor: '#ffffff',
sidebarTeamBarBg: '#162545',
onlineIndicator: '#3db887',
awayIndicator: '#ffbc1f',
dndIndicator: '#d24b4e',
mentionBg: '#ffffff',
mentionBj: '#ffffff',
mentionColor: '#1e325c',
centerChannelBg: '#ffffff',
centerChannelColor: '#3f4350',
newMessageSeparator: '#cc8f00',
linkColor: '#386fe5',
buttonBg: '#1c58d9',
buttonColor: '#ffffff',
errorTextColor: '#d24b4e',
mentionHighlightBg: '#ffd470',
mentionHighlightLink: '#1b1d22',
codeTheme: 'github',
},
sapphire: {
type: 'Sapphire',
sidebarBg: '#1543a3',
sidebarText: '#ffffff',
sidebarUnreadText: '#ffffff',
sidebarTextHoverBg: '#2a58ba',
sidebarTextActiveBorder: '#57b5f0',
sidebarTextActiveColor: '#ffffff',
sidebarHeaderBg: '#123b91',
sidebarHeaderTextColor: '#ffffff',
sidebarTeamBarBg: '#123582',
onlineIndicator: '#3db887',
awayIndicator: '#ffbc1f',
dndIndicator: '#d24b4e',
mentionBg: '#ffffff',
mentionBj: '#ffffff',
mentionColor: '#174ab5',
centerChannelBg: '#ffffff',
centerChannelColor: '#3f4350',
newMessageSeparator: '#15b7b7',
linkColor: '#1c58d9',
buttonBg: '#1c58d9',
buttonColor: '#ffffff',
errorTextColor: '#d24b4e',
mentionHighlightBg: '#7ff0f0',
mentionHighlightLink: '#0d6e6e',
codeTheme: 'github',
},
quartz: {
type: 'Quartz',
sidebarBg: '#f4f4f6',
sidebarText: '#1f2228',
sidebarUnreadText: '#1f2228',
sidebarTextHoverBg: '#e8eaed',
sidebarTextActiveBorder: '#32a4ec',
sidebarTextActiveColor: '#1f2228',
sidebarHeaderBg: '#ebecef',
sidebarHeaderTextColor: '#1f2228',
sidebarTeamBarBg: '#e5e7eb',
onlineIndicator: '#3db887',
awayIndicator: '#f5ab07',
dndIndicator: '#d24b4e',
mentionBg: '#1c58d9',
mentionBj: '#1c58d9',
mentionColor: '#ffffff',
centerChannelBg: '#ffffff',
centerChannelColor: '#3f4350',
newMessageSeparator: '#15b7b7',
linkColor: '#1c58d9',
buttonBg: '#1c58d9',
buttonColor: '#ffffff',
errorTextColor: '#d24b4e',
mentionHighlightBg: '#7ff0f0',
mentionHighlightLink: '#0d6e6e',
codeTheme: 'github',
},
indigo: {
type: 'Indigo',
sidebarBg: '#151e32',
sidebarText: '#ffffff',
sidebarUnreadText: '#ffffff',
sidebarTextHoverBg: '#222c3f',
sidebarTextActiveBorder: '#4a7ce8',
sidebarTextActiveColor: '#ffffff',
sidebarHeaderBg: '#182339',
sidebarHeaderTextColor: '#ffffff',
sidebarTeamBarBg: '#1c2740',
onlineIndicator: '#3db887',
awayIndicator: '#f5ab00',
dndIndicator: '#d24b4e',
mentionBg: '#4a7ce8',
mentionBj: '#4a7ce8',
mentionColor: '#ffffff',
centerChannelBg: '#111827',
centerChannelColor: '#dddfe4',
newMessageSeparator: '#81a3ef',
linkColor: '#5d89ea',
buttonBg: '#4a7ce8',
buttonColor: '#ffffff',
errorTextColor: '#d24b4e',
mentionHighlightBg: '#133a91',
mentionHighlightLink: '#a4f4f4',
codeTheme: 'solarized-dark',
},
onyx: {
type: 'Onyx',
sidebarBg: '#202228',
sidebarText: '#ffffff',
sidebarUnreadText: '#ffffff',
sidebarTextHoverBg: '#25262a',
sidebarTextActiveBorder: '#4a7ce8',
sidebarTextActiveColor: '#ffffff',
sidebarHeaderBg: '#24272d',
sidebarHeaderTextColor: '#ffffff',
sidebarTeamBarBg: '#292c33',
onlineIndicator: '#3db887',
awayIndicator: '#f5ab00',
dndIndicator: '#d24b4e',
mentionBg: '#4b7ce7',
mentionBj: '#4b7ce7',
mentionColor: '#ffffff',
centerChannelBg: '#191b1f',
centerChannelColor: '#e3e4e8',
newMessageSeparator: '#1adbdb',
linkColor: '#5d89ea',
buttonBg: '#4a7ce8',
buttonColor: '#ffffff',
errorTextColor: '#da6c6e',
mentionHighlightBg: '#0d6e6e',
mentionHighlightLink: '#a4f4f4',
codeTheme: 'monokai',
},
},
RECENT_EMOJIS: 'recent_emojis',
};
exports.default = Preferences;