Add ⌘F find in transcripts and a TODO filter on the project page
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user