Add ⌘F find in transcripts and a TODO filter on the project page

This commit is contained in:
Ian Gulliver
2026-10-23 09:50:35 -07:00
parent fe86916ce6
commit fd0529b949
11 changed files with 434 additions and 34 deletions
+3 -2
View File
@@ -233,11 +233,12 @@ struct PreBox: View {
let text: String
var maxHeight: CGFloat? = 320
var size: CGFloat = 12
@Environment(\.findQuery) private var query
var body: some View {
Copyable(text: text) {
ScrollView {
Text(verbatim: text)
Text(highlighted(text, query))
.font(Fonts.font(size, mono: true))
.textSelection(.enabled)
.frame(maxWidth: .infinity, alignment: .leading)
@@ -245,7 +246,7 @@ struct PreBox: View {
.padding(.vertical, 6)
}
.scrollBounceBehavior(.basedOnSize)
.frame(maxHeight: maxHeight)
.frame(maxHeight: matches(text, query) ? nil : maxHeight)
.fixedSize(horizontal: false, vertical: true)
.background(Palette.raised, in: RoundedRectangle(cornerRadius: 6))
.overlay(RoundedRectangle(cornerRadius: 6).stroke(Palette.border))