- Add annotation creation to API and repository layer (AnnotationsRepository) - Add DtoMapper for AnnotationDto to domain model conversion - Extend PAnnotationsRepository protocol with createAnnotation method - Add cache management to SettingsRepository (getCacheSize, getMaxCacheSize, updateMaxCacheSize, clearCache) - Extend PSettingsRepository protocol with cache settings methods - Use localized Highlight label in annotation overlay JavaScript for WebView and NativeWebView - Improve API error handling with detailed logging for HTTP errors and response data - Add LocalizedError extension for APIError with human-readable descriptions - Update localization strings for German and English (Highlight, Synchronization, VPN warning) - Update RELEASE_NOTES.md with version 2.0.0 offline reading feature details
36 lines
1.3 KiB
Swift
36 lines
1.3 KiB
Swift
//
|
|
// PSettingsRepository.swift
|
|
// readeck
|
|
//
|
|
// Created by Claude on 08.11.25.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
protocol PSettingsRepository {
|
|
// Existing Settings methods
|
|
func saveSettings(_ settings: Settings) async throws
|
|
func loadSettings() async throws -> Settings?
|
|
func clearSettings() async throws
|
|
func saveToken(_ token: String) async throws
|
|
func saveUsername(_ username: String) async throws
|
|
func savePassword(_ password: String) async throws
|
|
func saveHasFinishedSetup(_ hasFinishedSetup: Bool) async throws
|
|
func saveServerSettings(endpoint: String, username: String, password: String, token: String) async throws
|
|
func saveCardLayoutStyle(_ cardLayoutStyle: CardLayoutStyle) async throws
|
|
func loadCardLayoutStyle() async throws -> CardLayoutStyle
|
|
func saveTagSortOrder(_ tagSortOrder: TagSortOrder) async throws
|
|
func loadTagSortOrder() async throws -> TagSortOrder
|
|
var hasFinishedSetup: Bool { get }
|
|
|
|
// Offline Settings methods
|
|
func loadOfflineSettings() async throws -> OfflineSettings
|
|
func saveOfflineSettings(_ settings: OfflineSettings) async throws
|
|
|
|
// Cache Settings methods
|
|
func getCacheSize() async throws -> UInt
|
|
func getMaxCacheSize() async throws -> UInt
|
|
func updateMaxCacheSize(_ sizeInBytes: UInt) async throws
|
|
func clearCache() async throws
|
|
}
|