Add comprehensive annotations feature to bookmark detail views: - Implement annotations list view with date formatting and state machine - Add CSS-based highlighting for rd-annotation tags in WebView components - Support Readeck color scheme (yellow, green, blue, red) for annotations - Enable tap-to-scroll functionality to navigate to selected annotations - Integrate annotations button in bookmark detail toolbar - Add API endpoint and repository layer for fetching annotations
20 lines
408 B
Swift
20 lines
408 B
Swift
import Foundation
|
|
|
|
struct Annotation: Identifiable, Hashable {
|
|
let id: String
|
|
let text: String
|
|
let created: String
|
|
let startOffset: Int
|
|
let endOffset: Int
|
|
let startSelector: String
|
|
let endSelector: String
|
|
|
|
func hash(into hasher: inout Hasher) {
|
|
hasher.combine(id)
|
|
}
|
|
|
|
static func == (lhs: Annotation, rhs: Annotation) -> Bool {
|
|
lhs.id == rhs.id
|
|
}
|
|
}
|