font size setting
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user