font size setting

This commit is contained in:
Ian Gulliver
2026-10-20 19:32:27 -07:00
parent f2188c53eb
commit adb9424e66
9 changed files with 95 additions and 4 deletions
+14 -1
View File
@@ -38,8 +38,21 @@ final class VisitRecord {
}
}
@Model
final class PrefsRecord {
static let defaultFontSize = 12
var fontSize = PrefsRecord.defaultFontSize
var saved = Date.distantPast
init(fontSize: Int) {
self.fontSize = fontSize
saved = Date()
}
}
private let container: ModelContainer = {
let schema = Schema([ServerRecord.self, DraftRecord.self, VisitRecord.self])
let schema = Schema([ServerRecord.self, DraftRecord.self, VisitRecord.self, PrefsRecord.self])
let dir = URL.applicationSupportDirectory.appending(path: "run.fc.byre.mac", directoryHint: .isDirectory)
do {
try FileManager.default.createDirectory(at: dir, withIntermediateDirectories: true)