feat: implement Phase 1 Bible reader improvements (2025 standards)
## Typography Enhancements - Add letter spacing control (0-2px, default 0.5px for WCAG compliance) - Add word spacing control (0-4px, default 0px) - Add paragraph spacing control (1.0-2.5x line height, default 1.8x) - Add max line length control (50-100ch, default 75ch for optimal readability) - Apply WCAG 2.1 SC 1.4.12 text spacing recommendations ## Multi-Color Highlighting System - Implement 7-color highlight palette (yellow, green, blue, purple, orange, pink, red) - Theme-aware highlight colors (light/dark/sepia modes) - Persistent visual highlights with database storage - Color picker UI with current highlight indicator - Support for highlight notes and tags (infrastructure ready) - Bulk highlight loading for performance - Add/update/remove highlight functionality ## Database Schema - Add Highlight model with verse relationship - Support for color, note, tags, and timestamps - Unique constraint per user-verse pair - Proper indexing for performance ## API Routes - POST /api/highlights - Create new highlight - GET /api/highlights - Get all user highlights - POST /api/highlights/bulk - Bulk fetch highlights for verses - PUT /api/highlights/[id] - Update highlight color/note/tags - DELETE /api/highlights/[id] - Remove highlight ## UI Improvements - Enhanced settings dialog with new typography controls - Highlight color picker menu - Verse menu updated with highlight option - Visual feedback for highlighted verses - Remove highlight button in color picker Note: Database migration pending - run `npx prisma db push` to apply schema 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,7 @@ model User {
|
||||
sessions Session[]
|
||||
bookmarks Bookmark[]
|
||||
chapterBookmarks ChapterBookmark[]
|
||||
highlights Highlight[]
|
||||
notes Note[]
|
||||
chatMessages ChatMessage[]
|
||||
chatConversations ChatConversation[]
|
||||
@@ -116,6 +117,7 @@ model BibleVerse {
|
||||
chapter BibleChapter @relation(fields: [chapterId], references: [id])
|
||||
bookmarks Bookmark[]
|
||||
notes Note[]
|
||||
highlights Highlight[]
|
||||
|
||||
@@unique([chapterId, verseNum])
|
||||
@@index([chapterId])
|
||||
@@ -210,6 +212,24 @@ model ChapterBookmark {
|
||||
@@index([userId])
|
||||
}
|
||||
|
||||
model Highlight {
|
||||
id String @id @default(uuid())
|
||||
userId String
|
||||
verseId String
|
||||
color String // yellow, green, blue, purple, orange, pink, red
|
||||
note String? @db.Text
|
||||
tags String[] @default([])
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
verse BibleVerse @relation(fields: [verseId], references: [id])
|
||||
|
||||
@@unique([userId, verseId])
|
||||
@@index([userId])
|
||||
@@index([verseId])
|
||||
}
|
||||
|
||||
model Note {
|
||||
id String @id @default(uuid())
|
||||
userId String
|
||||
|
||||
Reference in New Issue
Block a user