Logo
Explore Help
Register Sign In
carrot_bbs/frontend
3
0
Fork 0
You've already forked frontend
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
accf7c04e8ee87001df23d36f430f2003ca4daf7
frontend/src/database/core/DatabaseConfig.ts

14 lines
412 B
TypeScript
Raw Normal View History

refactor(database): migrate to new modular database layer and unify data access - Remove legacy database.ts, LocalDataSource.ts, and MessageRepository.ts - Create new src/database/ module with messageRepository, userCacheRepository, conversationRepository, and groupCacheRepository - Update all consumers to import from @/database instead of services/database - Add web platform blur handling for modal components to fix focus issues - Flatten SystemMessageItem and NotificationsScreen styles for consistent design - Add draggable slider in ChatSettingsScreen and dynamic font size support - Introduce 9 new chat color themes - Add profile screens for about, terms, and privacy policy with navigation routes - Add policy links to login and registration screens - Fix post share URL format from /posts/ to /post/
2026-04-04 08:01:45 +08:00
export const DB_CONFIG = {
MAX_RETRIES: 4,
WEB_RETRY_DELAY_BASE: 500,
NATIVE_RETRY_DELAY: 100,
WEB_CLOSE_DELAY: 300,
WEB_FINAL_CLOSE_DELAY: 200,
LOCK_PREFIX: 'db-',
DEFAULT_DB_NAME: 'carrot_bbs.db',
DB_NAME_PREFIX: 'carrot_bbs_',
} as const;
export const getDbName = (userId: string | null): string => {
return userId ? `${DB_CONFIG.DB_NAME_PREFIX}${userId}.db` : DB_CONFIG.DEFAULT_DB_NAME;
};
Reference in New Issue Copy Permalink
Powered by Gitea Version: 25.6.2 Page: 179ms Template: 14ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API