@@ -70,19 +70,24 @@ struct CorrectionSheet: View {
7070 HStack ( alignment : . firstTextBaseline ) {
7171 Mono ( status ( match , number : number ) , size : 10.5 , color : statusColor ( match , number : number ) )
7272 Spacer ( minLength : 8 )
73- // A few works cars have a code painted on instead of a number.
74- if ! offersCode || codeMode {
75- Button ( action : toggleCode ) {
76- Mono ( codeMode ? String ( localized : " A NUMBER " ) : String ( localized : " A CODE, LIKE S-9? " ) ,
77- size : 10.5 , weight : 600 , color : Palette . yellow )
78- }
79- . buttonStyle ( . plain )
73+ // A few works cars have a code painted on instead of a number. Nothing read
74+ // is all the camera gets off one, so then it asks in the works colour.
75+ Button ( action : toggleCode ) {
76+ Mono ( codeMode ? String ( localized : " A NUMBER " )
77+ : offersCode ? String ( localized : " A WORKS TRAM? " ) : String ( localized : " A CODE, LIKE S-9? " ) ,
78+ size : 10.5 , weight : 600 , color : offersCode && ! codeMode ? Tier . works . color : Palette . yellow )
8079 }
80+ . buttonStyle ( . plain )
8181 }
8282 . padding ( . top , 8 )
8383
84- if offersCode , ! codeMode {
85- codeBanner . padding ( . top , 16 )
84+ // Said once it's asked for, not up front: a box saying it took half the sheet (#73).
85+ if codeMode {
86+ Text ( " A few works trams carry a code like S-9 instead of a number. " )
87+ . font ( TaborFont . grotesk ( 12.5 ) )
88+ . foregroundStyle ( Palette . sub )
89+ . fixedSize ( horizontal : false , vertical : true )
90+ . padding ( . top , 8 )
8691 }
8792
8893 // Missed the number? What was running right there when you shot (#41).
@@ -347,33 +352,9 @@ struct CorrectionSheet: View {
347352 }
348353
349354 /// Nothing was read, which is all the camera gets off a works car with a code painted on
350- /// instead of a number (S-9, P1): say so up front . They're all trams, so not in BUS mode.
355+ /// instead of a number (S-9, P1). They're all trams, so not in BUS mode.
351356 private var offersCode : Bool { draft . number == nil && draft . mode != . bus }
352357
353- private var codeBanner : some View {
354- let tint = Tier . works . color
355- return VStack ( alignment : . leading , spacing : 8 ) {
356- Mono ( String ( localized : " A WORKS TRAM? " ) , size : 11 , weight : 600 , spacing : 0.14 , color : tint )
357- Text ( " A few of them carry a code like S-9 instead of a number. " )
358- . font ( TaborFont . grotesk ( 13 ) )
359- . foregroundStyle ( Palette . ink . opacity ( 0.85 ) )
360- . fixedSize ( horizontal : false , vertical : true )
361- Button ( action : toggleCode ) {
362- Mono ( String ( localized : " TYPE THE CODE " ) , size : 11 , weight : 700 , spacing : 0.1 , color : Palette . bg )
363- . padding ( . vertical , 8 )
364- . padding ( . horizontal , 14 )
365- . background ( tint , in : Capsule ( ) )
366- }
367- . buttonStyle ( . plain )
368- . padding ( . top , 2 )
369- }
370- . frame ( maxWidth : . infinity , alignment : . leading )
371- . padding ( . vertical , 13 )
372- . padding ( . horizontal , 15 )
373- . background ( tint . opacity ( 0.08 ) , in : RoundedRectangle ( cornerRadius : 14 , style : . continuous ) )
374- . overlay ( RoundedRectangle ( cornerRadius : 14 , style : . continuous ) . stroke ( tint . opacity ( 0.28 ) ) )
375- }
376-
377358 private func toggleCode ( ) {
378359 Haptics . shared . tick ( )
379360 codeMode . toggle ( )
0 commit comments