// // 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 } } }