- Connect SettingsView font selection to WebView CSS rendering - Add dynamic font size and family mapping in WebView - Implement CSS custom properties for responsive font scaling - Add font family fallback stacks for cross-platform compatibility - Update WebView to use Settings object for typography configuration
37 lines
988 B
Swift
37 lines
988 B
Swift
import Foundation
|
|
|
|
class SaveSettingsUseCase {
|
|
private let settingsRepository: PSettingsRepository
|
|
|
|
init(settingsRepository: PSettingsRepository) {
|
|
self.settingsRepository = settingsRepository
|
|
}
|
|
|
|
func execute(endpoint: String, username: String, password: String) async throws {
|
|
try await settingsRepository.saveSettings(
|
|
.init(
|
|
endpoint: endpoint,
|
|
username: username,
|
|
password: password
|
|
)
|
|
)
|
|
}
|
|
|
|
func execute(token: String) async throws {
|
|
try await settingsRepository.saveSettings(
|
|
.init(
|
|
token: token
|
|
)
|
|
)
|
|
}
|
|
|
|
func execute(selectedFontFamily: FontFamily, selectedFontSize: FontSize) async throws {
|
|
try await settingsRepository.saveSettings(
|
|
.init(
|
|
fontFamily: selectedFontFamily,
|
|
fontSize: selectedFontSize
|
|
)
|
|
)
|
|
}
|
|
}
|