crosspoint-reader/src/BadgeConfig.h
cottongin 1496ce68a6
feat: Recents view improvements with badges, removal, and clearing
- Add pill badge system for displaying file type and suffix tags
- Add "Remove from Recents" option to remove individual books
- Add "Clear All Recents" option to clear entire recents list
- Add clearThumbExistsCache() for cache invalidation
- Create BadgeConfig.h for customizable badge mappings
- Add extractBookTags() utility for parsing filename badges
- Add drawPillBadge() component for rendering badges
2026-01-27 20:33:27 -05:00

28 lines
962 B
C

#pragma once
// ============================================================
// BADGE CONFIGURATION
// Edit these arrays to customize which file extensions and
// filename suffixes display badges in the Recents/Lists views.
// ============================================================
// Extension mappings: {".ext", "BADGE_TEXT"}
// The extension match is case-insensitive
static const char* EXTENSION_BADGES[][2] = {
{".epub", "epub"},
{".txt", "txt"},
{".md", "md"},
// Add more: {".xtc", "xtc"},
};
// Suffix mappings: {"-suffix", "BADGE_TEXT"}
// Matched at end of filename (before extension), case-insensitive
static const char* SUFFIX_BADGES[][2] = {
{"-x4", "X4"},
{"-x4p", "X4+"},
{"-og", "OG"},
// Add more: {"-kindle", "K"},
};
static const int EXTENSION_BADGE_COUNT = sizeof(EXTENSION_BADGES) / sizeof(EXTENSION_BADGES[0]);
static const int SUFFIX_BADGE_COUNT = sizeof(SUFFIX_BADGES) / sizeof(SUFFIX_BADGES[0]);