feat(annotator): support quick actions for text selection, closes #2505 (#2813)

This commit is contained in:
Huang Xin
2025-12-30 10:32:01 +01:00
committed by GitHub
parent 58a5c1625c
commit a42897ec5c
47 changed files with 1036 additions and 122 deletions
@@ -0,0 +1,10 @@
import { HIGHLIGHT_COLOR_HEX } from '@/services/constants';
import { HighlightColor } from '@/types/book';
import { SystemSettings } from '@/types/settings';
export const getHighlightColorHex = (settings: SystemSettings, color?: HighlightColor) => {
if (!color) return color;
const customColors = settings.globalReadSettings.customHighlightColors;
return customColors?.[color] ?? HIGHLIGHT_COLOR_HEX[color];
};