46 lines
1.5 KiB
TypeScript
46 lines
1.5 KiB
TypeScript
/**
|
|
* Common Constants
|
|
* Centralized configuration constants for the T4B Chat application
|
|
*/
|
|
|
|
// Domain Configuration
|
|
export const ALLOWED_DOMAIN = 'http://192.168.1.12:8069';
|
|
|
|
// FCM Configuration
|
|
export const FCM_REGISTER_ENDPOINT = '/fcm/register';
|
|
|
|
// Cookie Configuration
|
|
export const COOKIE_REFRESH_INTERVAL = 30000; // 30 seconds
|
|
export const INITIAL_COOKIE_DELAY = 10000; // 10 seconds
|
|
|
|
// Navigation Configuration
|
|
export const NAVIGATION_DELAYS = {
|
|
FOREGROUND: 100, // Minimal delay for foreground notifications
|
|
BACKGROUND: 200, // Minimal delay for background notifications
|
|
KILLED_APP: 100, // Minimal delay for killed app notifications
|
|
TWO_STEP_NAVIGATION: 300, // Delay between two-step navigation
|
|
NAVIGATION_RESET: 500, // Delay before resetting navigation state
|
|
KILLED_APP_RESET: 800, // Delay before resetting killed app navigation state
|
|
} as const;
|
|
|
|
// URL Patterns
|
|
export const URL_PATTERNS = {
|
|
MAIL_APP: '#action=106&cids=1&menu_id=73',
|
|
CHAT_CHANNEL: (channelId: string) => `&active_id=mail.channel_${channelId}`,
|
|
} as const;
|
|
|
|
// Deep Link Configuration
|
|
export const DEEP_LINK_PREFIX = 'myapp://chat/';
|
|
|
|
// Platform Configuration
|
|
export const PLATFORM_CONFIG = {
|
|
ANDROID_MIN_VERSION_FOR_PERMISSIONS: 33, // Android 13+
|
|
} as const;
|
|
|
|
// Notification Configuration
|
|
export const NOTIFICATION_CONFIG = {
|
|
CHANNEL_ID: 't4b_chat_channel',
|
|
CHANNEL_NAME: 'T4B Chat Notifications',
|
|
CHANNEL_DESCRIPTION: 'Notifications for T4B Chat messages',
|
|
} as const;
|