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
18 lines
496 B
Swift
18 lines
496 B
Swift
import Foundation
|
|
|
|
protocol PGetBookmarkAnnotationsUseCase {
|
|
func execute(bookmarkId: String) async throws -> [Annotation]
|
|
}
|
|
|
|
class GetBookmarkAnnotationsUseCase: PGetBookmarkAnnotationsUseCase {
|
|
private let repository: PAnnotationsRepository
|
|
|
|
init(repository: PAnnotationsRepository) {
|
|
self.repository = repository
|
|
}
|
|
|
|
func execute(bookmarkId: String) async throws -> [Annotation] {
|
|
return try await repository.fetchAnnotations(bookmarkId: bookmarkId)
|
|
}
|
|
}
|