Critique-directed polish of the reading surface (#72 ruling: pipeline calm, surface not-calm) plus the single-user typography rework: - Flow: leading 1.5, paragraph gap tightened; heading ladder rescaled (h1 1.15x / h2 0.85x / h3 body-face semibold) with cling margins, hN+hN suppression, no title dead space - Constructs: confident blockquote (near-ink text, 3px rail, nesting degrades), booktabs tables, tinted code panels, relative inline code - Fonts hardcoded for Alexander's faces: Valkyrie OT B 17 body, Concourse OT Semibold headings, UbuntuMono 14 code; 66ch measure - Stylesheet moved to Museion/Resources/reading.css, read fresh per page build — Debug builds load the repo copy (#filePath), so CSS edits hot-reload on the next reading toggle - Settings Typography/Text Flow sections and all flow-key plumbing deleted (56 insertions, 417 deletions) Refs #72, #78. Detector: 192 findings -> 0. Build + 93 tests green. [Generated by AI]
63 lines
1.6 KiB
Swift
63 lines
1.6 KiB
Swift
//
|
|
// SettingsPaneView.swift
|
|
// Museion
|
|
//
|
|
// #17 (S1.1): Settings — the Museion Home path, repoint-only (ADR-0004).
|
|
// #72 rework: the Typography + Text Flow sections are gone — single-user
|
|
// app, prose typography is hardcoded (editing: ProseTypography constants;
|
|
// reading: Museion/Resources/reading.css, editable while the app runs).
|
|
//
|
|
|
|
import AppKit
|
|
import SwiftUI
|
|
|
|
/// Settings pane. Home control per #17.
|
|
struct SettingsPaneView: View {
|
|
@Binding var home: URL
|
|
|
|
var body: some View {
|
|
ScrollView {
|
|
VStack(alignment: .leading, spacing: 24) {
|
|
contentSection
|
|
}
|
|
.padding(24)
|
|
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
|
|
}
|
|
.background(DesignTokens.background)
|
|
}
|
|
|
|
// MARK: Home (#17)
|
|
|
|
private var contentSection: some View {
|
|
VStack(alignment: .leading, spacing: 12) {
|
|
Text("Content")
|
|
.font(.system(size: 13, weight: .semibold))
|
|
HStack(spacing: 8) {
|
|
Text(home.path(percentEncoded: false))
|
|
.font(.system(size: 12, design: DesignTokens.mono))
|
|
.lineLimit(1)
|
|
.truncationMode(.middle)
|
|
.textSelection(.enabled)
|
|
Spacer(minLength: 12)
|
|
Button("Choose…") { chooseHome() }
|
|
}
|
|
Text(
|
|
"Repoint-only: Museion never moves content. The Posts list reads this folder's posts/ directory.",
|
|
)
|
|
.font(.callout)
|
|
.foregroundStyle(DesignTokens.muted)
|
|
}
|
|
}
|
|
|
|
private func chooseHome() {
|
|
let panel = NSOpenPanel()
|
|
panel.canChooseDirectories = true
|
|
panel.canChooseFiles = false
|
|
panel.canCreateDirectories = true
|
|
panel.message = "Choose the folder holding your posts. Museion never moves content."
|
|
if panel.runModal() == .OK, let url = panel.url {
|
|
home = url
|
|
}
|
|
}
|
|
}
|