Alle UI-Strings der Feature-/App-Schicht ziehen aus mana/i18n (Listen/Detail/Marker/Feed/Rückblick/Zusammenfassen/Settings/Account + Archiv/Bulk/Note-Sheet/Palette); Interpolation als generierte Funktionen. Verwaisten-Check grün (0 hartkodierte UI-Strings). Onboarding bleibt seine eigene SOT (mana/content/onboarding). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
56 lines
1.5 KiB
Swift
56 lines
1.5 KiB
Swift
import SwiftUI
|
|
|
|
/// Schwebende Auswahl-Leiste (Books-/Kindle-Stil): erscheint direkt an
|
|
/// der Text-Auswahl, statt als Bottom-Sheet vom unteren Bildschirmrand.
|
|
///
|
|
/// Ein Tipp auf eine Farbe markiert sofort — kein Zwischenschritt. Das
|
|
/// System-Edit-Menü wird in `ArticleBodyTextView` unterdrückt, daher
|
|
/// trägt diese Leiste auch das „Kopieren" mit, damit es nicht verloren
|
|
/// geht (vier Farb-Punkte + Trenner + Kopieren).
|
|
struct HighlightSelectionPalette: View {
|
|
let onPick: (HighlightColor) -> Void
|
|
let onCopy: () -> Void
|
|
|
|
var body: some View {
|
|
HStack(spacing: 10) {
|
|
ForEach(HighlightColor.allCases) { color in
|
|
Button {
|
|
onPick(color)
|
|
} label: {
|
|
Circle()
|
|
.fill(color.swiftUIColor)
|
|
.frame(width: 28, height: 28)
|
|
.overlay(
|
|
Circle().stroke(Color.primary.opacity(0.18), lineWidth: 1)
|
|
)
|
|
}
|
|
.buttonStyle(.plain)
|
|
.accessibilityLabel(PagetaStrings.markerMark(color.label))
|
|
}
|
|
|
|
Divider().frame(height: 22)
|
|
|
|
Button {
|
|
onCopy()
|
|
} label: {
|
|
Image(systemName: "doc.on.doc")
|
|
.font(.system(size: 15, weight: .medium))
|
|
.foregroundStyle(PagetaTheme.foreground)
|
|
.frame(width: 28, height: 28)
|
|
}
|
|
.buttonStyle(.plain)
|
|
.accessibilityLabel(PagetaStrings.actionCopy)
|
|
}
|
|
.padding(.horizontal, 12)
|
|
.padding(.vertical, 8)
|
|
.background {
|
|
Capsule(style: .continuous)
|
|
.fill(.regularMaterial)
|
|
.shadow(color: .black.opacity(0.18), radius: 8, y: 3)
|
|
}
|
|
.overlay {
|
|
Capsule(style: .continuous)
|
|
.strokeBorder(Color.primary.opacity(0.08), lineWidth: 0.5)
|
|
}
|
|
}
|
|
}
|